Chrono Compendium

Kajar Laboratories - Fan Works and Submissions => Chrono Trigger Modification => Topic started by: Fauntleroy on December 22, 2017, 11:01:00 pm

Title: Problem with enemies who change in battle
Post by: Fauntleroy on December 22, 2017, 11:01:00 pm
Having more Chrono Trigger hacking woes.

I have no idea how I triggered this, but now, any enemy who changes in battle (like the shield guys, the rock enemies that turn into volcanoes, gold birds that change into red birds, etc.) crash the game when they change.

This is something that happens with all enemies of this type.

I tried fixing it by importing the enemies from a fresh ROM, and making sure their battle AI had not accidentally been edited. But neither of things are the source of the problem.

Any ideas? Thanks.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 23, 2017, 03:03:12 am
So all transforming enemies crash, including ones that were set up previously?

What have you been using to edit the ROM?
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 24, 2017, 10:31:53 pm
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 24, 2017, 10:46:05 pm
Any Temporal Flux plugins?

Can you do a file compare in a hex editor between your ROM and an unaltered ROM, and list any changes between 0x10000 and 0x1FFFF?
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 25, 2017, 02:29:26 am
Thanks for your help.

I'm using pretty much your entire suite of plugins: Fiendcrafter, Hi-Tech, Inventory Manager, Itemizer, NPCustom, Warrior Workshop.

In comparing ROMs:
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 25, 2017, 09:08:57 am
0x014615 is a change made by Hi-Tech when player techs have their animations modified. 0x1FDDE is free space that was used by something that no longer fit in the original space when modified.

Send me a patch, I'll recreate the crash in a debugger.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 25, 2017, 02:00:06 pm
You are bomb.  Merry Christmas!

I'll send you a patch. The base ROM is Chrono Trigger (U) [!].

The crash is triggered by enemies on these maps:

125 - Dactyl Nest, Lower
126 - Dactyl Nest, Upper
1BD - Prison Stairwells
1EA - Forest Maze
134 - Black Omen 1F Entrance
13D - Black Omen 47F Royal Ballroom

Thank you again so much!
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 26, 2017, 02:50:54 pm
Just making sure you got the patch. I sent you a message through the board with a download link.

Thanks!
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 26, 2017, 03:37:31 pm
I got it. I'll test it later.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 27, 2017, 12:06:58 am
I haven't fully found the problem, but it's not all transforming enemies, it's enemies using transforming using enemy tech 7D. Ogans work fine, and I suspect Bantam Imps will as well.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 27, 2017, 08:29:44 pm
Yes, you're quite right. Bantam Imps are good.

Looks like it's just the shield guys (Guardia Prison and Black Omen), the birds in the Forest Maze, and the rock guys in the Dactyl Nest.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 27, 2017, 09:15:25 pm
I've compared all known data on Shists and Enemy Tech 7D, and there's nothing different.

The crash is caused by something not being set right in animation processing that causes an infinite loop.

What this means is there's unknown data relating to animation processing that got corrupted that I'll have to track down.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 27, 2017, 11:27:31 pm
I'm sorry.  You've been very kind.  I didn't realize it would be such a trial to track this down.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 27, 2017, 11:42:15 pm
Finding unknown tech/animation data is always helpful for me, so it's no problem.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on December 28, 2017, 02:37:55 am
It was not unknown data, it was a glitch with the modified animation data that occurred when an animation started on an address with the low byte being 0xFF, 0xFE, 0xFD, or 0xFC. I'll update Hi-Tech shortly to fix this.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on December 28, 2017, 07:39:10 pm
I'm glad my travails were of benefit to you as well!

Hi-Tech is a masterwork, by the way.  Looking forward to the update!
Title: Re: Problem with enemies who change in battle
Post by: Cherenkov on December 28, 2017, 10:32:04 pm
Mauron is the best, and works miracles 8)
Title: Re: Problem with enemies who change in battle
Post by: Boo the Gentleman Caller on January 01, 2018, 09:50:48 pm
Mauron really is the best. Not only is s/he an amazing developer, but an all-around kickass person, too. :)
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 04, 2018, 01:48:41 am
The new patch should be working. I'll do a little more testing, and if successful, get it out tomorrow.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 04, 2018, 09:32:41 pm
I hate to say this, but...

While the shield and volcano enemies now work great...

The shrooms in Guardia Forest now crash the game when they go to attack.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 04, 2018, 09:51:14 pm
I just tested a Hetake fight in 1000 AD with the patched version of your ROM, and they attacked fine.

Did you make any other changes?
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 04, 2018, 10:19:12 pm
Shit.

Yes, I've worked on it a little almost every day.

Edited to add: In testing this again, I found I can get through several battles with them, but eventually... something happens and the game crashes. It appears to be when a certain attack is initiated, but I could be wrong.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 04, 2018, 10:37:09 pm
I did some testing, and couldn't recreate the problem. Can you send me an updated patch?

Hetakes always use the same attack, with a slight variation in the AI data.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 04, 2018, 10:50:43 pm
As Kefka would say... crud!

I'll send a patch to you.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 04, 2018, 11:37:22 pm
Still not finding any issues with Hetakes. I did find a major issue with my saving code, that caused an issue with *Life 2. Change 0x0CDBD1 to 00 to fix it for the short term, and stay away from animations for now.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 05, 2018, 12:02:52 am
Yes, doctor.

Edited to add: Hey, great news! Just for the heck of it, I started a new game and encountered NO hangups with the Hetakes.

I've run into things like this before when doing hacks. Some flag got set while playing and by the time you get to the end something's changed and your save file is wonky. But starting fresh makes it all good because everything is consistent again.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 05, 2018, 04:00:34 am
Glad the Hetakes are working again.

Export *Life 2 from a clean ROM and import it into yours. I *really* don't get why that was an issue, or why my fix fixed it, but I did it and it's done.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 06, 2018, 12:46:30 am
Hey, whenever you have a minute. Check the battle in Truce Canyon with the two Blue Imps and a Roly. It's crashing for me.

Edited to add: Same story in 600 AD Guardia Forest, battle with a Green Imp and two Rolys. And the Blue Eaglets, too.  Hoo boy.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 06, 2018, 01:53:41 am
I tried the Truce Canyon fight. No issue that I could see in the patch I have.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 06, 2018, 01:04:32 pm
What do you make of it? It's both baffling and frustrating.

Would you mind sending your patch back to me? I'd like to try it and see if it helps.

Like, I'm 95% done with this project, so I can't abandon it, but it's also too late to start over.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 06, 2018, 01:58:30 pm
It's quite baffling. I haven't seen a problem like this before.

I *highly* recommend using Auto-Archive, from Temporal Flux's file menu. It creates a backup ROM every time you save.

I'll send you the link you sent me. It'll need that  0x0CDBD1 to 00 fix before you load it, and reimporting *Life2 from a clean ROM.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 06, 2018, 10:31:14 pm
Thanks!

I do make backups regularly; didn't even notice that Temporal Flux had a built-in feature for this.

I'm thinking about exporting... well, just about everything and then importing it all to a clean ROM. Wouldn't be fun but maybe it would take care of this weird issue.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 07, 2018, 02:07:09 am
Is it still happening? Maybe something got set weird in a part of RAM that's saved.
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 07, 2018, 02:36:20 am
Yeah, it still happens. New game or loaded game, or save state.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 07, 2018, 01:39:26 pm
Are you noticing any kind of pattern to it?
Title: Re: Problem with enemies who change in battle
Post by: Fauntleroy on January 10, 2018, 06:49:07 pm
I was not able to find any particular pattern.  Absolutely maddening.

Last night I had some time so I exported... everything... and then imported into a fresh ROM.  Had to redo a few things manually, but now everything is functioning perfectly.

Hopefully that was just a bizarre combination of factors that we never encounter again! Thank you for putting so much time into helping me.
Title: Re: Problem with enemies who change in battle
Post by: Mauron on January 10, 2018, 07:04:22 pm
Very strange. I'm not sure why it's acting like that.