Pip Distortion Bug: Difference between revisions
No edit summary |
Included example. |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The Pip Distortion Bug is triggered when you alter any infantry from an INI like an [[MP Modes|MP Mode file]] or a map without (re-)stating the pip settings for the unit in question. Its effect is that, if the unit enters any other object that displays a pip, the pip will get distorted (hence the name). | |||
== Example == | |||
Let's take the GI as an example. We are going to edit the GI in a game mode INI or map as follows: | |||
[E1] | |||
Strength=200 | |||
When we play in-game we will find that both the colour and shape of the GI's pip (when inside a transport or occupying a building) have been changed or 'messed up'. The same applies to any infantry unit you modify. | |||
To fix this problem, you must restate {{f|Pip}} and {{f|OccupyPip}} for every infantry type section in the game mode INI or map file like this: | |||
[E1] | |||
Strength=200 | |||
Pip=white | |||
OccupyPip=PersonBlue | |||
== Reasons == | |||
The bug only affects {{ra2}} and {{yr}}. It occurs because Westwood removed the <tt>empty</tt> item from the internal list that maps string values to frame indexes. Because the pip frame index defined in the previous loaded INI is used as the default for reading the next INI value (as an index into the mapping list), the default value is now off-by-one and the wrong default value is used. If the {{f|Pip|link}} or {{f|OccupyPip|link}} tag is not defined, the wrong default value is converted to its corresponding frame index. | |||
In Yuri's Revenge, the mapping list was amended by the <tt>person</tt> pips, which leave out frame index 6 (which would be "personempty"). Thus, the frame index actually becomes off-by-two for the person pips each time they are read. | |||
Because the pip frame index can be larger than the number of items in the mapping list, the game overflows into the following {{f|PipScales}} mapping list, using <tt>ammo</tt> (and in YR also <tt>tiberium</tt>) as default, which cannot be mapped back to a valid pip frame index. The game resets the value to <tt>green</tt> in this case. | |||
[[Category:Bugs and Errors]][[Category:Weird Bugs]][[Category:MP Mode Override Bugs]] |
Latest revision as of 19:32, 15 August 2013
The Pip Distortion Bug is triggered when you alter any infantry from an INI like an MP Mode file or a map without (re-)stating the pip settings for the unit in question. Its effect is that, if the unit enters any other object that displays a pip, the pip will get distorted (hence the name).
Example
Let's take the GI as an example. We are going to edit the GI in a game mode INI or map as follows:
[E1] Strength=200
When we play in-game we will find that both the colour and shape of the GI's pip (when inside a transport or occupying a building) have been changed or 'messed up'. The same applies to any infantry unit you modify.
To fix this problem, you must restate Pip and OccupyPip for every infantry type section in the game mode INI or map file like this:
[E1] Strength=200 Pip=white OccupyPip=PersonBlue
Reasons
The bug only affects Red Alert 2 and Yuri's Revenge. It occurs because Westwood removed the empty item from the internal list that maps string values to frame indexes. Because the pip frame index defined in the previous loaded INI is used as the default for reading the next INI value (as an index into the mapping list), the default value is now off-by-one and the wrong default value is used. If the Pip or OccupyPip tag is not defined, the wrong default value is converted to its corresponding frame index.
In Yuri's Revenge, the mapping list was amended by the person pips, which leave out frame index 6 (which would be "personempty"). Thus, the frame index actually becomes off-by-two for the person pips each time they are read.
Because the pip frame index can be larger than the number of items in the mapping list, the game overflows into the following PipScales mapping list, using ammo (and in YR also tiberium) as default, which cannot be mapped back to a valid pip frame index. The game resets the value to green in this case.