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

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Developing FF4kster: a comprehensive editor for FF4
« on: March 13, 2012, 07:41:05 AM »
Hi folks,

I know it's been a long time since I posted anything here but I've still been lurking a bit. Anyway, I decided a while ago that I want to create an all-in-one comprehensive rom editor / hacking tool for FF4 (well FF2us really, but if modifying it to also accomodate 4j isn't too difficult then I may look into that as well). I already have a start on it and you can right now edit:
  • weapons
  • armors
  • items
  • shops
  • spells / monster techs
  • spell sets/progressions
  • actors
  • commands (certain features only; what spells they point to, chances of working, etc)
  • event code
  • jobs
  • characters
  • event triggers
  • npcs
  • dialogue
  • battle messages
  • map properties
  • monster stats
  • monster AIs
  • monster formations
  • monster encounters
Also, I know how to do and will "soon" (read: eventually) have incorporated editing of:
  • At this point, everything I know how to do has already been incorporated into the editor. However, I will still be adding things as they are found and documented well enough to do a proper job of it.
Some unique/interesting things I'm trying to go for with this editor:

  • I'm trying to use config files rather than hard-coded strings for as many labels as possible. This includes things like element names, status names, shop names, map names, etc., basically whatever things you need names or descriptions for that can't be read from the ROM directly (things like character names and job names will be read directly from the ROM you're editing and the labels will display as such). Thus, if you change DKnight in the ROM to DarkKn or something, then all the labels for that job will show DarkKn rather than DKnight. Likewise, if you decide you want to have a different elemental scheme, then instead of having to remember "ok whenever I see 'fire' in the editor that means 'water'", you can just go into the config file and overwrite the string "fire" with "water", and the editor will display "water" for you.

  • I'm trying to get the editor to incorporate as much graphic data from the ROM as possible. For example, it currently reads the menu and font graphics from the ROM you're editing. This has a couple of advantages. First of all, if you changed the font/windows in your hack, the editor will look like that as well, so it adds to the look/feel/atmosphere. Secondly, if you changed some of the symbols to something else (like, let's say you took out the Whip weapons and added in, say, the Book weapons from FF3, so you changed the whip font symbol to look like the book symbol), then those changes will appear in the editor (so instead of having to remember "ok whenever I see a whip symbol that means book", you would just see the book symbol you put in there). Ideally though, I'd like it to also display things like, the weapon graphic for the weapon you're editing, with the correct palette (as opposed to the text description it has there right now). Likewise, the monster graphics and so on.

 :edit:
This is now being hosted on Romhacking.net!

http://www.romhacking.net/utilities/914/

How you can help if you're interested

For starters, you can download the demo and let me know what you think of both the idea itself and the implementation:

Windows XP (though it should work on pretty much any modern Windows)

I can also compile it for Unix if need be.

As well, if you have any information with regards to graphics; where the graphics (and particularly the palette information) for various game objects are stored, that would be most helpful. I know some of that information is posted here already, and I will certainly go digging for it when the time comes, but I think it's mostly related to characters and portraits. It'd be great to be able to read the graphics and palettes for spells, weapons, monsters, map tiles, etc. as well. Alternatively, if you know of a reliable technique for finding this type of information, that would be a great help as well.

Cheers!

The version hosted on the timecave in the link above will still be the more up-to-date one at any given time, but I will definitely be submitting periodic updates to RHDN.


 :edit:
=== FF4kster is now on Github ===

For a variety of reasons, I am no longer actively developing FF4kster. However, I have uploaded all the source code to Github just in case the community wishes to pick up the torch. The code is in FreeBASIC and isn't very well commented, but I will still be actively responding to messages, so feel free to send me any questions you may have and I'll do my best to answer them.

I'm glad to have had the opportunity to contribute to the FF4 hacking community in a significant way.

FF4kster Github: https://github.com/pinkpuff/ff4kster

FreeBASIC homepage: http://freebasic.net/
« Last Edit: October 18, 2016, 04:24:06 AM by Pinkpuff »
Let's dance!

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #1 on: March 14, 2012, 02:34:39 PM »
Sweet! I always wanted to have something like this. In my case, because I like having all of the game's data in one easy to use spot for my research proposes. Also, I commend you on the use of config files for labels, that makes the creation of new things a helluvalot easier.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #2 on: March 15, 2012, 10:10:00 AM »
Thanks!

Please let me know if you find any bugs or anything not displaying properly or if the controls/interface are awkward or anything like that.

Also I just updated; the new one now can edit spells effects, starting spells, and spell progressions.
Let's dance!

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #3 on: March 15, 2012, 09:27:44 PM »
I'll definitely look into this when I get the chance.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

vivify93

  • Liquid Flame
  • *
  • Posts: 303
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #4 on: March 16, 2012, 06:10:51 AM »
I don't suppose someday you'd be willing to implement a dialogue editor, would you? :happy: Obviously it would only work for FFII US.
Hacking is hard. :sad:

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #5 on: March 16, 2012, 08:25:26 AM »
Yup, dialogue is definitely part of the plan. Thanks for reminding me, I will add it to the to-do list at the top.

What the program will be able to edit will be limited only by my access to the information required.
Let's dance!

vivify93

  • Liquid Flame
  • *
  • Posts: 303
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #6 on: March 17, 2012, 06:58:02 AM »
I had a bit of an issue when I used it a little last night. I couldn't figure out how to go back out of the editor to the main page and thus had no way of saving my work.

Furthermore, it might be a good idea to implement hotkeys for the icons.
Hacking is hard. :sad:

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #7 on: March 17, 2012, 09:30:34 AM »
Yeah, at some point I'll put something in the program itself that tells you the keys, but for now:

Always:

ESC: Cancel / go back a menu
Enter: Confirm

In menus:

Arrows: Move among menu options
End: Jump to bottom option
Home: Jump to top option
Tab: If it is a "composite" menu (such as element/status or "can equip" menus), alternate between component windows

In numeric inputs:

Up: +1
Down: -1
Page Up: +10
Page Down: -10
Home: Minimum value
End: Maximum value
Backspace: Divide current number by 10, rounding down (effectively erases last digit)
0-9 keys: Multiply the current number by 10 and add the typed digit (effectively allows you to type out numbers)
Note - some things look like numeric inputs but are actually menus; prices for example, as you can't just put whatever you want as a price

In text inputs:

Letters: Letters
Numbers: Numbers
Symbols: If the symbol corresponds to a symbol in the FF4 font (such as a dash or colon), that symbol; otherwise a "?"
Insert: Insert a special symbol from the FF4 font that doesn't have a corresponding ascii symbol (e.g. weapon icons, magic orbs, etc); the first one will appear and you can cycle through them using the arrows (enter to confirm)
Backspace: Delete last letter/symbol
« Last Edit: September 19, 2012, 11:07:37 AM by Pinkpuff »
Let's dance!

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #8 on: March 24, 2012, 08:09:01 AM »
Updated again; now you can edit actors!

By "actor" I mean, the thing that joins your team. You can edit the battle command menus, the starting equipment, and the initial/shadow data it loads/saves. Right now it doesn't consider the possibility that your rom is using the "extra shadow slots" patch but I might add that functionality at some point. Especially if there's a way to definitively determine whether the patch has been applied or not just by reading the rom!

I found an interesting/odd behaviour when testing this component of the editor. It seems that changing the initial data the actor loads changes which battle command set it points to. If you get the actor to load either a shadow slot, or the initial data they're "supposed" to load, it will point to the correct command menu. I have no idea how or why this happens and thus I can't reflect it in the editor, so if anyone has any insight with regards to this I'm all ears.

In addition I cleaned up my code a bit, and also changed around the setup of the spell set editor to make it a little more intuitive (at least it is to me).

Also, pressing ESC on the main menu no longer quits, you have to select the "Quit" option at the bottom (but ESC will still take you back from an editor to the main menu).
Let's dance!

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #9 on: April 08, 2012, 10:29:03 AM »
The command editor is now done.

You can rename any command, but there are only certain ones that can have their other features modified. This is limited mainly by what information I have been able to obtain about memory locations of the routines for those commands and the addresses for the spells they reference and other values. If anyone has any more information in this regard I would love to code it in.
Let's dance!

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,425
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #10 on: April 30, 2012, 05:00:22 PM »
I could of sworn I posted in this topic already...

Anyway, great work so far! 

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #11 on: April 30, 2012, 05:43:34 PM »
An editor that's not in danger of throwing all your work against the wall breaking it to pieces? A comprehensive editor that lets you change so many things in just a few quick keystrokes? Fantastic! You even included commands and the like, wonderful!

Do you plan on adding onto the Commands? For instance changing the % of HP that it takes to use Darkness or Fixing up FuSoYa's Regen? I love that you included Tellah's "Recall" commands and adding all of their possibilities without messy hex editing. (Well you did technically put the ability there and even included the "Freeze" bit on that.)

All in all I am loving where this is going. Finally an editor where I won't have to worry about self-destructing games.

Ah yes, also are you going to look into event editing and map editing to streamline those down the line?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #12 on: April 30, 2012, 10:28:19 PM »
Whoa, adding new spell sets? That's wonderful! As if this thing wasn't user friendly enough! Just one question... there has to be a logical limit with how many additional sets you can have, but there is no enforced limit as far as I can tell. What is the limit that it would not be safe to cross?

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,425
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #13 on: May 01, 2012, 10:40:12 PM »
An editor that's not in danger of throwing all your work against the wall breaking it to pieces?

Was this a shot at me?  :P

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #14 on: May 02, 2012, 12:12:18 PM »
I had thought your editor was actually pretty stable. It isn't? My comment was moreso referring to Zyrthofar's editors that one version breaks equipment and the other version breaks monster stats. Your editor was a really nice start but was lacking some key information, the map properties thing is a wonderful change, the issue as you can imagine is that it doesn't say which map is which, the same follows with item shops and the like.

So your editor was a great start for its time. This new editor already provides simple and easy ways to modify things that used to require a hex editor (e.g. Weapon sprites in battle, commands, spell-sets, command effects for Medicine, Remember, etc.)

Your Treasure Editor is also a nice attempt. The only issue is documentation. I love that I can change treasure, but I don't know Where I'm changing Treasures.
« Last Edit: May 02, 2012, 12:57:36 PM by Grimoire LD »