The Disastrous NPC Pack

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

Moderator: Userbase Moderators

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

The Disastrous NPC Pack

Postby Master of Disaster » Sun Dec 31, 2023 8:17 am

The Disastrous NPC Pack - v1.2

Image

Hello there, this is the Disastrous NPC pack! And today, to celebrate the new year, I have something nice for you, introducing update 1.2!
This adds 4 new npcs into the mix, but also updates ALL the other npcs in this pack!

What's in there?
- NSMBU - Bone Blocks (v1.0)
- SMBW - Hanabihai (v1.0)
- SMBW - Long Donut Blocks (v1.0)
- SMBW - Shrodinger's Flip Block (v1.0)
- Original - Swinging Pole + Hanglerfish (v1.0)
- Original - Launchpad (v1.1)
- SMO - Packet (v1.1)
- SMW/NSMB - Roulette Block (v1.1)
- SMBW - Puffy Lifts (v1.1)
- NSMB - Spin Block (v1.2)
- M&L:SS - Shark Bones + Carcharodon Bones (v1.2)
- MvsDK - Flower Fans (v1.2)
- Original - Barrglar + Barrglarmite (v1.2)

Since I updated the older npcs, it's time for a changelog:
v1.2:
Spoiler: show
- Bone Blocks:
- added multiplayer compatibility
- Fixed an issue where you clip through lowering bone blocks.
- launchHeight and chainDelay are now block configs instead of episode spanning values.
- Hidden Bone blocks don't execute code anymore.
- Shroedinger's Flip Blocks:
- added multiplayer compatibility
- Long Donut Blocks:
- Updated donutblock2.lua to use the b5 version of donutblock.lua as a base
- Hanabihai:
- Changed visuals to be more faithful to SMBW (+ it looks better)
- Improved the npcsettings to make them useable
- Particles changes, most notably added an effect for the fuse
- Packets:
- added multiplayer compatibility
- Roulette Block:
- moved code into library
- improved powerup switching, so you aren't big for one frame + it's multiplayer compatible
- it takes the correct width and height from the block's content's npc config, if it exists
- added the big Roulette Block from NSMBWii, you can also now set the priority of the block's content via block configs.
- Swinging Poles:
- added multiplayer compatibility
- players with stars and I-frames render properly
- you leave the pole when too far away from it (so you can teleport the player that's on a pole)
- if there is no sprite sheet for a player/costume, it now uses default frames from the normal spritesheet
- you can now customize the acceleration on a pole
- the Hanglerfish won't despawn when the pole is onscreen, vice versa
- you can now hurt a Hanglerfish during it's hurt animation
- Launchpads:
- added multiplayer support
- fixed clipping through semisolids when ground pounding
- Puffy Lifts:
- added multiplayer support
- fixed clipping through semisolids when ground pounding
- if there are multiple npcs on a lift, their weight will now stack up properly

A short rundown of v1.0:
Spoiler: show
Bone Blocks! If they get hit, they unload a chain event (which results in a wave wooo), bouncing you back and hitting enemies!
And yes, it works with GroundPound.lua (funnily enough, through no extra work on my side)
Image


And there's the Hanabihai from Mario Wonder, aka the entire reason why I waited for New Year's Eve with this pack!
And best of all, you can give them a varying amount of segments and they come in red, yellow, blue and literally every other colour (via Hex Codes)!
The sprites are made by d3dot03 (aka hammerless penguin)
Image


I'll just pretend that the Long Donut Blocks are from Wonder since Wonder had them. I was not actively remaking that though.
You can change their width and if they hit a terminus, they turn gray and stop falling!
Image


Does the Flip Block exist when no one looks at it? Shrodinger's Flip Block from Mario Wonder sure doesn't!
It's a block that only exists when the player looks at it. There are also orange Anti-versions that only exist when you are not looking.
They will crush npcs by the way.
Image


And this one is a fun one: Swinging Poles! Jump on the pole, swing around to gain momentum and jump off at the right moment to get some distance!
When you are swinging so fast that there are afterimages, you just have to hold into the direction you want to jump in, otherwise you need to time your jump though!
Image
And there is also a Hanglerfish! Hit them to lower the lure, jump on the pole, get pulled up, bulid momentum and jump off in time! Otherwise you will see their teeth...
Image
v1.1 added some more NPCs!
Spoiler: show
Starting off with Launchpads! If they are pressured, they squish down. If you jump now, you release it's pressure, launching everything on top high into the air!
Image


Because motivation is an enigma, I randomly wanted to make Packets. Kick them, squish them, and see them fly around everywhere! They are even anotherwalljump.lua (granted, a special version that lets you walljump off of npcs) and GroundPound.lua compatible!
Image


Roulette Blocks are a neat thing. You can put any npc into this and configure the time it takes to cycle through each "powerup". It will also release progressive powerups, even if you are small!
Image


After making the launchpads, I figured that it wouldn't be too hard to make Puffy Lifts as well. Boy was I wrong, but here we are! Squish them for long enough and they'll disappear! It's even compatible with GroundPound.lua! However I'd recommend using spawnzones.lua alongside these, because loading logic does not like custom width npcs.
Image
And there are also the new additions for v1.2:
Spoiler: show
Featuring an original enemy, the Barrglar!! (No this guy is not from DK Country I swear I am being original). They hide as a normal barrel, but when they notice you, they jump up and start barreling towards you! You can jump onto it, and balance on it. If you throw something at it or ground pound it, you can destroy it, releasing it's contents.
Image

There's also a TNT version, the Barrglarmite! Works just as the Barrglar, but you can't stand on it and it explodes on impact.
Image

Next up, there are Flower Fans from Mario vs DK (Switch). They move players and npcs that are caught in the gusts, and there are versions for ON-OFF (and potentially JOFF and uhh JON states), as well as Beat Block ones!
Image

Watch out for the Shark Bones! Originally, they appeared in Mario & Luigi Superstar Saga, but now they have been adapted into SMBX2! They try to bite anything that comes into their territory, and jump after their prey if it's too high up. They can't survive long outside of sand, and they will always try to return to their starting position (or the nearest anchor bgo, by default the Passthrough Toggler)
Image

Say Hello to the Carcharodon Bones! Few adventurers have escaped the wrath of this beast...
Image

And there's also the Spin Block from NSMB for good measure!
Image
You know how it goes, just credit and you are good to go!

Speaking of good to go, here's the download:
https://www.dropbox.com/scl/fo/xlwgp7np ... tubdo&dl=0
Last edited by Master of Disaster on Tue Dec 31, 2024 7:46 am, edited 3 times in total.

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

Re: The Disastrous NPC Pack

Postby Emral » Sun Dec 31, 2023 8:45 am

Yooo, awesome stuff. The angler fish is such a cool idea.

In Wonder, the flip blocks are visible in a radius around the player, unrelated to the player's facing direction. Is there a setting for this?

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Sun Dec 31, 2023 10:20 am

Emral wrote:
Sun Dec 31, 2023 8:45 am
Yooo, awesome stuff. The angler fish is such a cool idea.

In Wonder, the flip blocks are visible in a radius around the player, unrelated to the player's facing direction. Is there a setting for this?
Thanks ^^
And yes, the flip blocks are visible even behind the player for a (library-spanning) configurable distance. The default is 32 px from the player's edge to the block's edge, and you can even set negative distances to troll

Blake Izayoi
Volcano Lotus
Volcano Lotus
Posts: 598
Joined: Sun Feb 23, 2014 1:55 pm
Flair: Sakuya's Husband
Pronouns: He / Him
Contact:

Re: The Disastrous NPC Pack

Postby Blake Izayoi » Sun Dec 31, 2023 1:58 pm

This is all quite amazing!! You've done a fantastic job with these, thank you for making them.

GreenDemon
Bob-Omb
Bob-Omb
Posts: 22
Joined: Mon Dec 25, 2023 4:03 pm
Flair: smbx is cool
Pronouns: he/him - autistic

Re: The Disastrous NPC Pack

Postby GreenDemon » Sun Dec 31, 2023 2:01 pm

What's the max amount of segments a Hanabihai can have?

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Sun Dec 31, 2023 8:23 pm

GreenDemon wrote:
Sun Dec 31, 2023 2:01 pm
What's the max amount of segments a Hanabihai can have?
It's 10 segments, but you can just edit the cap in their npcsettings to whatever you like
If you want to make an unavoidable obstacle, that is xD

Chilly14
Snifit
Snifit
Posts: 236
Joined: Thu Jul 18, 2019 10:28 pm
Flair: wash your hands and stay at home
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Chilly14 » Mon Jan 01, 2024 12:55 am

This looks cool! I think I'll give these NPCs for a spin at some point.

TheGameyFireBro105
Eerie
Eerie
Posts: 747
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby TheGameyFireBro105 » Mon Jan 01, 2024 3:28 pm

Bone Blocks are invisible for me.

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Tue Jan 02, 2024 6:16 am

TheGameyFireBro105 wrote:
Mon Jan 01, 2024 3:28 pm
Bone Blocks are invisible for me.
That's weird since they are drawn like normal tiles, so they really shouldn't be invisible unless you don't have their gfx files. Are they also invisible in the example levels?

TheGameyFireBro105
Eerie
Eerie
Posts: 747
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby TheGameyFireBro105 » Wed Jan 10, 2024 4:35 pm

Master of Disaster wrote:
Tue Jan 02, 2024 6:16 am
TheGameyFireBro105 wrote:
Mon Jan 01, 2024 3:28 pm
Bone Blocks are invisible for me.
That's weird since they are drawn like normal tiles, so they really shouldn't be invisible unless you don't have their gfx files. Are they also invisible in the example levels?
Haven't checked.

MegaDood
Torpedo Ted
Torpedo Ted
Posts: 1798
Joined: Wed Nov 01, 2017 2:43 am

Re: The Disastrous NPC Pack

Postby MegaDood » Fri May 03, 2024 10:19 pm

This wasn't bumped so I'm doing it for ya
Awesome update, I love all the new additions. The puffy lifts especially are really nice. Only thing is the launchpad can be a bit janky, I ran off of one while standing on a semisolid and I passed through the semisolid

Just_Thomas
Spike
Spike
Posts: 296
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Just_Thomas » Sat May 04, 2024 12:37 pm

MegaDood wrote:
Fri May 03, 2024 10:19 pm
This wasn't bumped so I'm doing it for ya
Awesome update, I love all the new additions. The puffy lifts especially are really nice. Only thing is the launchpad can be a bit janky, I ran off of one while standing on a semisolid and I passed through the semisolid
Great move by you, I would have totally missed it otherwise (imagine a thumbs up smiley here).

An NPC content update or release should ALWAYS be made clear with a new post. For everyone else like me, these are like new ingredients for cooking. In addition - at least for me - there is always a certain anticipation of at least being able to test the new content or even use it directly.
Master of Disaster wrote:
Sun Dec 31, 2023 8:17 am
Roulette Blocks are a neat thing. You can put any npc into this and configure the time it takes to cycle through each "powerup". It will also release progressive powerups, even if you are small!
Image
It's probably not directly possible because it was designed as a block, but in SMW you can also eat the contents of a roulette block with Yoshi's tongue. Can't be added by chance, can it? But hey, it's nice that the roulette block has also been realized now. It is once again also thanks to Emral and his Custom Asset Index that coders like you do know what is missing.

That the roulette block has the ID 777, this is of course a brilliant choice. :D

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Sun May 05, 2024 10:39 am

MegaDood wrote:
Fri May 03, 2024 10:19 pm
This wasn't bumped so I'm doing it for ya
Awesome update, I love all the new additions. The puffy lifts especially are really nice. Only thing is the launchpad can be a bit janky, I ran off of one while standing on a semisolid and I passed through the semisolid
Thanks ^^
And yeah the Launchpads in general probably needed a bit more polish than they got. Might make an update in the near future that fixes some of the issues, if I have the time.
Just_Thomas wrote: It's probably not directly possible because it was designed as a block, but in SMW you can also eat the contents of a roulette block with Yoshi's tongue. Can't be added by chance, can it? But hey, it's nice that the roulette block has also been realized now. It is once again also thanks to Emral and his Custom Asset Index that coders like you do know what is missing.

That the roulette block has the ID 777, this is of course a brilliant choice. :D
Thanks ^^ (again xD)

I don't think I'll add that, especially since Yoshi would (should) only be able to eat the npcs that can actually be eaten by him. I think it would be a massive headache for something that doesn't really matter that much.

Also next time when I update a pack or something, I'll make sure to push it with a new message!

Just_Thomas
Spike
Spike
Posts: 296
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Just_Thomas » Sun May 05, 2024 11:03 am

Master of Disaster wrote:
Sun May 05, 2024 10:39 am
Just_Thomas wrote: It's probably not directly possible because it was designed as a block, but in SMW you can also eat the contents of a roulette block with Yoshi's tongue. Can't be added by chance, can it? But hey, it's nice that the roulette block has also been realized now. It is once again also thanks to Emral and his Custom Asset Index that coders like you do know what is missing.

That the roulette block has the ID 777, this is of course a brilliant choice. :D
Thanks ^^ (again xD)

I don't think I'll add that, especially since Yoshi would (should) only be able to eat the npcs that can actually be eaten by him. I think it would be a massive headache for something that doesn't really matter that much.

Also next time when I update a pack or something, I'll make sure to push it with a new message!
You're absolutely right. Before I saw it in a longplay just a few weeks ago, I didn't even know that (I can't find the level again now).
Weeks ago I thought about asking if anyone was planning to create this block (so a request), but fortunately it has now happened.
PS: By the way, I have this ugly bug here.

Image

This bug happens if I already copy the files into my main project folder. They just have to be there to cause the bug, not even used or anything.
The really strange thing about that is, in the "safe area" (I sometimes test them seperate for several reasons) it does NOT happen at all.
I hope your block doesn't interfere with anything else.

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 607
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby mariobrigade2018 » Mon May 06, 2024 12:46 am

Great work with the roulette block! The only thing I would suggest to make it more accurate to SMW and the 3D games is to make the bumpable flag true. And putting a mega mushroom in the box will play the normal box SFX instead of the mega mushroom specific one.

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Mon May 06, 2024 1:49 pm

Just_Thomas wrote:
Sun May 05, 2024 11:03 am
PS: By the way, I have this ugly bug here.

Image

This bug happens if I already copy the files into my main project folder. They just have to be there to cause the bug, not even used or anything.
The really strange thing about that is, in the "safe area" (I sometimes test them seperate for several reasons) it does NOT happen at all.
I hope your block doesn't interfere with anything else.
Huh, what is your block-906? And also, it would also probably help to find out which npc/block of the pack specifically causes the issues.
Because tbh I have no idea what part of my npcs/roulette block is so menacing that it kills other custom blocks by it's sole existence

Just_Thomas
Spike
Spike
Posts: 296
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Just_Thomas » Mon May 06, 2024 2:22 pm

Block-906 IS your Roulette Block. I changed the ID because I wanted to reserve IDs 751-x for level blocks and stuff...
https://www.file-upload.net/download-15 ... F.zip.html
https://file.io/RF6rd9FjmkoF
Image
And the testmap works just fine. But as soon I copy these files in my project folder, all hell breaks loose.

No idea if it has something to do with ANYTHING of that (it is the content of the luna.lua)

Code: Select all

Defines.player_grabSideEnabled = false
Defines.player_grabTopEnabled = false
Defines.player_grabShellEnabled = false

--https://www.smbxgame.com/forums/viewtopic.php?t=29121
--True SMB1 Playables (Version 2.0 - LUIGI UPDATE)
--by: Nate-O
function onStart()
	Player.setCostume(CHARACTER_MARIO, "SMB1-Mario")
	Player.setCostume(CHARACTER_LUIGI, "SMB1-Luigi")
end

function onTick()
    	player.keys.dropItem = false
    	player.keys.altJump = false

--Code by deIce
--https://www.smbxgame.com/forums/posting.php?mode=quote&p=399575
--NPC always moves right after spawning
	for _, v in NPC.iterate() do
		if(v:mem(0x138, FIELD_WORD) == 1 and v:mem(0x13C, FIELD_DFLOAT) == 0) then
		v.direction = DIR_RIGHT
		end
	end
end

--https://www.smbxgame.com/forums/viewtopic.php?p=399480
--heartsForAll (v3.1.0.5) - Applies Heart System to Box Users
--by: AppleTheTomato
local pc = require("heartsForAll")

--https://www.smbxgame.com/forums/viewtopic.php?t=26835
--[NPC Pack / Library] Extended Koopas (v1.1.1) - More and more accurate koopas!
--by: MrDoubleA
local extendedKoopas = require("extendedKoopas")

--https://www.smbxgame.com/forums/viewtopic.php?t=28655
--Auto-loading next level after winning • levellist.lua
--by: LooKiCH
-- in {} paste the filenames of your levels in ascending order
-- BOTH MAP.LUA AND LUNA.LUA MUST HAVE THE SAME LEVEL LIST VALUE!
--require("levellist").levels = {"template_normalLevel.lvlx","template_underground.lvlx","template_normalLevel2.lvlx"}

--https://www.smbxgame.com/forums/viewtopic.php?t=25750
--warpTransition.lua (v1.1.3) - Spruce up your warps!
--by: MrDoubleA			
local warpTransition = require("warpTransition")
warpTransition.levelStartTransition = warpTransition.TRANSITION_MOSAIC

--https://www.smbxgame.com/forums/viewtopic.php?p=399891#p390017
--Re: warpTransition.lua (v1.1.3) - Spruce up your warps!
--by: Marioman2007

Pinetiger_
Goomba
Goomba
Posts: 4
Joined: Wed Jul 03, 2024 4:50 am
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Pinetiger_ » Mon Jul 15, 2024 9:09 pm

How do you enter the hex codes into the settings for the hanabihai? everything I enter in comes up with an error that either says "attempt to perform arithmetic on a local 'word' (a string value)" or "bad argument #1 to 'bitrshift' (number expected, got string)

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Wed Jul 17, 2024 11:16 am

Pinetiger_ wrote:
Mon Jul 15, 2024 9:09 pm
How do you enter the hex codes into the settings for the hanabihai? everything I enter in comes up with an error that either says "attempt to perform arithmetic on a local 'word' (a string value)" or "bad argument #1 to 'bitrshift' (number expected, got string)
You have to enter it like this for example:

Code: Select all

0x00ff5dFF 0x00b3ffFF 0x1500ffFF
#00ff5d for example won't work, but you can just add a 0x at the beginning and FF at the end to get the same colour.
The way you choose colours is pretty jank, I should probably rework that a bit to make it more user friendly.

Master of Disaster
Bit
Bit
Posts: 63
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: The Disastrous NPC Pack

Postby Master of Disaster » Tue Dec 31, 2024 7:47 am

updated the npc pack! Added 4 npcs but also updated all other npcs in the pack! Especially the Hanabihai (yes I know they have a localized name) is now a lot easier to use!
Happy new Year, everyone!


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari