FF6 Hacking
How to change Chocobo's palette? - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: How to change Chocobo's palette? (/thread-2022.html)

Pages: 1 2


How to change Chocobo's palette? - cdizzle - 03-29-2013

Hey guys, I am new to these forums and have found them quite useful for the hack I am working on. There is one part that is tripping me up. How do I change the palette for Chocobos? I am having great luck with changing the character's palettes with the palette location docs and WindHex32.

However, I just can't figure out how to search for chocobos in the hex. I presume it would have hex similar to 43**07, with ** standing for the hex for the chocobo sprite. Is this right? Am I way off? I've done some hex searches and found quite a bit of stuff that fits 43**07, so it's rather difficult to determine which is actually the chocobo. I'm not even sure if that's what I should be looking for, as I am uncertain if the follow the same rules as character sprites.

Thanks in advance for any advice. It will help me complete my submission for Screenshot of the Month, and it will also help me complete my first submission of a sprite to the forums.

Edit: I have looked in the level editor for clues, but all I've found there is that it's called a vehicle with no clue as to what it's sprite id might be. I've been trying everything I can think of to find hex around certain events, but nothing is yielding positive results. I presume I'm changing palettes to something, but that something certainly isn't the chocobo.


RE: How to change Chocobo's palette? - SSJ Rick - 03-30-2013

magitek armor and chocobo's share the same palette, its possible they r together via hex wise but I am not 100% sure


RE: How to change Chocobo's palette? - Ghost XIII - 03-30-2013

I'm just taking a wild guess here, but I assumed it would be in the coding somewhere near the functions for generating vehicles. In the event dump it says that the action for putting a character on a vehicle is action 44.
Code:
CA/6018: 44    Place character $01 (Actor in stot 1) on vehicle $20 (Chocobo) (Character is not shown)
There does not appear to be an action to assign palettes to vehicles as is done for players (i.e. action 43,) as I'm sure the game assumes that vehicles are always palette 07.

I would assume then if you looked in the C0 Bank for the code for generating vehicles that it would be there.
Code:
Place object xx on vehicle yy
    00: No vehicle         40: Magitek Armor        80: Object visible
    20: Chocobo            60: Raft
(gen. act. 44)

C0/9CCA:    20F09D      JSR $9DF0    
C0/9CCD:    A5EC        LDA $EC
C0/9CCF:    29E0        AND #$E0
C0/9CD1:    851A        STA $1A
C0/9CD3:    B96808      LDA $0868,Y
C0/9CD6:    291F        AND #$1F
C0/9CD8:    051A        ORA $1A
C0/9CDA:    996808      STA $0868,Y
C0/9CDD:    A903        LDA #$03
C0/9CDF:    4C5C9B      JMP $9B5C

Unfortunately I don't see anything there that looks to me like it's assigning palette 07, which is what the magitek armor, chocobo, and I assume also the raft, use. This has me stumped right now, but I will try looking a third time later.



RE: How to change Chocobo's palette? - Gi Nattak - 03-30-2013

The chocobo's palette is different, it's not handled by an event like the characters so you won't find it in there in the event dump. It is preset somewhere, along with the magitek armor, probably tied together (sharing the same code). I could never find where the code is for where it assigns the palette, I'm pretty sure it isn't known or documented. =/


RE: How to change Chocobo's palette? - cdizzle - 03-30-2013

Thanks for the advice. I am perfectly fine with the palette being shared with the other vehicles. I was really wanting to change them to palette 0 as the ideas I had for vehicles will all work for that palette. I'm actually trying to do all my sprites with minimum changes to any colors of palettes, as it will be easier to plan and easier to share with you all when I'm done.

If anyone figures out how to change vehicle palettes that would be awesome but if not, I'll figure something out. I've been looking through code to no avail as well
I remember reading that the crane and some other random things were technically NPCs with palette 7. Do you think these are all linked? Or do you think vehicles are separate?


RE: How to change Chocobo's palette? - Angelo26 - 03-30-2013

Palettes can be assigned to NPCs by using events or FF6LE. There is only a limited number of palettes (0-5). For palettes greater than 5, those must be assigned via events. For example, the statues, Odin, or terra in her esper form requires special palettes that are not available regularly.

But no, the palettes to NPCs are not linked to the palettes given to vehicles.


RE: How to change Chocobo's palette? - cdizzle - 03-30-2013

That's very useful to know, as I had intended a few characters to have Terra's esper form palette. However, I was able to give palette 7 to soldiers/vicks/wedge with windhex32 by just changing 430e00 to 430e07 and 430f00 to 430f07 at the locations listed in the palette location doc. Is just palette 6 itself weird like this and not 7?


RE: How to change Chocobo's palette? - madsiur - 03-30-2013

(03-30-2013, 01:10 PM)CMFL Wrote: I remember reading that the crane and some other random things were technically NPCs with palette 7.

Their NPC data have palette 6 assigned to all NPCs composing the crane but if you look at the crane event, I think palette 15 is assigned with event command 60:

Code:
CC/82BF: 60    Change background layer $0E to palette $0F

In fact, if you look at command 60 in bank C0, there is an instruction that loads the palette:

Code:
C0/AA20:    BF0080E6    LDA $E68000,X

I'm pointing this out because the only other place there is this instruction is at C0/50ED. If you do some backward tracing you find yourself at C0/BF91, in the giant map loading routine. This means every sprite (and vehicle) palette loading outside command 60 is done in the map loading routine. So the palette values for the vehicles might be hardcoded somewhere before C0/BF91, because they are not assigned via events (command 60). Now I really like answering questions but I don't have time to look further into that.



RE: How to change Chocobo's palette? - Angelo26 - 03-30-2013

(03-30-2013, 03:36 PM)CMFL Wrote: That's very useful to know, as I had intended a few characters to have Terra's esper form palette. However, I was able to give palette 7 to soldiers/vicks/wedge with windhex32 by just changing 430e00 to 430e07 and 430f00 to 430f07 at the locations listed in the palette location doc. Is just palette 6 itself weird like this and not 7?
My guess is that command 60 works for NPCs, while command 43 assigns any palette to a given party member? Nattak can correct me here.



RE: How to change Chocobo's palette? - madsiur - 03-30-2013

(03-30-2013, 03:58 PM)Angelo Wrote: My guess is that command 60 works for NPCs, while command 43 assigns any palette to a given party member? Nattak can correct me here.

Command 43 works for characters only, well in the event dump the character parameter is never beyond 0F. Command 60 seems to affect the palettes of a group of NPCs described as a background layer. Not sure about this. A palette assignation for a single NPC can only be done through the NPC data I think...