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

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 #855 on: July 23, 2014, 08:29:01 AM »
I did that once, but then a new version of FF4kster introduced new command modification possibilities, which introduced new ways for it to misinterperet my custom code.
Filling with FFs creates a fix for this and all future versions of the editor

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 #856 on: August 03, 2014, 02:49:21 PM »
Hey PinkPuff,

I think Ff4kster's having trouble editing NPCs, but maybe I'm just fried from what I've been working on...
Seems like (and this is even happening with a clean ROM) if I try to add extra speech data to an existing NPC, it doesn't save right.

For instance, I'm trying to a) change what the soldier outside of the training room says, and b) give him a second thing to say based on event flags. None of these changes are saving properly.

This is actually the last thing standing in the way of making my Shadow Party hack play-testable (as well as testing if it's fully compatible with Ff4kster, which I am trying to do).

 :edit: Upon further tinkering, it looks like it's related to making things conditional upon high numbered event flags (for instance, here I was trying to make different events happen when talking to the Baron Training Room soldier depending on whether flag 254 was set or not).
« Last Edit: August 03, 2014, 06:22:56 PM by chillyfeez »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #857 on: August 04, 2014, 04:38:11 AM »
Hm, I've been working on a demo hack myself and the NPCs seem to work correctly for me, speeches and all, though I haven't tried high numbered event flags yet. I probably will be getting there eventually though, considering some of my diabolical plans may involve a lot of flags  :laugh:

Is it something that can easily be worked around for the time being by using a smaller flag? If so I'd say do that and I'll probably get around to investigating that quirk when I get there. If it does kinda hinge on using those high flags though I can certainly go hunting now...
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 #858 on: August 04, 2014, 05:11:13 AM »
No, it's not necessary now since I figured out the problem more specifically. As a matter of fact, I can only confirm that it occurs if you do the following:
Speech 1 = Event A, If and only if flag 254 On
Speech 2 = Event B, If and only if flag 254 Off

Changing to flag 88 works just fine.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #859 on: August 04, 2014, 06:19:05 AM »
Glad to hear it!

Though on a pedantic technical note, isn't that situation equivalent to:

Speech 1 = Event A, If Flag 254 ON
Speech 2 = Event B, otherwise ( = "-always-" in FF4kster)
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 #860 on: August 04, 2014, 08:14:33 AM »
Probably. I never bothered to learn how conditional speech really works. If it hinges on one flag, I usually put both states in there to save myself having to correct it later. Yes, that's kinda lazy of me, I know.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #861 on: August 05, 2014, 06:05:40 AM »
Update time!

The big thing in this one is that the event editor has been cleaned up a little (references to certain things like placements and messages were off-by-one and you had to manually adjust in your head) but even bigger, it now previews bank 2 messages!

How is this possible you may ask? Well, the event editor now stores a "map preview link" for each event which it will treat the event as having been launched from that map for the purposes of previewing its bank 2 messages (and, coming soon hopefully, npc placements). You can press tab on the event selector to change this link manually so that it treats it as a different one. The links are not saved in the rom so they will restore every time you load; however, the way it figures out the default map link is dynamically determined from the rom data by hunting for a reference to that event in the triggers and npc speeches. The first map (in index order) with a reference to that event will be the default map link for that event. So changing the event call triggers and npc speeches will automatically change the default map link the next time you load the editor, but simply cycling through map links manually in the event editor will not.

If this works out, the next step will be to have it preview npc placements using the same information, thus making the events suddenly WAY more readable at a glance. For example:

"Placement 1 moves up"
"Placement 3 bows head"
"Show Message 4 from bank 2" (when highlighted shows nothing)

would instead read something like

"Placement 1: Yang moves up"
"Placement 3: Edward bows head"
"Show Message 4 from bank 2" (when highlighted shows "I have a bad feeling about this...")

 :edit: Updated again! The above-mentioned changes involving previewing placements have been implemented. Surprisingly didn't give me any trouble whatsoever (or should I say, suspiciously...) As usual, let me know if you find any bugs / odd behaviour.
« Last Edit: August 05, 2014, 07:46:33 AM by Pinkpuff »
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #862 on: August 05, 2014, 10:04:42 AM »
Wow! This is pretty neat! It gives the player a better measure of control! However there's one slight problem that I've noticed and I have no idea how this would properly be handled... when events switch maps mid-way  through the event all of the placements are then off. For instance for the Cecil Sleeping, prologue when it switches to the lobby and than the castle outside the program still reads these as coming from Cecil's bedroom so improper placements are referenced, also event call messages follow the same issue. You can view this plainly by looking at the aforementioned event. That said I love the flags being named and the NPC switches being clearly labeled!



It will make event editing a lot easier in many respects.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #863 on: August 05, 2014, 06:41:38 PM »
Yeah I'm aware of that; it would be exceedingly difficult to have it change maps mid-event, but that's part of the reason you can manually change it. Teleported to a different map? Go back and change the map preview to correspond, go back to editing. Not ideal, I agree, but IMO certainly no worse than what it was before.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #864 on: August 06, 2014, 11:21:29 AM »
Ah that's to be expected. It's a bit rarer than might actually be guessed so it's not that big of a deal.

Oh yes, Flag 26 not labelled by the editor is the flag for talking to a Sylph before Yang awakes, this activates being able to speak to Sheila and get the Pan.

Haha, here's something we should have realized long ago the "Tower of Babil Old Man, says nothing" is actually the Seneschal/Chamberlain coming to help Edge fight Rubicante too late.

The "blank" Flag 01 is the start of game flag. That said, I'm not really sure what that means or what it does because most of the important stuff in the event is handled by activating and deactivating NPC's.

Hmm, it seems "Rubicant main battle/hook" is just the hook on the airship. Since Rubicant's flag is labelled Finding the Falcon.

Interestingly Flag 16 is cleared when Tellah leaves your party, but what exactly does it do? Well let me check on something... No, that wasn't it either. I guess it's an unused flag and may have been used in the beta for something that didn't carry over to the final game?

Set:Flag "Rosa getting Captured" Is actually "Rosa Sick" in Kaipo, as is that entire event actually. The flag sets so Tellah joins the group rather than telling Rydia and Cecil to go back to Kaipo.

"Rosa casting Exit, learning Exit" is fully wrong. Quite literally it's just the normal "Exit" spell being cast.

Cecil flashing ?visual effect 0A? is the Warp spell.

Hmm, that "Feymarch Entrance" flag being set when Rydia rejoins is interesting... it implies that the little speech will not activate if you somehow went to the Feymarch without Rydia.

Flag 10 is cleared by losing Yang in the Tower of Babil... on what that does, your guess is as good as mine.

Oh... maybe Flag 10 needs to be deactivated so Golbez can destroy the stairway into the Tower of Babil as its activated in Cid rescuing the party event.

"Character Graphic 12 Dances" is the "Ninja Path into the Tower of Babil"

Hmm... the Asura Battle Flagi is set by the Lunar Whale surfacing... I never thought to wait that long to get Asura and Leviathan, but I imagine it's another dual-flag in this case...?

The second "Character Graphic 12 Dances" is the "Return to Ninja Path into Tower of Babil"

"Set flag: unknown" is used when fighting Rubicante. That seems to be the real "Main Rubicante Fight" flag.

"Finding the Falcon" has the flag "Heat Shielding the Falcon" which isn't right. It should be,

The first "Kain Stealing Dark Crystal" Flag should be "Reporting to King Giott after Tower of Babil"

Flag "Obtaining Luca Key" should be "Heat Shielding the Falcon".

Opening the Sealed Cave Door Flag is called "Attaching airship drill", which isn't correct.

I... think things got thrown off by that extra "Kain Stealing Dark Crystal" flag, another off by 1 error, it would appear.




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 #865 on: August 06, 2014, 02:53:02 PM »
Is it possible the flag set when tellah leaves determines whether the whole "spoony bard" event takes place?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #866 on: August 06, 2014, 04:06:20 PM »
Hmm, I just checked and that is a clear Event Flag check of "Tellah Fighting Edward" which has to be off. To my knowledge Flag 16 is unused, so I'm not sure why it would be turned off as I don't believe it is ever explicitly turned on in the first place.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #867 on: August 07, 2014, 06:41:24 AM »
Thanks for the corrections!

Those flag names I just copied and pasted from the "Event Flag Log" without checking. I'll go through now and make all those fixes.

 :edit:
Ah that's to be expected. It's a bit rarer than might actually be guessed so it's not that big of a deal.

Actually an idea occurred to me on how to do this in a fairly straightforward manner; I might attempt it today.

The "blank" Flag 01 is the start of game flag. That said, I'm not really sure what that means or what it does because most of the important stuff in the event is handled by activating and deactivating NPC's.

Flag 0 is already labelled as "opeing complete" in the config file, it's just apparently not being read and/or displayed correctly by the editor. Probably just an "indexing starting at 1 instead of 0" mistake.

Hmm, it seems "Rubicant main battle/hook" is just the hook on the airship. Since Rubicant's flag is labelled Finding the Falcon.

"Set flag: unknown" is used when fighting Rubicante. That seems to be the real "Main Rubicante Fight" flag.

For me it's showing "Set flag: Finding the Falcon" in the "Rubicant main battle" event, not "Set flag: unknown"... is that from a different event? Should the "Finding the Falcon" flag actually be labelled "Main Rubicante Fight"?

I... think things got thrown off by that extra "Kain Stealing Dark Crystal" flag, another off by 1 error, it would appear.

But they're not all off by one, just certain ones, correct?
« Last Edit: August 07, 2014, 07:13:49 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 #868 on: August 07, 2014, 06:56:38 AM »
Once again, my clerical skills are... Not to be trusted.
 :blush:

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #869 on: August 07, 2014, 07:16:38 AM »
Don't sweat it! It's a huge help to have that all indexed; even if there are a few mistakes, those can be found and corrected without too much trouble. I wasn't trying to pass the buck to you by any means.
Let's dance!