[NPC Pack] Climbing Koopas

Share and discuss custom LunaLua code and content packs for SMBX2.
Lithobraker
Rex
Rex
Posts: 31
Joined: Sat Mar 09, 2019 1:41 am

[NPC Pack] Climbing Koopas

Postby Lithobraker » Thu Jul 09, 2020 12:15 pm

With the help of Enjl, I've also made a pack of Climbing Koopas! These NPCs work similarly to how they do in Super Mario World, with a few caveats.
Green Koopas move slowly, while Red Koopas move almost as fast as the player does. The vertical variants do not collide with NPCs vertically and will just climb through each other(though other NPCs will still hit them when they collide from the side) while horizontal variants do collide with other NPCs/each other, and turn around when they hit.

Climbing Koopas will only use SMW Fences to climb. No other BGO, or climbable NPC will allow them to climb. If they're placed without a fence behind them, they'll just sort of float there and wobble. Presumably, they don't fall because they refuse to look down.
If you want to add more BGOs to the list, though, it shouldn't be too hard. They use a table of IDs to determine which BGOs are fences, so if you, say, wanted them to climb something the player can't, you could add/remove values from that table.

They do not switch to the opposite side of the fence, since there's currently no easy way to make that work(and the player can't punch the fence or switch sides anyway). I'm not experienced enough with Lua to get something like that running.

Also, I'll note that the vertical koopas are different from Hoopsters in that they move at the same speed while moving both up and down. As well, you can't change a Hoopster's speed no matter how hard you try, whereas with these all you need to do is go into the AI and change a couple values.

Image

Crucial note: DO NOT set the NPC's Speed value in its .lua or a .txt file. Due to the way Redigit's spaghetti code works, setting that value to anything but 1 makes it impossible for lua code to control the NPC's actual velocity- meaning these guys won't turn at the edge of a fence, will get stuck on blocks, and will do other weird things.

There may also be some wacky edge case interactions that end up pretty glitchy. These koopas work best for their intended purpose- climbing fences.
As far as I know though, unless you teleport them off of a fence or have moving layers push them off, they should be fine in almost every other scenario.

Mediafire:
http://www.mediafire.com/file/11c45mj6u ... s.zip/file

Google Drive:
https://drive.google.com/file/d/1ZPD3hc ... sp=sharing

ComparatorClock
Goomba
Goomba
Posts: 3
Joined: Mon Mar 18, 2024 8:38 pm
Pronouns: he/him

Re: [NPC Pack] Climbing Koopas

Postby ComparatorClock » Sat Apr 13, 2024 5:23 pm

Looks promising, does work with the desired functionality. However, I highly you suggest to do the following:

1) Update to Beta 5
2) Fix some errors related to nil npcID values

Good luck! And don't be afraid to ask for help from those knowledgeable in the community

MarioChallengerX2
Dolphin
Dolphin
Posts: 81
Joined: Sat Dec 31, 2022 4:34 pm
Pronouns: he/him

Re: [NPC Pack] Climbing Koopas

Postby MarioChallengerX2 » Mon Apr 15, 2024 12:48 pm

ComparatorClock wrote:
Sat Apr 13, 2024 5:23 pm
Looks promising, does work with the desired functionality. However, I highly you suggest to do the following:

1) Update to Beta 5
2) Fix some errors related to nil npcID values

Good luck! And don't be afraid to ask for help from those knowledgeable in the community
Unfortunately it might not happen. They haven't been active in the forums for 2 years.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari