News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Applying the palette change after defeating spore spawn

Started by jamma, May 23, 2019, 06:28:14 PM

Previous topic - Next topic

jamma

So I'm trying to find a way to import the palette from when after spore spawn dies and all the green blocks change to that brownish withered color. I want to apply that change to the whole green brinstar so that it's all brown after he dies. I can't seem to find the palette, and the special spore spawn palette in SMILE 3.0 isn't the right colors for the tiles if I try to apply that one to the blocks.

I thought maybe there's an ASM that alters the colors to that withered state, and I could apply that ASM to all the green brinstar rooms on an alternate Event state, but the Spore Spawn "Bosses 1" room doesn't seem to have any special ASM pointers that I can simply snag and apply to all the rooms.

I suppose if someone knows where to find the number values for all the colors in the withered palette, then I could alter the palette manually to match the color from the boss room after spore spawn is dead and use that palette for all the rooms.

Does anyone have any ideas how to make this work?

jamma

Just found this section in the wiki:

Boss Palettes
Spore Spawn

Spore Spawn's colors during battle.
  *12E359-3F

Spore Spawn's colors after battle.
  *12E3D9-8F

Foreground after battle.
  *12E4F9-DF

Background after battle.
  *12E5D9-6F



Can these full sections of code in the hex for the Foreground and Background after spore spawn dies be copied and pasted somewhere in the hex data for the level to make it appear that same withered color scheme on any room? If so, where in the level data could I paste those sections below?


caauyjdp

here's my hacky attempt at a solution(though possibly to a wrong problem):
apply this asm to rom:

lorom
org $8FE99B ;point to freespace in bank 8f. set to vanilla atm
php

lda $7ed829 : and #$0002 ;check if miniboss of brinstar is dead
beq notdead

phb : pea $a5a5 : plb : plb

ldy #$00c0
ldx #$0000

LDA $E4F9,y
STA $7EC280,x

INY : INY : INX : INX
CPX #$0020
BNE $F0

ldy #$00c0
ldx #$0000

LDA $E5D9,y
STA $7EC2E0,x

INY : INY : INX : INX
CPX #$0020
BNE $F0

;prevent palette from animating by changing fx1 to same as in boss room.
lda #$826E
STA $07CD

plb
notdead:

plp
rts

then for doors leading into affected rooms, set door asm to E99B(or wherever you'll move it if you will)

only tested with pre spore spawn room and noob bridge room, so there's probably issues if you set that door asm to wrong kind of room

jamma

Ok I applied the asm to my rom and changed the door asm leading to the room just before spore spawn so I'm testing the same room as you. There seems to be no effect to the pre-spawn room after I defeat spore spawn.

Is there anyway you can share a screenshot of how the room looks on your end to see if what you're hacking is what I'm going for?

caauyjdp

[spoiler=image][/spoiler]

It's not something silly, like setting door asm for door leading to the room from the left, and then testing it with the door that leads back from spore spawn room?

And I guess I was silly using door asm anyway, when this would probably better fit in room setup asm. Will try to do that tomorrow.

jamma

Oooh yes that looks like the colors I'm going for! Now if I only I can copy what you did and apply that to my rooms. I'm a beginner at this and don't know how to write my own ASM, but I do understand programming logic, so anything you can do to explain how you got that, I would be grateful.

jamma

Ok so I'm such a noob. This was my first time applying an asm patch and turns out the problem was that I chose the SNES emulator as the "assembler" when applying the patch. Upon realizing what I did, I changed the assembler to xkas and now your patch works!

I do see your point about it being more efficient with making it a room ASM setup however, because if I have an elevator going down into green brinstar after spore spawn is defeated, the door ASM on the elevator already needs its own elevator pointer so I'm not sure how to apply the ASM using the E99B on that...


caauyjdp

Tested and it can be used as is for room setup asm. Only difference is that you need to check what original room setup pointer was pointing to. In my test cases it was 91D5 and that just points to an "RTS", so no problem with just changing it, but if a room you want to change has something else, check http://patrickjohnston.org/bank/8F first, and if it has something like
;;; $<room setup asm pointer, for example "91D5">: Setup ASM: RTS ;;;
then it should be ok(if setup asm is set to 0000 then it should be fine to change it too, but haven't tested)

jamma

Awesome, that patrickjohnston reference is very useful! Glad I can understand what the ASM numbers correspond to now.

Thank you so much for your help on this. Credit to you and patrickjohnston once the hack is finished one day.

Cheers!