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

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,419
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #30 on: May 17, 2012, 02:59:00 PM »
Not yet. 

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #31 on: May 20, 2012, 04:40:41 PM »
The command settings seem to work fine for me. As a test I changed Recall to randomly summon the first eight summons and there is something fairly interesting that happens here.

I have the command on Dark Knight Cecil and when he had used it before I modified things, nothing happened. The game wouldn't even say "not enough MP!" but when I lowered all of the summons that could be summoned to 0 MP, the summons would appear but the message "Not enough MP!" would appear and the summon would de-summon itself as if it was a failed Odin. I'd never seen behavior in that manner before.

This is because the animation of summoning them is separate from the summoning itself. This was tested by changing all MP costs on the Summons themselves rather than their animations to 0 MP except Chocobo and in each case except Chocobo it worked as a proper summmon would.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #32 on: June 19, 2012, 08:28:11 AM »
The event editor now appears to be working, though I have only done very rudimentary testing on it so far. It allows you to edit the code for events, but does not currently allow you to edit how or when the events are triggered (though that will be coming eventually). Also, be careful with adding too many lines of code as there are currently no safeguards preventing you from overflowing the events section into whatever comes after it when you save... once again, something I will definitely get to at some point.

The controls for the code editor:

ENTER: Edit the current line (change the function call and/or parameters).
INSERT: Insert a new line of code before the current one.
DELETE: Remove the current line of code (shifting up whatever's after it).
BACKSPACE: Delete all the code for the entire event (don't worry it will prompt you to make sure you really want to do that).
ESC: Return to the event selection menu.

Please let me know if you find any bugs or strange behaviour.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #33 on: June 24, 2012, 11:58:45 AM »
Sorry I couldn't help with the Bank 2 problem, but I should be able to test this pretty thoroughly, great work once again PinkPuff!

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #34 on: June 25, 2012, 06:39:01 AM »
Thanks!

Sorry this one took so long, but I really wanted to get the event editor done before I work on something like the character editor, which in order to test a lot of things like starting stats and xp progressions and stuff I'd have to keep starting new games, which without a way to easily skip past the opening and edit your starting party, would be a very time-consuming and annoying task.

Don't worry about not being able to help with bank 2, I knew before posting it that it would be a shot in the dark; it's a very confusing thing. But I should still be able to make a dialogue editor that will be able to edit the actual text of the messages... the only problem really is figuring out how to reference a particular message from bank 2 so you know what numbers to put in for the events.
Let's dance!

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,419
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #35 on: June 25, 2012, 12:39:10 PM »
When I get home from work I can fix your dilemma on the new game thing.  :D

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #36 on: June 25, 2012, 06:28:09 PM »
I've taken a cursory look and this event editor is absolutely amazing! I did not realize how much FFII used movement commands though, that is literally at least 80% of event instructions if not more.

While this is an incredible step in the right direction it only brings to the forefront how little control there is when you don't have the map characters in front of you. You can poke around and guess a little, but without the knowledge of where each and every individual actor and sprite is it makes it kind of difficult. Though if I recall right there's a document already here somewhere on how to find what actors are in each map so that shouldn't be too much of a problem in the end.

Looking at the bank 2 deals and seeing that it looks for map pointers may lend itself to an eventual answer. For instance "Received Package" is 16 in that. But I have to say at times that the line placement is just random. In the middle of the starting cutscenes there's a Bank 2 reference for something like "Is everyone okay?" Maybe it's referenced later on? No idea why that would be randomly thrown in. And if you change the map, you change the text that goes with it. You figured that out already which is likely the cause for concern.


I was also really excited to see that you could board a ship and move it as you like! But then I tried it out and its clear they never got far with programming it. You go through anything and everything and there's no way to get off of it. It's little surprise it's used in that single solitary event.


EDIT: The map system is a little bit of a hassle, mainly because of how disjointed everything is and how the three main maps, Overworld, Underworld, and Moon are about in the middle to tail end of the maps. Using Phoenix's FFIV Tools as a reference to the maps makes that easier though.

EDIT 2: I spent a good deal of time deciphering what each of the visual effects were, testing them from the airship at the start of the game.

In the end not entirely sure how useful it is but eh... it's there.

It may be more appropriate to rename "Visual Effect" to simply "Cutscene" since that's more or less what the vast majority of these are.


Visual Effect 0  - Red Wings flying back to Baron
Visual Effect 1  - Red Wings landing at Baron
Visual Effect 2  - Bomb Ring (Without the fire and Bombs returning to wreak havoc)
Visual Effect 3  - Airships bombing Damcyan (Also changes the music) (If not used in the Overworld will produce a few glitch graphics)
Visual Effect 4  - Rydia battle? (Includes fighting Rydia, Titan, and the landslide in Mist, seems to freeze the game when not used in its appropriate spot only in a Map. It works surprisingly fine on the Overworld. It may have something to do with a Load Map instruction coming right after though. Regardless even that does not work in a normal map.)
Visual Effect 5  - ? (In a map it shows some sort of static wave on the player that quickly vanishes, also actors don't immediately appear until a few seconds later when the map is first accessed.)
Visual Effect 6  - Using Healing Pots graphic
Visual Effect 7  - Mist Dragon Gathering
Visual Effect 8  - Bomb's wreaking havoc from Bomb Ring
Visual Effect 9  - Prologue (Will lead to a black screen if used outside of its proper event? Not sure how this one works yet.)
Visual Effect 10 - Takes you to outside of Baron Town to the near East. I can't think of it's purpose.
Visual Effect 11 - As above, it seems.
Visual Effect 12 - Being bombarded.
Visual Effect 13 - Nothing, didn't do anything when used.
Visual Effect 14 - Agart Mountain being blown away.
Visual Effect 15 - Part of the Leviathan sequence.
Visual Effect 16 - Second part of Leviathan Sequence.
Visual Effect 17 - Ship being sucked in to whirlpool by Leviathan.
Visual Effect 18 - Kain's Red Wings meeting with Cecil.
Visual Effect 19 - Kain's Red Wings leaving.
Visual Effect 20 - Kain taking Cecil to the Tower of Zot.
Visual Effect 21 - The palette of the map slightly morphs and the text box turns orange.
Visual Effect 22 - The Enterprise caught between warring tanks and Red Wings.
Visual Effect 23 - Cid using the Enterprise to evade the Red Wings Underground.
Visual Effect 24 - Continuing to evade the Red Wings.
Visual Effect 25 - The map disappears beneath the actor's feet. Not sure when this is used.
Visual Effect 26 - A very slight screen tear that disappears as soon as it appears.
Visual Effect 27 - Nothing, it seems.
Visual Effect 28 - Nothing.
Visual Effect 29 - Nothing.
Visual Effect 30 - Screen shake and one explosion.
Visual Effect 31 - Lunar Whale Rising.
Visual Effect 32 - Boarding the Lunar Whale and going to the Moon.
Visual Effect 33 - Giant of Babil awakening and torching the countryside.
Visual Effect 34 - Tanks attacking the Giant of Babil
Visual Effect 35 - Tanks continuing to attack.
Visual Effect 35 - The Airships arrive and attack the Giant.
Visual Effect 36 - More attacks.
Visual Effect 37 - An airship moves out of formation
Visual Effect 38 - And moves toward the Giant.
Visual Effect 39 - The airship moves to the Giant and the screen darkens.
Visual Effect 40 - Nothing?
Visual Effect 41 - Caused all actors to vanish.
Visual Effect 42 - Neutralizing the Giant?
Visual Effect 43 - Not certain, maybe a ship flying away?
Visual Effect 44 - Ship Landing, then warped to the Lunar Whale on the Overworld.
Visual Effect 45 - Same as above?
Visual Effect 46 - Nothing?
Visual Effect 47 - Heading back to the Moon, with the ship entering the screen face forward.
Visual Effect 48 - Lunar Whale taking off, going to the Moon and landing in a specific spot.
Visual Effect 49 - Explosion which caused a strange minor screen glitch.
Visual Effect 50 - Mysidian Legend. (Like the prologue, will lead to a black screen might some of these work the way they do because it's at the end of their respective events?)
Visual Effect 51 - All actors disappear and the music gets quieter.
Visual Effect 52 - Seeing the moon through the Telescope.
Visual Effect 53 - The Lunar Whale returning to Mysidia.
Visual Effect 54 - Explosions to the side of the screen.
Visual Effect 55 - Mysidian Legend IN SPACE!
Visual Effect 56 - Moon goes flying off.
Visual Effect 57 - End Credits
Visual Effect 58 - Explosions on the center of the screen.
Visual Effect 59 - Bizarre. The map pans over a little, glitching the screen in the process and displays the text of Rosa meeting with Cecil in the Baron Castle Hallway, then resets the game.
Visual Effect 60 - Resets the game.
Visual Effect 61 - Decreases the volume of the music.
Visual Effect 62 - Nothing.
Visual Effect 63 - Same Rosa/Cecil conversation without the glitching.
Visual Effect 64 - Giant of Babil exploding, screen flashes black several times and then the screen darkens.
Visual Effect 65 - An NPC started to move strangely and then the system crashed.
Visual Effect 66 - Seems to be a Message Box 2 pointer.
Visual Effect 67 - All Actors vanished.
Visual Effect 68 - System crash.
Visual Effect 69 - Nothing.
Visual Effect 70 - System crash.


EDIT 3: I was looking at some of Phoenix's old notes and I found something that might be relevant in the "NPCs.txt".

"The speech data utilizes events numbers 01-03, which are event code EE message calls:
"Show bank 2 message [hex # xx after event call] from pointer [map#]"
For example, the Old Man wandering in the town of Baron has the following data (at 99EDE-99EEA):
   FE 06 FF 03 FE 0B FF 02 FF 01 03 04 05
This translates to:
   Data      Meaning
   --------   ------------------------
   FE 06      If event flag 06 is set,
   FF 03      load event 03 (i.e. message call EE 02 = message 05 of bank 2)
   FE 0B      (else) if event flag 0B is set,
   FF 02      load event 02 (i.e. message call EE 01 = message 04 of bank 2)
   FF 01      (else) load event 01 (i.e. message call EE 00 = message 03 of bank 2)
   03 04 05   [Hex data following event call]
======================================================================================"

EDIT 4 - I decided to take a look into this issue trying to correlate things from one side to the other.

I used the Old Man from Baron as the test in this. 003 of Bank 2- "Why is the King training soldiers how to use the sword of the dark side?" This goes right with what is in the notes, that the Old Man has 03,04, and 05 as his text depending on the Flag that is set. This one is a prime example because he is set up so close to the beginning of the maps.

I see now! It's all based around maps. Town of Baron - Not coincidentally the first map, has Bank 2 listings from 000 to 011.

Mist's numbers also add up with what the dialogue editor seems to show. It's just done in a different fashion for whatever reason. Whereas the Baron folks used Events 00-03 many of the other NPC's use the later calls for their text.

It may take a while but it should be a simple matter now to decode the Bank 2 calls.

I think I'll have something soon. To start this.






« Last Edit: June 26, 2012, 01:40:56 AM by Grimoire LD »

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,419
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Developing a comprehensive editor for FF4
« Reply #37 on: June 26, 2012, 11:06:34 AM »
Thanks!

Sorry this one took so long, but I really wanted to get the event editor done before I work on something like the character editor, which in order to test a lot of things like starting stats and xp progressions and stuff I'd have to keep starting new games, which without a way to easily skip past the opening and edit your starting party, would be a very time-consuming and annoying task.

Don't worry about not being able to help with bank 2, I knew before posting it that it would be a shot in the dark; it's a very confusing thing. But I should still be able to make a dialogue editor that will be able to edit the actual text of the messages... the only problem really is figuring out how to reference a particular message from bank 2 so you know what numbers to put in for the events.

Use this IPS on a FF2us 1.0 ROM with no header.  This will significantly make starting a new game for testing much easier.  I use this all the time myself.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #38 on: June 28, 2012, 09:57:26 PM »
I've noticed an odd glitch in the editor. If you go to edit one of the "Medicines" in this version (pretty sure it wasn't in the previous versions) and go to "Information" you can do that precisely once, before trying to do so again does nothing. You have to back out of the entire Medicines page and go back to the main choice menu and go back to Medicines before you can edit just one and rinse and repeat.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #39 on: June 29, 2012, 07:24:08 AM »
Thanks so much for making that VFX list. I'll make a VFX config file in a future version. Also for the help with bank 2. That table you posted looks familiar, I think I have a file like that in my archive of downloaded FF4 info. It will probably make more sense once I get around to tackling the editing of maps, NPCs, and event triggers.

Thanks for posting the patch. I haven't tried it yet but while skipping the opening is awesome I also need some of the other features that the event editor provides such as configuring my starting party, location, inventory, etc.

That's an interesting bug find. Very mysterious but I do have a suspicion as to what might be causing it. I'll check it out soon and post the fixed version as soon as I can.
 :edit:Bug found, fixed, and fixed version uploaded.
« Last Edit: June 29, 2012, 07:47:25 AM by Pinkpuff »
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #40 on: June 29, 2012, 09:04:47 AM »
Starting items? I had thought because the game starts you with absolutely nothing that there wouldn't be a way to start with items in the inventory? I guess I was wrong? Also for the starting party, since it purely consists of Dark Knight Cecil, you can easily switch that out for anyone you desire with event commands. But I would imagine there's a more intune way to do that, judging by mention of a starting party.

Also you work fast! You fixed that glitch in only roughly 20 minutes. Another thing though. I noticed you included the ability to create more spell sets, but have no way of assigning them. Is that going to be coming in a later update?

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #41 on: June 29, 2012, 10:10:17 AM »
Starting items? I had thought because the game starts you with absolutely nothing that there wouldn't be a way to start with items in the inventory? I guess I was wrong? Also for the starting party, since it purely consists of Dark Knight Cecil, you can easily switch that out for anyone you desire with event commands. But I would imagine there's a more intune way to do that, judging by mention of a starting party.

That's exactly what I mean by starting party; use event commands in the "opening event" to add/remove actors. Likewise, what I mean by starting inventory is the same thing; using event commands in the opening to add items to the party's inventory.

Also you work fast! You fixed that glitch in only roughly 20 minutes.

It was a simple one-line fix and I already had a rough idea of what would be causing something like that. Normally I don't work that fast (i.e. don't expect the character editor to be done next week or anything)

Another thing though. I noticed you included the ability to create more spell sets, but have no way of assigning them. Is that going to be coming in a later update?

Yup, as part of doing the character editor I will add a component to the appropirate editor(s) for assigning spell sets to battle menus and out-of-battle magic menus.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #42 on: June 29, 2012, 11:20:44 AM »
That's wonderful news all around. Glad to see I didn't miss anything in regards to starting party and items, etc.

I've been going through Phoenix's "Location Trigger" document and have been filling in what each of the locations are (what item they correspond to, gil, location warp, event, etc) I was curious to know has this done before? And if not, would this save you some work down the line, if I filled in all of that?

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #43 on: June 30, 2012, 04:17:49 AM »
Sure, it would mean that instead of a menu that looks like

"Trigger 1"
"Trigger 2"
"Trigger 3"
etc...

It would have meaningful names like

"Trigger for Cid talking to you in Baron"
"Trigger for Mist burning"
"Trigger for taking Rydia to Inn in Kaipo"
...

or something along those lines, which could be altered in a config file.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #44 on: July 02, 2012, 03:50:12 PM »
I'm making really good progress so far. Did you know that event tiles in FFIV are not in the same table as the normal event files? This caused me a lot of confusion, but I've gone through each tile event and I have an accurate picture (and list) of what each tile event links to a real event.

In addition to that I've also started decoding what tile events need what event flags to trigger, that's in its early phases but I've got a good idea of where to look for each.

Finally there's one map designator that is wrong (that I know of) in the editor. The map "Underground Tunnel background", appears to be a legitimately unused 7F of the Tower of Babil, it even has encounters and exits.

I'm up to map B0 in the Overworld so far. So things are moving along swimmingly.


EDIT: Overworld is finished, now to get started on the Moon. Though I had expected to find triggers for the Overworld but they were conspicuously absent. Do we know where they would be?
« Last Edit: July 02, 2012, 08:25:39 PM by Grimoire LD »