Users browsing this thread: 3 Guest(s)
Mass Sprite Sheet Expansion Battle & NPC

#30
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Har har, works like a charm!

Haven't checked them all but the two that were the worst trouble are loading up in battle like a couple of champs. Not a fancy fix by any means (you could almost call it cheating, actually, yes it is cheating.)

Code:
410200    B9 AE 2E              LDA $2EAE ,Y   (Load sprite ID)
410203    C9 17                 CPA #17        (Compare to 23 - Any sprite after Gesthal)
410205    10 03                 BPL +03        (Skip return if positive - Higher than 23)    
410207    29 1F                 AND #1F        (Relocated for the jump space)
410209    6B                    RTL            (Long Return)        
41020A    A9 00                 LDA #0000      (Set A to 0000 - Mimic Terra's intro)
41020C    29 1F                 AND #1F        (Same relocated Code)
41020E    6B                    RTL            (Long Return)

Yes, all it does is make any sprite ID higher than 23 (From Gesthal up) pretend to be Terra's (Sprite ID of 00) and load her Battle Intro.

No, I don't really like this fix. I'm proud of it, but not happy with it. The problem is, the game uses the Sprite ID to formulate a Battle Event ... call? [F7 22] is Terra's Battle Intro - Battle Event. So, to extend the list for EVERY sprite sheet it would require 40 some odd new battle events, new formulas (unless you could group them all together) and... just isn't worth it. It would also seriously reduce compatibility overall, I think (because I'd be taking up all those battle event numbers). I also generally just don't want to learn heavy battle event coding right now so... this is the fix unless someone else can whip up something better.

I DO plan on leaving some space around this chunk of code. That way it will be easy to tack in a special case for special sprite IDs. As in, if you wanted to have Clyde (or your custom NPC sprite) have a custom intro, you could add an exception to the "set to 00" and set it to a value that would end in your custom intro. That is the plan anyway.

On to the next task! Woot!

Hrm, the code I just posted uses $2EAE to pick a battle intro. Based on what I've got and the debugger data, that is the sprite number for a character (well, used to get, holds the value, however you want to say it).

The code for things such as depreration and magic use $3ED8 to tell who it is looking at.

Is $3ED8 for actor ID (as in the name/commands/base stats) or the character ID (00-14,15,16)? I would think there would be a way to check each of them.

I ask because I think this project would require magic learning,Desperations, etc to be figured based on the actor ID not sprite or character slot. I'd need to adjust those if they already do not work based on actor ID.


The only true wisdom is knowing you know nothing.
  Find
Quote  



Messages In This Thread
RE: Mass Sprite Sheet Expansion Battle & NPC - by Catone - 04-06-2015, 08:22 PM

Forum Jump:

Users browsing this thread: 3 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite