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

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #870 on: August 07, 2014, 08:36:57 AM »
Updated again!

I made the aforementioned fixes to the config files, and also my attempt at making the event map previews change based on the event teleporting you to another map seems to be successful! Let me know if any problems arise, of if you find any more errors in the config files.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #871 on: August 07, 2014, 11:33:59 AM »
Oh! You're right. The "Flag: Unknown" is set by defeating Edge's parents, since Rubicante appears after that I must have confused the two.

Ah, new version? I'll check that out first...

Hmm, looks like there is still the "one off" error, presumably caused by the "Opening the Sealed Cave??", things appear to be thrown out of order when you reach the Feymarch Entrance Event, the flag there reads "Obtaining the Dark Crystal", when it should read "Feymarch Entrance" I'd imagine, meaning that the proper flag that activates when Rydia rejoins should be "unknown" and "Rydia Rejoins". To note though, the "Opening the Sealed Cave??" is used in the actual "Kain Stealing the Dark Crystal" event, which is also one off, I imagine then that one of the "Sealed Cave" flag copies is causing this error.

Now as for your fix...

It works perfectly! I am curious to know how you fixed it! That is quite an impressive work, may I add to have it read each instance of a "loaded map" for the proper message and NPC layouts!



LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #872 on: August 07, 2014, 11:22:07 PM »
It works perfectly! I am curious to know how you fixed it! That is quite an impressive work, may I add to have it read each instance of a "loaded map" for the proper message and NPC layouts!

Indeed - quite impressive! I decided to take a break from real work and FF4 derivations to try and have some fun so I gave the new version of your editor a go...

Since I know I've missed a few steps please accept a well-deserved and long-overdue: "Way to go Pink! This is AWESOME!"   :childish:
"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 #873 on: August 08, 2014, 05:57:35 AM »
Hmm, looks like there is still the "one off" error, presumably caused by the "Opening the Sealed Cave??", things appear to be thrown out of order when you reach the Feymarch Entrance Event, the flag there reads "Obtaining the Dark Crystal", when it should read "Feymarch Entrance" I'd imagine, meaning that the proper flag that activates when Rydia rejoins should be "unknown" and "Rydia Rejoins". To note though, the "Opening the Sealed Cave??" is used in the actual "Kain Stealing the Dark Crystal" event, which is also one off, I imagine then that one of the "Sealed Cave" flag copies is causing this error.

... I'm confused now. What is the range of flags that are one-off? Is it all of the ones after "Opening the Sealed Cave??" all the way down? Simply inserting a flag wouldn't move all the others down like that; if you open up the config file you can see how it has each flag index along with what it's labelled. Some of the ones I copied and pasted must be off by one, but I'm not sure at this point which ones those were... It's gonna be a pain trying to track all these down piecemeal; maybe we should tackle it in the "Event Flag Log" thread and once we have something more complete I can paste it in.

Now as for your fix...

It works perfectly! I am curious to know how you fixed it! That is quite an impressive work, may I add to have it read each instance of a "loaded map" for the proper message and NPC layouts!

I'll do my best to explain. The key observation I made was that when you select an event in the event editor, it has to read through the event script linearly to construct the menu for editing that event. I figured, since it has to do that anyway, I'll also get it to construct a list of map links as it goes, one for each entry in the script, that corresponds to that individual entry. It will start with the currently assigned "preview map" for the event in question, but whenever it encounters a teleport event, it changes to that map, where it stays until the next teleport. The only tricky part was remembering to adjust the list when a teleport action was inserted, deleted, or modified.

Since I know I've missed a few steps please accept a well-deserved and long-overdue: "Way to go Pink! This is AWESOME!"   :childish:

Thanks!  :wink:

I think the process of trying to make a hack of my own using it is giving me a better idea of how it needs improvement in terms of user-friendliness and usability rather than the up-til-now main focus being strictly on functionality and being able to do all the necessary things, even if a little awkwardly.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #874 on: August 08, 2014, 05:55:46 PM »
This is tricky, but I do think I'm right, the extra "opening sealed cave" is throwing everything off.

The "dual flags" is precisely caused by this oddity because when you look at the actual events with these flags their flags are different or unknown (as is the case with the ribbon one).

Here is what they should actually be I think...

59  ("Opening the Sealed Cave??" previously) Kain Stealing the Dark Crystal 2
60  Opening Sealed Cave
61  ("unknown" previously) Attaching Drill
62  ("Feymarch entrance" previously) Rydia Rejoining 2
63  ("Obtaining Dark Crystal" previously) Feymarch Entrance
64  ("Demon Wall battle" previously) Obtaining Dark Crystal
65  ("Kain stealing Dark Crystal" previously) Demon Wall Battle
66  ("Lunar Whale surfacing" previously) Kain Stealing Dark Crystal.
67  ("Asura battle" previously) Lunar Whale Surfacing
68  ("Leviatan battle" previously) Asura Battle
69  ("Bahamut battle" previously) Leviatan Battle
70  ("meeting FuSoYa and having him join" previously) Bahamut Battle
71  ("CPU Battle" previously) Meeting FuSoYa and having him join
72  ("Four Fiends battle" previously) CPU Battle
73  ("Trading rat tail for adamant" previously) Four Fiends Battle
74  (previously "giving Kokkol Adamant and Legend")Trading Rat Tail for Adamant
75  Obtaining Excalibur
76  ("unknown" previously) Obtaining Excalibur
77  Receiving Pan   
78  ("Trading Pan for Spoon" previously) Using Pan
79  Trading Pan for Spoon
80  ("unknown" previously) Behemoth battle 50
81  Behemoth battle 51
82  Behemoth battle 52
83  ("unknown" previously) Fighting Edge's Parents
84  Rydia learning Sylph
85 ("unknown" previously) Obtaining Ribbons
86  ("Exiting Watery Pass - North" previously) unknown
87 Exiting Watery Pass
225 Dark Elf 'Me attack you' battle

I believe this is the way it should go. I think the doubles may have thrown a couple of wrenches into the work, but this looks proper at least.


Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #875 on: August 09, 2014, 04:41:53 AM »
Awesome, thanks! Updated, and uploaded!

As well, I've been going back through this thread starting from the beginning to see if there's anything that slipped through the cracks. So we also have new in this version:
  • Visual Effects config file!
  • Editing out-of-battle spell set names (white, black, call)
  • Who gets their Black set replaced by another string of text, and what that string of text is (once it's discovered how to change which set gets replaced by custom text, that will be editable as well!)
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #876 on: August 09, 2014, 10:28:40 AM »
Oh hey, you changed your avatar to TAY Porom. A nice choice, she is a good character in that game (not really too fond of her outfit though).

I have 19 minutes so I will test this out as much as I am able to...

Looks like everything works properly, there is one oddity I noticed though. At the end of the "CPU Battle" event there is a "Load Map" instruction, but there is no map specified (oddly) in the newer version the program crashes when it tries to read the instruction. In the older version it defaults to Baron Town (which obviously is not correct either). What it should be doing is loading the Moon. I can affirm if the event isn't touched it works all the same, but it seems as if the game does something different here oddly enough.

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #877 on: August 09, 2014, 11:57:40 AM »
Oh hey, you changed your avatar to TAY Porom. A nice choice...
Agreed - very cute; in general and specifically that picture.  :wink:
Looks like everything works properly, there is one oddity I noticed though. At the end of the "CPU Battle" event there is a "Load Map" instruction, but there is no map specified (oddly) in the newer version the program crashes when it tries to read the instruction. In the older version it defaults to Baron Town (which obviously is not correct either). What it should be doing is loading the Moon. I can affirm if the event isn't touched it works all the same, but it seems as if the game does something different here oddly enough.
Nothing to note as far as the editor goes; just an observation regarding map defaults. In the game itself Baron Town is definitely the default. I remember that from numerous walking-through-walls-adventures...the result of walking into chests (or pots, etc.) - the game throws you to Baron Town in the top left, so Map 000, @ (X,Y) = (0,0)  <-- I'm happy when something works out to have an answer that makes sense without having to stretch the imagination...I run into this problem a lot...

Anyway, I recently discovered it to be a direct consequence of the Floor counter going negative. You can provoke that with the 64-floor glitch and then with Warp. The default for the Underground & The Moon is Map 100: The Blacksmith's Shop.

I just wanted to mention that since at them moment I read this update I was watching a FF4 TAS run as just background noise to keep me in a FF4 programming mood. It has an overlay with background info like Map #, Floor #, Pos (X,Y), Current ATB, etc. - kinda neat. It's also pretty funny at times actually, I'm going to post a little blurb about it over on The Drawing Board.  :tongue:
"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 #878 on: August 10, 2014, 07:25:46 AM »
Oh hey, you changed your avatar to TAY Porom. A nice choice, she is a good character in that game

I agree!  :childish:

(not really too fond of her outfit though).

Aw, but it's so cute! And yet somehow kinda sexy at the same time. Not to mention... pink!  :celosa:

Looks like everything works properly, there is one oddity I noticed though. At the end of the "CPU Battle" event there is a "Load Map" instruction, but there is no map specified (oddly) in the newer version the program crashes when it tries to read the instruction. In the older version it defaults to Baron Town (which obviously is not correct either). What it should be doing is loading the Moon. I can affirm if the event isn't touched it works all the same, but it seems as if the game does something different here oddly enough.

I haven't looked into this yet, but if there's no map specified, I can see why the new version would crash. I haven't changed the way it does the actual parsing of the events themselves so it's strange that it would suddenly change in that particular way. Nevertheless, fixing this is taking top priority.

Agreed - very cute; in general and specifically that picture.  :wink:

I love Porom so much! It's a shame her scenario seemed to have about as much to do with Kain as it did with her though...
Let's dance!

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #879 on: August 10, 2014, 08:57:40 AM »
Looks like everything works properly, there is one oddity I noticed though. At the end of the "CPU Battle" event there is a "Load Map" instruction, but there is no map specified (oddly) in the newer version the program crashes when it tries to read the instruction. In the older version it defaults to Baron Town (which obviously is not correct either). What it should be doing is loading the Moon. I can affirm if the event isn't touched it works all the same, but it seems as if the game does something different here oddly enough.

I haven't looked into this yet, but if there's no map specified, I can see why the new version would crash. I haven't changed the way it does the actual parsing of the events themselves so it's strange that it would suddenly change in that particular way. Nevertheless, fixing this is taking top priority.

I was just thinking about it - could it be that it is getting snagged trying to load the Big Whale. If I recall it goes from CPU-Room -> Outside (Giant Explodes) -> Big Whale ("Think that's sweet of you to say hot-shot?!") -> Flying to the Moon -> Whale Again ("I'm the only Caller you've got.") -> Moon's Surface  - just a thought. Good luck!

I love Porom so much! It's a shame her scenario seemed to have about as much to do with Kain as it did with her though...

Yeah - I noticed that too. I remember getting into the last chapter and going over the previous installments in my mind and thinking "Hmm...Palom had a pretty involved tale with Lenora and all that...and Porom...yeah, what the hell - she barely had anything...what a total rip!"  :bah:  :lame:
"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 #880 on: August 11, 2014, 05:45:30 AM »
Ok fixed and uploaded.

The problem was that the moon was being loaded "on the moon/underground"... in other words, as far as the editor was concerned it was trying to add 256 to the map index of the moon surface, resulting in an index way past the end of the list of maps. So I just threw in a check there that makes sure the map you're trying to load is indeed within the bounds of the list, and if it isn't, subtract 256.

Anyway I haven't tried saving a rom with it and making sure the event still plays out correctly since I don't have a save file anywhere near there, so here's hoping!
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #881 on: August 11, 2014, 09:59:29 AM »
I just tested this by setting the CPU event much earlier and it works just fine. Nice fix there PinkPuff!

Oh yes, are you aware that Chillyfeez has finished the first iteration of his Shadow Party hack? He's even included a new actors.dat to go along with it!

So now the Shadow Slots are completely freed up! We can have any character join whenever is necessary. This will definitely increase the freedom for people who want to change the story in a larger, more significant fashion (read:Chillyfeez, again).


Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #882 on: August 11, 2014, 11:19:25 AM »
Yes! And I will be making my best attempt to make FF4kster compatible with that patch in particular. I know my policy is normally that FF4kster doesn't consider outside patches, but for this I'm willing to make an exception!
Let's dance!

vivify93

  • Liquid Flame
  • *
  • Posts: 303
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #883 on: August 11, 2014, 11:07:35 PM »
Dropping in to say thank you so, so much for your hard work, everyone. Also, thanks for finally implementing the item description editing, Pinkpuff! :)

 :edit:
Updated again! This time... ...

... ... wait for it ... ...

ITEM DESCRIPTIONS!!

Here's how it works: In the Features editor you can change the range of items that have descriptions. In the Messages editor, you can edit what the descriptions themselves say (their text). In the editors for the various kinds of items, you can edit which item has which description index, if that item is within the range of items that have descriptions. It will be in the same box with the name and other misc info.

As usual, have at 'er and let me know what kinds of horrible game-destroying bugs I've introduced this time ^_^;
Hahah, I could've done my update back in march?
« Last Edit: August 12, 2014, 02:53:28 PM by vivify93 »
Hacking is hard. :sad:

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #884 on: August 12, 2014, 10:54:08 AM »
Until I was fixing a glitch for Project II (and thereby Combat Boost), I noticed that you added coordinates in your map editor which makes editing placements and event setups So much easier than calculating it in your head, thank you very much for that!