News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: New FF4 Advance Editor  (Read 5213 times)

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
New FF4 Advance Editor
« on: January 21, 2020, 08:19:55 pm »
I'm working on an editor for FF4 Advance and I wanted to share some screenshots and gauge folks' interest.

As anyone who has attempted to hack this game quickly learns, FF4 Advance is actually a Gameboy Advance port of FF4 for the WonderSwan Color (released only in Japan), which in turn is a port of the Japanese version of FF4 for the Super Famicom. But although the GBA and WSC versions are roughly the same, they are drastically different from the SFC/SNES versions of the game. And unlike FF5 and FF6 Advance, it's not just the things you notice (like the updated graphics, bonus dungeons, and improved dialog), the data formats are almost all completely different!

I've managed to work out some of the details and I'm starting to add support for FF4 Advance to my editor, FF6Tools. The changes aren't live yet, but they will be once I get things working a little better. So far I have implemented the following:

  • Map Editor (No world maps yet)
  • Event Editor (Most event commands are not implemented yet)
  • Battle Editor (Monster stats/scripts can't be modified yet)

If anyone has any experience hacking this game and would like to compare notes, please let me know. Other than a short doc by PKT Paladin (from 2009) I haven't been able to find much info. If you are interested in using the editor, please let me know what types of features you would be interested in.

Spoiler:






fedorajoe

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: New FF4 Advance Editor
« Reply #1 on: January 21, 2020, 09:24:15 pm »
To quote Young Master Alucard: "I am interested in this!"

Are you familiar with FF4kster, the quite comprehensive hacking utility for FFIV on the SNES? Ideally, your tool would include all of the same features. FF4kster includes sub-editors for:

* Spells and spell sets
* Weapons, armor, and items
* Shops
* Characters and jobs
* Commands (limited editing ability)
* Text
* Events and event triggers
* NPCs
* Tilesets (limited editing ability)
* Location maps and map settings
* Monsters, monster formation, and formation encounters
* Auto-battles and solo-battles

Other features that FF4kster does not include, but which are desirable:

* Overworld map, event, and location trigger editing
* Graphical editing of tiles
* Ability to import/export data (maps, level-ups, location-based text, etc.)

Very much looking forward to more news about your project!

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: New FF4 Advance Editor
« Reply #2 on: January 22, 2020, 08:29:29 am »
One large thing I have to suggest is to make this compatible with the European version of FFIV:A. FFIV:A has so many weird bugs and glitches in its battle system that it overshadows a lot of the good that it does, those are mostly fixed in the European versions... mostly.

Aside from that FedoraJoe has the right idea. FF4kster is an incredible tool! But has been left aside, it can be updated, but it requires knowledge of Basic if memory serves right, which is something many people aren't well versed with these days.


The idea to import and export materials would be amazing.

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: New FF4 Advance Editor
« Reply #3 on: January 22, 2020, 07:28:16 pm »
@fedorajoe

Thanks for the feedback. Yes, I'm familiar with FF4kster! That and the old Yousei editors were what sparked my interest in ROM hacking in the first place. I've been working on FF6Tools and slowly adding support for the SNES/SFC versions of FF2/FF4 in order to make sort of an alternative to FF4kster. That's all live on my GitHub site if you'd like to try it out. FF6Tools is written in pure javascript, so hopefully it will be more portable and age a little more gracefully than FF4kster.

@GrimoireLD

Yes, I do plan to implement support for the European and Japanese versions of FF4 Advance. I've already done this for FF6 Advance and it went pretty smoothly.

I'm not sure if there's a standard format for importing or exporting maps. What did you have in mind? It would not be too difficult to import and export maps to and from the same version of a game. It could simply spit out a file with a header and the raw binary map data. But every game uses a different map format, so it would not be possible to copy, say, a map from FF4 Advance to FF2us or vice versa. Something like that would most likely require some more serious asm hacking.

Celice

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
Re: New FF4 Advance Editor
« Reply #4 on: January 22, 2020, 10:34:29 pm »
This looks really cool! I tried working on my own project with FF4kster, and while it was fairly robust, the GUI was way too clunky and hard to work with. Especially the map editor. Your program already looks way easier to navigate.

Looking forward to more progress :)

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: New FF4 Advance Editor
« Reply #5 on: January 24, 2020, 10:19:47 pm »
@fedorajoe

Thanks for the feedback. Yes, I'm familiar with FF4kster! That and the old Yousei editors were what sparked my interest in ROM hacking in the first place. I've been working on FF6Tools and slowly adding support for the SNES/SFC versions of FF2/FF4 in order to make sort of an alternative to FF4kster. That's all live on my GitHub site if you'd like to try it out. FF6Tools is written in pure javascript, so hopefully it will be more portable and age a little more gracefully than FF4kster.

@GrimoireLD

Yes, I do plan to implement support for the European and Japanese versions of FF4 Advance. I've already done this for FF6 Advance and it went pretty smoothly.

I'm not sure if there's a standard format for importing or exporting maps. What did you have in mind? It would not be too difficult to import and export maps to and from the same version of a game. It could simply spit out a file with a header and the raw binary map data. But every game uses a different map format, so it would not be possible to copy, say, a map from FF4 Advance to FF2us or vice versa. Something like that would most likely require some more serious asm hacking.

Oh, haha! No, no nothing like that. The idea is similar to what FedoraJoe suggests of making exportable sections such as... let's say weapons, you export that for one project so you can use it for another, and especially level-ups which are kind of annoying to set-up. Maps should be able to be exported and imported from the same game, of course.

Kea

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: New FF4 Advance Editor
« Reply #6 on: February 04, 2020, 11:14:14 pm »
Hello,

I no longer hack FF4 Advance, but I do have notes on various data structures, routines and GFX for the European version that you may find useful, along with some script dumping presets for use with Atlas/Cartographer:

https://www.dropbox.com/s/blzzzsks16llt83/FF%20IV%20Advance%20%28E%29%20Documentation.zip?dl=0

(also hi Grimoire LD! Good to see you still around)

Rudy

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: New FF4 Advance Editor
« Reply #7 on: February 05, 2020, 09:18:41 am »
Might want to look at the PSP version too, I believe a lot of the data is the same as the GBA version.... an editor for the PSP version would be beyond awesome

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: New FF4 Advance Editor
« Reply #8 on: February 06, 2020, 11:26:16 pm »
@Kea Thank you for sharing your files! They will be very helpful.

@Rudy I didn't even realize there was a PSP version of FF4. Thanks for the heads up! Maybe some of the data structures are the same? The graphics are very different.

I'm working on adding a few new features, mostly for editing characters and items. I still have some work to do before I make this live, but here are some screenshots of the level progression editor so far:

Spoiler:



Grimoire LD

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: New FF4 Advance Editor
« Reply #9 on: February 07, 2020, 06:35:09 am »
Oh, that looks nice! The level-up lists in editors are always rather messy, but this looks quite clean and readable. Great work!

Also Kea it is great to see you're still around. I am glad to see someone managed to save their notes and data. Once this editor is up and running it may even be better to move to FFIV:A for general hacking.

The PSP version of FFIV would be great to deal with. I imagine that the program is much more streamlined and getting some of the additional stuff from TAY into a modded FFIV would be terrific. Or even modding The After Years itself for a different experience.
« Last Edit: February 07, 2020, 06:45:52 am by Grimoire LD »

WingCloud8

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: New FF4 Advance Editor
« Reply #10 on: February 07, 2020, 07:41:46 am »
What about HP/MP tables of characters and HP/MP limit greater than 9999/999?

Rudy

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: New FF4 Advance Editor
« Reply #11 on: February 07, 2020, 08:41:48 am »
@Rudy I didn't even realize there was a PSP version of FF4. Thanks for the heads up! Maybe some of the data structures are the same? The graphics are very different.

Yea anything for the graphics I'll assume is very different. Glad to hear you'll look into it. An editor like yours could really open up some cool hack for the PSP version

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: New FF4 Advance Editor
« Reply #12 on: February 07, 2020, 09:11:13 pm »
@WingCloud8 I'm thinking about adding an option to compare two characters' stats by plotting them on the same graph, but I haven't gotten around to it yet. The tables for total HP/MP are not stored directly. Instead there are HP/MP increments for each level. I could add an option to print the computed HP/MP tables to the javascript console, but keep in mind that the increase in HP/MP at each level can be anywhere from 100% to 125% of the increment value, chosen at random. You can see this in the editor as a shaded region that shows the minimum and maximum values that can be attained at each level. So there is no strict table, but rather a table of minimum, maximum, and average values.

Stats above the maximum values allowed by the vanilla game are outside the scope of FF6Tools. Maybe there's a hack out there that allows larger values? I could potentially add an option to increase the maximum values, but it probably wouldn't work without some pretty extensive assembly hacking.

February 10, 2020, 08:51:07 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
The level progression editor for the SNES/SFC versions (US/J) is now live! It's a pretty tedious to make major changes but I am planning to eventually add some standard math functions (linear, exponential, quadratic). I also need to add a plot legend - right now it's hard to tell which curve is which.

Some preliminary functionality for FF4 Advance is also live (US version only, European and Japanese versions coming soon!). A lot of things will corrupt your ROM if you save, but you can try it out if you want. The map editor saves changes to the map backgrounds, but triggers are still a little iffy. You can also edit character and monster stats.

If anyone has feedback, please let me know. Keep in mind that I'm still working on the FF4 Advance support, so you can expect some crashes and bugs, especially when saving.
« Last Edit: February 10, 2020, 08:51:07 pm by Everything »

Madsiur

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 175
  • FF6 hacker
    • View Profile
Re: New FF4 Advance Editor
« Reply #13 on: February 18, 2020, 10:38:27 pm »
That's awesome work as usual Everything!  :thumbsup:

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: New FF4 Advance Editor
« Reply #14 on: February 28, 2020, 12:06:07 am »
FF6Tools now supports the North American and European versions of FF4 Advance. Maps, triggers, battles, monsters, characters, dialog, shops, and some event commands can be edited. Still working on world maps and lots of other details.

Here's a shot of Yang's level progression with fixed HP curve that actually goes up past level 60.


Grimoire LD

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: New FF4 Advance Editor
« Reply #15 on: February 29, 2020, 10:42:56 am »
Hmm, they made things a lot more comprehensive in some ways in FF4:A while complicating others. I find it interesting that they completely changed the way that events worked and made it a lot more code-like instead of the cleaner system they had for the SNES version.

I had a lot of fun looking through the maps and seeing how matters were dealt with in some ways. It does seem as if many of the unknown commands don't have their details included, as an example dialog is created saying "Obtained X Item" and there's an instruction clearly called Give Item, without any way to see what is included in the command.

Also it looks as if enemy stats are completely askewed when using the European version. At least as far as I can tell.

Being able to move NPC's is nice (and to see the absolute 25 NPC madness for how they programmed the different characters showing up for the Lunar Subterrane entrance) and don't get me started on the 10 copies of every PC (including Tellah!) in Kain's Lunar Trial. That is insanity!

Since FFIV A was... strange, so many sprites are reused again and again. I think we could definitely take at least 30-40 of those "hooded enemy sprites" and add other sprites (What a concept!). Also do you know if the maps are templated and changing one changes all types? Or is each map a unique entity and changing say... one of the many Airship maps will not change the rest?

You are well on your way of making FFIV:A a definitive modder's choice though. I am sure once we start digging into the battle code we might find it to be a bit more... malleable than FFIV SNES sometimes turned out to be.

Which I do hope spell and item modding will be your next step once you get maps and events working out.

vivify93

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 1110
  • Guardian of Mystery
    • View Profile
Re: New FF4 Advance Editor
« Reply #16 on: March 01, 2020, 12:09:26 am »
This editor looks exciting for sure! I'd love to be able to port the DS translation to the European GBA version, as well as some of Project II's command and equipment enhancements. :)
All my life I've tried to fight what history has given me.

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: New FF4 Advance Editor
« Reply #17 on: March 01, 2020, 11:49:11 am »
@Grimoire LD Yeah, I was also surprised by how drastic the differences are from the SNES version. Especially since FF5 and FF6 Advance are almost exact copies of the SNES versions.

The event editor is still missing a lot of details. I've deciphered maybe a quarter of the commands. I could definitely use some help there. Here is what I have so far if anyone is interesting in looking at it.

Most of the maps use a unique layout, but a few of them share the same layout. There are several different airship layouts that are used for cutscenes. If you edit one, you will see your changes appear in the others if they share the same layout.

Thanks for the heads up about monster properties in the European version. The address was off by 8. I'll get that fixed soon. I'm working on item properties now, and then I'll add spell/attack properties. Those are pretty well documented in the notes I got from Kea so it should be pretty simple.

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: New FF4 Advance Editor
« Reply #18 on: March 02, 2020, 06:36:23 am »
I just took a look at some of the instructions. I am not sure what wackiness is going on with how they changed "Learn Spell". It almost looks as if the spells learned are by some sort of index or something since Tellah is listed as only learning two "Spells" at Mt. Ordeals and they both correspond to things that are not Black or White Magic so it seems they changed the way that works a bit...

What is this psychotic ordering for dialogue?! Also they seemed to have lost the ability from the SNES version to carry on events from one map (or even one battle...) to another. This is mind-boggling how bizarre this all looks! By all appearances it look like they built this game again from the ground-up!


Well for what its worth...

Command 0x72 is party member that will join.
Command 0x73 is party member that will leave.
Command 0x74 is... something dealing with Party Members. It is called when most characters returns from their Lunar Trial on every party member except for Tellah, FuSoYa and Paladin Cecil.

Oh! Dear me! They even lost the ability to do single battles. Instead they literally *remove* the party member before those battles and add them afterwards. What happened here...?


...Or not. Maybe that's just for the Kain battle? Since it seems that there are no special instructions for Yang or Edge to fight alone.

Command 0x8C is actually rather interesting... it sets equipment onto a character, that seems to be their way of handling the "Shadow Party" deal. So it is...

8C 05 (Character) 0F (Weapon) 00 (Quantity) 00 00 00 00 (Armor) 8F 00 (Accessory) A7 00 

It is also how in the Debug Room it sets all party members to have their best Pre-Lunar Ruins equipment.

Then right after that is 8B which also deals something with the rejoined character. But I can't tell what that may be.

Oh, new update, neat!

Hmm, there is a lot lacking in the items field such as elementals and race modifiers... and status ailments... okay there's still a lot missing as you're likely aware, haha. I think those endless boxes of unknowns should go after the stats for ease of use.
         





« Last Edit: March 02, 2020, 06:46:40 am by Grimoire LD »

Everything

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: New FF4 Advance Editor
« Reply #19 on: March 03, 2020, 09:57:51 pm »
Thanks for the feedback! I'm not sure how the Learn Spell command works. Maybe there's a lookup table with spell lists?

The dialogue commands actually have access to the entire string table. I guess that's why the actual dialogue strings are all over the place.

I added the 3 event commands for adding/removing party members. I think maybe 0x73 is for removing permanently and 0x74 is for removing temporarily? I also added command 0x8C. The equipment parameters are actually 16-bits each since in FF4A there are more than 255 items. So I don't think there's a way to set a quantity for arrows.

I also added the item element/status/monster type flags. Kea's document also lists some data related to weapon animations and sound effects, so I will add those soon. Any idea what Usage 8.4 and 8.5 might be? They're set for a bunch of weapons but I can't figure out what those weapons have in common.