Author Topic: Developing FF4kster: a comprehensive editor for FF4  (Read 223601 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 #435 on: August 16, 2013, 12:39:09 AM »
Honestly, Grimoire, I don't own any of the phones or consoles TAY is available on, so I don't really know what Piercing Sight is, but if my research helped you do something you wanted to then I'm glad  :happy:

Now that you mention it, though, I've been wondering about the charm script that almost every monster has... does a charmed monster not behave as charmed without one of these scripts?

Pinkpuff, imho you probably should let us mess around with it for a while longer before uploading to RHDN. I understand you're probably eager to release this to the world, but bugs are still turning up, so you'll probably save yourself some headaches letting us beta test some more first. Probably not a big deal if you take some time off, though. We'll certainly have fun with what we've got, and our findings aren't going anywhere.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #436 on: August 16, 2013, 01:22:25 AM »
Ah, Piercing Sight in TAY is an ability that is used by a "scholar" character, she also has Gil Toss which is great early game, tapers off in the final chapter though. She was Supposed to be a Blue Mage, but I guess Square didn't want to devote that much time to it...

In any case Piercing Sight randomly assigns a weakness to an enemy, and the way to tell what the weakness added to is by the flash of color on the screen. It surprisingly (or oversightedly...) even can hit a Dark elemental, but there's nothing in TAY which is Dark Elemental to even use.

The way I made it work is to have the enemy react to a status (in this case, Charm) and then while they are "charmed" the player would use Peep and I made a message to tell the player the new weakness (Fire) and added a chain end flag to move it back to its normal AI script. So it's very close to Piercing Sight without the random factor.

But yes, Charm is individual Monster-by-Monster basis. Charm alone does nothing (As seen when you use it on the Imp enemy in the Underworld in Sylvan Cave) and so many scripts are used by fancy attacks or sequences that only activate when the enemy is charmed (TinyMage comes to mind) that it's a bit of a waste when it could be put to better use, in my opinion.


Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #437 on: August 16, 2013, 06:40:04 AM »
I have noticed one slightly troubling thing, but I can't say what's causing it. For a test I set my Encounter in Overworld 19 (in front of Baron) saw that it worked, switched it back, but some of the encounters are still as if they are in the Kaipo Desert, but this doesn't seem to be a "one off" error or anything. The first Formation, the Goblin still works fine and appears as frequently as ever and I have seen the six Goblin Formation after I set this, so it's not somehow pushing it down or anything like that. It's difficult to say what Formations have been replaced by the Kaipo Desert one.

I can't reproduce this. I'm not sure what overworld section corresponds to what index in that list but based on the default data 19 does not appear to be in front of Baron. I changed 35 though, which does appear to be near Baron and had no problems, changed it back, still no problems. Granted I didn't grind there for any extensive period so maybe someone else can confirm this?

You have made Tremendous progress in just today alone, fixed several bugs, added several new features and additions, you deserve a rest, haha.

Thanks  :happy: I'm still have this compulsion to fix things as they come up though...

:edit: Actually I have found another error. When you go to switch any of the Items in the Drop Charts, though the editor will show them as changed, even as you go through other menus and do other things, the changes are only superficial and don't carry over to the game and when you exit FF4kster and reopen it the data will be initialized.

Fixed.

:edit: 2 I updated the Cover data, including the method to have the requirements read Class rather than Character giving it more versatility over all.

On the to-do list.

I've also found another error. If you press "end" while viewing the AI Index, it will show 256, but no descriptions, just a black spot where a box normally would be and pressing down breaks the program.

Fixed.

Pinkpuff, imho you probably should let us mess around with it for a while longer before uploading to RHDN. I understand you're probably eager to release this to the world, but bugs are still turning up, so you'll probably save yourself some headaches letting us beta test some more first. Probably not a big deal if you take some time off, though. We'll certainly have fun with what we've got, and our findings aren't going anywhere.

That's true. I'll give it another week or so and see where we are.

The way I made it work is to have the enemy react to a status (in this case, Charm) and then while they are "charmed" the player would use Peep and I made a message to tell the player the new weakness (Fire) and added a chain end flag to move it back to its normal AI script. So it's very close to Piercing Sight without the random factor.

It might make more sense to do this with a reaction to the "Peep" command (can be renamed Peer or Sight or whatever). You'd only need to take up 6 reaction AIs at most, and you could add it as a clause into existing reaction AIs. Just beware that there's currently no check for monster data (including AI data) bleeding into whatever comes after it.

 :edit: Forgot to upload after fixing...  :isuck: Anyway the fixes are up now
« Last Edit: August 16, 2013, 06:48:55 AM by Pinkpuff »
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #438 on: August 16, 2013, 07:39:19 AM »
Wha-What? You mean to say that Section 19/64 is not Outside of Baron? But I switched that and saw my formations appearing... hmm... Now I am very confused, for whatever reason my 35/64 was Index 1 which should have been the Outside of Baron. I don't recall changing it... but true to form when I changed it to 0 those odd Kaipo Desert encounters stopped. Now I wonder... is 19 at all connected to Baron?

You were 100% right on the Peer issue, I had thought because it bugged out as just a normal AI, it would bug out as a reaction but that is not the case. It works Flawlessly as a reaction, even only going through the motions once rather than repeating. Good thinking there.

Good work on the fixes. I'll keep an eye out for anything else that may pop up.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #439 on: August 16, 2013, 08:00:11 AM »
Wha-What? You mean to say that Section 19/64 is not Outside of Baron? But I switched that and saw my formations appearing... hmm... Now I am very confused, for whatever reason my 35/64 was Index 1 which should have been the Outside of Baron. I don't recall changing it... but true to form when I changed it to 0 those odd Kaipo Desert encounters stopped. Now I wonder... is 19 at all connected to Baron?

Like I said, I have no idea which is which, I was just going by what the default encounter sets appeared to be, which for me, 19 was appearing as monster set 1, whereas 35 was the first 0 I encountered in the list. Perhaps it bears further testing, maybe starting with a clean rom just in case you had made any other changes.

You were 100% right on the Peer issue, I had thought because it bugged out as just a normal AI, it would bug out as a reaction but that is not the case. It works Flawlessly as a reaction, even only going through the motions once rather than repeating. Good thinking there.

 :childish: Thanks, glad to hear it worked! Also depending on who you give it to and what period of the game they're in your party for, you may only have to put it on to a small subset of the monsters. Like for example, supposing the plot was otherwise left alone, say you gave it to Edward. Now you only have to change the monsters that Edward can possibly encounter. Now that I think about it that would actually be a neat ability for him. Rydia has the black magic to take advantage of the fire/ice/bolt weaknesses, and Cecil can take advantage of the Dark weakness. Once you pick up Rosa, she (or heck even Edward himself can put on a bow) can take advantage of air weakness... and the holy arrows for holy weakness. I think that covers all of them!

Good work on the fixes. I'll keep an eye out for anything else that may pop up.

Thanks! I think I'll actually write out an itemized list of everything that needs to be done (not on the forum, just locally) and make an updated wish-list for things that I still don't know how to edit but would like to.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #440 on: August 16, 2013, 08:29:05 AM »
Like I said, I have no idea which is which, I was just going by what the default encounter sets appeared to be, which for me, 19 was appearing as monster set 1, whereas 35 was the first 0 I encountered in the list. Perhaps it bears further testing, maybe starting with a clean rom just in case you had made any other changes.

That was indeed the problem. A clean rom shows it as you described, 0's don't start until 35. By the way do we have a map of the 64 overworld parts anywhere to see what parts align with where?

:childish: Thanks, glad to hear it worked! Also depending on who you give it to and what period of the game they're in your party for, you may only have to put it on to a small subset of the monsters. Like for example, supposing the plot was otherwise left alone, say you gave it to Edward. Now you only have to change the monsters that Edward can possibly encounter. Now that I think about it that would actually be a neat ability for him. Rydia has the black magic to take advantage of the fire/ice/bolt weaknesses, and Cecil can take advantage of the Dark weakness. Once you pick up Rosa, she (or heck even Edward himself can put on a bow) can take advantage of air weakness... and the holy arrows for holy weakness. I think that covers all of them!

That's a solid idea, that section of the game would need a bit of a difficulty overhaul to make use of that, but I could see a replacement to Salve for Peer, and incorporating Yang's elemental claws in the Fabul Castle Siege could add a bit of strategy.

Thanks! I think I'll actually write out an itemized list of everything that needs to be done (not on the forum, just locally) and make an updated wish-list for things that I still don't know how to edit but would like to.

A lot has been found, but there's still much left to decipher. I'll see if I can't help with that.

Oh! By the way, before I forget, it's not exactly an error per se, but possibly an oversight. If you set another weapon to replace an existing arrow, you will receive a x10 for getting what was those arrows. The fix for this is in this post...

Alright! Well that ends the Arrow business. I found how to make treasure chests give multiples of items, that aren't arrows.

I found it by breakpointing on where the Arrows would appear in my inventory when picked up from a chest, back traced a little from there and found another C9 54 (Compare with 54) and there it was. An unintended consequence of this is that all Weapons are given a multiple of 10 from events. So there would be 10 Excaliburs for instance when you trade the Adamant Ore for the Excalibur (however then you can just have the Smithy's apprentice sell "repairs" to Excalibur, since it's not a quest item.

In addition is the amount that these are given.

In RAM at...

0x009824 - 54 (Change that to whatever value you would like so that when you collect that specific kind of item a multiple would appear in your inventory up until the Armor begins)

0x009828 - 0A (Change that to what you wish for the quantity of item from those sorts of items.)

In ROM at...

0x1A24 - 54

0x1A28 - 0A

Looks like there's no issue now with a Durability based FFIV.

If only finding the information on Two-handedness was this simple...

It was in a separate post from all of the other Arrow stuff so I can see how it was missed.

 :edit: Let me phrase that a little better... If you change the starting point of arrows you will still receive a x10 Multiple, even if the intention was for the weapon to be changed to another weapon type all together (I'm not sure if the breakable bit is removed from moved Arrows)
« Last Edit: August 16, 2013, 08:52:20 AM by Grimoire LD »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #441 on: August 18, 2013, 02:11:18 AM »
Certain lunar dungeon attack sequences are making the editor crash. Select the D.Bone and scroll up the sequences to 50 or down to 79. I haven't put together a full list of bad ones yet, but those two are easily reached.

 :edit: More bad sequences:

120
135
232
247

---

Also, it only appears to be cosmetic, but hitting page down without anything selected in the number/condition/sequence windows will place the text at the bottom of the box, creating blank selectable entries (selecting them does nothing but make the window flash). Hitting page up after this will fill the box with these blank, fake entries - the real text can be brought back, at the bottom of the box, by hitting page down again.
« Last Edit: August 18, 2013, 02:21:20 AM by Dragonsbrethren »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #442 on: August 18, 2013, 06:23:52 AM »
That's bizzarre that it would only be specific ones like that. This one should be a fun hunting trip...

The Page Up/Down thing sounds like an oversight in menus that are larger than the number of entries in them. Seems like something I could have easily missed when I first implemented that functionality, as most menus have either exactly enough room, or have to scroll. I suspect if you try using those keys in, say, the spell set editor, you'll probably get similar behavior.
Let's dance!

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #443 on: August 20, 2013, 03:06:32 PM »
Attempting to edit Lunar sequences is a bit of a minefield, too. When you hit enter on a part of the sequence to edit it, which command comes up is incorrect. As an example, try editing the Tricker's reaction sequence: the two messages will give different commands when selected, and Cast Fast will crash the editor.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #444 on: August 27, 2013, 06:02:17 AM »
Ok, so I think I now know what's going on with certain lunar AIs messing up.

There are 256 "regular" scripts ("Script Index") and 90 "lunar" ones. However, the conditionset-script pairs ("AI index") are shared among regular monsters and lunar monsters. What I mean is, suppose something has AI index 50. I'm too lazy to look it up right this minute but for the sake of argument let's just suppose AI index 50 says something like "Set 25: Script 32; Set 15: Script 100". Now, if you try to preview this for a normal monster, no problem. Script 32 has meaning and so does Script 100. Now suppose we try to preview AI Index 50 for a lunar monster. Now you have it trying to access Lunar Script 100 (out of 90). KABOOM!

Not sure what a good fix for this would be but I'll think about it and if you have any clever ideas by all means post them.

 :edit: Nevermind, I figured out a way to do it. Now if you select such an index the editor will simply display the message "-- DOES NOT EXIST --" and won't allow you to edit that script. I also fixed the x10 arrows issue. Still on the table though are the "crashing while editing of certain script details in lunar scripts" (I'm pretty sure I know what's causing that) and the Pg Up/Down issue.

 :edit: The bug causing the editor to mess up when editing lunar scripts has now been smashed.  :banonsmash:

 :edit: And Page Up/Down bug fixed. I think that's everything so far? If there are no other major bugs reported by tomorrow I'm uploading this version to RHDN.
« Last Edit: August 27, 2013, 09:17:24 AM by Pinkpuff »
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #445 on: August 27, 2013, 11:48:32 AM »
Seems like everything is working properly as far as I can tell. I'll take a more indepth look a little later to see if anything goes wrong.

 :edit: Hmm all of Zeromus' AI seems to be... wrong? I guess you could say, Ah I see. He's counted as an Overworld enemy for whatever reason in the editor.
« Last Edit: August 27, 2013, 12:09:17 PM by Grimoire LD »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #446 on: August 27, 2013, 03:03:04 PM »
Yeah everything seems good to me so far too.

 :edit:

Feature request: An option to scan for unused attack sequences and individual scripts. Can lose track of this stuff pretty quickly when you're changing them around.
« Last Edit: August 27, 2013, 03:14:17 PM by Dragonsbrethren »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #447 on: August 28, 2013, 01:55:02 PM »
Auto battle editor is mostly done, the only thing I'm having trouble with is figuring out how the multi-character scripts work. Looking at the data in the rom it appeared to be, for example, FuSoYa's script followed by FF followed by Golbez' script (followed by another FF). I figured this would extend to regular scripts as well so I tried adding Kain to the party in the opening events before the airship battles to see if he would use Lit-Bolt (I changed the Fire-Bomb to Hide) but instead, they both executed the first script (so both Cecil and Kain hid).

Anyone have any idea how this works?

Another thing too, is it known how the game determines that only one party member is active for a particular battle? For example, in the Tellah vs Bard fight, only Tellah is active and everyone else, while still in your party, are somehow not present in the battle.
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 #448 on: August 28, 2013, 02:20:46 PM »
Good question. It happens in tellah's battle vs golbez also. Is it possible that tellah's actor in particular has this effect?

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #449 on: August 28, 2013, 02:40:08 PM »
I don't think there's anything special about Tellah's actor. I tried adding "Tellah 1" to the initial battle instead of Kain and he behaved exactly the same way (he hid along with Cecil).
Let's dance!