WeaponCount: Difference between revisions
mNo edit summary |
m Dedeezirified completed |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|values=unsigned integers, (0 to 18) | |values=unsigned integers, (0 to 18) | ||
|default=uninitialized (see below) | |default=uninitialized (see below) | ||
|types={{Categ|InfantryTypes}}{{Categ|VehicleTypes}}, {{Categ|BuildingTypes}} | |types={{Categ|InfantryTypes}},{{Categ|VehicleTypes}},{{Categ|BuildingTypes}} | ||
|ra2=yes | |ra2=yes | ||
|yr=yes | |yr=yes | ||
| | |ares=yes | ||
}} | }} | ||
Specifies the amount of weapons this object has. Used for special weapon systems, for example, turret-changers ({{f|Gunner|yes|link}}), charge turrets ({{f|IsChargeTurret|yes|link}}), or gattling logic ({{f|IsGattling|yes|link}}). | Specifies the amount of weapons this object has. Used for special weapon systems, for example, turret-changers ({{f|Gunner|yes|link}}), charge turrets ({{f|IsChargeTurret|yes|link}}), or gattling logic ({{f|IsGattling|yes|link}}). | ||
In those cases, the game parses weapons specified by {{Tt|(Elite)Weapon''%d''=}} , where ''%d'' represents the number between 1 and {{f|WeaponCount}}, as opposed to {{Tt|(Elite)Primary/Secondary}} it loads normally. Then, {{Tt|(Elite)Weapon1}} is used as the default weapon instead of {{Tt|Primary}}. | In those cases, the game parses weapons specified by {{co|{{Tt|(Elite)Weapon}}{{co|''%d''|#114A55}}=|green}} , where {{co|''%d''|#114A55}} represents the number between 1 and {{f|WeaponCount}}, as opposed to {{Tt|(Elite)}}{{f|Primary|link}}/{{f|Secondary|link}} it loads normally. Then, {{Tt|(Elite)Weapon1}} is used as the default weapon instead of {{Tt|Primary}}. | ||
Values larger than {{tt|18}} are not allowed and will corrupt memory. | Values larger than {{tt|18}} are not allowed and will corrupt memory. | ||
{{Bugs}} | {{Bugs}} | ||
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 {{f|TurretCount}} is greater than {{tt|0}}, set this value, too. | 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 {{f|TurretCount|link}} is greater than {{tt|0}}, set this value, too. |
Latest revision as of 10:48, 25 April 2025
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Flag: | WeaponCount |
File(s): | Rules(md).ini |
Values: | unsigned integers, (0 to 18) |
Default: | uninitialized (see below) |
Applicable to: | InfantryTypes,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.