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

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,267
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #120 on: September 21, 2012, 09:28:55 AM »
ah, yes, didn't even see that you had done that.  The file I was referring to was the same one, BEFORE you decoded the whole thing.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #121 on: September 21, 2012, 09:30:18 AM »
Ah, a quick question. When you moved a treasure did you turn another trigger into a Treasure or did you move one Treasure to another location?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,267
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #122 on: September 21, 2012, 11:16:01 AM »
ah-ha - good question...
at first, I was just talking about moving the x/y of an existing chest, but I just tested switching a chest with an exit.  Seems if you keep the x/y locations, but change the instructions, the exit will work but the chest will be invalid.  If you keep the instructions but change the x/y locations, they will both work.  It's almost like the ROM checks for all treasure chests first, then when it sees the first non-treasure trigger, it ignores all subsequent treasure triggers.
so:
original
Quote
2A   Castle Baron (1F)            A87EE-A8824   0D 03 FE 00 1E
                           0E 03 FE 80 CE
                           0F 03 FE 80 E2
                           08 00 2B 0E 07
                           01 05 24 CC 0D
                           08 0F 24 8F 12
                           10 0A 24 53 0D
                           05 05 66 04 08
                           0B 05 67 04 08
                           06 0A FF 03 00
                           0E 05 FF 01 00
doesn't work:
Quote
2A   Castle Baron (1F)            A87EE-A8824   0D 03 24 53 0D
                           0E 03 FE 80 CE
                           0F 03 FE 80 E2
                           08 00 2B 0E 07
                           01 05 24 CC 0D
                           08 0F 24 8F 12
                           10 0A FE 00 1E
                           05 05 66 04 08
                           0B 05 67 04 08
                           06 0A FF 03 00
                           0E 05 FF 01 00
does work:
Quote
2A   Castle Baron (1F)            A87EE-A8824   10 0A FE 00 1E
                           0E 03 FE 80 CE
                           0F 03 FE 80 E2
                           08 00 2B 0E 07
                           01 05 24 CC 0D
                           08 0F 24 8F 12
                           0D 03 24 53 0D
                           05 05 66 04 08
                           0B 05 67 04 08
                           06 0A FF 03 00
                           0E 05 FF 01 00

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #123 on: September 21, 2012, 11:21:19 AM »
So wait, it is that simple? I could've sworn I had tested placing all of the chests in the beginning.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,267
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #124 on: September 21, 2012, 11:48:21 AM »
what I didn't try (and now that I think about it, what you WERE trying to do from the start) was completely replace an exit with a treasure chest (that is, remove an exit, add a treasure).  This may not be possible without at least removing another treasure somewhere else (?).  I think I remember reading Phoenix saying that the game has a fixed amount of space devoted to treasure locations... though it seems very strange that you wouldn't be able to steal an exit slot to give to treasure.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #125 on: September 21, 2012, 12:31:56 PM »
Yes, that's precisely what I was referring to. I had thought at first you had come across a document that details this elusive "Treasure Index" that map data seems to contain and only once I remembered that I realized why extra chests couldn't be spawned I realized that was the reason. This Treasure Index thing may have the answers, if we can locate it.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #126 on: September 21, 2012, 02:28:32 PM »
Just from a quick glance, the treasure index may indicate how many chests to skip ahead. Baron is $00, Kaipo Mist is $07. Baron has seven treasures. I haven't tested this yet, but maybe changing Kaipo Mist to $08 will allow Baron to have an additional working chest? It would certainly be an odd way of handling it, but this is an odd game internally.

Edit: Yep, that seems to have done it.



The chests do all have to be in the beginning, before the other events. I changed that door into a treasue with Kaipo Mist's index set to $08. It didn't work. I swapped its position with Baron's Inn door (so I wouldn't have to edit the map to make it accessible as a treasure), made the Inn door into a treasure, and it worked perfectly. Changed Kaipo Mist's index back to $07, just to prove we're not idiots, and it stopped working again.
« Last Edit: September 21, 2012, 02:45:59 PM by Dragonsbrethren »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #127 on: September 21, 2012, 02:39:27 PM »
Well done Dragonsbrethren! That is that long time mystery solved. Does that mean that there's only 255 Treasures allowed though? I always thought there were more chests than that in FFIV.

 :edit:

Quick question though. Did that take a spot from Kaipo? As in did one of those treasure triggers no longer activate?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #128 on: September 21, 2012, 02:44:03 PM »
I haven't made my way over to Mist to test yet (yeah, it was Mist, not Kaipo, got my internal order mixed up); hopefully I have a save without those treasures collected.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #129 on: September 21, 2012, 02:46:18 PM »
Hmm, would an easier way to be to erase the beginning event, load up in Mist and check from there? With the editor I've been finding a bunch of event shortcuts to help with testing all those sorts of things.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #130 on: September 21, 2012, 02:52:41 PM »
Nah, I had a save. One of the treasures in Mist can't be collected with this change in place. So if you add treasures, you need to update every map's index. Kind of sucks, but it works for what I want to do, it's better than not being able to change them at all.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #131 on: September 21, 2012, 02:59:41 PM »
That's very true. What an odd limitation for the game to have only 255 Treasure Chests (Maybe 510 if it Underground/Moon uses a seperate index?) available in chests.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #132 on: September 21, 2012, 03:05:23 PM »
Yeah, I'll check that out in a bit. Can't say I've ever counted the chests/treasures in this game. What's interesting is this means parts of the Sealed Cave, Crystal Palace, and Subterrain (or rather, the maps that follow them) have their index set too high, which is why you can get treasures from other triggers in those maps. The system seems to have been put into place to specifically prevent false positive chests from happening (otherwise, why use an index at all? If you're going to step through this data every time anyway, you could just determine it automatically).

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #133 on: September 21, 2012, 03:10:57 PM »
Oh of course! That fully goes to explain that old bug. That's some pretty good insight into the matter. With that kind of thought process it makes sense that it would be put together that way. Is that also the reason that treasure come first before anything else in the Location Trigger Data?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #134 on: September 21, 2012, 03:17:36 PM »
Yeah, I edited that bit into my first post about this, but I guess you didn't see it. Now what I didn't test was changing, say, the second teleport and setting Mist's index to $09.