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

Range: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m Forgot the category, oops
DeathFish (talk | contribs)
mNo edit summary
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{flag|name=Range|files=rules(md).ini|values=float|special=-2|default=?|types=Weapons|games=TS/RA2/YR}}
=== On Weapons ===
Range= defines the distance (in cells) that a weapon can travel (aka the distance from the firing point to the impact point [in 3D, so it makes a difference for targets in different altitudes]). It takes a positive floating point value as literal distance, and special value "-2" as "infinite".


Mind that this only applies to non-homing projectiles. Homing projectiles (those which have a positive [[ROT]]= value) can follow their targets all over the map, unless they are tagged as [[Ranged]]=.
{{flag
|values={{Values|float}}
|special= -2
|default=0
|types={{Categ|Weapon|Weapons}}
|ra=yes
|ts=yes
|fs=yes
|hp=yes
|ra2=yes
|yr=yes
|ares=yes
}}
{{f|Range|link}} defines the distance (in cells) that a weapon's projectile can travel under normal conditions (aka the distance from the firing point to the impact point [in 3D, so it makes a difference for targets in different altitudes]), as well as the range between an object and its target at which that object will fire its weapon. For mobile objects, this means that they will approach their target until it is within range.
It takes a positive floating point value as literal distance, and, starting with RA2, [[#Special values|-2]] as a special value.


{{meanings|sound(md).ini}}
Mind that the travel range only applies to non-homing projectiles. Homing projectiles (those which have a positive {{f|ROT|link}} value) can follow their targets all over the map, unless they are tagged as {{f|Ranged|link}}.


''' Allied General '''
For [[BuildingTypes]], the range of the [[Secondary]] weapon will get ignored if it exceeds the range of the [[Primary]] weapon - in effect, this means that the Primary weapon determines the maximum range of a building.


Range is the maximum distance that a weapon can travel across the RA2 battlefield.
Keep in mind, that shrapnel weapon can't have range more, then max [[CellSpread]] value (videlicet, 11 for YR) because, likely, game can't understand in what direction weapon should spread.


The maximum for "normal" weapons is 255 whilst -2 is used for special spawn, scanning logic.
In ''Ra1/RA2/YR only'', {{f|Range|-2|link}} is a special value indicating infinite range.<br>
{{f|Range|-2}} has a problem with weapons with the tag {{f|DiskLaser|yes|link}} Those weapons cannot damage Any [[TechnoTypes]].


[[Category:INI Flags]]
'''Note:''' Since the {{f|GuardRange|link}} is inherited from the {{f|Range}} by default, setting an excessively large {{f|Range}} value will cause game lag.
*If you set {{f|Range|-2}}, you must manually configure the {{f|GuardRange}} to enable units to actively seek out enemies.
 
== On SuperWeaponTypes ==
 
{{flag
|values={{Values|float}}
|default=0.1
|types={{Categ|SuperWeaponTypes}}
|yr=yes
|rp=yes
}}
 
Specifies the radius (in cells) of the "area effect indicator" that is displayed when a player is targeting this Super Weapon. Note that this is just a  visual effect, and doesn't actually influence the Super Weapon's area of effect.
 
== On Sounds ==
{{flag
|files={{Categ|ini=sound}}
|values={{Values|integer}}
|default=1
|types={{Categ|SoundList|VocTypes}}
|ts=yes
|fs=yes
|hp=yes
|ets=yes
|ra2=yes
|yr=yes
|rp=yes
}}
Some sounds should be heard by players regardless of their current screen position ("Kirov reporting", for example), while other sounds should only be heard within a certain radius from their point of origin (Machinegun impact sound, for example). In the second case, the Range= in the sound's section defines that radius. <br />
If you don't specify a Range= when a game is expecting it, it will default to the Range= value of the {{ini|sound}}'s {{Sl|Defaults}} section.
 
See also the [[Type#sound%28md%29.ini|Type]]= and [[VShift]]= statements.

Latest revision as of 18:13, 12 April 2025

On Weapons

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: Range
File(s): rules(md).ini
Values: Floating point values: Any decimal number (clearer range should be added in Template:Values).
Special Values: -2
Default: 0
Applicable to: Weapons
Warning: There are 1 numbered subpages of this page. These pages should all be merged into this page.


Range defines the distance (in cells) that a weapon's projectile can travel under normal conditions (aka the distance from the firing point to the impact point [in 3D, so it makes a difference for targets in different altitudes]), as well as the range between an object and its target at which that object will fire its weapon. For mobile objects, this means that they will approach their target until it is within range. It takes a positive floating point value as literal distance, and, starting with RA2, -2 as a special value.

Mind that the travel range only applies to non-homing projectiles. Homing projectiles (those which have a positive ROT value) can follow their targets all over the map, unless they are tagged as Ranged.

For BuildingTypes, the range of the Secondary weapon will get ignored if it exceeds the range of the Primary weapon - in effect, this means that the Primary weapon determines the maximum range of a building.

Keep in mind, that shrapnel weapon can't have range more, then max CellSpread value (videlicet, 11 for YR) because, likely, game can't understand in what direction weapon should spread.

In Ra1/RA2/YR only, Range=-2 is a special value indicating infinite range.
Range=-2 has a problem with weapons with the tag DiskLaser=yes Those weapons cannot damage Any TechnoTypes.

Note: Since the GuardRange is inherited from the Range by default, setting an excessively large Range value will cause game lag.

  • If you set Range=-2, you must manually configure the GuardRange to enable units to actively seek out enemies.

On SuperWeaponTypes

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: Range
File(s): rules(md).ini
Values: Floating point values: Any decimal number (clearer range should be added in Template:Values).
Default: 0.1
Applicable to: SuperWeaponTypes
Warning: There are 1 numbered subpages of this page. These pages should all be merged into this page.


Specifies the radius (in cells) of the "area effect indicator" that is displayed when a player is targeting this Super Weapon. Note that this is just a visual effect, and doesn't actually influence the Super Weapon's area of effect.

On Sounds

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: Range
File(s): sound(md).ini
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: 1
Applicable to: VocTypes
Warning: There are 1 numbered subpages of this page. These pages should all be merged into this page.


Some sounds should be heard by players regardless of their current screen position ("Kirov reporting", for example), while other sounds should only be heard within a certain radius from their point of origin (Machinegun impact sound, for example). In the second case, the Range= in the sound's section defines that radius.
If you don't specify a Range= when a game is expecting it, it will default to the Range= value of the sound(md).ini's [Defaults] section.

See also the Type= and VShift= statements.