Skip to content

Text Menu Routine

Michael Nock edited this page Jun 29, 2017 · 3 revisions

Overview

When a string is passed to the text routine, it can have certain values passed to it outside of the standard alphanumeric ASCII range. In general, a player's stats can be drawn directly in a string and take values below $20 (32 decimal). There are also actions which can be performed such as setting the x/y position for the text, requesting the engine to wait for 2nd before continuing, displaying items, etc. These start from $FF and work their way down as more are added.

Stats

To display the value of a player's stat, you can use the corresponding equate (all values are below $20, ASCII space). These are the current values:

_NAME	= 1			;remember, 0 = end of text, so we have to start at 1
_CURHP	= 3+HP
_MAXHP	= 3+MAXHP
_CURMP	= 3+MP
_MAXMP	= 3+MAXMP
_STR	= 3+STR
_UDF	= 3+UDF
_LDF	= 3+LDF
_AGI	= 3+AGI
_INT	= 3+INT
_END	= 3+END
_CNC	= 3+CNC
_SNC	= 3+SNC
_DSP	= 3+DSP

Actions

Actions start from $FF and work their way down as they're added. These are the current actions:

MN     = $FF
NEWX   = $FE
NEWXY  = $FD
NEWL   = $FC
BRK    = $FB
PERS   = $FA	;load person to disply their stats
ITEM   = $F9	;display the name of an item based on item's ID
ITEMD  = $F8	;display item's description based on ID
NUM    = $F7	;display a 3-byte number (starting with LSB, so 23456 would be stored as 6,4,2)
NUM8   = $F6	;display a 1-byte number
ATK    = $F5	;display attack name (ID)
MAG    = $F4	;display magic name (ID)
STAT   = $F3	;mark that you specifically want to insert a stat
                    ;(for stat values above ASCII space, ie 32 decimal)
Clone this wiki locally