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

PrismSupportModifier: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Updated
Crimsonum (talk | contribs)
m Added into the new bugs category.
 
(3 intermediate revisions by 3 users not shown)
Line 8: Line 8:
}}
}}


This flag specifies a multiplier to damage when a building designated as {{TTL|PrismType}} fires its weapon supported by other buildings of the same type.  
This flag specifies a multiplier to damage when a building designated as {{f|PrismType|link}} fires its weapon supported by other buildings of the same type.  


== Bugs ==
Actual damage done by a linked PrismType is calculated like this:


[[Image:warning.png|left]] This flag is parsed in an incorrect way: after reading its value from the INI file, it's multiplied by 100 before being saved internally. Due to the fact that the ini parser reads each flag in {{sl|General}} whenever the {{Tt|[General]}} section is present in the file, and if it can't interpret the flag's value properly (say, the flag was not redeclared), it falls back to the value the flag already has. Which means, if the {{Tt|[General]}} section is present in the mpmode file/map, but this flag is not, then its value is multiplied by 100 ''again'' for each such case. Which results in a severely overpowered weapon.
// naming: ''PSM.ini'' - the value specified for this flag in the rules.ini file
// DamageMultiplier is 1.0 on normal projectiles
Projectile->DamageMultiplier = ( ( (NumberOfSupportingPrisms * (''PSM.ini'' * 100) + 100) * 256 ) / 100 ) / 256;
<!-- who's the smartest coders? that's right, westwood is -->


[[Category: Bugs And Errors]]
{{Bugs}}This flag is parsed in an incorrect way: after reading its value from the INI file, it's multiplied by 100 before being saved internally. Due to the fact that the ini parser reads each flag in {{sl|General}} whenever the {{Tt|[General]}} section is present in the file, and if it can't interpret the flag's value properly (say, the flag was not redeclared), it falls back to the value the flag already has. Which means, if the {{Tt|[General]}} section is present in the mpmode file/map, but this flag is not, then its value is multiplied by 100 ''again'' for each such case. Which results in a severely overpowered weapon.
 
[[Category:Resetting Flags]]

Latest revision as of 12:18, 4 December 2020

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: PrismSupportModifier
File(s): rules(md).ini
Values: Floating point values: Any decimal number (clearer range should be added in Template:Values).
Default: 100.0 (broken, see ↓ below)
Applicable to: General


This flag specifies a multiplier to damage when a building designated as PrismType fires its weapon supported by other buildings of the same type.

Actual damage done by a linked PrismType is calculated like this:

// naming: PSM.ini - the value specified for this flag in the rules.ini file
// DamageMultiplier is 1.0 on normal projectiles

Projectile->DamageMultiplier = ( ( (NumberOfSupportingPrisms * (PSM.ini * 100) + 100) * 256 ) / 100 ) / 256;

Bugs/Side-Effects/Unexpected Limitations

This flag is parsed in an incorrect way: after reading its value from the INI file, it's multiplied by 100 before being saved internally. Due to the fact that the ini parser reads each flag in [General] whenever the [General] section is present in the file, and if it can't interpret the flag's value properly (say, the flag was not redeclared), it falls back to the value the flag already has. Which means, if the [General] section is present in the mpmode file/map, but this flag is not, then its value is multiplied by 100 again for each such case. Which results in a severely overpowered weapon.