News:

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

Main Menu

Trouble when creating new custom BTSs

Started by Vener, April 16, 2019, 11:56:34 AM

Previous topic - Next topic

Vener

Good day everyone  :^_^:

I tried to make a missile block , like sup. missile block , so i done this :

;tile used is 7D in CRE
;using crumble block bts #08

08:D3AA ;x-ray CRE tile to display

7D

0A:1149 ;crumble block bts #08 PLM name in bank $84

E0F2*

0A:1DB4 ;bomb reaction table in bank $84

37F3





*02:72E0

E4F2,0BCC

72E4:

   AE DE 0D     LDX Current projectile index
   BD 18 0C     LDA,x Projectile type array
   29 00 0F     AND #0F00
   C9 00 05     CMP #0500 bomb reveal
   F0 29 *      BEQ
   C9 00 01     CMP #0100 missile break
   F0 0C **     BEQ
   C9 00 02     CMP #0200 sup missile break
   F0 07 **     BEQ
   A9 00 00     LDA #0000
   99 37 1C     STA,y PLM header table
   60           RTS

break

** BE 87 1C     LDX,y PLM's location in the room
   BF 02 00 7F  LDA,x  Room Tilemap
   29 00 F0     AND #F000
   09 7D 00     ORA #007D
   99 17 1E     STA,y  Variable use PLM value
   29 FF 8F     AND #8FFF
   9F 02 00 7F  STA,x  Room Tilemap
   60           RTS

reveal

* A9 3B F3     LDA #Reveal
   99 27 1D     STA,y  Next PLM instruction
   60           RTS


4C0B:

108C 0A ;play a 'breaking' sound
0400 45A3    \
0400 4BA3      breaking block animation (CRE tiles 53-54-55 then FF)
0400 51A3 
3000 57A3    /
BC86        ;delete PLM



7337 (Bomb reaction table):

E4F2,0BCC





733B (Reveal):

0100,41F3,BC86

7341:

0100 7DC0 0000      < (CRE tile to display when bombed)


So

When i X.ray this , it display correctly my custome CRE tile .
When i bomb it , it display correctly my custome CRE tile .

But

If i bomb it a 2nd time , it display power bomb block instead (then become it)
and anyway , if i shot on missils/sup. , that do nothing (they just explode on) ; and with Samus , i can walk trough blocks ...

If someone could explain me all the process to do for making a custom BTS to work , it'll be really cool .



Vener

It's good , i found the solution .

However , i have another question for PLMs ;
i modified the tilemap of the elevator , and it rewrite the door blocks when i put it in a room , then the elevator ennemie don't work anymore .
By default , this PLM is in solide blocks , but could i change it to door blocks #00 or #01 instead ?

Thanks in advance for the help