PDA

View Full Version : How To: Setting Squad Reinforce Costs and Times



Lethal Dosage
17th Oct 10, 4:22 AM
This tutorial focus’ purely on correctly calculating the reinforce time of a squad, in particular I’ll focus on crewed weapons like AT guns. WARNING! A fair amount of math is involved.

The squad reinforce costs and times are calculated as percentages by a figure with a decimal place (example, 0.256). These are calculated only off the first entity listed in the squad_loadout_ext, and always off one entity. If there are multiple of the first entity listed (such as in most infantry squads), it'll still only be calculated off one of them. In crewed weapons such as AT guns, the gun is usually listed first. If your not sure, check the squad_loadout_ext.

So if a Pak38 is listed first in it's squad, and the entity costs 100mp and takes 30 seconds to build, and it's reinforce cost is 0.5 and time is 0.25, then each man to be reinforced in that squad will cost 50mp and take 7.5 seconds to build.

When an infantry squad captures an abandoned gun, the infantry entities become part of a new squad including the abandoned weapon referred to as a weapon_capture_squad. Now while the original squad has it’s own squad_reinforce_ext with tables listing the percentage cost and time, the weapon_capture_squads have their own and don’t use the squad_reinforce_ext of the original squad. Where Relic did something strange is, while the actual crewed weapons (such as AT guns) are listed first in their squad_loadout_ext first, in the weapon_capture_squads the unspecified crew (the Type line is left blank) is listed first, and the gun is listed second. This means that when a gun is re-crewed, it's the cost and time of the infantry entities that captured it (from the capturing squad).

So for example a Pak 38 is captured by some Riflemen (they cost 45mp and 6 seconds each), the weapon_capture_squad for that Pak38 with its own squad_reinforce_ext says that the cost_percentage = 0.5 (50%) and the time_percentage = 1 (100%). If that captured Pak38 lost a crewmember, to replace him it’d cost 22mp and take 6 seconds.

One thing to remember is that with costs CoH always rounds down, so if something should cost 22.5mp, then ingame it’ll actually cost 22mp.

If you want more uniform costs and times to reinforce captured weapons, what you can do is open up the weapon_capture_squads, go into the squad_loadout_ext, and swap the gun and the blank listing for the crew (normally unit_02 and unit_01 respectively) around so that the gun is listed first and the blank listing (with the Max and Num numbers set to 3 (for the number of entities, all crewed weapons in CoH have a crew of 3 by default) listed second. With this done, captured weapons will use the percentage cost and time of the gun’s entity to reinforce it, regardless of what squad captures it. If you do this, just remember to also adjust the cost_percentage and time_percentage in the squad_reinforce_ext of the weapon_capture_squads otherwise you’ll be surprised with a rather odd cost when you reinforce that captured gun.

On a final related note, the actual production time and cost of any squad is the sum of the costs and times of all the entities in the squad. If you have an Pak38 that costs 100mp and 30 seconds to build, and crewed by 3 Grenadiers who each cost 75mp and take 7.5 seconds of time to build, then when you que that Pak38 to be built it’ll cost 325mp and take 52.5 seconds.

The math would be;

Cost = (crew X number of) + gun = squad cost
ie. (75 X 3) + 100 = 325

Time = (crew X number of) + gun = squad build time
ie. (7.5 X 3) + 30 = 52.5

That’s it, now you don’t need to be afraid of those reinforcement costs anymore!

Celution
17th Oct 10, 4:53 AM
Nice tut LD, but why in Font size 3?

Kapp'n
17th Oct 10, 2:54 PM
Anyway, moving to How-To's.

Lethal Dosage
19th Oct 10, 1:42 AM
Sorry about that, i typed this up some time ago in Word, and just copy pasted it here with little formatting. With my internet playing up, i had a lot of trouble posting this, i'm surprised posting it worked at all, or alternatively that there isn't multiple duplicate threads.

Anyway, i'll be digging through my collection of tutorials in the near future and posting those i've written, but haven't posted yet. This tut will be more relevant then.

Kapp'n
19th Oct 10, 9:17 AM
Just the one dupe thread but that was taken care of :P

Lethal Dosage
21st Oct 10, 7:19 PM
Thanks Kapp'n.