Talk:SetTextVal

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

7/16/23 - Using these commands:

 SetTextVal(x05,x71EC)//Ignore Height
 SetTextVal(x07,x71FB)//Fly
 SetTextVal(x09,x01F2)//Teleport (forgot to add x7000)
 SetTextVal(x0B,x01F3)//Teleport 2 (forgot to add x7000)

caused the Text Variable bytes to become EC FF, FB FF, F2 FF, and F3 FF respectively. However, these commands:

 SetTextVal(x01,x305F)//Black Chocobo
 SetTextVal(x03,x3057)//Lancer

worked perfectly fine.

Some testing seemed to show that the issue was with the lower byte, not the higher one - changing 305F to 715F worked fine, but changing 71EC to 30EC did not, nor did 00EC. No idea how that works.

Setting that value to a variable and using SetTextVar worked fine, however.

/Talcall

the text argument here points directly to a loaded text entry (maybe only if the text entry resides in battle.bin?)

to get the overall text table address, take the whole number and shift it right by 0xB (so 0x71ec >> 0xB = 0xe, or, 14. this points to ability names)

take the value of all the bits not erased by shifting and that points to the text entry itself (so 0x71ec && 0x7ff = 0x1ec, or ignore height)

0x305f points to table 0x6 (job names) entry 0x5f (black chocobo), however 0x30ec points to 0x6 (job names) but does not index a valid entry (0xec is too big for the job names table)