• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
July 11, 2020, 04:33:26 am

News:

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


Routines that determine Move/Act CT costs

Started by cadence, May 30, 2019, 03:18:49 am

cadence

So by default, if a unit neither moves nor acts it ends its turn with 40 CT, if it does only one or the other it ends with 20, and if it does neither it ends with zero. I've been having a tough time finding the routines that determine this. Conservatively, it'd be nice to tweak those numbers; more ambitiously, knowing where this math comes from means I could try to write new routines to do things like giving abilities custom CT costs, FFX style (this is somewhat possible with damage formulas, but not ideal).

If this info isn't readily available (I had a hard time digging through BATTLE.BIN for it), maybe give me a hint about what I should breakpoint to get started? It'd be nice if eventually I could answer small questions like these on my own.
  • Modding version: PSX
  • Discord username: cadence#6190

Glain

This routine looks like the right one.

As for a breakpoint that could determine this?  That would be a write breakpoint on a unit CT value (offset 0x0039 from the start of the unit's in-battle data - array starting at 0x801908cc - see this reference).
  • Modding version: Other/Unknown

cadence

  • Modding version: PSX
  • Discord username: cadence#6190