Language…
13 users online:  Anorakun,  bebn legg, carlofe92, Children's Playmate Magazine, Fullcannon, MarsAmPear, Mischievous Marc, otis89, PopCorn181, Rykon-V73, Seamus Sinclair, Spedinja, yoshiatom - Guests: 400 - Bots: 148
Users: 70,244 (2,565 active)
Latest user: SuperCheetos31

Pass/no pass based on Yoshi coins in the hack

OpenASM

Name
Block letting you pass or not depending on how many Yoshi coins you picked up in the game (not much of a name, heh?)

Type
I guess it's block and ASM patch. Maybe object, but I don't know the possibilites with objects.

Description
Pretty much what the shop is in JUMP and JUMP1/2. You pick up yoshi coins in the game, and these allow you do pass a block when you have enough, gaining access to what's behind.
(if it looks for levels where all YC have been picked up, it's fine. Not a big deal)

References
https://youtu.be/DMYMMLPF32E?t=312 (as you guessed, it's the yellow blocks with the lock on it)
Super Mario Pants World
Luigi's Lost Levels
New Super Mario Pants World
Luigi's Lost Levels 2 - Back With A Revenge
Luigi's Lost Levels 3 - Electrik Boogaloo
VLDC12 - 72HoKaizo#1
Code
db $42 ; or db $37
JMP MarioBelow : JMP MarioAbove : JMP MarioSide
JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireball
JMP TopCorner : JMP BodyInside : JMP HeadInside
; JMP WallFeet : JMP WallBody ; when using db $37

!level = $??

MarioBelow:
MarioAbove:
MarioSide:

TopCorner:
BodyInside:
HeadInside:

	STZ $01
	PHY
	LDY #$0C
-
	LDA $1F2F|!addr,y
	JSR bit_to_value
	LDA $00
	CLC
	ADC $01
	STA $01
	DEY
	BPL -
	PLY
	
	LDA $01
	CMP #!level
	BCC +
	
	LDA #$10
	STA $1DF9|!addr
	%erase_block()
	%create_smoke()
+
;WallFeet:	; when using db $37
;WallBody:

SpriteV:
SpriteH:

MarioCape:
MarioFireball:
	RTL

bit_to_value:
	STZ $00
	CLC
	PHY
	LDY #$07
-
	LSR A
	BCC +
	INC $00
+
	DEY
	BPL -
	PLY
	RTS

print "level yoshi coin block"
So !level is meant to be the number of levels the yoshi coins were picked in? Like in the JUMP1/2 clip I posted, it would be !level=15 (or in hex, whatever)?
And I assume I need to save the yoshi coins in bwram, right?

(PS: thanks)
Super Mario Pants World
Luigi's Lost Levels
New Super Mario Pants World
Luigi's Lost Levels 2 - Back With A Revenge
Luigi's Lost Levels 3 - Electrik Boogaloo
VLDC12 - 72HoKaizo#1
?? is a hexadecimal notation ($0F for 15)
Made to work without saving to bwram
Ok thanks
So far my testing went well. The only thing that isn't featured is that if I quit the game after a save point, when I come back the yoshi coins reappear in levels and I don't have them collected anymore.
But this is out of that block that I would need to change that, right? For this I'd need BWRAM (and I'm not even sure BWRAM would be able to save something even after quitting the game #tb{:)})
Super Mario Pants World
Luigi's Lost Levels
New Super Mario Pants World
Luigi's Lost Levels 2 - Back With A Revenge
Luigi's Lost Levels 3 - Electrik Boogaloo
VLDC12 - 72HoKaizo#1
Originally posted by Romano338
But this is out of that block that I would need to change that, right? For this I'd need BWRAM (and I'm not even sure BWRAM would be able to save something even after quitting the game #tb{:)})

Correct. And BW-RAM Plus just extends the saving so if the regular saving doesn't save on quitting, so doesn't BW-RAM Plus.
So why not try this patch, which allows you to save the collected dragon coins to bwram?
How about this.

If you still don't like it, I'll make a patch or I'll give up.

OpenASM