Use case: text in industry window.
Current state: I can set text correctly with callback 3E, returning a single text ID to the cb. I can create a branching varaction 2 chain to return different text IDs according to various criteria (is the industry currently accepting input cargo 1 for example).
Desired state: the variation between the text is relatively small. It is wasteful of IDs to create near-identical texts with only a few words or a single line difference between them. It is harder to maintain, and will make translation more time consuming. I want to produce the appropriate text programatically, by combining sub-strings.
I have found and understood the purpose of text control code 80. I have successfully used it to crash the game
I have not understood (conceptually or in code) how to push something to the text stack. I'm slightly familiar with the %s pattern for string replacement, and I assume nfo wants something like:
Code: Select all
check variable store a text ID (or other value) to the stack (using 0E?) rinse and repeat until the stack has everything needed return final text ID for text containing \80 control codes