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

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #660 on: January 09, 2014, 04:58:43 PM »
Ah? Hmm... do I have a slightly outdated version? I'll redownload what is there and see if maybe I was using a slightly outdated one. Apparently it was slightly outdated... I got the one from RhDN and that one works perfectly fine. Sorry for the false alarm Pinkpuff.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #661 on: January 09, 2014, 05:06:38 PM »
No sweat  :wink:

Before uploading to RHDN I had a more thorough run-through of the different components, looking for any pink areas that I may have missed. I still may have missed some though.
Let's dance!

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #662 on: January 09, 2014, 05:17:24 PM »
So far so good over here - made some changes to Baron Town and changed some of the dialogue: no problem. It looks you have it figured out though so that's good.  :yabin:
"Now I know; and knowing makes it even more confusing..."

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #663 on: January 09, 2014, 05:25:07 PM »
Also, this version seems to include the two names that have been missing since the start, Golbez and Anna. All in all the touch-ups seems to be working and the editor runs as smooth as ever.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #664 on: January 09, 2014, 05:26:55 PM »
Incidentally I managed to figure out a more efficient way to search for the tilesets so I think I can handle that part after all. Also got the palette problem fixed.

Soon we will have tile graphics being read from ROM!  :childish: ...and I won't have to package all those image files with the program! ...and then I can get started on the Map Tile Editor!
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #665 on: January 09, 2014, 05:43:51 PM »
That sounds fantastic! Looks like you already have the future all lined up!

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,425
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #666 on: January 09, 2014, 07:51:51 PM »
I'm relieved that the map editor is coming along!  :)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #667 on: January 10, 2014, 03:37:59 AM »
I'm relieved that the map editor is coming along!  :)

Actually the map editor proper is basically done already as of the version currently on RHDN. The only planned features it's missing are copy/paste, and toggle display of NPCs and background map.
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 #668 on: January 10, 2014, 05:14:46 PM »
I'm relieved that the map editor is coming along!  :)

Actually the map editor proper is basically done already as of the version currently on RHDN. The only planned features it's missing are copy/paste, and toggle display of NPCs and background map.

Sweet!  Love the copy/paste!  Do you think you could add a clone map feature?

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #669 on: January 10, 2014, 06:01:46 PM »
I'm relieved that the map editor is coming along!  :)

Actually the map editor proper is basically done already as of the version currently on RHDN. The only planned features it's missing are copy/paste, and toggle display of NPCs and background map.

Sweet!  Love the copy/paste!  Do you think you could add a clone map feature?

Maybe? Not sure what the point would be though... especially when you could either highlight the entire map, copy it, and paste it to another map, or just set the other map's map index to the map you want it to be a copy of...

In any case, right now my focus is on getting the map tile editor working.
Let's dance!

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #670 on: January 13, 2014, 12:55:03 PM »
That is almost certainly what is happening. FF4kster saves absolutely everything even if you've changed nothing. For most things, this results in no change, but for some things (definitely messages, and probably events as well), even though there is no functional difference in the gameplay, the underlying representation may not be identical to what was there originally.

To that my brain tries to make the analogy of the theoretical aspects of teleportation: Can't actually teleport someone - but they can be scanned, destroyed, and rebuilt to be exactly the same (or are they...)

However - that analogy doesn't help me understand what is actually happening. I look at your program like someone looking at a book (again with the analogies - it's how I understand - how I teach as well, actually) I take the FF4 book off the shelf (not the Japanese one - I can't actually read it = sad) and if I look at it and put it back - no edits: how did it change.

As I write this I kinda feel like I may be edging "stupid question" teritory - but something just doesn't connect with me on why things would change.

My only thought is that what Chillyfeez had hinted at was correct:

FF4kster, bless it's little automiton heart...

Which would mean that maybe my problem is just that my feable skills are no match for the power of the Pink-side  - and only at the end will I understand  :laugh:

But even if that's true I'm still interested in learning anyway  :wink:
"Now I know; and knowing makes it even more confusing..."

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 #671 on: January 13, 2014, 01:19:27 PM »
LordGarmonde, lemme try to explain...

Every bit of information in the game, obviously, has its own starting point within the ROM.
The way the game knows how to find that starting point is by referencing pointers, often grouped together right before the part of the ROM designated to house the data in question.

Now, if you change those pointers, you can change where the beginning of that information is, and the game will handle the change seamlessly. One could, in theory, switch the data for the opening events with the data of the closing events and (as long as they fit I each other's spots) the game would play exactly as normal, as long as the pointers were changed to accommodate the changes.

NOW THEN... presumably, when first programming the game, the developers did not know exactly howlong the data for the opening events would be, BUT, they had a ballpark, so they set aside a block that was a bit more than long enough, set the pointers, and moved on until such time that the opening events were programmed.
Later, when the opening events were programmed, it turned out thatthere was extra space at the endthat was not needed. At that point, instead of moving a shitton of data around and changing a bunch of pointers, they just left the empty space, filled presumably with FFs.

Flash forward to now. In FF4kster, Pinkpuff has programmed the instructions to recognize unused space between events and, well, squeeze it out, so to speak. The pointersareautomatically adjusted bythe program, and any empty space is gathered together after the end of the last event. This, if nothing else, helps the hacker knowhowmuch extra space is still available for more events, or longer events.
When one loads and saves a clean FFIIUS ROM with FF4kster, the program does not just read the book then put it back on the shelf. It looks at the book, finds the empty pages, tears them out, gathers them together, and replaces the at the end of the chapter. Now an aspiring reader could pick up the book, look at the end of a chapter, and kmmediately know how many pages are available for edits and rewrites.

Hope that helps.
Please excuse multiple typos. I'm kind of in a hurry right now.

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #672 on: January 13, 2014, 01:28:50 PM »
That's a hell of a lesson for being in a hurry - I think I get it!

You even extended my book analogy  :cookie: for you sir!

I'll probably have another question later upon reread but ATM I follow. Thanks, Chillyfeez!!  :childish:
"Now I know; and knowing makes it even more confusing..."

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #673 on: January 18, 2014, 06:46:34 PM »
I was thinking about something earlier today and then remembered a conversation from a few days back:

Pretty much, yeah. With XML you define a more or less standard way to represent data, which can be manually edited and expanded at will. Here's and example of what I have in my enemy database:

Yup that's pretty much what I was picturing. FF4kster will still need a ROM file regardless because it gets all sorts of other information from there, including things like the font and menu graphics (so it's literally unusable without a loaded rom). But I can certainly picture something like "export project file" which will create an xml file based on the loaded rom or "import project file" which will read the xml file the user provides and alter the loaded rom according to the specifications.

That said, it probably won't be happening any time soon. It's still evolving at a fairly rapid pace (relatively speaking), and we're still discovering things about the game data that would cause us to have to revisit the structure for some objects fairly frequently. But it does sound like an ideal solution to the problem down the road.

Would there be a way, perhaps, to start on a smaller scale. I was playing around in the Event Editor and remembered trouble I was running into (completely of my own making) keeping track of versions of the ROM at editing stages. What it got me thinking was on any given screen (Events lets say) could it be set up to export whatever I'm looking at: So when I have selected "4: Behemoth battle 51" with a list of the steps could it dump to a text file that would read:

4: Behemoth battle 51
-------------------------
1: Fight battle: Formation 153
2: Set flag 81
3: Play song: Feymarch
4: --END--

So exactly what I'm looking at which in my mind at least must already have instructions to output to anyway so I can see it. Just a thought - but I could see that or something similar as useful in its own right (especially for me) - but maybe as a base for a grander total export down the road.

Also (if it sounds stupid <- ignore) what about some kind of recorded action scheme? Just keep a list going of every action submitted. This would work great if starting from a fresh ROM, but then building something off a previously edited ROM would cause problems - but for me I have a layout in my head of:

Start with ROM A (Fresh Copy) ---> Make Changes & Save as ROM B ---> Make More Changes & Save as ROM C ... and so on

But if the Change Map is preserved from each Step then if I wanted to recreate ROM C all it should take (I think) would be the two Maps <- I'm sure this an obvious connection but I might miss it later so :P - but the thought process was same as applying multiple patches sequentially.

Anyways, just some thoughts - some good, some bad, some ugly - :hmm: 
"Now I know; and knowing makes it even more confusing..."

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #674 on: January 19, 2014, 04:18:26 AM »
Both of those are good ideas but would be a bit of an undertaking. An "undo" feature would also be awesome but again, it's gonna be a fair bit of work.

Right now I just want to get the tile editor working, which can't happen until I get those Airship/Ship tileset offsets figured out and also figure out why the Giant tileset doesn't look quite like it should.
Let's dance!