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

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1035 on: April 03, 2015, 05:31:46 AM »
Ok so FF4kster has been updated with this functionality and has been uploaded.

HOWEVER, when you change the range it might mess with your spell names (though it also might not). Here's exactly what happens:
  • FF4kster, upon loading the rom, reads the names according to what it thinks the ranges should be based on the data currently in the rom.
  • You go into the features editor and change the end of "six-letter spells" to something else.
  • FF4kster looks at the new index and does the following to the list of spell names it has already read into memory:
    • All spell names before the new index get truncated to six letters if they were longer (e.g. "MegaNuke" would become "MegaNu")
    • All spell names after the new index get padded out to eight letters with trailing spaces if they were shorter (e.g. "_Image" would become "_Image__")
  • When it saves, it will put all the newly modified names back to back in memory, trusting that the ROM will deal with them correctly.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1036 on: April 03, 2015, 08:34:31 AM »
Ok so FF4kster has been updated with this functionality and has been uploaded.

HOWEVER, when you change the range it might mess with your spell names (though it also might not). Here's exactly what happens:
  • FF4kster, upon loading the rom, reads the names according to what it thinks the ranges should be based on the data currently in the rom.
  • You go into the features editor and change the end of "six-letter spells" to something else.
  • FF4kster looks at the new index and does the following to the list of spell names it has already read into memory:
    • All spell names before the new index get truncated to six letters if they were longer (e.g. "MegaNuke" would become "MegaNu")
    • All spell names after the new index get padded out to eight letters with trailing spaces if they were shorter (e.g. "_Image" would become "_Image__")
  • When it saves, it will put all the newly modified names back to back in memory, trusting that the ROM will deal with them correctly.

Terrific! I'll try this out and let you know how it all goes.

Ah,  now that is terrific!

I can't see anything wrong with this at all. I also noticed you reimplemented adding what is currently "Monster Spells" back into character's Spell Sets that is wonderful foresight on your part as indeed that would have been my next logical request, hehe.

« Last Edit: April 03, 2015, 09:26:15 AM by Grimoire LD »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1037 on: April 03, 2015, 08:26:10 PM »
Actually that part came as a side-effect. The variable that told it how far down the list to look is the same one it's reading from the rom for the six-letter spell range. I haven't actually tried seeing whether adding monster spells to a player spell set will display correctly in the actual rom now, but if so that would be fantastic.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1038 on: April 05, 2015, 01:54:21 PM »
Actually that part came as a side-effect. The variable that told it how far down the list to look is the same one it's reading from the rom for the six-letter spell range. I haven't actually tried seeing whether adding monster spells to a player spell set will display correctly in the actual rom now, but if so that would be fantastic.

It was one of the first things I've tried and it displays Perfectly, no issues to be found with that aspect either.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1039 on: April 17, 2015, 08:36:38 AM »
Ugh I tried changing it and it's not displaying correctly for me.

I expanded the 6-letter names to include one more spell, and they all display correctly, even in the menus, but the 8-letter spells are all off. I cast Ifrit and it comes up "JudgBolt". Ifrit's sprite still appears and it has the Ifrit effect, but it just has the wrong 8-letter name. Same for all the monster abilities; they're all off...

 :edit: False alarm! I missed one of the pointers there in that original post. It's fixed and working correctly now (though not uploaded yet)
« Last Edit: April 17, 2015, 10:07:35 AM by Pinkpuff »
Let's dance!

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1040 on: April 18, 2015, 06:12:16 AM »
Updated again!

This time:
  • Fixed the above-mentioned pointer error for six-letter spell/technique names.
  • Command stances can now be edited (but not the poses they consist of... yet).
  • Victory theme can be turned on/off in battles that have "no change" music (only the first 6 such battles that DO play the theme will be saved; the rest will revert to "no fanfare").
  • Exp & Gil rewards can now be suppressed in specific battles (only the first 12 such battles that DO NOT give rewards will be saved; the rest will revert to giving rewards).
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1041 on: April 21, 2015, 04:21:49 PM »
Updated again!

This time:
  • Fixed the above-mentioned pointer error for six-letter spell/technique names.
  • Command stances can now be edited (but not the poses they consist of... yet).
  • Victory theme can be turned on/off in battles that have "no change" music (only the first 6 such battles that DO play the theme will be saved; the rest will revert to "no fanfare").
  • Exp & Gil rewards can now be suppressed in specific battles (only the first 12 such battles that DO NOT give rewards will be saved; the rest will revert to giving rewards).

Very good finds! I suspect that the programmers may have forgotten that they already included an "exp/gil exception". If a battle ends with no Exp. or Gil received the game will treat it accordingly and not display "Won 0 GP!" It will skip those all together. I noticed they're on a few of the Auto-Battles which have special enemies for That very purpose.

So where these are by defaults wasted...

FloatEye Auto-battle
Raven Auto-battle
Golbez Auto-battle
Dark Knight Battle
King and Queen Eblan
Dr. Lugae/Balnab/Balnab-Z
Zemus
Zeromus
Zeromus/Zeromus(2)
Imp (Unused)


So... 10 of the 12 of those have no business being suppressed. As that can be done easily enough by making the monster in question give 0 Gil/Exp and one of them is unused. The only time this is used adequately is against the Imp Captains with Yang and the Guards before fighting Yang. They had to be aware of this as Yang gives no rewards when defeated because of the Exp/Gil matter.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1042 on: April 24, 2015, 10:55:09 AM »
Ah, I had a request, could you add Golbez and Anna's  (Call them Extra 1, Extra 2, if you wish) Equip Indexes into the Editor? My most recent hack utilizes these two but the Editor refuses to read them and acts as if they don't exist so when I save in the Editor they are set back to how they were without the last two bits executed on any of them.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1043 on: April 25, 2015, 03:57:33 AM »
That should be straightforward. I'm currently in the middle of reworking the map reading and writing routine though so it may be a while before it happens.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1044 on: April 25, 2015, 08:51:27 AM »
Oh? You have some new plans for map editing? Ah, that's fine. I can just keep a separate hex document that I can paste into the pertinent spot on my side for the moment.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1045 on: April 25, 2015, 09:18:30 AM »
Not sure if you noticed, but some of the maps' backgrounds are messed up (in the editor, that is; they still work fine in-game). I've got a new way of reading the maps now, and now it displays backgrounds correctly, but for some reason writing the data back to the rom is not as straightforward as it would seem.
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1046 on: April 25, 2015, 10:58:02 AM »
Hey PinkPuff, I have sort of an abstract question about FF4kster behavior that I figure might be worth asking you before I attempt to do what I want to try doing.

I want to make two different events draw from the same event data, but from different starting points.

So, for an entirely hypothetical example... let's say I wanted to make two events that call the Mist Dragon battle. We'll call them Event 01 and Event 02 for the sake of this example.

Event 01 (the normal Mist Dragon battle event) looks like this:
Code: [Select]
D8              Toggle music fade
F8 8D           Show bank 1 message 18D with Yes/No box
EF 02           Show bank 2 message 02 starting from pointer ??
FB 47           Play sound effect 47
FD 07           Play visual effect 07
FB 00           Play sound effect 00
EC DE           Fight battle with enemy set DE
F2 0D           Set event flag 0D
FA 25           Play song 25
FF              END
FA 00           Play song 00
C2              Main Character: move down
FA 25           Play song 25
FF              END

Event 02 would remove the choice to turn away from the event, but would otherwise be the same, and therefore would look like this:
Code: [Select]
EF 02           Show bank 2 message 02 starting from pointer ??
FB 47           Play sound effect 47
FD 07           Play visual effect 07
FB 00           Play sound effect 00
EC DE           Fight battle with enemy set DE
F2 0D           Set event flag 0D
FA 25           Play song 25
FF              END

Because those strings of event data are identical (for the portion that is event 02), the game should, in theory, work just fine if I simply change the pointer for event 02 to point to that location within event 01 (that's a statement, not a question).

The question is, how will FF4kster react to a manual pointer change like this? I imagine everything will be fine as long as I don't edit events in FF4kster after that, but what if I do? will FF4kster look through all of my event data and come up with its best guess as to what location within event data to point? And if so, given the unorthodox method employed, will it likely guess wrong?

It's really all just theoretical at this point, but this might be something I'd be doing for my hack if you think it wouldn't cause more problems than it's worth.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1047 on: April 26, 2015, 06:11:40 AM »
Without actually trying it, my speculation is:

The game would read it "correctly" but display it as two sepearate events. It would also conceive of them as two separate events. Thus, when it went to save, it would likely duplicate the instructions and put in a new pointer. This may bloat your event space and may even cause it to give you an "event data overflow" error if you've used enough event space for other events.
Let's dance!

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1048 on: April 27, 2015, 05:12:27 AM »
New WIP version uploaded:
  • Map backgrounds display correctly (finally)
  • Jobs "Extra 1" and "Extra 2" added; you can give them equips and in-battle spell sets, but not menu spell sets.
  • When you start the program now you will notice it itemized everything it's reading as it reads the rom. This way, if it hangs for some reason, people can give more useful bug reports than "I tried to load it and just got a black screen"
Next up: turning glitch worlds into real worlds and vice versa!
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1049 on: April 27, 2015, 06:03:51 AM »
New WIP version uploaded:
  • Map backgrounds display correctly (finally)
  • Jobs "Extra 1" and "Extra 2" added; you can give them equips and in-battle spell sets, but not menu spell sets.
  • When you start the program now you will notice it itemized everything it's reading as it reads the rom. This way, if it hangs for some reason, people can give more useful bug reports than "I tried to load it and just got a black screen"
Next up: turning glitch worlds into real worlds and vice versa!

Wow, that was rather fast! I'll check it out when I get home from class today, again great work! I rather like the debugging aspect you've added to it.

 :edit: Had a bit of time before class to test this. Looks like everything works great! Only problem is when you go to view the map above Smithy's House (I believe) I think it's called "Current Map" when it goes to that map the program crashes. While very minor (you can literally skip over it) it would be a bit of an annoyance I imagine.
« Last Edit: April 27, 2015, 06:18:55 AM by Grimoire LD »