So, you know how “IFAT conditionID 0x7A2F1” is a condition that checks for player phase.
And you can ELSE it after that to do something on Enemy/NPC phase?
Is there anything that exists or is conjurable that checks for NPC phase first?
I want to make a condition where:
If the boss dies
Check if its on NPC phase (NPC in this case is the 3rd Faction)
If so, do this
NPC phase death events
If it was on Enemy or Ally phase, do this instead
Ally/Enemy phase death stuff
IFAT conditionID 0x7A305 appears to be a check for enemy phase (the code is identical except it compares to 0x80 instead of 0x0). For an NPC check you could either check if not player OR enemy phase, or you could make a new check yourself:
.thumb
.org 0
mov r1,#0 @default to false
ldr r0,=0x202bbf8
ldrb r0,[r0,#0xf] @check phase
cmp r0,#0 @player? change to 0x80 for enemy/0x40 for NPC?
bne End
mov r1,#1 @set to true
End:
mov r0,r1
bx lr
Frankly the old conditionals system is so confusing I honestly have no idea.
IFAT 0x1 0x7A2F1 //Check player phase, if not skip ahead to LABEL 0x1
//stuff if player phase
GOTO 0x2 //player phase events over, skip ahead to LABEL 0x2
LABEL 0x1
//stuff if not player phase
LABEL 0x2
Much easier to understand, right?
And for the sake of completeness:
IFAT 0x1 0x7A2F1 //Check player phase, if not skip ahead to LABEL 0x1
//stuff if player phase
GOTO 0x2 //player phase events over, skip ahead to LABEL 0x2 (end)
LABEL 0x1
IFAT 0x3 0x7a305 //Check for Enemy Phase, if not skip ahead to LABEL 0x3
//stuff if enemy phase
GOTO 0x2 //enemy phase events over, skip ahead to LABEL 0x2 (end)
LABEL 0x3
//stuff if NPC phase
GOTO 0x2 //you don't really need this, LABEL 0x2 is next anyway
LABEL 0x2 //the end
//any stuff that happens on all three phases
heh. Yeah that’s essentially what I think I’ve done.
MarcoKilled:
IFAT 0x03 0x7A2F1// if Marco dies on ally phase
A bunch of stuff happens
IFEF 0x01 0x19// now check if JR survived the fight
JUMP DuelJR
ELSE 0x02// if JR didn't survive
ENIF 0x01//Close if alive JR cond
MNCH (0x6)// move to next chapter
ENIF 0x02 // close the condition where JR died
ELSE 0x04 // if Marco fell on NPC or Enemy Phase
ENIF 0x03// close IF marco fell on Ally phase
CAM1 Eliwood
TEX1 0xB18
REMA
ENIF 0x04// close the condition wher Marco fell on Enemy/NPC phase
ENDA
I could have sworn I had made some post about how the conditions actually were label/goto, but upon searching I guess not. I’ll write a short PSA about it when I have the time.