Users browsing this thread: 1 Guest(s)
Script Rewrite (Final Draft) Underway!

#11
Posts: 126
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2021
Reputation: 2
Status
None
Here's a brief look at the notes on my workflow using FF6Tools. I'll only be making minor changes to a few of the maps and events to better suit the changes I've made to the new script. I've arbitrarily titled my notes the Woolsey Cleanup Kit, but I may use that as a title for the final patch if it goes up on romhacking.net... which is part of the plan.


Woolsey Cleanup Kit

Map: 7 Blackjack - Interior
Select Setzer (CB/2007) scroll to (CB/21AE) delete dialog.

Delete Cid event trigger and map event trigger.

From right to left (Terra to Shadow) replace ALL pointers with subroutine (CA/F59D), delete ALL character dialog.

Map: 8 Blackjack - Parlor

Select Setzer (CB/1B0E) scroll to CB/1B68) change speed to slow, enable animation, do action head turned left facing down.

Map: 12 Falcon - Interior

Replace ALL pointers with subroutine (CA/F59D), delete ALL character dialog.

Map: 19 Narshe - South Exterior (Intro)

Select map event trigger CC/9BB3, delete both triggers.

Map: 30 Narshe - Other Rooms

Select Edgar (CC/C271), scroll up to (CC/B5A4), wait 60 frames, play sound effect 0, wait 60 frames, scroll down to (CC/B661), wait 60 frames, play sound effect 0, wait 60 frames.

Select Gau (CC/C28D), replace ALL pointers with subroutine (CA/F59D), delete ALL character dialog.

Repeat this process from bottom/right to top/left (Gau to Locke).

Map: 54 Figaro Castle - Submerging

Select Chancellor, scroll down to (CA/6245), delete dialog.
  Find
Quote  

#12
Posts: 126
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2021
Reputation: 2
Status
None
Alright, I've got my first prototype for the script.ips file underway! Now I've just gotta play test it, and proofread it...

I may just have my first patch under my belt sometime this Spring?!
  Find
Quote  

#13
Posts: 126
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2021
Reputation: 2
Status
None
Welp, I've run into another game-crashing bug. I know it's because I'm deleting sprites, so I'll have to dedicate sprite removal to version 1.1 or 1.2. Removing text boxes, palette swapping sprites, changing sprite images, and reassigning sprite behavior are all fair game. But, removing sprites is just a little beyond me at this time. Might have to wait until Summer for the final draft release.
  Find
Quote  

#14
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Why are you deleting sprites lol? I thought you were just rewriting the script?


We are born, live, die and then do the same thing over again.
Quote  

#15
Posts: 126
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2021
Reputation: 2
Status
None
Yeah, I got carried away. I’m constantly worried about running out of bite space.

I do want to remove sprites eventually, but I know it won’t be a deal breaker when I release version 1.0 of the patch. Cid’s event on the airship with Setzer is a waist of text. And, I’ve removed event triggers without any problems. That lets me bypass simple events. But Cid’s event is rather large. It involves a sprite trigger and event trigger on the map. That’s just one example. The other sprite would be the one hidden up in the trees of Jidoor, right next to the mansion. There are a few more I’d like to get rid of (2 or 3 more).

I’ve been able to make progress with all the other changes I’ve made. I just wasn’t expecting to hit this obstacle involving sprite removal. It’s forced me to redo my work editing the ROM at least twice now, because I haven’t been saving my edits. I’ve learned my lesson, I’ll set sprite removal aside for later.

Any chance I could get some help later on? After I’m done with version 1.0? Hex editing from scratch is the only thing I don’t have a good understanding of yet… That and axkas…
  Find
Quote  

#16
Posts: 126
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2021
Reputation: 2
Status
None
Welp, I've hit a major roadblock in the patch. The changes I've made to the game hold up fine until Setzer hands control of the Blackjack over to the player. I want to stress that I haven't been deleting ANY NPC sprites in my latest attempts. Only removing dialog captions. This mostly involves dialog captions inside the Blackjack and Falcon while changing party members. I've got around 3,000 to 3,500 bytes left. So I can always adapt my script to include those lines that have been removed. Although, I won't have enough room to replace both the lines involving party change and the lines used during the event between Cid and Setzer on the Blackjack...I'm willing to keep the CId & Setzer event blank for now, because I have plans on removing it completely in the future. I'll have to adapt my script to avoid ANY changes to the Blackjack at all, and maybe the Falcon as well.

Panda, did you encounter anything like the game crashing on you while you were making changes to the Blackjack/Falcon for Divergent Paths?

I'd be grateful for some assistance on debugging this .ips file from any of the senior members after I'm done with this project since that and raw hex editing are where my current understanding still requires the most education.

I'm dedicated to completing this project and feel it's within the range of my abilities to achieve a working .ips file for the community.

Thanks for everyone's time and consideration while I continue learning.
  Find
Quote  

#17
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
How are you going about removing dialog captions? In the event code? Or do you mean just erasing the dialog from them? If you were working around the same area where the game now crashes, it must be related I’d imagine. Do you have a backup where it doesn’t crash to compare what might’ve happened?


We are born, live, die and then do the same thing over again.
Quote  

#18
Posts: 126
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2021
Reputation: 2
Status
None
Yes, I’m removing the dialog captions from the event code. That way they aren’t even being displayed. I do have backup ROMS, however FF6Tools lists the map for both airships right at the top, so these are the first few changes I make while I work…

I can shuffle through my backups, and even creat a rom that makes zero changes to either of the airships. It’ll take a few days though. Can I PM you after complete said task? Maybe next week?

The only other bug I’ve encountered so far involves recruiting Gau, and that one doesn’t crash the game. It just prevents you from running during the event, so if you don’t have any Dried Meat, you’re stuck in the event and can’t recruit Gau. I’ll fix that one later, since there is an easy work around. I just run from battle until I reach Mobliz.

One thing at a time. I need to gain access to the Airship without the game crashing. I’ll PM you sometime next week with an update. I do have ROM maps of every single backup. Can I share those with you?
  Find
Quote  

#19
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Well I was more so hoping you could try to first figure it out on your end. It certainly seems like the event code got messed for that very part where you gain control of the airship. This should be an easy task to correct, instead of taking days to make another rom or whatever... If you're going to do things like remove captions and npcs on a preexisting mod, you should be able to find out and fix what caused the issue to happen since it was something you did that caused it.

That being said, if you can't figure it out by comparing your rom and a working backup event code with ff6tools, where you did the work around there removing captions, then I'd be willing to take a look, sure. I'd just probably put back the event code how it was though, because I'm sure something got messed up.


We are born, live, die and then do the same thing over again.
Quote  

#20
Posts: 86
Threads: 6
Thanks Received: 14
Thanks Given: 2
Joined: Jul 2020
Reputation: 8
Status
None
(03-09-2023, 01:39 AM)Joshua H. Wrote: Welp, I've hit a major roadblock in the patch.  The changes I've made to the game hold up fine until Setzer hands control of the Blackjack over to the player.

What issue are you running into?

There is a bug with FF3usME's dialogue editor where lines will get messed up sometimes if the index that separates banks $CD and $CE changes and you edit lines on either side of it before saving.

I don't know how familiar you are with how the dialogue is encoded and extracted, but the dialogue text spans two banks in the ROM: $CD and $CE.  The dialogue indices map to pointers that contain the two-byte address offset from either $CD or $CE where the line starts.  There's also a single "pivot" entry for the value of the dialogue index where the text transitions from bank $CD to $CE so it calculates the offset against the correct bank.  In the vanilla ROM, this dialogue index is $0626, which is around the Cave to the Sealed Gate point of the game (though if you've been going through the dialogue, you've noticed it's not entirely sequential). So it's basically: "if dialogue_index < $0626, dialogue_text = $CD + dialogue_index.address_pointer, else dialogue_text = $CE + dialogue_index.address_pointer".

When editing dialogue in FF3usME, any time the length of a line of dialogue is changed, it shifts the positions of every line that comes after it, and their pointer values have to be updated accordingly.  If the line you're editing is before $0626, that means that the lines that cross the $CD/$CE boundary are shifting, and the "pivot" index needs to be updated accordingly.  There's a bug in FF3usME where this isn't always properly calculated, causing the lines around that "pivot" point to be messed up.

Note that in the vanilla ROM, the dialogue wasn't as efficiently compressed as it could have been, so simply opening the ROM in FF3usME and then re-saving it, thereby re-compressing the dialogue, will shift everything, anyway, making $0626 no longer the pivot point, and will free up a bunch of text space without even doing anything.

If you want to check if this is your problem, open the ROM in a hex editor and check what the two bytes at $CCE600 are, as this is where the "pivot" index value is saved (with the bytes reversed, so $0626 looks like 26 06).  Then go and cross reference that dialogue index with your script and see if it's at or around the same place where you're seeing issues.

If this is your problem, I think you can fix it by simply re-importing your text export of the dialogue script and re-saving it.

(03-09-2023, 04:03 PM)Joshua H. Wrote: Yes, I’m removing the dialog captions from the event code.  That way they aren’t even being displayed.

Are you removing the dialogue captions from the event code manually via a hex editor or through a tool?  Because depending on how the caption was encoded, some of them need more done than simply removing the event that calls the dialogue box.

If it's just a regular dialogue caption called with event code $4B, these are generally safe to NOP out since they don't have any dependencies.

Some dialogue captions are called with event code $48.  These are for cases where there's something that needs to happen before you can dismiss the dialogue box, and there will be a separate event code called later, $49, to flag when it will allow you to dismiss it.  If you remove a $48 dialogue box, you need to remove the paired $49 later in the code, too, or it's not going to know what to do when it gets there.

But if it's messing up with Setzer handing over the airship, what I suspect has happened is that you deleted a dialogue box that has options in it like, "Do you want me to teach you some tricks?  Y/N".  Dialogue boxes with options in them are always going to be followed by a $B6 command with the address offsets for the events triggered by each selection.  This $B6 command needs to be removed, too, since it can't exist in a void with no dialogue selection made.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite