Author Topic: Developing FF4kster: a comprehensive editor for FF4  (Read 223606 times)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #345 on: April 25, 2013, 11:07:21 AM »
Hi again, Pinkpuff -
So I know you've already got a full plate with this battle sequence stuff, but I just discovered part of the system that I hadn't previously noticed.
Phoenix's condition indices table (http://rb.thundaga.com/monsters/eci.txt) also explains how to modify condition indices.

The table at 76800-768FF is the breakdown of each condition, variable lengths, each terminated by FF.
The non-FF bytes in that table reference the index of four-byte conditions at 76900-76AFF.

SO...
For example, condition 18 (picked at random) reads:
13 04 4B FF

That's:
13 (02 00 00 03), If condition flag is 03
04 (0A 00 00 00), and HP damage
4B (01 17 00 0B), and Self's HP is less than [index 0B in table at 76200]
FF

Look up condition 18 in Phoenix's list, and that is exactly what it days (apparently, index 0B in table at 76200 is 16,000), but you could theoretically change this to whichever three conditions you want, such as:
15 (02 00 00 05), If condition flag is 05
02 (0B 00 00 00), and only enemy alive
09 (07 19 C2 01), and hit by a character ice-elemental spell (literally, "if any enemy attacks with magic command with element 01, ice")
FF

One could even, if so inclined, change the individual conditions, as well as create new ones (a third of the table is FFs). There are thousands of possibilities here.

Sorry, I know that doesn't make the job of creating an AI editor any easier...

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #346 on: April 25, 2013, 05:22:17 PM »
Yup I knew about that actually, and as far as I can tell the editor is actually reading things correctly now (I think). I'm currently working on getting it to translate the scripts into english. The conditions are already translated and seem to be mostly working.

Sorry I haven't been updating very much but this is a slow process and there hasn't really been much to report...
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #347 on: April 25, 2013, 09:17:10 PM »
Yup I knew about that actually, and as far as I can tell the editor is actually reading things correctly now
Ok, glad that didn't screw you up.
Quote
Sorry I haven't been updating very much but this is a slow process and there hasn't really been much to report...
No worries. I can't even begin to imagine how much tedious work must be involved in actually writing ff4kster.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #348 on: April 28, 2013, 04:15:59 PM »
Indeed, it's a testament to your constitution that you're willing to put in this extremely laborious-to-implement part of the system. In the end though it will definitely be worth it.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #349 on: May 28, 2013, 09:02:53 PM »
Hey pinkpuff,
Just checking in. Any progress worth mentioning on the monster editor? Anything else we might be able to help with?

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #350 on: May 29, 2013, 07:58:25 AM »
It's coming along but nothing anyone can really help with right now. I have the script entries translated and I'm about to start working on the editing part. Once I get to the saving I may or may not need help but thanks to those docs and the posts here I think I have a pretty clear idea of how everything is encoded but I certainly won't hesitate to post if something goes wrong.

I'm in the process of getting ready to move so work on this has taken somewhat of a backseat lately but don't worry it's still being worked on! ^_^

Actually now that I think about it I did notice something odd. The Dark Elf seems to have a script that chains together "Dancing", "Remedy", and "Magnet", though I'm certain those should be Fire 2, Ice 2, and Bolt 2... other chains for other monsters seem to be correct so I don't think it's an issue with the fact that they're in a chain. Likewise, other "player spells" for monster AIs seem to be correct as well.

 :edit: Maybe there is something you guys can help with! There seems to be no indication in the monster data itself to tell whether a monster uses "lunar" scripts or "regular" scripts. In the future I will hopefully have a way to get it to automatically detect that from the monster encounter data, but for now it will be stored in a config file. If someone has time to kill and the inclination to do so, I'd love to have a comprehensive list of every monster that uses the "lunar" script set (preferably with monster indexes, doesn't matter what base).
« Last Edit: May 29, 2013, 08:12:17 AM by Pinkpuff »
Let's dance!

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #351 on: May 29, 2013, 01:50:01 PM »
Your best bet on the lunar sequences is to have an option to toggle between normal/lunar when displaying/editing a monster's sequence. This is more hacker friendly since any monster can use either set of sequences - which one is determined by the map they appear on, not the monsters themselves.

(The original game doesn't do it, but it's possible to make monsters that switch behavior based on location, for example.)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #352 on: May 29, 2013, 03:16:06 PM »
If I implement something like that it will be in addition to the config file, not a replacement for it.
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #353 on: May 29, 2013, 05:39:00 PM »
Come to think of it, how does the game know if a monster is on the moon? I know map data has an "underworld" bit, but I don't recall a "moon" bit...

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #354 on: May 30, 2013, 07:10:46 AM »
It doesn't know.

Each monster has an AI index (0-255). If that monster appears on the moon, it will use the moon AI script of that index. If it appears anywhere else, it will use the "regular" AI script of that index.


 :edit: I totally misread your question the first time. I don't know actually, but my guess would be that it looks at the map index.

The purpose of the config file is to specify which monsters you want to default to displaying their AI as though they are on the moon, and which you want to display as though they are not. When designing a hack I don't want to have to try to remember myself which monsters in the list are on the moon and which aren't and risk mixing them up and accidentally messing up the AIs. In future, once I can get the editor to read the monster encounter and formation tables, I will simply have it dig into the moon ones and make its own list of monsters that appear on the moon, and those ones will show up as lunar scripts by default, and dynamically update it as you change the encounters and formations. However, until that time I would expect that moving monsters between celestial bodies would be a rare enough occurance to justify having a config file that the user can update as they move them.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #355 on: May 31, 2013, 03:43:35 PM »
Yeah that plan seems for the best PinkPuff.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #356 on: June 20, 2013, 01:30:57 PM »
Hi folks, I know it's taking a long time but I am still working on this. Everything is displaying correctly as far as I can tell, and I'm working on the editing part. I messed up something logistically with the AI editor component so I need to rethink the structure of it, so it still may be a while before the next release.

Anyway, just thought I'd check in and reassure everyone that I'm still alive ^_^
Let's dance!

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,419
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #357 on: June 20, 2013, 02:16:38 PM »
Yay!  You're alive!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #358 on: June 20, 2013, 02:55:04 PM »
We'll be here to test it whenever :)

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,677
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Developing a comprehensive editor for FF4
« Reply #359 on: June 20, 2013, 10:38:07 PM »
The demon of real life claims us all at some point. Take your time. :cycle:

119 bugs fixed and counting.