[NPC Pack] Some NPCs I have made (Update: Bug Fixes for Upside Down Beetle & Wild Piranha)

Share and discuss custom LunaLua code and content packs for SMBX2.
GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

[NPC Pack] Some NPCs I have made (Update: Bug Fixes for Upside Down Beetle & Wild Piranha)

Postby GtW » Sat Jun 06, 2020 7:43 am

Hello, everyone!
I am actually a very old member since around two(?) forums ago. (Under another username, that's not important now anyways)
Every time I registered back then, the forum went down under not too long after. So hopefully this time it stays lol

Anyways, I just revisited SMBX recently due to having a little bit of free time, and I was surprised that how much has been progressed since then.
LunaLua in particular intrigued me, because it opens up a lot of new possibilities, therefore I tried give it a shot.

Hopefully these are decent enough! I'm still pretty new at this.

Here are what I have so far
Spoiler: show
SMB3 Flame Chomp (New!)
A Chomp-like enemy that chase you and fire the fireball at you periodically.
If it's tail reached 0, then it explodes like a Bob-omb.
Tail length can be customized per-NPC in the Editor.

I'm not completely sure if its tail should have an hitbox or not. From both sources that I've seen, the tail hitboxes were absent.
Screenshot:
Spoiler: show
Image

SMB3 Fire Nipper (New!)
A special Nipper Plant that can be found in the World 7-8 of the original game.
It shoot fireball projectile periodically.

Attack length and time can be customized per-NPC in the Editor.
Screenshot:
Spoiler: show
Image

SMB3 Brown Paragoomba
A Paragoomba that flies up and drops Micro-Goomba at you.
The micro-goomba will prevent you from being able to jump until certain time passed then you can shake them off.
You can also shake them off instantly if you go into the water or collect Starman.
Screenshot:
Spoiler: show
Image

SMB3 Upside Down Buzzy Beetle & Spiny
A Buzzy Beetle and Spiny that climbs on ceiling and drops down onto you when approached.
Special thanks for Enjl for Polflip Ceiling detection code, and Yoshi021 and MrDoubleA for shell interaction code.
Do note that it doesn't work with the ceiling slopes though, please use with caution.
Screenshot:
Spoiler: show
Image

YI Wild Piranha Plant & Wild Ptooie Plant
A piranha plant variant from SMW2:YI that tries to chomp you or splitting projectile at you.
Wild Piranha Plant took 1 NPC hit or 5 fireballs to defeat, while Wild Ptooie Plant took 3 NPCs hit or 15 fireballs to defeat.
Do note that Wild Ptooie Plant will only face the preset direction, for ease of level mapping and coding.

Each one took 2 NPC slots, with the stalk shared.
Screenshot:
Spoiler: show

SMB3 Pile Driver Micro-Goomba
Works like its NES and GBA counterpart, where the brick doesn't shine.
Screenshot:
Spoiler: show
Image

SMB3 Pipe Muncher
A small Piranha Plant-like enemy that go in and out of the pipe in alternating pattern.
Can be found in World 7-Piranha Plant in the original game.
The starting phase is depending on NPC direction.
Screenshot:
Spoiler: show
Image

YI Goonies Set
Consists of Goonies, Carrier Goonies (A container, you can set NPC for them to hold), Wingless Goonies as well as their Skeleton Counterpart.
Hefty Goonies and Bowling Goonies are also included as well.
I tried to replicate their behavior to be as close as original game as possible, however some inconsistency are abound. I hope it's not too bad.
Screenshot:
Spoiler: show
Image
(The gameplay one was too long, it got converted into mp4. You can watch it here

YI Fat Guy
Should be working mostly similar to how they worked in YI, except that Yoshi cannot make a giant egg upon swallowing it.
Screenshot:
Spoiler: show
Image

YIDS Pointey
A plant from Yoshi Island DS that hides in the ground, then raises up when the player draw near. The stem completely blocks everything. You can only defeat it by either stomping or throw something to hit the head. This one took 2 NPC slots. Height can be set in the editor.
Screenshot:
Spoiler: show
Image
(The gameplay one was too long, it got converted into mp4. You can watch it here

YI Baron von Zeppelin
A balloon that drops enemies on the player if they get near. It is a container. For Item version where you need to throw something or touch it to obtain the item, set it to Friendly. The balloon color is randomized from the 4 available colors.
It also comes with projectile Needlenose and Missile. You can also use them for Goonies as well without problem.
Screenshot:
Spoiler: show
Image

YI Pokey
A Cactus that bounce the Needlenose on its head. It's harmless for a while if the Needlenose is destroyed.
Do note that the Needlenose here is different from the one from Baron von Zeppelin.
Screenshot:
Spoiler: show
Image
Some of the NPC will have extra NPC config settings, you can see each of them in their respective lua file.
Let me know if I should list it besides NPC instead in this post or not.

Download Link: https://drive.google.com/drive/folders/ ... sp=sharing
(This is a Google Drive folder. You can pick anything you needed from there)
Please give credits to me and the original author of each adapted code if used.
Credits for the adapted code portions can be found under Credits.txt in the folder.

Note: If you have changed the original NPC id, please change the effect ID to match as well. For every NPC I made, if you have change any NPC ID you have to make sure to update all other relative NPC id and effect accordingly. These option, however, can also be override manually inside lua file as well too if you prefer to move around the id yourself, just uncomment the respective property.

That's all I have for now. I still have some more stuff that is still WIP so I will update it here once I get them done!
Please let me know if there is any bugs, error or anything else to fix!

(No NPC request though, please. There are already long list of stuffs I wanted to make and I don't know if I can get to them all or not with little free time I have)
Last edited by GtW on Mon Oct 17, 2022 11:05 am, edited 7 times in total.

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

Re: [NPC Pack] Some NPCs I have made

Postby Emral » Sat Jun 06, 2020 5:01 pm

Awesome stuff, keep it up!

PROX
Banned
Posts: 1953
Joined: Sun Jul 06, 2014 8:50 pm

Re: [NPC Pack] Some NPCs I have made

Postby PROX » Sat Jun 06, 2020 5:21 pm

Very nice! These will definitely be useful

Murphmario
Chargin' Chuck
Chargin' Chuck
Posts: 2382
Joined: Fri Dec 20, 2013 7:07 pm
Pronouns: he/him

Re: [NPC Pack] Some NPCs I have made

Postby Murphmario » Sun Jun 07, 2020 7:59 pm

I actually tried to do Pile-Driver Micro Goombas a while ago, with the shining animation. However, I didn't get very far.

Asides from that, I like how these NPCs look in the screenshots.

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

Re: [NPC Pack] Some NPCs I have made

Postby MegaDood » Sun Jun 07, 2020 10:00 pm

These are very good! Well done!
However, this error popped up when I was testing with the goonie NPCs in the test level.
This appeared when I attempted to stomp one of the flying or hefty goonies.
Image

GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

Re: [NPC Pack] Some NPCs I have made

Postby GtW » Mon Jun 08, 2020 12:38 am

Thank you very much everyone!
I'm glad that you guys like it so far.

MegaDood wrote:
Sun Jun 07, 2020 10:00 pm
However, this error popped up when I was testing with the goonie NPCs in the test level.
This appeared when I attempted to stomp one of the flying or hefty goonies.
Would you mind providing some more details? Like, which character did you used or have you made any modification?
I cannot seems to replicate this error on my end.

From the error, the problem is at the riding NPC checking logic, which is completely identical as the basegame Parabeetle.
I have also tried looking more into it myself as well.

According to the document, calling NPC(<id>) should return the respective NPC object so I'm not sure what went wrong here.

Edit: What I'm also curious is what error Hefty Goonie produce, because this code portion only exists in the regular Goonie.

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

Re: [NPC Pack] Some NPCs I have made

Postby MegaDood » Mon Jun 08, 2020 12:41 am

GtW wrote:
Mon Jun 08, 2020 12:38 am
Would you mind providing some more details? Like, which character did you used or have you made any modification?
I cannot seems to replicate this error on my end.

From the error, the problem is at the riding NPC checking logic, which is completely identical as the basegame Parabeetle.
I have also tried looking more into it myself as well.

According to the document, calling NPC(<id>) should return the respective NPC object so I'm not sure what went wrong here.

Edit: What I'm also curious is what error Hefty Goonie has, because this code portion only exists in the regular Goonie.
Hm, ok. I was testing with Mario, I tried with him in small form, then fire form, and big form. I don't think I made any modifications to the code, though I'll re-download and let you know if it makes any difference.

GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

Re: [NPC Pack] Some NPCs I have made

Postby GtW » Mon Jun 08, 2020 1:03 am

Nevermind, I got it triggered now. Turns out I have out of date SMBX2. (I think it was a little bit before patch 2)
I will see what I can do.

It's weird, though. Since the code for that is still identical to Parabeetle.
Last edited by GtW on Mon Jun 08, 2020 1:04 am, edited 1 time in total.

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

Re: [NPC Pack] Some NPCs I have made

Postby Emral » Mon Jun 08, 2020 1:04 am

I recommend instead using player.standingNPC in onTickEndNPC:
if p.standingNPC and p.standingNPC.isValid and p.standingNPC.id == npcID then
p.standingNPC.ridden = p.idx --lets goonie know which player is riding it
end

and then in onTickEndNPC
if v.ridden then (instead of riddenNPCs[v.uid])

Basegame parabeetles are very old code, so the function didn't exist yet when we made those. I'm not exactly sure why it errors here,

The reason why this errored isn't quite clear to me, but I can at least explain why it errored on any NPC, not just the goonie it runs for: A lack of ID-check when checking for the NPC the player stands on, so the indexing code would run regardless of which ID is stood on.

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

Re: [NPC Pack] Some NPCs I have made

Postby MegaDood » Mon Jun 08, 2020 1:14 am

Alright, so after testing, it seems that bowling and hefty goonies work fine, as long as the regular flying ones aren't present in the level. If they are I get the same error when jumping on any of the large ones. Skeleton goonies don't seem affected. This was done with freshly downloaded code, which was unedited from me, and in a separate level. Hope I was of help GtW.

GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

Re: [NPC Pack] Some NPCs I have made

Postby GtW » Mon Jun 08, 2020 1:33 am

Thank you very much Enjl! That did the trick.

I don't know player.standingNPC exists as I cannot find that anywhere. Being it wiki, doc or changelog lol
It seems to be really useful.

Updated, it should no longer raise the error now.

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

Re: [NPC Pack] Some NPCs I have made

Postby Emral » Mon Jun 08, 2020 1:47 am

GtW wrote:
Mon Jun 08, 2020 1:33 am
Thank you very much Enjl! That did the trick.

I don't know player.standingNPC exists as I cannot find that anywhere. Being it wiki, doc or changelog lol
It seems to be really useful.

Updated, it should no longer raise the error now.
We've abandoned the old wiki in favour of a new page, where new things that were added since beta 3 are being documented. The new page is still largely incomplete, but I've already written the player section on it at least, so here it is: https://docs.codehaus.moe/#/reference/player

ANueUtsuho
Swooper
Swooper
Posts: 50
Joined: Sun May 04, 2014 1:13 am

Re: [NPC Pack] Some NPCs I have made

Postby ANueUtsuho » Mon Jun 08, 2020 1:23 pm

Do the Munchers keep moving even when the game is paused? https://www.suppermariobroth.com/post/1 ... t-come-out

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

Re: [NPC Pack] Some NPCs I have made

Postby Emral » Mon Jun 08, 2020 2:51 pm

ANueUtsuho wrote:
Mon Jun 08, 2020 1:23 pm
Do the Munchers keep moving even when the game is paused? https://www.suppermariobroth.com/post/1 ... t-come-out
Is the implication here that they should? Because if so, I disagree. It would make them pretty useless since players can avoid them with no effort.

DisasterMaster
Tweeter
Tweeter
Posts: 151
Joined: Fri Jan 31, 2020 10:01 pm

Re: [NPC Pack] Some NPCs I have made

Postby DisasterMaster » Mon Jun 08, 2020 3:39 pm

ANueUtsuho wrote:
Mon Jun 08, 2020 1:23 pm
Do the Munchers keep moving even when the game is paused? https://www.suppermariobroth.com/post/1 ... t-come-out
This version created for SMBX doesn't continue to emerge and retract when the game is paused, unlike in the original SMB3 for the NES as shown in the link. The All-stars version for the SNES does this as well, and with a remaster including the same functionality as the original, it doesn't feel like an oversight but more of an intentional decision. This effect was even used as part of a Kaizo SMB3 level gimmick.

I agree that being able to pause-buffer their movement does cheapen the danger of the npc unless it's used as a purposeful gimmick. Perhaps an extra setting to allow them to ignore pause could be created (if that is even possible)?
Last edited by DisasterMaster on Tue Jun 09, 2020 12:01 am, edited 3 times in total.

GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

Re: [NPC Pack] Some NPCs I have made

Postby GtW » Mon Jun 08, 2020 7:45 pm

Honestly, I agree with both Enjl and DisasterMaster in that.
All of the fangames I was a part of in the past also removed that because originally that was not something the developer intended. It's a bug, not a feature.
On top of my head, I think at least it doesn't do that in GBA remake.

Even if you used it as a purposeful gimmick, I found it being unfun in a Kaizo level tbh.

That said though, if you really want to do it, just register onTickFrameCounter with onDraw instead of onTick.
But I won't take any responsibility if there's some strange interaction.

GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

Re: [NPC Pack] Some NPCs I have made (Update: More SMW2:YI Stuff)

Postby GtW » Thu Jun 11, 2020 4:40 am

Updated the first post with a few more stuff that I have just finished.
(YI Fat Guy, YIDS Pointey, YI Baron von Zeppelin and YI Pokey)

EDIT: Added Pointey Base BGO. I completely forgot about it.

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

Re: [NPC Pack] Some NPCs I have made (Update: More SMW2:YI Stuff)

Postby TheGameyFireBro105 » Thu Jun 11, 2020 9:04 am

A SMB2 recolor for the Fat Guys would actually be pretty cool. Either that, or YI shy guy ai

----------------------------------------------------------------------------------------------------------------------
The pokey is causing this!
Image

GtW
Bob-Omb
Bob-Omb
Posts: 22
Joined: Sat Jun 06, 2020 6:35 am

Re: [NPC Pack] Some NPCs I have made (Update: More SMW2:YI Stuff)

Postby GtW » Thu Jun 11, 2020 9:37 am

TheGameyFireBro105 wrote:
Thu Jun 11, 2020 9:30 am
The pokey is causing this!
<error screenshot>
Do you mind elaborate on what you did before the error was triggered?
I think I know what went wrong, but I want to make sure that it is fixed before uploading the fix.

EDIT: I gotta go soon, so I primarily upload the fixed version for now. I did not initialize data.currentFrame properly so it tried to assign nil to animationFrame.
Let me know if the problem persists, since I cannot checked it myself. Thanks!
Last edited by GtW on Thu Jun 11, 2020 9:58 am, edited 1 time in total.

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

Re: [NPC Pack] Some NPCs I have made (Update: More SMW2:YI Stuff)

Postby TheGameyFireBro105 » Thu Jun 11, 2020 9:56 am

I literally just tried to test the level. i even removed all of the other lua codes. it still happened!

Added in 47 seconds:
it only happened in that specific level

Added in 18 seconds:
it was fine on the test level


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari