[Update V2.1] Beetroot Powerup w/ Custom GFX!

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

[Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Tempest » Mon Feb 27, 2017 6:30 pm

Koopsakimoto wrote:some Power-Ups from MF? (Mario Forever.)
Made it.

http://www.mediafire.com/file/snujh41dc ... empest.rar

As you can tell by the name, it's that weird beetroot power-up from Mario Forever.
screenshots: show
V1:
Image
V2.1:
Image
With this powerup, you can throw beetroot and they will bounce 2 times, left and right.

Like all the other V1.0s, only Mario can use this powerup, for now. Not anymore!

If you have any suggestions or found any glitches, leave them down below!
changelog: show
UPDATE V2.1:

Features:
-Thanks to HenryRichard's coding, now the beetroot powerup is a separate entity (NPC-92, turnip)! Yaaaay
-added new cheatcode: "needabeetroot"
-link can now use the powerup, and gain an explosive sword and beetroot bombs, how cool is that?
-holding up before pressing the run button will throw the projectile higher but slower, like any other projectile powerup
-instead of dealing absurd damage, beetroot projectiles will now explode every 21,6 seconds (~1/3 of a second) on impact with any enemy or projectile in the "hittable" table
-code is SIGNIFICANTLY less repetitive
-some other minor stuff
-templets
templets coming soon not really

Known issues:
-still only works for player one (believe me, i TRIED SO HARD to fix this)
-code MIGHT break when you exit a level
-beetroot explosion isn't correctly centered
-probably other minor stuff

UPDATE V2:

Features:
-i finally started using pnpc, i was just too dumb to even try it out
-now Luigi, Toad and Peach can also use the powerup (link isn't available yet, but he can still throw beetroot... sometimes)
-you can now throw 2 at a time, because a) i think more would be too overpowered and b) it would lag. A LOT.
-now if you try to stand on the projectile you will bounce off of it
-changed texture
-removed some bugs
-the projectiles can now break blocks better
-each character works differently, Mario throws at medium height and speed, Luigi throws higher but slower, Toad throws faster but lower and Peach has one extra bounce
-you can't grab the projectile anymore
-removed herobrine

Known issues:

-only works for player one
-code might be a little too repetitive
-the mushroom block used for beetroot has odd behavior when you don't have the powerup
-projectile won't always break bricks.

UPDATE V1

Original version
Credit to HenryRichard for being such a cool guy and letting me use some of his code for the "separate entity" part. Thanks man! :D

I just wanted to quickly thank everyone for being so supportive, at first i didn't know if i should post my creations or not, but after the feedback and good criticism, i just want to say thank you.

GIVE CREDIT IF USED.
Last edited by Tempest on Fri Apr 27, 2018 10:52 pm, edited 6 times in total.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby PixelPest » Mon Feb 27, 2017 8:52 pm

Why can you only throw one at a time?

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby Tempest » Mon Feb 27, 2017 8:59 pm

PixelPest wrote:Why can you only throw one at a time?
Because i'm absolute garbage at NPC table scripting, and didn't know how to make more than one at the same time, so you have to wait for it to disappear so you can throw another one.

I'm gonna try to fix that in V2.0.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby PixelPest » Mon Feb 27, 2017 9:10 pm


Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby Tempest » Mon Feb 27, 2017 9:13 pm

Hmmm. Gonna try that later. Thanks!

MacDuckBeat
Fuzzy
Fuzzy
Posts: 1055
Joined: Fri Oct 07, 2016 8:09 am
Flair: Neon and edgy artist hehe
Pronouns: he/him
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby MacDuckBeat » Tue Feb 28, 2017 1:02 am

They're called beetroot. And anyways, good job on remaking the powerup from MarioForever to SMBX with LunaLua. :)

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby Tempest » Tue Feb 28, 2017 11:01 am

RSuper wrote:They're called beetroot. And anyways, good job on remaking the powerup from MarioForever to SMBX with LunaLua. :)
Thanks! :D

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9890
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Potato(?) V1.0 w/ Custom GFX!

Postby Emral » Tue Feb 28, 2017 11:15 am

There's a lot of repeat code here. Keep in mind when setting variables you can perform arithmetic:

Code: Select all

for k,v in pairs(NPC.get(265,-1)) do
	if player:mem(0x106,FIELD_WORD) ~= -1 then
		v.width = 32
		v.height = 32
		v.speedX = 4
		v.speedY = -6
		v.id = 154
		player:mem(0x160,FIELD_WORD,2)
		PotatoAppear = 1
		PotatoDirection = 1
	else
		v.width = 32
		v.height = 32
		v.speedX = -4
		v.speedY = -6
		v.id = 154
	   player:mem(0x160,FIELD_WORD,2)
		PotatoAppear = 1
		PotatoDirection = 2
	end
end
This piece of code can be easily rewritten to:

Code: Select all

for k,v in pairs(NPC.get(265,-1)) do
		v.width = 32
		v.height = 32
		v.speedX = 4 * player:mem(0x106, FIELD_WORD)
		v.speedY = -6
		v.id = 154
		player:mem(0x160,FIELD_WORD,2)
		PotatoAppear = 1
		PotatoDirection = player:mem(0x106, FIELD_WORD) --changing direction to use -1 and 1 as values to make direction math easier
end
I haven't fully looked over and tried to comprehend all of the code, but is there a reason why variables like PotatoDirection are global, rather than bound to a single potato object?

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: Potato(?) V1.0 w/ Custom GFX!

Postby Tempest » Tue Feb 28, 2017 11:34 am

Enjl wrote:There's a lot of repeat code here. Keep in mind when setting variables you can perform arithmetic
Okay. Gonna try that.
Enjl wrote:I haven't fully looked over and tried to comprehend all of the code, but is there a reason why variables like PotatoDirection are global, rather than bound to a single potato object?
I think it's because i was so frustrated that i didn't understand NPC tables and had to finish that code quickly that i forgot to make them more local. Oops

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9890
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Beetroot V1.0 w/ Custom GFX!

Postby Emral » Tue Feb 28, 2017 12:13 pm

The API you want to load is called "pnpc". Using pnpc you can wrap npc objects and access a data table which lets you store all kinds of data per-npc.
Example:

Code: Select all

for k,v in pairs(NPC.get()) do
    v = pnpc.wrap(v) --sets or gets wrapper object
    if v.data.timer == nil then v.data.timer = 0 end
    v.data.timer = v.data.timer + 1
end

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: [Update V2] Beetroot Powerup V2.0 w/ Custom GFX!

Postby Tempest » Thu Mar 15, 2018 12:43 am

Update V2 is out: Updated thread and changelog. Check it out!

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Tempest » Thu Mar 29, 2018 11:42 pm

Update V2.1 is out: Updated thread and changelog. Check it out!

WildW
Rocky Wrench
Rocky Wrench
Posts: 676
Joined: Thu Dec 14, 2017 2:21 pm
Flair: C# more like Db
Pronouns: he/him

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby WildW » Fri Mar 30, 2018 12:15 am

Oh yes de templetz!



Anyway I actually find this a pretty cool power up! I might do some recolouring on this for my project as well. Nice power up.

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Tempest » Fri Mar 30, 2018 11:35 am

Thank you :D

WildW
Rocky Wrench
Rocky Wrench
Posts: 676
Joined: Thu Dec 14, 2017 2:21 pm
Flair: C# more like Db
Pronouns: he/him

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby WildW » Fri Mar 30, 2018 2:24 pm

fuck.

I just spent 1.5 hours on a SMW version and fucking deleted it.I_I

Grand Goomba
Buster Beetle
Buster Beetle
Posts: 98
Joined: Sun Nov 19, 2017 3:58 pm

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Grand Goomba » Fri Mar 30, 2018 2:29 pm

This looks great! I'll try to use it in my episode. And since I should be giving credit for this, here I go: thanks!

Rakalborn
Shy Guy
Shy Guy
Posts: 8
Joined: Sun Dec 25, 2016 12:50 pm

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Rakalborn » Tue Jul 24, 2018 6:33 pm

Hello, tempest. How to use it not only in one level. If I complete level with beetrot powerup, next level I will start without it(i used lunaworld). Sorry for my bad english.

Tempest
Swooper
Swooper
Posts: 79
Joined: Tue Jan 31, 2017 5:18 pm
Flair: not here
Contact:

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Tempest » Tue Jul 24, 2018 11:12 pm

Rakalborn wrote:
Tue Jul 24, 2018 6:33 pm
Hello, tempest. How to use it not only in one level. If I complete level with beetrot powerup, next level I will start without it(i used lunaworld). Sorry for my bad english.
Yeah, that's one of the main issues I forgot to put in the changelog. I've tried to fix that a couple times but for next updates (may take some time, I'm kinda out of SMBX for a while) I will try once again to fix that. But for now I recommend storing the item on the reserve box, so you can keep it on the next level

Rakalborn
Shy Guy
Shy Guy
Posts: 8
Joined: Sun Dec 25, 2016 12:50 pm

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Rakalborn » Wed Jul 25, 2018 5:59 pm

Tempest wrote:
Tue Jul 24, 2018 11:12 pm
Rakalborn wrote:
Tue Jul 24, 2018 6:33 pm
Hello, tempest. How to use it not only in one level. If I complete level with beetrot powerup, next level I will start without it(i used lunaworld). Sorry for my bad english.
Yeah, that's one of the main issues I forgot to put in the changelog. I've tried to fix that a couple times but for next updates (may take some time, I'm kinda out of SMBX for a while) I will try once again to fix that. But for now I recommend storing the item on the reserve box, so you can keep it on the next level
thx, will wait next update

Dor_78
Spiny
Spiny
Posts: 28
Joined: Wed Mar 30, 2022 2:08 pm

Re: [Update V2.1] Beetroot Powerup w/ Custom GFX!

Postby Dor_78 » Sat Jan 20, 2024 9:39 am

Does this work with Beta4?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari