WeaponCount
Flag: | WeaponCount |
File(s): | Rules(md).ini |
Values: | unsigned integers, (0 to 18) |
Default: | uninitialized (see below) |
Applicable to: | VehicleTypes, BuildingTypes |
Specifies the amount of weapons this object has. Used for special weapon systems, for example, turret-changers (Gunner=yes), charge turrets (IsChargeTurret=yes), or gattling logic (IsGattling=yes).
In those cases, the game parses weapons specified by (Elite)Weapon%d= , where %d represents the number between 1 and WeaponCount, as opposed to (Elite)Primary/Secondary it loads normally. Then, (Elite)Weapon1 is used as the default weapon instead of Primary.
Values larger than 18 are not allowed and will corrupt memory.
Bugs/Side-Effects/Unexpected Limitations
The game does not initialize this to a constant value. If this tag is not defined, random garbage in memory is used as weapon count, which can lead to desyncs, crashes during loading time, or -- in the worst case -- appear to be working. If TurretCount is greater than 0, set this value, too.