Transforming Tooltips: Difference between revisions
Exporting the naming to separate article, needs styling love |
EvilRenegade (talk | contribs) m Replacing Template:TTL with Template:F. |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | ==Introduction== | ||
If an InfantryType is inside a VehicleType with {{f|Gunner|yes|link}} set, then the name of the VehicleType will change depending on several rules. | |||
Given that there is only one VehicleType in the game with {{f|Gunner|yes|link}} set, we will assume that we are working with the VehicleType known as the "IFV". | |||
If your VehicleType is not called "IFV", then substitute the string "IFV" in the following examples with the {{f|UIName|link}} of your VehicleType. | |||
==Nomenclature== | |||
An IFV with no passenger is just called "IFV". | |||
IFV | An IFV with a passenger which is not an [[InfantryType]] (meaning, it is a VehicleType, since no other object type can technically be a passenger) will be called "Rocket IFV". | ||
An IFV whose passenger has {{f|UseOwnName|true|link}} set is called "<passenger> IFV" (where <passenger> is the {{f|UIName|link}} of the passenger). | |||
If the passenger has | If the passenger has {{f|UseOwnName|false|link}} set (which is the default value) then the following rules apply: | ||
*A) If the passenger's IFVMode weapon turret is turret index | * A) If the passenger's IFVMode weapon turret is turret index 1 (e.g. fvtur1.vxl), then the IFV will be called "Machine Gun IFV". | ||
* B) If the passenger's IFVMode weapon turret is turret index 2 (e.g. fvtur2.vxl), then the IFV will be called "Repair IFV". | |||
* | * C) If the passenger's IFVMode weapon turret is turret index 3 (e.g. fvtur3.vxl), then the IFV will be called "<passenger> IFV" (where <passenger> is the {{f|UIName|link}} of the passenger). | ||
* | * D) In all other cases (index 0 and index > 3) the IFV will be called "Rocket IFV". | ||
* E) In {{ra2}}, where {{f|UseOwnName|link}} doesn't exist, one additional rule applies - if the passenger has a {{f|Primary|link}} weapon whose warhead has {{f|Bullets|yes|link}} set, it will be called "Machinegun IFV" regardless of the turret index. | |||
==Inconsistencies in Yuri's Revenge== | |||
In Yuri's Revenge, there are some inconsistencies with the use of {{f|UseOwnName|link}}: | |||
* IFVMode 2 (machine gun A, turret 1) is used by the GI, Conscript and Spy, and is called "Machine Gun IFV" | |||
* IFVMode 3 (flak weapon, turret 1) is used by the Flak Trooper. However, this results in "Machine Gun IFV", due to a lack of {{f|UseOwnName|true|link}} on the Flak Trooper. | |||
* IFVMode 4 (machine gun B, turret 1) is used by the SEAL, Tanya, Boris, and is called "<passenger> IFV" | |||
* IFVMode 4 (machine gun B, turret 1) is also used by Chrono Commando and Psi Commando, but for these units it is called "Machine Gun IFV". The Chrono Commando and Psi Commando do not have {{f|UseOwnName|true|link}} set, which causes this behaviour. | |||
==VehicleTypes as IFV passengers== | |||
VehicleTypes as IFV passengers | |||
The IFV naming system does not work with VehicleTypes. | The IFV naming system does not work with VehicleTypes. | ||
Whilst VehicleTypes can transform the IFV's turret and weapon, the IFV's tooltip will remain as "Rocket IFV". | Whilst VehicleTypes can transform the IFV's turret and weapon, the IFV's tooltip will remain as "Rocket IFV". | ||
Before you waste your time, | Before you waste your time, you cannot solve the problem by rearranging turrets or modifying the string table. This has already been attempted without success. | ||
==Tooltip String Table Entries== | |||
People have asked what the string table entries are for the tooltips. These are: | |||
* Tip:Machinegun="Machine Gun" (as in "Machine Gun IFV") | |||
* Tip:Repair="Repair" (as in "Repair IFV") | |||
* Tip:Rocket="Rocket" (as in "Rocket IFV") | |||
* The "IFV" suffix in all cases is the IFV's {{f|UIName|link}} entry. | |||
* All other tooltips are built using the units' {{f|UIName|link}} entry. | |||
---- | |||
{{SourceCode|http://dc.strategy-x.com/src2/UnitClass/GetUIName.cpp | {{SourceCode|http://dc.strategy-x.com/src2/UnitClass/GetUIName.cpp}} | ||
[[Category:General Editing Information]] | [[Category:General Editing Information]] |
Latest revision as of 08:44, 27 November 2009
Introduction
If an InfantryType is inside a VehicleType with Gunner=yes set, then the name of the VehicleType will change depending on several rules.
Given that there is only one VehicleType in the game with Gunner=yes set, we will assume that we are working with the VehicleType known as the "IFV".
If your VehicleType is not called "IFV", then substitute the string "IFV" in the following examples with the UIName of your VehicleType.
Nomenclature
An IFV with no passenger is just called "IFV".
An IFV with a passenger which is not an InfantryType (meaning, it is a VehicleType, since no other object type can technically be a passenger) will be called "Rocket IFV".
An IFV whose passenger has UseOwnName=true set is called "<passenger> IFV" (where <passenger> is the UIName of the passenger).
If the passenger has UseOwnName=false set (which is the default value) then the following rules apply:
- A) If the passenger's IFVMode weapon turret is turret index 1 (e.g. fvtur1.vxl), then the IFV will be called "Machine Gun IFV".
- B) If the passenger's IFVMode weapon turret is turret index 2 (e.g. fvtur2.vxl), then the IFV will be called "Repair IFV".
- C) If the passenger's IFVMode weapon turret is turret index 3 (e.g. fvtur3.vxl), then the IFV will be called "<passenger> IFV" (where <passenger> is the UIName of the passenger).
- D) In all other cases (index 0 and index > 3) the IFV will be called "Rocket IFV".
- E) In Red Alert 2, where UseOwnName doesn't exist, one additional rule applies - if the passenger has a Primary weapon whose warhead has Bullets=yes set, it will be called "Machinegun IFV" regardless of the turret index.
Inconsistencies in Yuri's Revenge
In Yuri's Revenge, there are some inconsistencies with the use of UseOwnName:
- IFVMode 2 (machine gun A, turret 1) is used by the GI, Conscript and Spy, and is called "Machine Gun IFV"
- IFVMode 3 (flak weapon, turret 1) is used by the Flak Trooper. However, this results in "Machine Gun IFV", due to a lack of UseOwnName=true on the Flak Trooper.
- IFVMode 4 (machine gun B, turret 1) is used by the SEAL, Tanya, Boris, and is called "<passenger> IFV"
- IFVMode 4 (machine gun B, turret 1) is also used by Chrono Commando and Psi Commando, but for these units it is called "Machine Gun IFV". The Chrono Commando and Psi Commando do not have UseOwnName=true set, which causes this behaviour.
VehicleTypes as IFV passengers
The IFV naming system does not work with VehicleTypes. Whilst VehicleTypes can transform the IFV's turret and weapon, the IFV's tooltip will remain as "Rocket IFV".
Before you waste your time, you cannot solve the problem by rearranging turrets or modifying the string table. This has already been attempted without success.
Tooltip String Table Entries
People have asked what the string table entries are for the tooltips. These are:
- Tip:Machinegun="Machine Gun" (as in "Machine Gun IFV")
- Tip:Repair="Repair" (as in "Repair IFV")
- Tip:Rocket="Rocket" (as in "Rocket IFV")
- The "IFV" suffix in all cases is the IFV's UIName entry.
- All other tooltips are built using the units' UIName entry.
Relevant pseudocode is available at http://dc.strategy-x.com/src2/UnitClass/GetUIName.cpp.