• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
October 29, 2020, 12:02:25 pm

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


SPID - For Battle?

Started by Werewolfe, August 11, 2020, 01:25:27 pm

Werewolfe

Hello!

I have not yet made or changed an event, but I am trying to read in the mean time to get an understanding of what I can and cannot do.  I had a question with SPID though.

Is this a viable command in battle?  Meaning, can I have a dialogue option with SPID to check if a character is in battle and have a dialogue/event play, or otherwise ignore the command if they're not present?  Or is SPID only used to begin an event, and not to alter an event itself?
  • Modding version: PSX
  • Discord username: Werewolfe

Nyzer

UnitAddress is the event command you're looking for.

Just make sure you use the newest version of the Event Upgrade hack as older versions didn't have a functional UnitAddress
  • Modding version: PSX & WotL
  • Discord username: Nyzer

Werewolfe

Thank you so much!  I greatly appreciate it.
  • Modding version: PSX
  • Discord username: Werewolfe

Nyzer

Specifically, you'll want to use UnitAddress to write to Variable x0001 based on that unit's innate Unit ID (which I think is equal to their spritesheet ID number?). If that unit isn't present, UnitAddress will write a value of zero to that variable.
ZERO out Variable x0000.
You then use NEQ which compares Variable x0000 and Variable x0001, and sets Variable x0000 to a value of 1 if the two are Not EQual - meaning, if the unit is present.
JumpFowardIfNot will go to the appropriate ForwardTarget if x0000 is set to a value of x00. Meaning, if the unit is not present, it will skip over all the commands between it and the appropriate ForwardTarget.
Those commands should be that unit's dialogue or whatever else you're putting in there.
  • Modding version: PSX & WotL
  • Discord username: Nyzer