Language…
6 users online: cletus_deletus,  Donut, masl, playagmes169, Skewer, toady - Guests: 227 - Bots: 323
Users: 64,795 (2,375 active)
Latest user: mathew

Sprite Extra Bytes/Extension Clarification

So, I'm using imamelia's Panser sprite, as optimized by Blind Devil, and have run into issues with Extra Bytes/Extension in LM. The readme says:

Code
;; Uses Extra Byte 1 (Extension). They determine the sprite's palette/behavior.
;; 00 = palette 8
;; 01 = palette 9
;; 02 = palette A
;; 03 = palette B
;; 04 = palette C
;; 05 = palette D
;; 06 = palette E
;; 07 = palette F

...

BehavioralProperties:			; some behavior settings for each palette
db $04,$05,$02,$00,$01,$03,$10,$21	; palette 8, 9, A, B, C, D, E, F
; Bit 0 - no movement
; Bit 1 - no X speed for the spawned fireballs
; Bit 2 - *random* XY speeds for the spawned fireballs
; Bit 3 - stay on ledges
; Bit 4 - follow the player (if set to move)
; Bit 5 - jump every now and then


So, I've been able to get the no X-motion fireballs and no-motion Panser's working fine, and kind of the palettes, but I don't entirely understand how to use this. I understand that the Extension is 8 bytes, 16 numbers.

So, as an example, to set a behavior that is "No movement, no X speed for spawned fireballs" with palette 9, I put in "0500" in and it does just that. But how would I get, say, "Follow the player, no X speed for spawned fireballs" with the same palette?

For clarification, I am using GIEPY, and I'm pretty sure Extra Bytes were enabled during installation.
I'll assume you know how to handle binary to hexadecimal conversion. The way this sprite is set up is that each color has predefined properties that you can change under BehavioralProperties.

If you want Follow the Player (Bit 4) and No X for fireballs (Bit 1) for a specific palette, let's say palette 9 (SECOND palette), you'll need to set the SECOND entry of BehavioralProperties to the bits you chose, in this case to $12 ($10 for bit 4 + $02 for bit 1). This change is made in the sprite's .asm file, not the extension field!

Also, make sure you only have Extra Bytes Length 1 in the panser.cfg file, as it uses only a single one. Therefore you should only have to input "xx" into the Extension field, where you replace xx with the palette you want.