News:

11 March 2016 - Forum Rules

Main Menu

New FF4 Advance Editor

Started by Everything, January 21, 2020, 08:19:55 PM

Previous topic - Next topic

Grimoire LD

Oh, it wasn't so much the dialogue strings which made me freak out. It was the order of how they set up events. For instance, Event 500 is the start of the game, fair enough. It starts with some special instructions (0x6B in someway)  to add the moving sky in the background... then it jumps based on switch. They really abused that new event command... it jumps to 00D5 in the event, which is at the end of the event to give the opening dialogue. It's as if they forgot the opening lines and threw them in later, haha.

Oh! I didn't realize you could start modding maps now. Great!
It seems as if you still can't add treasures or NPC's though. Oddly enough Map Exit Triggers can be added... I think.

The more I looked at the Learn Spell Command, I think there's a reason it acts as... compartmentalized as it does. It's not adding one spell. It's adding Up to whatever spell it says. That's why in the Debug Room if you talk to the NPC which gives you all spells and your best weapons, people like Cecil and Rydia will have a filled out White Magic List.

In the SNES version the opening event is one big event. It goes from the Airship all the way to parting way with Kain in the Foyer.

In this, because they lost the ability to carry events over from map transitions (causing crashes if an event tries to transfer to a different map without the right NPC's... or something.)

So the order it goes in is...

Cecil on Airship - 500
Mysidian Memory - 504 (in the Mysidian Map made for this purpose...)
Cecil on Airship (Battle 1) -501
Cecil on Airship (Battle 2) -502
Cecil on Airship (Landing in Baron) - 503

And Event 505...? Kain being brainwashed to take the Dark Crystal after finishing the Sealed Cave. Ridiculous. Town NPC's are also handled in one enormous event and due to all the switches that look for specific areas here and there, I don't know how plausible it is to add anything to them. There were old rumors that TOSE helped program this version and with coding like this, I'm starting to believe it...

Unfortunately the editor still crashes the game if you make any changes to events, even as simple as dialog box changes, at least with the European version.

The Item menu looks much better now, good work. Hmm, 8.4 is weird... it's on everything except for Claws, the unused Assassin Dagger, along with Bows and Arrows, and once you get into the new items it becomes even less consistent. Though it does still hold that it's not on Claws Bows and Arrows.

Everything

I made some improvements to the event editor. It should be easier to navigate between triggers and events now. You should also be able to save your changes without it crashing. Well, it should crash less anyway. It's a WIP.

By consolidating duplicate events, the event editor will automatically free up about 1000 bytes of space after the event script to add new stuff. I haven't tested this out much though.

I added some labels to some of the events. There are 1241 of them, so it's going to take a long time to label all of them...

The add/remove trigger menu doesn't work. It's just a holdover from the SNES/SFC version that I didn't disable. Because of the differences in how the GBA version stores triggers I haven't come up with a way to add new triggers yet.

Grimoire LD

#22
Ah, now this looks a lot cleaner and with the script pointers implemented and where the pointers are jumping to the method to the madness becomes clearer.

A fine job combining redundancies. I still find it ridiculous though that every map apparently needs its own event section for its very Existence. However this does make it easier to program place specific events. So... it may have a point in the end.

I was just testing those field effects on equipment... I am shocked they programmed it this way. You can literally make a Dark Sword into a Soma Drop if you want (which I did) it seems the +10 is set.) I mean... it does open up possibilities, but it is still a strange way to deal with it.

Hmm, while you can set an item to act as an Apple, it doesn't appear to increase HP at all, sadly.

I just tested out the event system by adding Rydia into the party by talking to the bookshelf in Cid's House because I wanted to see what the Dark Sword would teach her. It worked great, what is even more interesting about the command is that it doesn't repeat itself. It checks if Rydia is in the party and seems to know how to skip it, it doesn't even refresh her stats or equipment. I am actually somewhat impressed there, considering I don't think this behavior (of a repeating character joining) event would ever be called in the game normally.

By the way that event system you have set up is rather smooth. I do wish we could play around with the unknown commands though. While you can place them, you can't actually modify them. Same with "Cinematic Effect" which may be more than that since I see it also called when the party is inflicted with status effects, such as in Mysidia.

Interestingly the Dark Sword teaches Rydia "Monster 16", but she can't actually use it, oddly enough. Monster 16 is the name of the last "learnable" spell in the game. (It's likely defaulting to the highest value it can give) That might be something to look into...

Well, coincidentally enough, if Gysahl Greens was made into a Teach Summon Item it would teach Chocobo to Rydia, haha!
But it is interesting... the Membership Pass teaches Shiva to Rydia, which makes sense. It starts from the beginning of Summon Magic. This might be able to be made into something more robust, once we find the spell pointer and the character pointer (fun fact! That was some of the first hacking I did for FFIV.)

Geez, and I thought Golbez was a mess in the SNES version... in this he's just Dark Knight Cecil outside of combat and in combat he for some reason only has a Dark Knight's skills. His weapon crashes the game "Old Waterway Rod", and in his left hand is something that overflows the text. Fixing him might be tricky, especially since it seems he doesn't come with anything that his data should imply that he would have.

All in all a very impressive update.

This update makes the editor seemingly fully usable. From its event and map editing capabilities to item and shop modifying.


March 09, 2020, 11:05:49 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

With this cleaner outlook I think I can start helping with labeling events...

3 - Intro Cutscene for arriving at Baron Castle.
4 - Devil's Road - Mysidia to Baron
5 - Devil's Road - Baron to Mysidia
...
9 - HP/Status Healing Points (Dwarves Castle, maybe elsewhere)
...
16 - Interacting with Fireplace
...
57 - Magazine
...
144 - Meeting with Baigan  (Intro)
145 - Baron 1st Floor Events (but not Baigan Battle
146 - Baron 1st Floor - Leaving Baron with Kain
147 - Baron 1st Floor - Baigan Battle
148 - Baron Foyer Events
149 - Baron Foyer - Apology to Kain after being kicked out of Throne Room
150 - Baron Foyer - Cid revealing secret Airship Hangar
151 - Hallway - Baigan telling Cecil to wait/Officer telling Cecil that he cannot enter
152 - Hallway - The Twins' Sacrifice
153 - Hallway - Using a Gold Needle on the Twins
154 - Throne Room - Audience with the King (Intro)/Officer lines
155 - Throne Room - Meeting Cagnazzo
156 - Throne Room - Cagnazzo aftermath
157 - Black Mage Classroom Events
158 - White Mage Classroom Events
159 - Baron Left Stairway - Meeting Rosa
160 - Baron Prison Events
161 - Baron Barracks Events
162 - Baron West Tower 2F - Speaking with Maid
163 - Cecil's Room Events
164 - Sleeping in Cecil's Bed
165 - Baron Right Stairway Events
166 - Baron East Tower Basement - Pushed back by barrier
167 - Odin's Throne Events
(As a segue. There are two copies of the exact same conversation at two different dialogue sections, dependent on whether Rydia or not is in the party how peculiar...)
168 - Cid's Workers attaching the Hook
...
170 - Taking the Enterprise out of Baron Hangar
171 - Preparing to parley with Kain
172 - Parley with Kain
...
199 - Dwarf Castle 1st Floor - Meeting Luca
...
201 - Dwarf Throne Room - Giott NPC Lines
202 - Dwarf Throne Room - Further Luca Lines
...
(Basically it seems every Dwarf was given their own unique event slot. There seems to be an unused line in 206 that looks to see if you have Cid, but the switch to their final dialogue is set before Cid rejoins the party.)
207 - All Dwarf Castle Crystal Room Events
...
219 - Dwarf Dancer in Pub
...
221 - Dwarf Castle B1 - Fat Chocobo Worshipper Dwarf
222 - Dwarf Castle B1 - Worshipper 2
223 - Dwarf Castle B1 - Wall Guard
224 - Dwarf Castle Infirmary - Finding Cid/Upgrading Ship
225 - Dwarf Castle Infirmary - NPC Cid
226 - Dwarf Castle Infirmary - NPC Cid 2 (seems to be a copy of the previous event)
227 - Dwarf Castle Infirmary - Dwarf Nurse
...
232 - Programmer's Office - Sakaguchi
233 - Programmer's Office - Matsumura
234 - Programmer's Office - Hoshino
235 - Programmer's Office - Taka
236 - Programmer's Office - R. Tanaka
237 - Programmer's Office - Nakada
238 - Programmer's Office - Adachi
239 - Programmer's Office - Adachi (copy of above)
240 - Programmer's Office - S. Tanaka
241 - Programmer's Office - Dobashi
242 - Programmer's Office - K. Koizumi
...
244 - Programmer's Office - M. Akao
245 - Programmer's Office - A. Ueda
246 - Programmer's Office - N. Uematsu
247 - Programmer's Office - K. Ito
248 - B1 Programmer's Office - Getting Magazine
249 - B1 Programmer's Office - ???
250 - B1 Programmer's Office - Tokita
(Amusingly enough, if I'm reading it right, he'll remark an "All male party is boring", even if you have Porom.)
251 - B1 Programmer's Office - K. Narita
...

That's all I've got in me for now.

Everything

Excellent, thank you so much for the event labels! I'll copy those over soon. Thanks for testing too. I'm glad to hear some of the event edits are working.

I added controls to edit a few more event commands. A lot are still either missing or listed as "Unknown". More to come on that.

Kea's document lists an "Item Spell Multiplier" that might determine things like how much HP/MP to add/restore for each item. I'll add that to the item properties soon. Some things might be hard-coded though.

Grimoire LD

Looks like you updated the editor! I just finished playing Chrono Cross again after getting the urge to do so after beating Fedorajoe's wonderful Chrono Trigger: Schala Edition and haven't checked up on the editor in a while.

Looks like you've started to implement the World Maps for editing, neat! It will be great to add new places to the world map without having to load several different tools to do so.

Are you telling me that they used a unique slot for each of the item spells...? Wow! That gives a ton of use for new spell slots that you can fill with... well, basically anything! Spells go up to 265, meaning they take two bytes... I never knew that. Does the game take this into account when you learn spells? Or are they still set to a single byte?

Everything

Yep, the world map editor is live now. It still needs some work, but you can edit the overworld, underground, moon, and the extra overworld from cid's trial (map 350). I didn't include the mini overworld map because it's not accessible and it doesn't have triggers or tile properties.

You might notice some extra triggers on the underground map. Those are actually dummied out moon triggers. The overworld and underground triggers are stored together, but for some reason the moon triggers are stored separately and in a different format (more like the regular maps). Strangely, they left an extra set of incorrect moon triggers with the underground triggers, but they are not accessible because they are not on the right type of tiles. You can see this in the editor because the triggers are clear instead of red.

Spells are normally only 8-bit. The only place where they are 16-bit is for the special item spells. So I don't think the special item spells will be accessible anywhere else unfortunately.

I figured out how the learned spells for events work. All of the event commands have a fixed length, and they used a data block at 080D2DB4-080D30B8 (U) and 080D630C-080D6614 (E) to store any variable width data needed by event commands. It's a mix of spell lists and map background data (open doors, etc.). The spell parameter is a pointer to this data block, and the spell lists are null-terminated arrays of spells (8-bit). I haven't implemented these in FF6Tools yet, but you can at least find them in a hex editor if you want to.

Everything

I finally implemented a way to edit tile properties that I feel pretty good about. The changes are now live.

Instead of having tile properties linked to the tileset (like every other Final Fantasy game I've worked on), every map in FF4 Advance has a separate layout for tile passability and other tile properties. Some maps even have two z-levels (upstairs and downstairs) with separate layouts for each. The moon map uses the same format as the normal maps. The overworld and underground maps use a different format that is more like the other games.

If you select Layer 3, you will see the tile properties as a mask overlay on the map. I'm not super happy about the colors I used, but they work for now. I should probably add some kind of legend that tells what each color represents. You can select a tile (or a rectangular group of tiles) by right clicking and dragging, and you can draw whatever is selected by left clicking. You can switch between upper and lower z-level with a button at the top of the map.

I changed treasures and exits so that instead of being edited like triggers, they are now part of the tile properties. This is how they are stored in the game's data, so it made sense to edit them this way too. It's now possible to add and remove treasures and exits from maps, although there are quite a few steps involved. If ever prompted with a "Save ROM" dialog box when saving, use the "Relocate" option.

I also improved the tile properties for the overworld and underground maps. I figured out how passability works for most vehicles, but I still haven't figured out how the hovercraft is able to move over shallow water. I still need to figure out how the 3D map elements work too (castles and towers).

Spoiler
Town Baron Upper/Lower Z-Level

[close]

Spoiler
Lunar Subterrane with Hidden Paths
[close]

Spoiler
Treasures and Exits edited through tile properties

[close]

Grimoire LD

The weirdness of FFIV:A strikes again, haha! It looks wonderful though. Great work Everything!

Quinn

Hey this RULES! I've been wanting to make a FFIV GBA romhack for a while but haven't been able to find a utility for what I need. Is this available for download?

einlanzer

Wow, I missed this topic. I did a lot of work on FFIV : CC, which has most of the same data structures from FFIVA packed into the eboot file for original FFIV (TAY is a completely different animal.)

I found everything i was hoping to find (monsters, shops, spell data, equipment, etc.) EXCEPT command data. I'm looking at your command documentation right now but it's not making a ton of sense. Shoot me a PM to collaborate on this!