Page 1 of 2

[NPC Pack] helmets.lua - Protect your head!

Posted: Sun Jul 26, 2020 5:09 pm
by MrDoubleA
This is an NPC pack (and library too, I guess?) that allows you to create Mario Maker-like helmets.
Screenshots: show
Image
Image
Image
Image
Image
Image
Download: show
Documentation


Enjoy!

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Sun Jul 26, 2020 5:20 pm
by Novarender
Awesome dude. The pow effect is kinda lame though

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Sun Jul 26, 2020 9:55 pm
by MegaDood
These are amazing! I've been wanting these for ages and I'm glad someone finally made them, the POW block and cannonballs I can especially see being put to good use in puzzle levels.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Sun Jul 26, 2020 11:40 pm
by PROX
Yaaaay someone finally made these! I can see all kinds of uses for this!

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Mon Jul 27, 2020 3:30 pm
by JamesR624
This is awesome, but how would one go about adjusting the GFX offset for the helmets when worn. I have SMW style skins for the players and the helmets are just a little to low on the head. It's not the sprites themselves cause everything else works fine. Just wondering what to adjust in which lua files to change the offset (graphical positioning) of the helmets being worn.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Mon Jul 27, 2020 3:48 pm
by Cedur
Does the coin helmet decay after 100 coins? Does the propeller helmet allow you to jump indefinitely?

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Mon Jul 27, 2020 4:28 pm
by ElectriKong
Cedur wrote:
Mon Jul 27, 2020 3:48 pm
Does the coin helmet decay after 100 coins? Does the propeller helmet allow you to jump indefinitely?
Coin helmet decays after 80 in the GIF. The propeller helmet probably lasts for 3 jumps, assuming the light indicators on it are accurate.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Mon Jul 27, 2020 4:38 pm
by MrDoubleA
JamesR624 wrote:
Mon Jul 27, 2020 3:30 pm
This is awesome, but how would one go about adjusting the GFX offset for the helmets when worn. I have SMW style skins for the players and the helmets are just a little to low on the head. It's not the sprites themselves cause everything else works fine. Just wondering what to adjust in which lua files to change the offset (graphical positioning) of the helmets being worn.
Instead of copying the SMW graphics into your folder, just put this into the luna.lua file (and map.lua if you have an overworld):

Code: Select all

Player.setCostume(CHARACTER_MARIO,"SMW-Mario",true)
Player.setCostume(CHARACTER_LUIGI,"SMW-Luigi",true)
That activates the costumes properly, and this library has built-in offsets for them.
Electriking wrote:
Mon Jul 27, 2020 4:28 pm
Cedur wrote:
Mon Jul 27, 2020 3:48 pm
Does the coin helmet decay after 100 coins? Does the propeller helmet allow you to jump indefinitely?
Coin helmet decays after 80 in the GIF. The propeller helmet probably lasts for 3 jumps, assuming the light indicators on it are accurate.
Yep, the coin block only allows you to get 80 coins and the propeller only allows 3 jumps before you need to touch the ground to recharge it. Both of those are customisable.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Mon Jul 27, 2020 10:07 pm
by GOD_SAMA
What about this?
Image

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Tue Jul 28, 2020 5:10 am
by MrDoubleA
GOD_SAMA wrote:
Mon Jul 27, 2020 10:07 pm
What about this?
Image
That looks to just be an early version of the cape.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Tue Jul 28, 2020 6:10 pm
by Smibbix
Wow. I was already super impressed that you were working on the cape feather, but you also got THIS done!? You're crazy, MrDoubleA.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Tue Jul 28, 2020 9:13 pm
by GOD_SAMA
MrDoubleA wrote:
Tue Jul 28, 2020 5:10 am
GOD_SAMA wrote:
Mon Jul 27, 2020 10:07 pm
What about this?
Image
That looks to just be an early version of the cape.
Soooo it could be used for something
Anything
It doesn't look half bad either kinda wished Nintendo went with this tbh

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Wed Jul 29, 2020 7:49 pm
by JamesR624
MrDoubleA wrote:
Mon Jul 27, 2020 4:38 pm
JamesR624 wrote:
Mon Jul 27, 2020 3:30 pm
This is awesome, but how would one go about adjusting the GFX offset for the helmets when worn. I have SMW style skins for the players and the helmets are just a little to low on the head. It's not the sprites themselves cause everything else works fine. Just wondering what to adjust in which lua files to change the offset (graphical positioning) of the helmets being worn.
Instead of copying the SMW graphics into your folder, just put this into the luna.lua file (and map.lua if you have an overworld):

Code: Select all

Player.setCostume(CHARACTER_MARIO,"SMW-Mario",true)
Player.setCostume(CHARACTER_LUIGI,"SMW-Luigi",true)
That activates the costumes properly, and this library has built-in offsets for them.
I do not mean to be annoying but many of the offsets even for these costume are severely broken, particularly when small and riding yoshi or going through a clear pipe. Again, it would be great to know where to look to manually adjust these offsets, both in case people don't want to use costumes, and also to fix the way off offsets for these costumes.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Wed Jul 29, 2020 9:21 pm
by IAmPlayer
JamesR624 wrote:
Wed Jul 29, 2020 7:49 pm
I do not mean to be annoying but many of the offsets even for these costume are severely broken, particularly when small and riding yoshi or going through a clear pipe.
Those have been already fixed in the recent patch.

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Thu Jul 30, 2020 9:12 am
by JamesR624
1AmPlayer wrote:
Wed Jul 29, 2020 9:21 pm
JamesR624 wrote:
Wed Jul 29, 2020 7:49 pm
I do not mean to be annoying but many of the offsets even for these costume are severely broken, particularly when small and riding yoshi or going through a clear pipe.
Those have been already fixed in the recent patch.
Unless I am missing something, not they're not. I have the latest version of both this mod ("1.0" from your download link), as well as SMBX2 Beta 4 "patch 2 with hotfix" from https://codehaus.wohlsoft.ru/downloads.php?

It's fine though, I manually found at least the offset integers for the SMW costumes and manually adjusted them. I was able to fix the Yoshi issue and the helmets being slightly lower than needed. The only one I cannot seem to get working properly is the helmet not lowering when small and ducking.

Code: Select all

        -- Costume-specific offsets
        helmets.offsets["SMW-MARIO"] = {
            [PLAYER_SMALL] = {
                default = 0.1,
                [35] = 0.35, -- Ducking
                [36] = 0.35, -- Ducking with an item
            },
            [PLAYER_BIG] = {
                default = 0.15,
                [27] = vector(0.1,0.15), -- Victory
            },
        }
        helmets.offsets["SMW-LUIGI"] = {
            [PLAYER_SMALL] = {
                default = 0.1,
                [35] = 0.35, -- Ducking
                [36] = 0.35, -- Ducking with an item
            },
            [PLAYER_BIG] = {
                default = 0.2,
                [27] = vector(0.1,0.2), -- Victory
            },
        }
        helmets.offsets["SMW2-YOSHI"] = {
            [PLAYER_BIG] = {
                default = vector(0.35,-0.1),
                [14] = vector(0.55,0.1), -- Spit out
                [35] = vector(0.55,0.1), -- Tongue
            }
        }

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Fri Jul 31, 2020 4:29 am
by Mushroom King
Request: Is it possible for the bullet bill mask to make it works in the water, like it do in SMM2?
With the Bullet Bill Mask, the player can fly in a horizontal line for a short period of time (or indefinitely if used underwater) In the underwater theme, the Bullet Bill Mask can still be used unlike other flight-related power-ups, although it travels slower.
Optional request: Maybe give it the flare and colored smoke effect when active, a "back" wiew too for when the player is climbing/spinning (I guess the spinning would also need a "front").


Image

Image

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Wed Aug 26, 2020 1:05 am
by Blake Izayoi
Fantastic work as expected, these are all great! You always post bangers MDA

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Fri Sep 10, 2021 1:23 pm
by SuperAlex
Wow, MrDoubleA Awesome helmets Designs!
But It's possible to do a code when players grab a Buzzy Bettle Shell (NPC-24) and When you throw up and it collides under the player's head, it transforms into Buzzy Helmet (npc-951) as in "SMM"?

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Sat Feb 26, 2022 8:22 am
by Marioman2007
Here's a contribution!

Spoiler: show
Image
https://cdn.discordapp.com/attachments/ ... am_Box.zip

Special thanks to Enjl and Waddle for help!

Re: [NPC Pack] helmets.lua - Protect your head!

Posted: Wed Mar 02, 2022 3:57 am
by FutureNyanCat
Finally, the Light Box is here! I've been waiting for this to be created ever since helmets.lua was first programmed.