Page 1 of 1

extraFrames - v3.1.2.0

Posted: Sat Nov 26, 2022 3:39 pm
by AppleTheTomato
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)

Re: extraFrames - v3.1.1.9

Posted: Fri Nov 10, 2023 7:45 am
by Thundaga_T2
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.

Re: extraFrames - v3.1.1.9

Posted: Fri Nov 10, 2023 6:13 pm
by AppleTheTomato
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.