Nomad Text Format

From ModdingWiki
Jump to navigation Jump to search
Nomad Text Format
Format typeText
Text purposeStory
Line endings(none)
Character setASCII

The Nomad Text Format is used for the in-game mission descriptions, inventory object descriptions, and alien dialogue lines in the game Nomad. The format is referred to internally by the game's code as "RText".

The text is stored in ASCII strings with null terminators, but also contains embedded command sequences that modify the game state. Null characters may appear within these command sequences, and they are not counted as terminators in this case. The embedded commands start with a single byte and can consume up to two additional bytes as a parameter (depending on the command).

Command byte # of parameter bytes Description
01 0 Insert the player's name
02 0 Insert the name of the player's ship
03 0 Insert the name of the planet around which the player is currently in orbit
04 0 Insert the string "<GAMESTR>" (purpose unknown)
05 2 Insert meta text (e.g. a randomly chosen synonym, Shaasa phrase that may be translated, or Losten gateway code). The two parameter bytes are combined into a 16-bit little-endian value that specifies the number of the index in META.TAB. Note that this number is given as if META.TAB used 1-based indexing; since it actually uses 0-based indexing, this value must be decremented before being used.
06 1 Add one item (specified by the parameter byte) to the player's inventory.
07 0 Insert the string "<METAMOVE>" (purpose unknown)
08 1 Change temperament of alien speaking the text (by the value specified in the parameter byte.)
09 1 Grant knowledge of fact (specified by the parameter byte).
0A 1 or 2 Grant knowledge of place (specified by the parameter byte or byte pair). If the first byte following the command byte has its MSB clear, then it may be used directly as an index into the Place Table. Otherwise, if the first byte has its MSB set, then it must be combined with the following byte to form the Place Table index: (firstbyte & 7Fh) | (secondbyte << 7).
0B 1 Set bit 0 in the first byte of the current Alien State Table entry.
0C 1 Grant knowledge of item (specified by the parameter byte).
0D 0 Set bit 1 in the first byte of the current Alien State Table entry.
0E 0 Copy contents of encount_relate2 table to encount_relate table.
0F 1 Grant knowledge of alien race (specified by the parameter byte).
10 2 Modify encount_relate tables in memory. Takes two parameter bytes, where the first is the ID of the alien race.
11 1 Store ship ID (specified by the parameter byte) in the Setup Table. The game doesn't track knowledge of ships in the same way as people, places, and objects. However, mentions of ships in conversation are usually followed with this command that causes the game to modify the "setup table" for that particular ship.
12 2 Store place ID in the Setup Table.
13 0 Set flag that causes this text to immediately end the conversation with the alien.
14 0 Set alien attribute (friendliness?) to maximum (64h). The alien table entry to be modified is selected by existing pointers in memory.
15 0 Set alien attribute (friendliness?) to minimum (00h). The alien table entry to be modified is selected by existing pointers in memory.
16 1 Mark mission complete for the mission specified by the parameter byte.


Reverse engineered by cmb.