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

vivify93

  • Liquid Flame
  • *
  • Posts: 302
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #315 on: March 17, 2013, 04:53:00 PM »
Something similar happened to me with resting after I edited the location labels. If you went to an inn, used a tent or a cabin, the characters would never wake up. The screen would stay black until you reset.

Final Fantasy IV: Eternal Sleep! :laugh:

I fixed it by importing the old code from a clean version of FFII US. But man, pages upon pages were changed.

 :edit: Hello! I encountered another problem: Warp, Exit, and Emergency Exits don't work in dungeons anymore. I think this stems from me using ff4kster's map editor. I'm trying to use an Emergency Exit to leave Magnes Cave, but it doesn't work on my project ROM. However, it does work on a normal FFII US ROM. I'm not quite sure what happened here, but I know Emergency Exits worked earlier in the game, as that's how I escaped the Antlion Cave earlier in my testing.

I thought you'd like to know, Pinkpuff.
« Last Edit: March 17, 2013, 06:42:52 PM by vivify93 »
Hacking is hard. :sad:

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,419
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #316 on: March 17, 2013, 10:12:17 PM »
PinkPuff, anything about the map properties or whatnot that you need help with?  Tomorrow I will try to get the monster encounter rates over to you when I get upstairs. :)

Anything else you might need that I may have let me know. :)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #317 on: March 18, 2013, 07:27:11 AM »
Warp/Exit bug is now fixed, and in the process of debugging I found the "warpable" flag and added it to the Map Info editor.

I can't duplicate the sleeping bug so I can't really debug it until then... is this happening for anyone else?

PinkPuff, anything about the map properties or whatnot that you need help with?  Tomorrow I will try to get the monster encounter rates over to you when I get upstairs. :)

Anything else you might need that I may have let me know. :)

Thank you so much!! Yes, I would love to have any information you're willing to give me! I'm an FF4 information sponge for the purposes of this project. The more info I have the more robust the editor will be.

If you want me to make some specific requests... I think most of the things in the wishlist thread have actually been found. Did we ever find out what spells and items correspond to what effects outside of battle, and how to change those? If not, that would be a good thing to know. Also any information on the location of graphics and particularly palettes would be nice. I can certainly go digging for it myself but if someone happens to know them already it would speed up the process a great deal.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #318 on: March 18, 2013, 03:57:37 PM »
Warp/Exit bug is now fixed, and in the process of debugging I found the "warpable" flag and added it to the Map Info editor.

I can't duplicate the sleeping bug so I can't really debug it until then... is this happening for anyone else?

PinkPuff, anything about the map properties or whatnot that you need help with?  Tomorrow I will try to get the monster encounter rates over to you when I get upstairs. :)

Anything else you might need that I may have let me know. :)

Thank you so much!! Yes, I would love to have any information you're willing to give me! I'm an FF4 information sponge for the purposes of this project. The more info I have the more robust the editor will be.

If you want me to make some specific requests... I think most of the things in the wishlist thread have actually been found. Did we ever find out what spells and items correspond to what effects outside of battle, and how to change those? If not, that would be a good thing to know. Also any information on the location of graphics and particularly palettes would be nice. I can certainly go digging for it myself but if someone happens to know them already it would speed up the process a great deal.

I found a bit about those. But really only Items. When it comes to spells I had modicum success, but in so doing I couldn't get the spell to do anything else. For instance I changed Sight to where it would act like a "normal" spell, but nothing would happen when used.

I'll check to see if I have notes on these...

Here's what I have on Items...

8260 - 03
8264 - 87 (Event Number corresponding to Warp)
8269 - 04
826D - 86 (Event Number corresponding to Exit/Emergency Exit)
8272 - 05
8276 - FB (Event Number corresponding to Sight/Dwarven Bread)
827B - 06
827F - 01 (?? Siren ??)
8286 - DB (Event Number corresponding to Magazine)

Seems I've misplaced (or never wrote down?) the spell correspondence.

hmm... making spells 40+ into summons seems to invariably summon Asura (completely effectively - party comes back afterwards). Not useful at all, really, but different than the game-ruining effect of setting spells before 31 to be summons.
(sorry, I'll stop talking non-ff4kster now)

That is interesting. I am assuming that the game is looking for Specific sections to jump to. If you use This Spell in This Index then Jump 1C further to use the actual spell. I'm assuming that Asura and Bahamut are handled a little differently though. That may be worth a look.

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 #319 on: March 18, 2013, 10:59:46 PM »
That is interesting. I am assuming that the game is looking for Specific sections to jump to. If you use This Spell in This Index then Jump 1C further to use the actual spell. I'm assuming that Asura and Bahamut are handled a little differently though. That may be worth a look.
... you mean because those are the only two where the order of the *cast* spell is not the same as the order of the *effect* spell, right? I've thought of that as well. I've also considered that maybe the different order has something to do with the multiple effect spells associated with Asura.
Don't know how much time you've spent looking at the game's graphics, but it's also worth noting that:
a) the summoned monsters' graphics are all grouped together,
b) they are the last monster graphics that appear (beginning at 68A18 - the earliest monster graphics begin at 48200),
c) they follow the same order of appearance as the effect spell,
and d) there is a large amount of non-graphical data separating the summoned monsters' graphics and all other monsters' graphics
Incidentally, I've also learned how to make an enemy look like a chocobo (change the graphic pointer to C217 and the "size" to 01), or a sylph (C5D4/C5E0/C5EC, 00). Not very useful knowledge about summoning, but a fun side effect of my search. The other non-enemy summons (Shiva, Indra, Jinn) are all irregular sizes, so while I'm sure it is possible, I don't know enough about how the irregular-sized monsters are encoded to make them enemies.
Some pieces of info I'm missing that surely are key:
- the location of the subroutine(s) for the effect spells
-also, I'm sure the effect spells must also have a separate range identified somewhere. If that could be found, then maybe changing the range of the cast spell wouldn't cause the party to permanently disappear (not to mention possibly make other monsters summonable).
(SORRY, this is totally off-topic)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #320 on: March 20, 2013, 12:33:01 PM »
Working on the monster editor now, and it's easily the most complex editor so far. I am going to try to incorporate the AI editor in with the monster editor. However, I'm reading the docs and have run up against a slight roadblock...

The AIs are stored as pairs of indexes: one is an index of a set of conditions, the other is the index of a battle scirpt. However, I can't find any information in the docs I have on how to interpret the conditions. Does anyone else know how they are encoded, or know where I can find that information?

This is all I was able to find on the subject:
Quote from: Tower of Babil
Each attack sequence group is made of from one to ten two byte entries. The
first byte determines under what condition(s) the attack sequence specified by
the second byte will take place.

The first byte of the attack sequence group is looked up in yet another list
that extends from 76800 to 773FF. This list is another list of lists; each of these sub-lists consists of
from one to three condition bytes terminated by an FF. Once again, the game
code must walk down the list one byte at a time, looking for those FFs.
Presumably, these bytes represent conditions that must all be met for the
specified attack sequence to be used. The condition bytes are looked up in a
table from 76900 to 76AFF. Each table entry is four bytes. I don't know the
exact meaning of these bytes yet.
Let's dance!

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #322 on: March 20, 2013, 03:41:45 PM »
Thanks! I thought I had downloaded everything from thundaga but apparently not.
Let's dance!

vivify93

  • Liquid Flame
  • *
  • Posts: 302
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #323 on: March 22, 2013, 09:17:27 PM »
Hello! Pinkpuff, I've made a bit of a discovery--the bit labeled "Warpable" in ff4kster is actually only the "Exit OK" bit. "Warp OK" is a different bit. I tested a save in the Lunar Subterrane, where I had Rydia cast Warp in my hack. It didn't work. Then I tried it again with a vanilla FFII US ROM, and lo and behold, it worked just peachy!

I wanted you to know. :happy:
Hacking is hard. :sad:

Aether Knight

  • Mist Dragon
  • *
  • Posts: 1
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #324 on: March 23, 2013, 06:00:35 PM »
Greetings all. I have found a bug with your (PinkPuff's) editor. Whenever you save the game within the editor whether you changed anything or not, Golbez in the final auto battle with FuSoYa is removed. This causes FuSoYa to endlessly cast spells on Zemus. Tested it versus a clean rom and it is indeed the editor. Just thought you would like to know that.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #325 on: March 24, 2013, 07:22:54 AM »
Hello! Pinkpuff, I've made a bit of a discovery--the bit labeled "Warpable" in ff4kster is actually only the "Exit OK" bit. "Warp OK" is a different bit.

Thanks for the tip! There are a couple of other "mystery bits" in that byte so I'm sure it's one of those. I'll get to work on that soon and add it into the map properties editor.

Greetings all. I have found a bug with your (PinkPuff's) editor. Whenever you save the game within the editor whether you changed anything or not, Golbez in the final auto battle with FuSoYa is removed. This causes FuSoYa to endlessly cast spells on Zemus. Tested it versus a clean rom and it is indeed the editor. Just thought you would like to know that.

Wow, nice catch! Thanks Aether Knight. The testing I've done on roms saved with the editor has so far been very cursory and not very rigorous at all. I haven't played one as far as the underworld even, let alone the end of the game. I appreciate the feedback very much and I will try to hunt down this bug. It may take a while though, as I'm going to have to progress a game file that far so that I can make a proper save first.

FF4kster is not a fan of Golbez in general it seems...
Let's dance!

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #326 on: March 25, 2013, 07:31:43 PM »
Ok, "exitable" flag has been separated from the "warpable" flag and added to the editor.

Likewise, I tracked down the problem with Golbez and as far as I can tell it is fixed. If anyone wants to verify, please re-download the current version from the Time Cave link on the first post. Interestingly, in the process of tracking down the Golbez bug, I found that the character level up data looks like it isn't being written to the rom...
« Last Edit: March 26, 2013, 06:51:26 AM by Pinkpuff »
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 #327 on: March 25, 2013, 09:25:23 PM »
Interestingly, in the process of tracking down the Golbez bug, I found that the character level up data looks like it isn't being written to the rom...
You mean all characters' level up data? If so, then that's new in the last couple of releases. I did quite a bit of levelup editing in February that worked fine.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #328 on: March 26, 2013, 06:48:17 AM »
You mean all characters' level up data? If so, then that's new in the last couple of releases. I did quite a bit of levelup editing in February that worked fine.

False alarm. It looked that way because there was a huge chunk of code in the character saving routine that was commented out, all having to do with the levelups and so I paniced. Anyway after further investigation, you're right, it's working correctly; I just at some point changed how I was saving it, evidently involving moving the code elsewhere, and forgot to delete the redundant part.
Let's dance!

vivify93

  • Liquid Flame
  • *
  • Posts: 302
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #329 on: March 27, 2013, 10:20:35 AM »
How do I go about adding Golbez back to that battle? Please tell me that I don't have to start all over--I've invested far, far too much work in this project to restart now...!
« Last Edit: March 27, 2013, 11:41:48 AM by vivify93 »
Hacking is hard. :sad: