Language…
8 users online:  Atari2.0, drkrdnk, GRIMMKIN, JezJitzu,  Nanako, Nemesis1407, Pink Gold Peach,  Segment1Zone2 - Guests: 252 - Bots: 342
Users: 64,795 (2,376 active)
Latest user: mathew

Base bro help

I'm using the base bro that already have the shell bro and the bomb bro, but is there a way to add an additional base bro that spawns another original sprite? like the bullet bill for example.
Gotta aim fast.
Just edit base_bro.asm and just make a copy of bullet_bro.cfg with a different property byte. You'll notice six tables at the start of the ASM file. That allows you to set the tiles. The first table, is the sprite number, the second table the state (aka $14C8), the third tablethe sprite number, the fourth and fifth table the tile number when the Bro "carries" the sprites and the sixth's table the initial speed (which doesn't work here because Bullet Bills override it).
Be aware that bullet bills handle their directions differently from most other sprites. As such, you have to set the initial state 1, not 8 as you'd usually do.
Originally posted by MarioFanGamer
Just edit base_bro.asm and just make a copy of bullet_bro.cfg with a different property byte. You'll notice six tables at the start of the ASM file. That allows you to set the tiles. The first table, is the sprite number, the second table the state (aka $14C8), the third tablethe sprite number, the fourth and fifth table the tile number when the Bro "carries" the sprites and the sixth's table the initial speed (which doesn't work here because Bullet Bills override it).
Be aware that bullet bills handle their directions differently from most other sprites. As such, you have to set the initial state 1, not 8 as you'd usually do.
Is it okay if I use one of the cfg files and change the extra property byte?
Gotta aim fast.
What should I add in "Spawn state", "Spawn timer" and "Spawn prop"? And do I need to change something in the sprite routines or the sprite data?
Gotta aim fast.
I've just set the sprite cfg file, but it does't shoot bullet bills, is there a last step that I missed?
Gotta aim fast.
How does the top of the ASM file look like?
Originally posted by MarioFanGamer
How does the top of the ASM file look like?


Here it is:
Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Bro sprite that throws a sprite.
;; What sprite is determined by the first extra property byte in the CFG editor and the
;; tables below
;;
;; Uses first extra bit: NO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;Tables indexed by first extra property byte

;Currently:
;	0 - Green Shell
;	1 - Bob Omb

;sprite to spawn
SpriteToSpawn:		db $04,$0D
;$14C8 state
SpawnState:			db $0A,$09
;$1540
SpawnTimer:			db $00,$A0
;Graphical Display Stuff:
SpawnTile:			db $8A,$CA
SpawnProp:			db $0A,$03


	!Throw_XOff = $07
XThrowSpeed:		db $32,$CE

	!JUMP_TIMER = !163E            ;Decrements itself per frame!!!!
	!RAM_ThrowTimer = !1504        ;DOESN'T decrement itself!!!!!!!

I just added 2 for extra proprety byte and $1C for the sprite to spawn, and $08 or $07 for the spawn state, but it spawns it just to the right.
Gotta aim fast.
You do understand that this is the unmodified file? Either way, I mentioned that the initial state (i.e. SpawnState) needs to be set to 1, not 8, to make the bullet bill face the direction.
Oh, yeah, I totally forgot about this. I'll try it then fill you with further news. And by the way, is it possible to make the base bro spawn a custom sprite?
Gotta aim fast.
It's actually working, thanks a lot, even if the bullet bill doesn't face Mario before it is thrown when he goes to the opposite direction, but still.
Gotta aim fast.