extraFrames - v3.1.2.0

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

Moderator: Userbase Moderators

AppleTheTomato
Buster Beetle
Buster Beetle
Posts: 85
Joined: Wed Jun 02, 2021 8:44 pm
Flair: I am a Tomato named Apple.
Pronouns: He/Him

extraFrames - v3.1.2.0

Postby AppleTheTomato » Sat Nov 26, 2022 3:39 pm

With the release of my playable pack (here: viewtopic.php?f=31&t=28725), a bunch of the characters have 'extra frames' that have no functionality in SMBX. Unless...you have this! It's a super simple library that allows you to set extra frames for characters, like looking up, kicking, etc. Look here:
Image
Here's the download: https://drive.google.com/drive/folders/ ... sp=sharing
Load the library using something like local ef = require("extraFrames"). Here's the available frames to set/use, and HOW to set/use them:
Spoiler: show
- kicking, jumping, falling
- a normal looking-up stand and a grabing-an-item looking-up stand
- a grabbing-an-item jump and fall
- using the loading example above, you'd set a frame field like this:
ef.frames.kicking[CHARACTER_NAME] = {[PLAYER_POWERUP] = extraFrameThing}
extraFrameThing should be an number, which correlates to the place on the character's GFX sheet where and extraFrame thing is. MDA hightlights it well in his Uniform Player Offsets post: viewtopic.php?t=26127
with the download, there's an example for a costume I made, so you can see how it works better.
There are also a bunch of other features:
Spoiler: show
*ef.kickTimer - A table with a possible value for each player. The value determines how long you stay in the kicking frame. Slowly decreases.
*ef.paths - Table with two fields: aw, which is the path to anotherwalljump, and spin, which is the path to smgSpin.
*ef.maxFrames - When you're holding an item, this is what ef.kickTimer is set to (16 by default).
*ef.frames - A table with all the frames. See the table for how to set said frames.

*ef.baseCheck(p) - A general state check for the passed player (p). If literally ANYTHING goes against the check, your extra-frames can't be updated.
*ef.mdaOnGround(p) - Copied from MDA's SMW Costume Code, so ty MDA! A better "on the ground" check for the passed player (p) than p:isOnGround().
*ef.walljumping(p) - Checks if the passed player (p) is walljumping (with Enjl/Emral's AWJ). Used in ef.baseCheck(p).
*ef.spinning(p) - Checks if the passed player (p) is spinning (with Marioman2007's smgSpin). Used in ef.baseCheck(p).
*ef.falling(p) - A general "are you falling" check (NOT used for grab jump/fall).
*ef.standing(p) - The above, but for standing.
Thanks for checking this out, and please credit me if used!

(In case you're confused, this was called v4.0.0.1, but that was in relation to the U versions, so I renamed it)
Last edited by AppleTheTomato on Sun Jan 28, 2024 6:34 pm, edited 3 times in total.

Thundaga_T2
Ripper II
Ripper II
Posts: 350
Joined: Wed Jun 11, 2014 6:31 am

Re: extraFrames - v3.1.1.9

Postby Thundaga_T2 » Fri Nov 10, 2023 7:45 am

Im sorry, can you explain in greater detail how to use this? I want to add swimming frames for Peach, but i dont know how to do that.

AppleTheTomato
Buster Beetle
Buster Beetle
Posts: 85
Joined: Wed Jun 02, 2021 8:44 pm
Flair: I am a Tomato named Apple.
Pronouns: He/Him

Re: extraFrames - v3.1.1.9

Postby AppleTheTomato » Fri Nov 10, 2023 6:13 pm

Thundaga_T2 wrote:
Fri Nov 10, 2023 7:45 am
Im sorry, can you explain in greater detail how to use this? I want to add swimming frames for Peach, but i dont know how to do that.
Ah, I'm sorry, this can't do that. Your best bet is to look into either the SMW Costume Code or animationPal by MDA
The goal of this library was just to have super simple single frame changes for things. Animations like that are out of my scope.
I really oughta put what all this library CAN do, now that I think about it.

EDIT: went in and not only (hopefully) explained things better on the post, but I also added an example in the download.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari