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

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #135 on: September 21, 2012, 03:27:02 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.

Yep, completely missed it. Went back and looked at it. Very good proof of concept in action. Thanks for the confirmation. Now that's all starting to make sense. Though now the difficulty for PinkPuff is in how to make this all work in the FF4kster editor without becoming a mess. However until that happens we have Hex editors.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #136 on: September 21, 2012, 04:04:34 PM »
It looks like there are separate indices for the Underworld. They restart from zero at Kokkol's Smith entrance, same as the map indices. The last Overworld entry is F9, so we can probably add a few more chests without removing any. I'm not about to do it unless Pinkpuff can get inc/decrementing these indices automated in the editor; you'd have to be insane to do these by hand.
« Last Edit: September 21, 2012, 04:21:16 PM by Dragonsbrethren »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #137 on: September 21, 2012, 04:33:14 PM »
Recalculation is the most likely solution, hmm? In theory it doesn't sound that difficult to implement, in practice though, I'm not entirely sure how easy it would be to get that to work. Good to hear though that there is a second index for the Underworld/Moon. I had no idea that those two even used that much treasure. But eh, F9 is... 6 less than FF, I guess that's something. So all 255 Treasures are used on the Overworld then, I take it?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #138 on: September 21, 2012, 04:49:37 PM »
F9 is the overworld. I didn't check what the underword/moon end at.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #139 on: September 21, 2012, 04:52:14 PM »
Oh, I completely misread the above statement as Underworld instead of Overworld. Now that is a relief and leads me to believe that we can expect to have a lot of free space (and some freed up space when you take the Tower of Babil, Crystal Palace, and Sealed Cave wrong treasure indices into account)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #140 on: September 21, 2012, 07:43:38 PM »
Since we've been on a bit of a Location Triggers binge I decided to clean up the old NPCs document, using Wordpad, a bit of spacing, it looks much more readable (then again its readability problems may have just been caused by my notepad and whatnot. I've started to decode it, and will do so next week, but I'll be away for the weekend, or at least away from my main computer.

Ways to read it. Load it in Wordpad. Go to View, change it to No Wrap, and you should have a properly spaced clean looking document, If there are any problems, please let me know.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #141 on: September 21, 2012, 08:01:49 PM »
Looks horrid in Notepad++ because I have tabs set to four spaces. I really recommend using spaces instead of tabs, that'll ensure everyone sees it the same way. (Also consider this a plug for Notepad++; it can automate this.)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #142 on: September 21, 2012, 08:14:19 PM »
The problem with spaces as you can imagine is that it takes even more time to get things positioned while just using tab makes things a simple matter all together.

I didn't count on anyone using it on anything but WordPad. I tried to use NotePad++ to instantly fix it as you suggested it, but I couldn't find anything like that in its Edit feature, maybe I missed something.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #143 on: September 21, 2012, 08:34:49 PM »
I don't want to go into the whole tabs vs. spaces argument here, but you mentioned cleaning up the document, and you've made it look worse on my end. Phoenix's wasn't perfect, but the text is even more off now. While you can use Notepad++ to replace tabs with spaces, it's just not going to give decent results in this document. What you can do is use its option to insert spaces instead of tabs:

Settings -> Preferences -> Language Menu/Tab Settings
Tab Size: 8 (or whatever)
Replace tabs by space.

When you hit the tab key, it'll insert the correct number of spaces, working exactly like a normal tab (unlike the replace option, which always inserts X spaces, rather than up to X). It'll take a little work converting manually, but it'll be worth it for ensuring the document looks the same to everyone. Unfortunately, the replace option can't automate this for some reason (you'd think if you told it to replace all tabs with tabs when you had this setting enabled, it would do spaces instead, but it doesn't.)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #144 on: September 22, 2012, 05:32:04 AM »
Though now the difficulty for PinkPuff is in how to make this all work in the FF4kster editor without becoming a mess.

Doesn't seem too difficult if I understand correctly...

When writing the info back to the ROM it would just iterate through all the triggers in all the maps, counting how many treasures it comes across. When it reaches the end of the list of triggers for a given map, the treasure index for the next map is the current running total. Simple, intuitive, linear running time, and the user doesn't need to worry about it.
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 #145 on: September 22, 2012, 03:41:57 PM »
Hey Pinkpuff,
I just noticed a little bug in the event editor: since the main character and NPCs have a slightly different set of available actions, inputting "You Toggle Visibility" always causes the main character to become invisible.  This is because NPCs can toggle invisibility, but the main character has separate commands to disappear and reappear.  It's just a tiny little thing, but I just spent the better part of an hour trying to figure out why I couldn't make my main character reappear  :eek:

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #146 on: September 23, 2012, 07:17:24 AM »
I'm afraid I don't understand...
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #147 on: September 23, 2012, 01:22:19 PM »
It's not really a bug in the editor as much as it is a peculiarity in the way the game is programmed. If you go to Character Movement, choose You (who I believe is always the main character) there's a slight text error here. Main Character has a different set of animations which begins at C0-CF, as I'm sure you're aware of because you programmed it in that way. Now for their commands you have for C8 - Toggle Visibility, and C9 Do nothing. When in reality it should read C8 - Make Invisible. C9 - Reappear. Or something to that matter. I believe that's all he's referring to.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #148 on: September 23, 2012, 02:32:04 PM »
Double Post: Looks like you were right DragonsBrethren using NotePad++ and using the directions you specified did make everything look immaculately nicer in even normal Notepad.

Here's a truly cleaner document which should work fine in any notepad-esque application.

 :edit: Another quick Editor fix. Event 0C which is called "Empty" in Phoenix's Event Editor and "Empty Chest" in your editor, Pinkpuff is actually the "Locked." message for places like the Waterway and Equipment Shop in Baron. Though in theory it should be easy to lock a chest with that message and require a specific item to open it.
« Last Edit: September 23, 2012, 02:39:44 PM by Grimoire LD »

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 #149 on: September 23, 2012, 02:51:54 PM »
Yes, that's the right idea...
08, 18, 28... B8 are instructions to make a NPC toggle visibility (becoming invisible if visible, and becoming visible if invisible).
09, 19, 29... B9 are instructions to make a NPC jump two spaces sideways.
C8 is the instruction to make the main character invisible.
C9 is the instruction to make the main character visible. (main character cannot jump two spaces sideways)
As a matter of fact, all main character movement instructions after C7 differ from their corresponding NPC instructions.