ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

WeaponCount: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Rewrite
Updated the default value and the valid range, and added remarks about the valid values and a potential source of crashes.
 
(4 intermediate revisions by 4 users not shown)
Line 2: Line 2:
|name={{PAGENAME}}
|name={{PAGENAME}}
|files={{Categ|Rules(md).ini}}
|files={{Categ|Rules(md).ini}}
|values=unsigned integers
|values=unsigned integers, (0 to 18)
|special=None
|default=uninitialized (see below)
|default=0
|types={{Categ|VehicleTypes}}, {{Categ|BuildingTypes}}
|types={{Categ|VehicleTypes}}, {{Categ|BuildingTypes}}
|games=[[RA2]], [[YR]]
|ra2=yes
|yr=yes
|rp=yes
}}
}}


Specifies the amount of weapons this object has. Used for special weapon systems, for example, turret-changers ({{TTL|Gunner|yes}}), charge turrets ({{TTL|IsChargeTurret|yes}}), or gattling logic ({{TTL|IsGattling|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}}).


In those cases, the game parses weapons specified by {{Tt|(Elite)Weapon''%d''=}} , where ''%d'' represents the number between 1 and {{TTL|TurretCount}}, 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 {{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}}.
 
Values larger than {{tt|18}} are not allowed and will corrupt memory.
 
{{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.

Latest revision as of 03:28, 20 August 2015

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
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.