What is TextID in TypTranslate?

Freeform discussion about anything related to modding Transcendence.
Post Reply
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

From the funclist:

Code: Select all

(typTranslate unid textID [default])
Just wanted to know.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

It selects a particular element in the <Language> section of a type:

Code: Select all

<MissionType ...
   <Language>
      <Text id="ComeBackLater">
         "I've got no " (random '("bananas" "oranges" "peppers")) " for you today, %name%, come back later"
      </Text>
   </Language>
</MissionType>

...
(typTranslate unid 'ComeBackLater) -> "I've got no bananas for you today, George, come back later"

There are two advantages to using typTranslate (and objTranslate):

1. It is polymorphic (in the OO sense)--that is, it allows the specific type or object to decide what text to use.
2. In the future, if all text is in <Language> tags, then it will be easier to create translations of the game.
Datal
Militia Commander
Militia Commander
Posts: 309
Joined: Mon Feb 07, 2011 12:54 pm
Location: Hyno Gunship

george moromisato wrote: 2. In the future, if all text is in <Language> tags, then it will be easier to create translations of the game.
I like it. I noticed that changes in version 1.2 and hope it will help me in future. Even if it would be translation without special signs. :)
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Ah ok. I got my hopes up and thought it could extract XML if you feed it a UNID >.<
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Post Reply