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

#21
Posts: 2,768
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
personally thats why I don't use gimp

I'm not sure why it does what it does, but unfortunately thats what always seems to happen


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#22
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Ah! Found it. GraphicsGale that's the one I was looking for. Its more palette friendly, I think. Came across it on FFT sprite editing tutorial.
There was some reason for using gimp, then graphics gale then something, something... FF6 sprites are better...

Heh, also answers why I had copies of all the vanila sprites in my old files. It was for importing the base palette order.


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

#23
Posts: 2,768
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
there u go

I've never used graphics gale either but I've heard good things about it and am willing to mess with it


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#24
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Well I'm still more fond of Gimp as far as general purpose editing goes. I could say because its more "user friendly" but I really think its just because its more basic. GraphicGale seems a little to highspeed for my general taste.

That being said, you can open a sprite sheet, then load a palette and it automatically updates the sprites to the closest color match in the new palette without changing the order of the palette. Takes about 30seconds. Gimp probably does it to I just never found where.

I knew there was an easy way to adjust to palettes just took me all day to remember what.

*EDIT*
Updated the first post with current status.


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

#25
Posts: 127
Threads: 8
Thanks Received: 21
Thanks Given: 12
Joined: Jan 2012
Reputation: 13
Status
None
Catone, I think you might need to expand a pointer table for the battle intros at $D0/9844 it uses the sprite id as index for different intros in battles.

Check Edrin's post here for more info:
https://www.ff6hacking.com/forums/showth...ttle+intro
  Find
Quote  
[-] The following 1 user says Thank You to m06 for this post:
  • Catone (04-05-2015)

#26
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Son of a b....

You might be absolutly correct,
  • Happens after graphics loading and before battle.
  • Would explain why some sprites never show up on screen at all.
  • Explains the randomness of working/nonworking
The feeling of being an idiot for not thinking of that (I even made a post regarding making battle intros for npcs... and never considered not having them a problem...) is definatly second to the urge to jump on that idea.

It may or may not be "THE" solution to fix all, but its definatly a lead to follow.

You have my thanks.

*Edit* After tonight's reading and typing and eye bleeding, this could definatly be the issue. From the looks of things (the intros I pulled and poked from hex) they all seem to end with FF. If the character ID hit a value from the table that never ended up at a FF or if it landed on something that resymbled some kinda fancy battle event there's no telling what would happen. What surprises me at this point is how did any of the extras work, let alone how many did work.


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

#27
Posts: 127
Threads: 8
Thanks Received: 21
Thanks Given: 12
Joined: Jan 2012
Reputation: 13
Status
None
Haha, I would like a document on the battle intros would be a nice to have. You can reuse the scripts by setting the same pointer twice with no problems.

I also scanned the C2 bank for sprite checks while figuring this out. So I'll post what I noticed but they only concern parts that are skipped for guest characters. Such as desperation attacks and magic learning.

The sprite index for an in-battle entity/character is stored at: $3ED8, X (X is the index)

Code:
Desperation attack:

C2/15F8: B9 D8 3E     LDA $3ED8,Y (Which character it is)
C2/15FB: C9 0C        CMP #$0C
C2/15FD: F0 05        BEQ $1604   (branch if Gogo)
C2/15FF: C9 0B        CMP #$0B
C2/1601: B0 0D        BCS $1610   (branch if Character 11 or above: Gau, Umaro, or
                                   special character.  none of these characters have DAs)


Magic related:

C2/5589: BD D8 3E     LDA $3ED8,X
C2/558C: C9 0C        CMP #$0C
C2/558E: B0 1E        BCS $55AE


Magic learning related:

C2/56C9: BD D8 3E     LDA $3ED8,X
C2/56CC: C9 0C        CMP #$0C
C2/56CE: F0 15        BEQ $56E5    (branch if the character is Gogo)
C2/56D0: C8           INY
C2/56D1: C8           INY          (Y = 2)
C2/56D2: B0 11        BCS $56E5    (branch if Umaro)


Post battle rewards:

C2/5E59: B9 D8 3E     LDA $3ED8,Y (Which character it is)
C2/5E5C: C9 0C        CMP #$0C
C2/5E5E: B0 13        BCS $5E73   (Branch if Gogo or Umaro)
...
C2/5E9A: B9 D8 3E     LDA $3ED8,Y
C2/5E9D: 20 83 62     JSR $6283    (Stores address for spells known by character in $F4)
...
C2/5EAF: B9 D8 3E     LDA $3ED8,Y
C2/5EB2: C9 0C        CMP #$0C
C2/5EB4: B0 03        BCS $5EB9

These are parts of four routines that do checks for sprites above #$0C or #$0D and branch if so. So they target all guest characters as such. There are more checks for sprites in the C2 bank that directly check for certain sprites. But they don't target above #$0D so I guess they don't need changing.

This is a nice project, I hope you get it all up and running smoothly Smile
  Find
Quote  

#28
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I'm guessing 100% here but most of those check $3ED8, Y except for the Magic related that checks $3ED8, X.

Whats up with that?


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

#29
Posts: 127
Threads: 8
Thanks Received: 21
Thanks Given: 12
Joined: Jan 2012
Reputation: 13
Status
None
X is used for something else Smile, doesn't really matter if it's X or Y

I think in these cases (and a lot of the time) they are copying the data within the routine, so X points to the data to copy from and Y points to the data to write to. This way they want to check and edit the data at the location stored: Y
  Find
Quote  

#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  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite