[FE8] Textbox/Scripted Fight Questions

So I’m testing porting Staff of Ages over to FE8 (fun fact: It was supposed to always be an FE8 hack, I just didn’t feel like trying to learn FE8 eventing with its lack of documentation compared to 7, but now I want to give it a shot)

I’ve hit a two snags though that are preventing progress:

  • I can’t for the life of me figure out what code I’m supposed to use for the “parchment” textboxes (or where I should be poking around, because I didn’t see any in Language Raws, and TEX6 isn’t a thing in FE8 apparently)

  • I can’t seem to make the scripted fighting work right.

[Spoiler=Fight data]CMDS
CriticalHit(0,40)
EndBattle
FIG1 0x5A 0xCB 0x00 //Because nothing is actually inserted character wise, so it’s just Gheb and Ismaire
[/Spoiler]

EA is telling me “No code names CMDS/_SAVEFORBATTLE/EndBattle found”, but I thought I set it up exactly how it’s supposed to be, so I’m not sure what’s up with that.

I’ve got EA v9.1.1 (which I think is the most up to date), so it’s without a doubt something dumb I’m doing (for the fighting stuff anyway, for the textbox I’m just not finding it)

Here’s the full (WIP) event file if needed)
[Spoiler=Event file data]
#include EAstdlib.event

EventPointerTable(0x07,ThisChapter)

ORG 0x1000200

ThisChapter:
POIN TurnBasedEvents
POIN CharacterBasedEvents
POIN LocationBasedEvents
POIN MiscBasedEvents
POIN Dunno Dunno Dunno
POIN Tutorial
POIN TrapData TrapData
POIN Units Units
POIN $0 $0 $0 $0 $0 $0
POIN BeginningScene EndingScene

Units:
UNIT Eirika 0x02 0x00 Level(1,Ally,False) [1,4] 0x00 0x00 0x01 T1 [IronSword] NoAI
UNIT 0x19 0x4B 0x02 Level(1,Ally,False) [1,3] 0x00 0x00 0x01 T2 [0x4B] NoAI
UNIT

T1:
REDA [4,8] 0x1 0x00 0x20 0x00 0x00

T2:
REDA [3,8] 0x1 0x00 0x10 0x00 0x00

T3:
REDA [19,4] 0x1 0x00 0x00 0x00 0x00

Enemies:
UNIT 0x68 0x05 0x00 Level(1,Enemy,True) [19,4] 0x00 0x00 0x01 T3 [IronSword] NoAI

TurnBasedEvents:
TurnEventPlayer(0x07,Oona1,1)
TurnEventPlayer(0x08,Oona2,2)
END_MAIN

CharacterBasedEvents:
END_MAIN

LocationBasedEvents:
END_MAIN

MiscBasedEvents:
CauseGameOverIfLordDies
END_MAIN

Dunno:
//DO NOT TOUCH
WORD $00

Tutorial:
//DO NOT TOUCH
WORD $00

TrapData:
END_MAIN

ALIGN 4

BeginningScene:
_LOAD1 0x1 Units
_Load1 0x1 Enemies
Text(0x0A,0x0903)//Soldier+Kalvesta
REMA
Text(0x35,0x0904) //Needs parchment box thing
REMA
Text(0x02,0x0905)//Seneca in the village
REMA
//0x0906 Seneca led his rebels…
Text(0x0A,0x0907) //Seneca meets queen
REMA
//Fighting shit goes here
//CMDS
//CriticalHit(0,40)
//EndBattle
//FIG1 0x5A 0xCB 0x00
Text(0x0A,0x0908) //Post regicide
REMA
Text(0x13,0x0909) //Guard tells belle to gtfo
Text(0x13,0x90A) //Seneca shows up and murks guard
REMA
//0x090B Originally seeing belle as an insignficant threat…
Text(0x18,0x090C) //Make good haste belle
REMA
ENUN
ENDA

EndingScene:
MNC2 0x1
ENDA

// Events
Oona1:
Text(0x90D) //Belle remember your training
REMA
ENDA

Oona2:
Text(0x90D) //Seek refuge behind me
REMA
ENDA
// Manual Movement

// Scripted Fights

// Units

// Shop Data

MESSAGE Events end at offset currentOffset

[/Spoiler]

Seth is also randomly making an appearance on the map, which is weird.

_SAVEFORBATTLE has been replaced with the more accurate SAVETOQUEUE, use StartBattle instead of CMDS, and EndAttack instead of EndBattle. Replace them and it should work.

Edit: also you should add an empty UNIT to the end of the enemies list.

1 Like

d’oh

Will try what you you said, thanks!

EDIT: Still getting the “No code named _SAVEFORBATTLE found” error, but the fight has been changed

StartBattle
CriticalHit(0,40)
EndAttack
FIG1 0x5A 0xCB 0x00

I’m not 100% sure where the error is coming from, since it’s giving it to me on lines 93 and 94 (CriticalHit and EndAttack, respectively)

It’s because there’s no underscore before SAVEFORBATTLE it should be SAVETOQUEUE (the underscore means it’s experimental/not fully understood).

I don’t see a SAVEFORBATTLE in my code, meaning I think I’m missing something obvious that I’m not grasping.

Yes, you’re using the macros CriticalHit and EndAttack, which translate to

"_SETVAL 1 combatantNumber+damage*0x100+0x00010000; _SAVEFORBATTLE"

and

"_SETVAL 1 0xFFFFFFFF;                              _SAVEFORBATTLE"

respectively.

You need to open up EA Standard Library/Unit Helpers.txt and change them to SAVETOQUEUE.

2 Likes

Ooooooooooooh.

I repeat:

Thanks!