How combat works (r29):
So, I thought I'd write a lil summary about how combat works in r29. This is assuming you already know a fair bit about combat so I'm not gonna explain well known basic parts, and instead I'm focussing on more interesting aspects, some of which you would already know about, some which you might think "hmm didn't know that!"
Anyway, t'is easiest to describe using a real combat and a bcalc simulating it (lch gives a much better details section than thruds):
http://bcalc.lch-hq.org/index.php?id...71141228809182
http://game.planetarion.com/show_news.pl?id=5344
EMPING (inits 1-3)
In this battle, it works exactly as you would expect from the manual. One interesting point though is the widows firing in init1. Although there is (if you worked out total emp resistance of the targetted ships) more than enough ships for the widows to be fully used in their t1, there are some left over to fire t2. This might not make much sense if you're thinking about this for the first time, but its a direct consequence of the formula:
EMPed Ships = total EMP shots on class X * number of ships of X/total number of ships in class of ship X) * ( 100- ship X emp resistance)/100
As lch shows, this effectively splits the widows up into groups which can fire at each target, and if there's too many in one group to freeze a particular ship, the remainder fire in t2 instead. That said, I found it easier to code it differently to how lch has seemingly done it.
Nothing else of interest here - so I'll point out something else about emp (mentioned previously in the thread, many times probably). Say for example you had this combat (sadly the pa beta link no longer works, so you'll have to take my word for this):
http://bcalc.thrud.co.uk/index.php?loadfile=game80625a0
http://bcalc.lch-hq.org/index.php?id...15671226843463
In LCH's the scarabs re-freeze the previously frozen spectres (lch bcalc does this for all similar emping scenarios) whereas thruds does not. Needless to say, thruds is correct. Although it isn't clear in the manual, after each t1/t2/t3, you update hte available ships to kill/freeze and to use. That said, while thruds calcs this properly, its results aren't accurate due to an inbuilt randomness in emping (not mentioned anywhere in the combat code). This can effect emping by up 10-20%, decreasing as the number of ships involved increases. It would be nice if someone could clarify this with some formulas or examples, or something?
Finally, also since this doesn't become an issue during this battle, I'll mention it here as well. For example:
http://bcalc.lch-hq.org/index.php?id...44041227539052
Clearly this is wrong and both the clippers and banshees should target the mirages in t1. Or do they? And if so, how do they? This is so far an unresolved problem. It does partly arise in the battle in init5 where lch says:
Defender(s): 18576 Pegasus available to shoot
• 16040 pegasus (91.9k) FIRE AT: 4751 beetle RESULT: 4751 beetle (11.8k) killed (11289 pegasus unused)
• 2532 pegasus (14.5k) FIRE AT: 750 mosquito RESULT: 750 mosquito (2.3k) killed (1656 pegasus unused)
The pegasus do the killing? What about the available clippers? My bcalc gives:
5|t2: 2704/17578 defpegasus kill 2704/4751 attbeetle
5|t2: 1636/10639 defclipper kill 2046/4751 attbeetle
5|t2: 497/17578 defpegasus kill 426/750 attmosquito
5|t2: 301/10639 defclipper kill 323/750 attmosquito
Sadly, since clippers/ pegs aren't used afterwards in this battle, its impossible to know what actually happens.
KILLING (inits 4-10)
The first issue I had here can be seen in init5 with the wyverns firing. As LCH says:
• 35655 wyvern (513.4k) FIRE AT: 1009510 spectre RESULT: 76659 spectre (363.4k) killed ()
Where 1009510 spectres is the original number of spectres involved in the battle ... but previously in init2 we had:
• 100359 scarab (726.6k) FIRE AT: 1009510 spectre RESULT: 126456 spectre (599.4k) emped ()
So despite some spectres having already been frozen, the wyverns still fire at them - even though they can't/won't kill them unless all the non-emped ships are killed first. This is bizarre in my head, and obviously is what happens comparing to the real combat.
So ie, when you're working out "total number of ships in class of ship X", you include the previously emped ships in class X ..... even though they aren't actually fired at... unless the others die. Hmmmmmm. Arrrrg.
Finally, at the end there with the spectres, you see again that some spectres end up shooting t2 even though you'd think they should all fire t1 (note: I'm not saying this is a bug or anything, it happens exactly the way it should do due to the formulae).
STEALING (inits 20-21)
A few things to note here. As lch says:
• 167497 marauder (1822.4k) FIRE AT: 931623 spectre RESULT: 266329 spectre (1262.4k) stolen ()
Attackers: 116029 Marauder died for stealing
So 167k marauders are needed to steal the spectres, but only 116k of them die - equal to the value of spectres stolen. Not what I would expect based on the manual:
Quote:
Originally Posted by teh manual
Steal ships die when they steal other ships, losing as much as possible in value as they steal.
|
This to me implies that all 167k marauders should die... it should really be changed to: "Steal ships die when they steal other ships. The number lost is such that the value lost is equal to the value gained in stolen ships. If there are not enough stealing ships present (including any that may have been previously emped) to satisfy this equality, as many as possible are lost." or something better worded.
I must admit, when I think about combat I try to imagine real ships firing - and this, as well as other parts of the combat code, leave my head confused. As you may have noticed, I added "(including those previously emped)" to my manual-suggestion. This is because - although they are no longer active in combat - they can still "be used" to steal ships. ???? Anyway, this is shown in init21:
Defender(s): 20266 Buccaneer available to shoot
This means there are 20266 buccaneers still active in combat - and they all fire. Below you see a list of buccs which actually die, if you add them up - you get more than 20266 - ie some of the previously emped buccs are used to steal. Even though they're emped. Arrrg.
Finally, I've saved possibly my biggest unhappy issue with the combat code for last. In all other areas of combat, t1/t2/t3 are effectively different inits (except coming with a factor 1,0.6,0.3). So ie something happens in t1, and the 'results' are saved before t2 occurs and so forth (good luck finding an indication of that in the manual). But not in stealing.
This really confuses me.
Lets take init20 and tha marauders. t1 you have the following:
Attacker(s): 286080 Marauder available to shoot
• 57445 marauder (625k) FIRE AT: 18625 shadow RESULT: 18625 shadow (68.7k) stolen (52533 marauder unused)
• 209754 marauder (2282.1k) FIRE AT: 68000 cutter RESULT: 68000 cutter (310.8k) stolen (187951 marauder unused)
• 5750 marauder (62.6k) FIRE AT: 1866 spirit RESULT: 1866 spirit (6.2k) stolen (5298 marauder unused)
• 13102 marauder (142.5k) FIRE AT: 4249 mirage RESULT: 4249 mirage (16.2k) stolen (12064 marauder unused)
That means ... (57445-52533) + (209754-187951)+(5750-5298)+(13102-12064) = 28205 marauders were used. However, to equal out the values - as shown below on lch, in reality you have (6316+28562+565+1487) = 36930 marauders dying to cap the ships they steal in t1. So surely, that means there are 286080-36930 = 249150 marauders available to fire t2??? No, instead you have 286080-28205 = 257846.
Again, I don't understand how this can happen... but it does. I think theres a lot of confusion around in how inits and t1/t2/t3 work ... and I thought I'd jsut about understood it ... and now I don't.