øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=961.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index4229.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=961.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index4229.html.zx™xg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ  ,îOKtext/htmlISO-8859-1gzip@øÕîÿÿÿÿÿÿÿÿTue, 10 Mar 2020 11:39:29 GMT0ó°° ®0®P®€§²ð®™xg^ì î Print Page - Auto Battle Script Location?

Board of Slick

Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Deathlike2 on February 18, 2009, 06:43:11 PM

Title: Auto Battle Script Location?
Post by: Deathlike2 on February 18, 2009, 06:43:11 PM
See title.

I was wondering how Cecil was ever able to execute his FireBomb and Lit-Bolt scripts.. while it doesn't seem doable by an enemy for some reason...
Title: Re: Auto Battle Script Location?
Post by: Phoenix on February 18, 2009, 07:16:18 PM
Here's what I've found so far (FF2us 1.0 headered):

Code: [Select]
A000D-A001C Auto-Battle Enemy Set Pointer (xx00 = Overworld Enemy Sets, xx01 = Underground/Moon Enemy Sets)
A001D-A002C Auto-Battle Pointers (2 bytes, reverse and add 0x90200)
A002D-A0066 Auto-Battle Data (00xx = spell, 01xx = item, Cx/Dx00 = command; separated by 0xFFs)
A0067-A0075 Auto-Battle related? (enemy set to transition to?)
A0076-A0088 Auto-Battle related? (other auto-battle related enemy sets?)

If you can figure out what the last two data sets are, please post them.
Title: Re: Auto Battle Script Location?
Post by: Deathlike2 on February 18, 2009, 07:44:15 PM
A0067-and onwards - this bears some semblence to the "reverse" of Rydia-Golbez battle. Remember that there are two Golbez battles.. one doing the reverse of the other. That's my only guess.
Title: Re: Auto Battle Script Location?
Post by: Deathlike2 on September 25, 2009, 08:40:31 AM
The auto-battle script pointers have to be updated as it isn't as moddable as I thought it would be. My attempt to tweak the intro battles made DK Cecil do nothing, so, there must be pointers somewhere for each auto-battle.
Title: Re: Auto Battle Script Location?
Post by: Phoenix on September 25, 2009, 05:55:25 PM
What did you tweak them to? It worked fine for me, but I only tried simple one or two command replacements.
Title: Re: Auto Battle Script Location?
Post by: Deathlike2 on September 25, 2009, 06:00:05 PM
I tested the DK Cecil opening battles... and tried to add a 2nd attack to the script. Firebomb, then Icicles would be used (one after the other obviously). That worked, but when it came to the Raven, the game whacked out on me and DK Cecil didn't execute the attack I set. I suspect there are pointers for each scripted battles to point out the start of the battle sequence, which is the problem. I got the extra space from Yang's auto-script (deleted a command from it to make room, but then again I made it a manually-controlled battle... not that it matters).

It's not as easily modable as the battle scripts where actual parsing is done...
Title: Re: Auto Battle Script Location?
Post by: Dragonsbrethren on September 25, 2009, 06:13:54 PM
Phoenix already has the pointers noted:

Code: [Select]
A001D-A002C Auto-Battle Pointers (2 bytes, reverse and add 0x90200
The Raven battle pointer is at 0xA001F (headered).
Title: Re: Auto Battle Script Location?
Post by: Deathlike2 on September 25, 2009, 06:25:47 PM
Bleh, that's not worth updating then. I'll have more clever ideas to work with what I already know...
Title: Re: Auto Battle Script Location?
Post by: Dragonsbrethren on September 25, 2009, 06:35:38 PM
It's not hard to update at all...