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

Transforming Tooltips: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Exporting the naming to separate article, needs styling love
 
Nighthawk200 (talk | contribs)
Cleaning up as per the Styleguide. Feel free to fix if I've messed up.
Line 1: Line 1:
{{Cleanup}}
==Introduction==
If an InfantryType is inside a VehicleType with {{TTL|Gunner|yes}} set, then the name of the VehicleType will change depending on several rules.


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".
Given that there is only one VehicleType in the game with {{TTL|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.


If your VehicleType is not called "IFV", then substitute the string "IFV" in the following examples with the {{TTL|UIName}} of your VehicleType.


IFV with no passenger is called "IFV"


==Nomenclature==
An IFV with no passenger is just called "IFV".


IFV whose passenger has 'UseOwnName=true' set is called "<passenger> IFV" (where <passenger> is the 'UIName=' of the passenger).
An IFV whose passenger has {{TTL|UseOwnName|true}} set is called "<passenger> IFV" (where <passenger> is the {{TTL|UIName}} of the passenger).


If the passenger has {{TTL|UseOwnName|false}} set (which is the default value) then the following rules apply:
* A) If the passenger's IFVMode weapon turret is turret index 0 (e.g. fvtur.vxl), then the IFV will be called "Rocket IFV"
* B) If the passenger's IFVMode weapon turret is turret index 1 (e.g. fvtur1.vxl), then the IFV will be called "Machine Gun IFV"
* C) If the passenger's IFVMode weapon turret is turret index 2 (e.g. fvtur2.vxl), then the IFV will be called "Repair IFV"
* D) If the passenger's IFVMode weapon turret is turret index 3 or higher (e.g. fvtur3.vxl etc.), then the IFV will be called "<passenger> IFV" (where <passenger> is the {{TTL|UIName}} of the passenger).


If the passenger has 'UseOwnName=false' set (default) then the following rules apply:
*A) If the passenger's IFVMode weapon turret is turret index 0, then the IFV will be called "Rocket IFV"
*B) If the passenger's IFVMode weapon turret is turret index 1, then the IFV will be called "Machine Gun IFV"
*C) If the passenger's IFVMode weapon turret is turret index 2, then the IFV will be called "Repair IFV"
*D) If the passenger's IFVMode weapon turret is turret index 3 (or higher), then the IFV will be called "<passenger> IFV" (where <passenger> is the 'UIName=' of the passenger).


Note: Higher than 3 has not actually been confirmed. If someone tests this then please ammend this page.
----


{{NeedTesting}}
Higher than 3 has not actually been confirmed. If someone tests this then please amend this page.


----




Inconsistencies in Yuri's Revenge:
==Inconsistencies in Yuri's Revenge==


In Yuri's Revenge, there are some inconsistencies with the use of 'UseOwnName='
In Yuri's Revenge, there are some inconsistencies with the use of {{TTL|UseOwnName}}:
*IFVMode 2 (machine gun A, turret 1) is used by GI, Conscript and Spy. "Machine Gun IFV"
* IFVMode 2 (machine gun A, turret 1) is used by the GI, Conscript and Spy, and is called "Machine Gun IFV"
*IFVMode 4 (machine gun B, turret 1) is used by SEAL, Tanya, Boris. "<passenger> IFV"
*IFVMode 4 (machine gun B, turret 1) is used by Chrono Commando, Psi Commando. "Machine Gun IFV"


Chrono Commando and Psi Commando do not have 'UseOwnName=true' set. I believe they should.
* IFVMode 3 (flak weapon, turret 1) is used by the Flak Trooper. However, this results in "Machine Gun IFV", due to a lack of {{TTL|UseOwnName|true}} on the Flak Trooper.


*IFVMode 3 (flak weapon, turret 1) is used by Flak Trooper. "Machine Gun IFV"
* IFVMode 4 (machine gun B, turret 1) is used by the SEAL, Tanya, Boris, and is called "<passenger> IFV"
I believe that the Flak Trooper should also have 'UseOwnName=true' set.


Both of the above inconsistencies are dealt with in the YR Unofficial 1.002 Mini-Patch.
* 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 {{TTL|UseOwnName|true}} 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, I'll tell you now that you can't solve the problem by rearranging turrets or modifying the string table (leastways, I have tried for several hours without success).
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:


Some people have asked what the string table entries are for the tooltips. Since it's kind of related to this I'll tell you:
* Tip:Machinegun="Machine Gun"  (as in "Machine Gun IFV")


tip:machinegun="Machine Gun"  (as in "Machine Gun IFV")
* Tip:Repair="Repair"  (as in "Repair IFV")


tip:repair="Repair"  (as in "Repair IFV")
* Tip:Rocket="Rocket"  (as in "Rocket IFV")


tip:rocket="Rocket"  (as in "Rocket IFV")
* Name:Fv="IFV"  (this is appended to all tooltips)


name:fv="IFV"  (appended to all tooltips - note: this may be a hardcoded reference, or it may be a reference to the IFVs UIName= entry, I haven't tested it.)
* All other tooltips are built using the units' {{TTL|UIName}} entry.


----
{{NeedTesting}}
The "IFV" suffix may be a hardcoded reference, or it may be a reference to the IFVs {{TTL|UIName}} entry, this needs to be tested.


All other tooltips are built using the units' UIName= entry.
----


{{SourceCode|http://dc.strategy-x.com/src2/UnitClass/GetUIName.cpp|tr=yes}}
{{SourceCode|http://dc.strategy-x.com/src2/UnitClass/GetUIName.cpp|tr=yes}}


[[Category:General Editing Information]]
[[Category:General Editing Information]]

Revision as of 23:49, 27 July 2008

Introduction

If an InfantryType is inside a VehicleType with Template:TTL set, then the name of the VehicleType will change depending on several rules.

Given that there is only one VehicleType in the game with Template:TTL 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 Template:TTL of your VehicleType.


Nomenclature

An IFV with no passenger is just called "IFV".

An IFV whose passenger has Template:TTL set is called "<passenger> IFV" (where <passenger> is the Template:TTL of the passenger).

If the passenger has Template:TTL set (which is the default value) then the following rules apply:

  • A) If the passenger's IFVMode weapon turret is turret index 0 (e.g. fvtur.vxl), then the IFV will be called "Rocket IFV"
  • B) If the passenger's IFVMode weapon turret is turret index 1 (e.g. fvtur1.vxl), then the IFV will be called "Machine Gun IFV"
  • C) If the passenger's IFVMode weapon turret is turret index 2 (e.g. fvtur2.vxl), then the IFV will be called "Repair IFV"
  • D) If the passenger's IFVMode weapon turret is turret index 3 or higher (e.g. fvtur3.vxl etc.), then the IFV will be called "<passenger> IFV" (where <passenger> is the Template:TTL of the passenger).



Template:NeedTesting Higher than 3 has not actually been confirmed. If someone tests this then please amend this page.



Inconsistencies in Yuri's Revenge

In Yuri's Revenge, there are some inconsistencies with the use of Template:TTL:

  • 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 Template:TTL 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 Template:TTL 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")
  • Name:Fv="IFV" (this is appended to all tooltips)
  • All other tooltips are built using the units' Template:TTL entry.

Template:NeedTesting The "IFV" suffix may be a hardcoded reference, or it may be a reference to the IFVs Template:TTL entry, this needs to be tested.


Needs Transcribing
Pseudocode relevant to this article is available at http://dc.strategy-x.com/src2/UnitClass/GetUIName.cpp. Please update this article with information revealed by the pseudocode.