Language…
6 users online: Cote de Boeuf, Ginnb0b, Lespna1, Raumeo, Reggiamoto, Zavok - Guests: 69 - Bots: 123
Users: 67,562 (2,002 active)
Latest user: Dilshacking

Red Coin v2.1

SMW Blocks → Red Coin v2.1

Submission Details

Name: Red Coin v2.1
Author: Donut
Added:
Version History: View
Act As: 025
Includes GFX: No
Description: A red coin, if the player collects X amount of them, they get a power-up as a reward. It also plays a sound effect when collected.
They can be set to only be collectable when a p-switch is active, and additionally, there's an option to stop the p-switch timer when all the coins have been collected.
To make them not visible while a blue switch isn't active, use the graphic tiles that are already in the game, that are used for the invisible p-coins (there's an image file included as help in addition to a map16 file). For the silver switch variant, use exanimations (the animation can be found in the example level, so you can just copy it from there), for normal non-switch variant, once again, use a custom animation (to avoid the block turning into used blocks when a blue p-switch is active. This animation can also be found in the example level).
Everything is configurable in the file.

Inspired by NSMB's red coins.

v2.0 update:
- I rewrote the entire code. It's a lot more configurable and optimized now.
v2.1 update:
- Added more customizability.
- No longer relies on the item box.
Tags: bonus coin lorom sa-1
Comments: 18 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 19.88 KiB | 696 downloads

Screenshots

Comments (18)

1LE Link
How do I do it if I want the coin to be worth 2?
 Donut Author Link
In hindsight I should've added this as a define...
On line 81 in red_coin.asm, change
Code
INC $13CC|!addr	;increment coin counter thingie
to
Code
LDA $13CC|!addr
CLC : ADC #$XX
STA $13CC|!addr	;add to coin tally
changing "XX" to the number of coins you want it to give, so for you "02" (so it should be CLC : ADC #$02)
 Major Flare Link
Tested with: GPS 1.4.3, Lunar Magic 3.40, ZMZ 1.08 and SA-1 1.40.

Update Accepted.
Vash the fairytail Link
The eighth and final coin is taken from directly below.
The 35th object block (question block to produce keys, Yoshi wings, etc.) is generated by itself.
Is this a bug?
 Donut Author Link
Yes it is, however, for the life of me, I can not replicate it... (I think I know why it's happening; Y's overwritten at some point, but I never use Y in my code so I have no idea how it happened for you.)
Could you please let me know which settings you used in the file itself and which GPS version you're using?
Vash the fairytail Link
GPS used V1.4.21.
LX5 Powerup is used.
This bug no longer occurs when I set the .pppatchold from 1 to 0.
 Donut Author Link
That told me everything I needed to know, thank you!
That has now been fixed hopefully. (In case of caching, here's a download)
0LE From older version: Red Coin Link
It looks very good, the only thing I ask is that each coin be two. Like those of SM64.
CalHal Link
You can also use MarioFanGamer's P-Ring to recreate the NSMB red coin gimmicks.
Heitor Porfirio From older version: Red Coin Link
I have a suggestion for these blocks. I'm not sure if this would need a custom sprite, but when you collect all the red coins, the power-up will flash for a set time and land right on top of the player, which turns out to be more accurate with some newer Mario games.

Not to mention that it would facilitate compatibility with status bars that remove the item box.
 Donut Author From older version: Red Coin Link
I thought about implementing both. Once I stop being lazy.™
 RussianMan From older version: Red Coin Link
TESTED WITH:
-Lunar Magic 3.31
-bsnes v115
-SA-1 1.40
-GPS 1.4.2.1
-Addmusic 1.0.8

Fixed a small kinda oversight where if !reset = 1 and both colored p-switches are pressed, the music will get restored and after the second p-switch timer runs out, the music resets once again. Also edited the example level to actually feature 3 different coin tiles. Didn't notice any other issues. A neat little addition to the bonus collectibles.
Hamilton64 From older version: Red Coin v1.2 Link
Eu não estou conseguindo ganhar os powerups como recompensa, como posso fazer para ganhar esses powerups?
 Donut Author From older version: Red Coin v1.2 Link
Originally posted by Epic_Manky
I'm assuming this is compatible with custom powerups?

Nope. Or... I'm not sure.. it depends on how custom power ups work. This code basically just sets the RAM value for the item box and automatically drops it by calling a routine. So if the custom power ups still work the same way as the normal power ups (using the RAM value for the item reserve box), it should.

(also p.s.: This block kinda sux.. I made it waaaay back when I knew next to nothing about ASM. so... don't expect much from it)
Epic_Manky From older version: Red Coin v1.2 Link
I'm assuming this is compatible with custom powerups?
AyGaAlPa From older version: Red Coin v1.2 Link
Originally posted by Friday_D0nat
It should work now AyGaAlPa :‍)


Works perfectly!!!! Thanks YOU!!!!!!!!!
JamesD28 From older version: Red Coin v1.2 Link
Tested with:

• Lunar Magic 3.21
• SA-1 Pack v1.32
• GPS V1.4.21
• Snes9x v1.60
• bsnes plus v05

The block now works as intended on both LoROM and SA-1, so, accepted. Added the LoROM tag.
 Donut Author From older version: Red Coin v1.2 Link
It should work now AyGaAlPa :‍)