TurretCount: Difference between revisions
en>Testid123 mNo edit summary |
Rain-Islet (talk | contribs) m [bot] Batch update {{Bugs}} templates. |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 4: | Line 4: | ||
|values=unsigned integers | |values=unsigned integers | ||
|default=0 | |default=0 | ||
|types={{Categ|VehicleTypes}}, {{Categ|BuildingTypes}} | |types={{Categ|InfantryTypes}},{{Categ|VehicleTypes}},{{Categ|AircraftTypes}},{{Categ|BuildingTypes}} | ||
|ra2=yes | |ra2=yes | ||
|yr=yes | |yr=yes | ||
|rp=yes | |rp=yes | ||
}} | }} | ||
Specifies the amount of turrets 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 turrets 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 loads files {{Tt|''objectname''tur''%d''.vxl/hva}}, where ''%d'' represents the number between 1 and {{f|TurretCount|link}}, as opposed to plain {{Tt|''objectname''tur.vxl/hva}} it loads normally. | In those cases, the game loads files {{Tt|''objectname''tur''%d''.vxl/hva}}, where ''%d'' represents the number between 1 and {{f|TurretCount|link}}, as opposed to plain {{Tt|''objectname''tur.vxl/hva}} it loads normally. | ||
{{Bugs}} | =={{Bugs}}== | ||
When setting {{f|TurretCount}} to a value greater than {{tt|0}}, see that {{f|WeaponCount|link}} is also set correctly. This has to be done because the latter is not initialized to a constant value, and garbage in memory could lead to unexpected results, like corrupting memory. In the best case it crashes when starting a game. | When setting {{f|TurretCount}} to a value greater than {{tt|0}}, see that {{f|WeaponCount|link}} is also set correctly. This has to be done because the latter is not initialized to a constant value, and garbage in memory could lead to unexpected results, like corrupting memory. In the best case it crashes when starting a game. | ||
*Allows <font style="color:blue"><u><b> | *Allows <font style="color:blue"><u><b>[[InfantryTypes]]</b></u></font> to use Weapons with '''<u><b><font style="color:blue">Burst=2</font></b></u>''' are possible. | ||
If <u><b>[[InfantryTypes or AircraftTypes]]</b></u> has <u><b>{{f|TurretCount|1|Link}}</b></u> | |||
<u><b>{{f|WeaponCount|2|Link}}</b></u> | |||
<u><b>[[Weapon1FLH]](in [[Art.ini]] or [[Artmd.ini]])</b></u> | |||
<u><b>[[Weapon2FLH]](in [[Art.ini]] or [[Artmd.ini]])</b></u> | |||
<u><b>[[EliteWeapon1FLH]](in [[Art.ini]] or [[Artmd.ini]])</b></u> | |||
<u><b>[[EliteWeapon2FLH]](in [[Art.ini]] or [[Artmd.ini]])</b></u> | |||
<b>[E1]</b> | <b>[E1]</b> | ||
| Line 33: | Line 44: | ||
[[File:Burst=2.png]] | [[File:Burst=2.png]] | ||
And the [[WeaponX]] system initiated in this way can also be used normally in modern engines with [[DeployFireWeapon]] to specify weapons beyond 2. | |||
Latest revision as of 18:00, 2 July 2025
|
|
|
|
|
|
| Flag: | TurretCount |
| File(s): | Rules(md).ini |
| Values: | unsigned integers |
| Default: | 0 |
| Applicable to: | InfantryTypes,VehicleTypes,AircraftTypes,BuildingTypes |
Specifies the amount of turrets 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 loads files objectnametur%d.vxl/hva, where %d represents the number between 1 and TurretCount, as opposed to plain objectnametur.vxl/hva it loads normally.
Bugs/Side-Effects/Unexpected Limitations
When setting TurretCount to a value greater than 0, see that WeaponCount is also set correctly. This has to be done because the latter is not initialized to a constant value, and garbage in memory could lead to unexpected results, like corrupting memory. In the best case it crashes when starting a game.
- Allows InfantryTypes to use Weapons with Burst=2 are possible.
If InfantryTypes or AircraftTypes has TurretCount=1 WeaponCount=2
Weapon1FLH(in Art.ini or Artmd.ini)
Weapon2FLH(in Art.ini or Artmd.ini)
EliteWeapon1FLH(in Art.ini or Artmd.ini)
EliteWeapon2FLH(in Art.ini or Artmd.ini)
[E1]
TurretCount=1
WeaponCount=2
Weapon1=AGGattling
EliteWeapon1=AGGattlingE
Weapon2=AAGattling
EliteWeapon2=AAGattlingE
And the WeaponX system initiated in this way can also be used normally in modern engines with DeployFireWeapon to specify weapons beyond 2.





