Final Fantasy Hacktics

Projects => New Project Ideas => Topic started by: Raijinili on March 26, 2017, 11:55:40 pm

Title: FFT custom AI scripting concept
Post by: Raijinili on March 26, 2017, 11:55:40 pm
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.
Title: Re: FFT custom AI scripting concept
Post by: Xifanie on March 27, 2017, 01:50:52 am
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.
Title: Re: FFT custom AI scripting concept
Post by: nitwit on March 27, 2017, 04:07:39 am
This interests me.
Title: Re: FFT custom AI scripting concept
Post by: Dokurider on March 28, 2017, 06:03:12 pm
Don't worry too much Rai, I'll keep looking into where the AI begins in proper.
Title: Re: FFT custom AI scripting concept
Post by: Raijinili on March 29, 2017, 01:47:56 am
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.