STT

From OHRRPGCE-Wiki

Jump to: navigation, search

STT - configurable strings

The STT lump holds every configurable string that you can edit in CUSTOM. A 'single' field is 11 characters long (1 byte length, 10 bytes data +junk). However, some fields are double or triple length! (In this case, Custom lets the strings have max length 20 or 30, not 21 or 32.) You must know in advance, so you can load them correctly.

This table helps you construct a list of strings. for each item in the table, read (v * 11) bytes, where v is the value from the table. the first byte is the string length, the remainder are string contents (and junk, if (v * 11) > str_length)

       lengths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
                  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
                  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
                  2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2,
                  2, 2, 1, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 3, 
                  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
                  1, 1]

Not all fields may be stored! It depends on what was the lowest string-constant edited. Anyway, round the size of the file up to the nearest 11, and if fields are missing you need to supply defaults. You can find the defaults in the source by looking at SUB statname in subs2.bas.

Uncharted strings begin at offset 1761 (1-based) in the STT lump. Before you hack, edit the final string in 'string constants' by holding down a key enough to repeat 33 times. This forces the file to become its maximum length.

ARCHINYM.LMP . BROWSE.TXT . ATTACK.BIN . BINSIZE.BIN . DEFPAL#.BIN . DEFPASS.BIN . FIXBITS.BIN . LOOKUP.BIN . MENUS.BIN . MENUITEM.BIN . PALETTES.BIN . PLOTSCR.LST . SFXDATA.BIN . SONGDATA.BIN . UICOLORS.BIN . GEN . BAM . Map Format . T . P . E . D . L . N . DOR . DOX . DT0 . DT1 . DT6 . EFS . FOR . FNT . HSP . HSZ . ITM . MAP . MAS . MN . MXS . PAL . PT0 . PT1 . PT2 . PT3 . PT4 . PT5 . PT6 . SAY . SHO . SNG . STF . STT . TAP . TIL . TMN . VEH

Personal tools