[NPC Pack] Urchins

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

Moderator: Userbase Moderators

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

[NPC Pack] Urchins

Postby Emral » Thu Jun 27, 2019 1:56 pm

I can't believe Core beat me to uploading an Urchin script. Now you have two to choose from! Pick whichever you like more.

A download link can be found here:
https://drive.google.com/file/d/11SP1-f ... sp=sharing

Demo:
https://www.youtube.com/watch?v=iuFO-R_ISsY
1:20

Installation instructions can be found in the handbook or in my thread.

Modifications and adaptations of the code is permitted. If you use this particular code as a basis for an enhanced version of these NPCs, please give credit.

Movement guided by:
Straight redirectors
Diagonal redirectors
Terminus (Sets speed to 0)
Toggle (Inverts speed)

NPC codes:
waittime: Time the urchin waits at each redirector. Defaults to 65 for the purple urchin and 0 for the pink urchin.

55jedat555
Buster Beetle
Buster Beetle
Posts: 93
Joined: Sat Feb 28, 2015 11:35 am
Flair: flare
Contact:

Re: [NPC Pack] Urchins

Postby 55jedat555 » Sun Jul 07, 2019 9:14 am

Just want to point out that the Urchins ignore redirectors/togglers/terminuses (except the initial one) when placed underwater. It's fixed by setting nowaterphysics to true though.

Teemster2
Rocky Wrench
Rocky Wrench
Posts: 622
Joined: Sat Jan 18, 2014 11:56 am

Re: [NPC Pack] Urchins

Postby Teemster2 » Sun Jul 07, 2019 6:26 pm

Wow. One of my all time favorite npcs. This is a great addition to the roster. Thanks everyone for keeping this alive.

BlablaNord
Cheep-Cheep
Cheep-Cheep
Posts: 10
Joined: Sat Jan 18, 2020 4:54 am

Re: [NPC Pack] Urchins

Postby BlablaNord » Mon Mar 02, 2020 2:49 pm

Yeah I have some bugs with the urchins too (with redirectors, especially underwater). Otherwise, thank you for your big job !

Teemster2
Rocky Wrench
Rocky Wrench
Posts: 622
Joined: Sat Jan 18, 2014 11:56 am

Re: [NPC Pack] Urchins

Postby Teemster2 » Thu Mar 05, 2020 12:40 pm

Rakel0123 wrote:
Mon Mar 02, 2020 2:49 pm
Yeah I have some bugs with the urchins too (with redirectors, especially underwater). Otherwise, thank you for your big job !
What kind of bugs? Please provide details.

BlablaNord
Cheep-Cheep
Cheep-Cheep
Posts: 10
Joined: Sat Jan 18, 2020 4:54 am

Re: [NPC Pack] Urchins

Postby BlablaNord » Thu Mar 05, 2020 2:46 pm

No, it's all fixed. I reinstalled the pack and I set nowaterphysics to true too so now it's ok ^^

JamesR624
Spiny
Spiny
Posts: 29
Joined: Wed Aug 09, 2017 4:24 pm

Re: [NPC Pack] Urchins

Postby JamesR624 » Mon Jul 06, 2020 9:36 am

Odd...

Code: Select all

==> ...\Mario\SMBX2 Beta 4\data/scripts/base/engine/require.lua:146: Error: worlds/test/npc-840.lua:44: '}' expected (to close '{' at line 40) near '['
=============
stack traceback:
	...\Mario\SMBX2 Beta 4\data/scripts/base/engine/require.lua:146: in function 'customNpcRequire'
	scripts/base/npcManager.lua:239: in function 'loadNpcCode'
	scripts/base/game/lunabase.lua:196: in function 'codeFile'
	main.lua:732: in function 'loadCodeFile'
	main.lua:875: in function <main.lua:782>
	[C]: in function '__xpcall'
	main.lua:782: in function <main.lua:781>
I tried fixing this but I can't seem to find any unclosed brackets in the lua file.

Sorry, I did forget to mention that I did change the NPC ID to a free slot. I also replaced the instances of 802 with 840 to reflect the changes, though I dunno why changing that ID would make the game complain about a missing bracket.

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

Re: [NPC Pack] Urchins

Postby Emral » Mon Jul 06, 2020 10:21 am

That is pretty odd. I presume you renamed the file to npc-840 yourself? Just to double-check, make sure the registerHarmTypes call looks exactly like this:

Code: Select all

npcManager.registerHarmTypes(npcID,
	{
		HARM_TYPE_NPC,
		HARM_TYPE_PROJECTILE_USED,
		HARM_TYPE_HELD,
		HARM_TYPE_LAVA,
	}, 
	{
		[HARM_TYPE_NPC]=801,
		[HARM_TYPE_PROJECTILE_USED]=801,
		[HARM_TYPE_HELD]=801,
		[HARM_TYPE_LAVA]={id=13, xoffset=0.5, xoffsetBack = 0, yoffset=1, yoffsetBack = 1.5},
	}
);
Please post the file to hastebin.com and link it here if the error remains unsolved, so I can take a look if anything's different as well.

JamesR624
Spiny
Spiny
Posts: 29
Joined: Wed Aug 09, 2017 4:24 pm

Re: [NPC Pack] Urchins

Postby JamesR624 » Mon Jul 06, 2020 10:39 am

Okay, this is really strange. After being severely frustrated, I just re-installed the NPC completely, dumped my world and put in a backup I have from before the installation. Did the exact same procedure and it seems to work fine now. I am guessing I may have misclicked and added something.

Quick during typing edit: I did a compare of the broken LUA file with the new one I JUST NOW modded that is working and it seems I accidentially deleted a comma after one of the ID numbers around line 43. Due to, I am guessing, how LUA works, the error complaining about line 44 is what threw me off and made me ignore the ACTUAL error in line 43. Oops. Anyway, they work great now, thank you!

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

Re: [NPC Pack] Urchins

Postby Emral » Mon Jul 06, 2020 11:05 am

Glad to hear it works now! Yeah, the line numbers are where the compiler notices something is wrong. Often that means the surrounding lines are relevant, too.

AirShip
Fuzzy
Fuzzy
Posts: 1085
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

Re: [NPC Pack] Urchins

Postby AirShip » Tue Jan 11, 2022 5:40 pm

Hello, I made variations for this one based on the SMW beta sprite:
Spoiler: show
ImageImage

For those interested, the link.

Registered sand eater
Bot
Bot
Posts: 55
Joined: Fri Jan 28, 2022 4:14 pm
Pronouns: he/him

Re: [NPC Pack] Urchins

Postby Registered sand eater » Tue Apr 19, 2022 1:26 pm

AirShip wrote:
Tue Jan 11, 2022 5:40 pm
Hello, I made variations for this one based on the SMW beta sprite:
Spoiler: show
ImageImage

For those interested, the link.
What is the background used in the 2nd one? Asking for a friend.

AirShip
Fuzzy
Fuzzy
Posts: 1085
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

Re: [NPC Pack] Urchins

Postby AirShip » Tue Apr 19, 2022 7:39 pm

Registered sand eater wrote:
Tue Apr 19, 2022 1:26 pm
AirShip wrote:
Tue Jan 11, 2022 5:40 pm
Hello, I made variations for this one based on the SMW beta sprite:
Spoiler: show
ImageImage

For those interested, the link.
What is the background used in the 2nd one? Asking for a friend.
It's a mix of many backgrounds, which are:
SMB3 Clouds
SMB1 Stars
Pokémon Mystery Dungeon Explorers of Sky
Layer of glowing effect

Registered sand eater
Bot
Bot
Posts: 55
Joined: Fri Jan 28, 2022 4:14 pm
Pronouns: he/him

Re: [NPC Pack] Urchins

Postby Registered sand eater » Wed Apr 20, 2022 8:23 am

AirShip wrote:
Tue Apr 19, 2022 7:39 pm
Registered sand eater wrote:
Tue Apr 19, 2022 1:26 pm
AirShip wrote:
Tue Jan 11, 2022 5:40 pm
Hello, I made variations for this one based on the SMW beta sprite:
Spoiler: show
ImageImage

For those interested, the link.
What is the background used in the 2nd one? Asking for a friend.
It's a mix of many backgrounds, which are:
SMB3 Clouds
SMB1 Stars
Pokémon Mystery Dungeon Explorers of Sky
Layer of glowing effect
How do you mix them into one? I'm quite new to LunaLua.

AirShip
Fuzzy
Fuzzy
Posts: 1085
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

Re: [NPC Pack] Urchins

Postby AirShip » Thu Apr 21, 2022 10:36 am

Registered sand eater wrote:
Wed Apr 20, 2022 8:23 am
How do you mix them into one? I'm quite new to LunaLua.
It's not really a lunalua thing, specifically, it's more of a functionality that SMBX2 has added, you can learn more about it here:
https://docs.codehaus.moe/#/features/pa ... ackgrounds


Return to “LunaLua”

Who is online

Users browsing this forum: Google Feedfetcher and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari