• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
July 15, 2020, 08:21:12 am

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen/RetroArch is recommended for playing/testing, pSX is recommended for debugging.


FFT custom AI scripting concept

Started by Raijinili, March 26, 2017, 11:55:40 pm

Raijinili

I want to externalize the AI. "Externalizing" meaning, when a character on a particular team is to take a turn, the emulator pauses, calls an external script (one per team) to decide what to do, writes the choices into memory, jumps to the FFT code, and resumes. The eventual goal is to have custom AI tournaments.

I ignore the problem of finding an emulator that can do this, and currently must figure out:
- Where to stop. (Entry point of turn-decider.)
- What data to expose to the script.
- Where to write to.
- Where to resume. (Exit point of decider.)

(For complete automation, there needs to be a hack to make "Crystal" automatically pick "Heal HP/MP", but I'm also ignoring that for now.)

Rather than running ASM within the emulator, I imagine the custom AI code running externally, and communicating with the emulator. This method doesn't need a way to generate ASM and find a place for it in the code, or for the scripter to write ASM. I'd aim to have Python bindings for ease of learning, and Lua bindings, since Lua is popular among emulators and the TAS community. The engine will probably be written in Lua, because, again, emulators commonly support Lua.
  • Modding version: Other/Unknown

Xifanie

Quote from: Raijinili on March 26, 2017, 11:55:40 pm
(For complete automation, there needs to be a hack to make "Crystal" automatically pick "Heal HP/MP", but I'm also ignoring that for now.)

...I made that, for Arena, too.
  • Modding version: PSX
Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

nitwit

  • Modding version: PSX

Dokurider

Don't worry too much Rai, I'll keep looking into where the AI begins in proper.

Raijinili

Quote from: Dokurider on March 28, 2017, 06:03:12 pm
Don't worry too much Rai


No U.

It's unlikely that I'll end up doing anything with it, given my track record, and I intended to look for the entry point myself anyway. I just made this topic to draw the discussion out of your topic.
  • Modding version: Other/Unknown