[SMBX2] FNC2002's Custom Keys v1.1 - bro where are my car keys??

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

Moderator: Userbase Moderators

FutureNyanCat
Eerie
Eerie
Posts: 764
Joined: Fri Dec 20, 2013 8:39 pm
Flair: Species: Felis robotus
Pronouns: He/Him
Contact:

[SMBX2] FNC2002's Custom Keys v1.1 - bro where are my car keys??

Postby FutureNyanCat » Sat Feb 01, 2025 9:30 pm

The Custom Keys Pack by FutureNyanCat [v1.1]
So... here it is! One of my biggest LunaLua undertakings this year is a COMPLETE rework of the basegame SMW key (npc-31) AND the Zelda Keypad (npc-255) to make them much more standardized for use as proper puzzle gimmicks going forward. Their interactions are pretty much identical to how they were in basegame, but with much more customization capabilities via extra settings.

While originally intended to be part of the upcoming v2.0 release of FNC2002's NPC Pack, I decided to make an early release for everyone to enjoy. Note that when 2.0 of my NPC pack releases, this version of Custom Keys may become obsolete as I may add more bug fixes to it. Please feel free to check out all the features here.

Additional code was adapted from MrDoubleA's SMM keys and DisasterMaster's Colored Keys and Key Gates, while player data table interactions were adapted from cold soup's Conveyor Rails. They will be credited here AND inside the pack itself.

Demonstration Video:


Features:
Spoiler: show
The Basics
- THIRTY SIX (36) color skins to pick from for keys and key gates
- Key gates now come in four different sizes: 2x2, 1x2, 2x1 and 1x1, all perfect for your use cases
- All basegame interactions with warps, keyholes, basegame keypads, and even Link have been fully reimplemented in LunaLua. They can be TOGGLED!
- INDEX ID system via extra settings: keys can now match to certain key gates with the same index ID to unlock them. Or, if you like, you can make a "skeleton key" capable of unlocking every key gate in existence!

Even MORE features!
- Actual KEY HEALTH because who says keys can't last forever? Let's defy that, OK?
- Fully REIMPLEMENTED Link behavior: this is the first time I've ever used the new player data table from SMBX2 Beta 5! Pocketed keys can now have different key color icons and have their extra settings carry over to Link when used. Also, they do not rely on the player memory address 0x12 to check for Link's keys, so you can use them alongside the basegame keys. (NOTE: Key icons are only guaranteed to work in single-player mode!)
- Timer system for keys, implemented in a similar fashion to Mario vs. Donkey Kong keys, and can have different events triggered (respawning, destroying, hot potato, triggering SMBX events, etc.)
- You can now toss keys into key gates! (Toggleable)
- You can now make keys only unlock warps on the same layer! Perfect for all your colored door needs.
- Key gates that actually kill infinite health keys. I think I really need to stop...
- Where are my car keys???
- I need to stop adding more bullet points...
Download:
CURRENT VERSION: v1.1
Download v1.1 (MEGA)
Download v1.1 (Google Drive)

Changelogs:
Spoiler: show
v1.1
-- Merged the AI files of keys and key gates into one.
-- Pocketing a key as Link now only requires holding the Up key to unlock doors, instead of pressing, for consistency with vanilla.
-- Player data for storing the ability to unlock warps and gates while pocketing a key as Link is now properly reset by clearing the player data table entirely instead of resetting values to default, as the latter could never be done in time before the NPC dies. (reported by DisasterMaster)
-- displayhealth NPC config now also displays the key's health when pocketed by Link. It is drawn in a similar fashion.
-- There is one bug I was unable to fix, and that is both custom keys and keys pocketed by Link being used at the same time to unlock npc-255 key gates. Please try to avoid using basegame keys and custom keys if basegame key gates are present in the level, or just simply use the custom range key gates instead.

v1.0
-- Initial release
OLD VERSIONS
Last edited by FutureNyanCat on Mon Feb 10, 2025 11:05 am, edited 2 times in total.

Pixelated_Perfection
Swooper
Swooper
Posts: 53
Joined: Fri Feb 25, 2022 1:23 pm
Pronouns: Any/All

Re: [SMBX2] FNC2002's Custom Keys v1.0 - bro where are my car keys??

Postby Pixelated_Perfection » Sun Feb 02, 2025 2:19 pm

Really cool so far!

Just out of curiosity, are there any plans to make colored keys that work like the SMM keys? (Ie: floats behind you so you dont have to hold it in the players hands)

FutureNyanCat
Eerie
Eerie
Posts: 764
Joined: Fri Dec 20, 2013 8:39 pm
Flair: Species: Felis robotus
Pronouns: He/Him
Contact:

Re: [SMBX2] FNC2002's Custom Keys v1.0 - bro where are my car keys??

Postby FutureNyanCat » Sun Feb 02, 2025 10:17 pm

Pixelated_Perfection wrote:
Sun Feb 02, 2025 2:19 pm
Really cool so far!

Just out of curiosity, are there any plans to make colored keys that work like the SMM keys? (Ie: floats behind you so you dont have to hold it in the players hands)
I've implemented something like this for Midnight Museum Mania, but I have no plans to release it yet, as that's modified off MrDoubleA's SMM keys.

Pixelated_Perfection
Swooper
Swooper
Posts: 53
Joined: Fri Feb 25, 2022 1:23 pm
Pronouns: Any/All

Re: [SMBX2] FNC2002's Custom Keys v1.0 - bro where are my car keys??

Postby Pixelated_Perfection » Mon Feb 03, 2025 12:14 pm

FutureNyanCat wrote:
Sun Feb 02, 2025 10:17 pm
Pixelated_Perfection wrote:
Sun Feb 02, 2025 2:19 pm
Really cool so far!

Just out of curiosity, are there any plans to make colored keys that work like the SMM keys? (Ie: floats behind you so you dont have to hold it in the players hands)
I've implemented something like this for Midnight Museum Mania, but I have no plans to release it yet, as that's modified off MrDoubleA's SMM keys.
ah, well either way this all looks amazing!

FutureNyanCat
Eerie
Eerie
Posts: 764
Joined: Fri Dec 20, 2013 8:39 pm
Flair: Species: Felis robotus
Pronouns: He/Him
Contact:

Re: [SMBX2] FNC2002's Custom Keys v1.1 - bro where are my car keys??

Postby FutureNyanCat » Mon Feb 10, 2025 11:05 am

Just updated the custom keys to v1.1 with some bug fixes, for parity with their release in my NPC pack.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari