ericbabe
Posts: 11927
Joined: 3/23/2005 Status: offline

Engineers in a fort have a chance to repair it during each siege round. Base chance is 30%. For encircle this is reduced to 0%. For subterfuge, 15%. If successful, they repair 5%. Units besieging with engineers have a better chance to damage the walls than normal. Base chances are: fortI, 20%; fort2, 10%; fort3, 0%. Modified by type of siege: encircle, x0 entrench, half; bombard and not artillery, 0; subterfuge, 0. This is, of course, modified by the relative artillery/engineer ratings according to: progressChance += (engineerLevel4)*5% + (artilleryLevel4)*5%, modified x.25 up or down for besieger/defender Siege Technique upgrades. Modified by x.75 if the defender has breastworks. If the base chance is reduced below 15%, then the minimum is set to 15% and the damage set to only 1% damage. The amount of damage an engineer does in this case is based on a multiplier value. This defaults to 1, but is set to 2 in the case of critical hits, which can happen if both the artillery and engineer rating are strictly greater than four, the fort does not have the bombproof special, and a 10% chance check is made. If the attacker has the Incendiary Shell upgrade, the multiplier on a critical hit is 4, not 2. For engineers in an infantry brigade, the multiplier is multiplied by 1% to give the damage done to the fort. The biggest effect of engineers on sieges comes from the calculation of the engineering ratio. Forts have an automatic base of 2 engineers. Here's the code that calculates the engineering advantage in a siege: int TGame::PH3_Acw_Calc_Engineer_Level(PIECE_HANDLE hSiege) { // levels are in the range of "ratings", from 0 to 9 (see RatingStrings[]) int att = PH3_Acw_CalcSiege_Engineer(hSiege); int def = PH3_Acw_CalcDefender_Engineer(hSiege); if (def>4*att) return 0; if (def>3*att) return 1; if (def>2*att) return 2; if (def> att) return 3; if (att>4*def) return 8; if (att>3*def) return 7; if (att>2*def) return 6; if (att> def) return 5; return 4; } As previously mentioned, this modifies the base chance of progress for *every* unit in the siege, not just engineers, as per progressChance += (engineerLevel4)*5 + (artilleryLevel4)*5;, where engineerLevel = PH3_Acw_Calc_Engineer_Level(PIECE_HANDLE hSiege). Hope that helps.
_____________________________
