animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

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

Moderator: Userbase Moderators

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby MrDoubleA » Sat Aug 19, 2023 8:19 am

These are two libraries that I have been using for quite a while, and am finally releasing them.
If you want to use these, I'd recommend having a decent amount of experience with Lua first.

animationPal

animationPal can create "animator" objects, which can be given animation sets and used to make animation easier. However, it also includes the ability to completely replace a player character's animation and rendering systems entirely. It is also fully multiplayer compatible.

Example: show
This is an example for the custom player animation system, using the SMW Mario sprites. It is included as a level in the download.

Image

cutscenePal

cutscenePal is for creating custom cutscenes. It requires animationPal to work. It provides several useful features:
- Scene objects, which are the core of the library and help to organise cutscenes.
- Actors, which are flexible objects used for any characters or objects needed for the cutscene.
- Optional littleDialogue support.
- Optionally being able to skip cutscenes (though you may need to write extra code for it, depending on the scene).
- Making the player "inactive" for a cutscene, useful if you want to replace the player with an actor or otherwise hide them. Layers will also still move when the player is inactive.
- Letterboxing and skip transitions, which are overridable with your own draw functions.

An example cutscene is included in the download. There's quite a bit it doesn't show off, so I'd recommend reading through the cutscenePal.lua file which provides descriptions and documentation for each function and value.

Examples: show
This is a simple example cutscene. It is included as a level in the download.

Image

This is a more advanced example, made by me for Starshi's SMBX2 project, Super Mario and the Rainbow Stars. It is not included in the download.


Download

Download for both

Documentation is provided within the comments of each respective file.

JackTBS
Shy Guy
Shy Guy
Posts: 5
Joined: Tue Aug 15, 2023 7:13 am
Pronouns: He/Him
Contact:

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby JackTBS » Sat Aug 19, 2023 11:47 am

This is great! I was wondering if this is compatible with your camera lua?

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby MrDoubleA » Sat Aug 19, 2023 1:39 pm

JackTBS wrote:
Sat Aug 19, 2023 11:47 am
This is great! I was wondering if this is compatible with your camera lua?
Should be (assuming you're referring to customCamera), though it'd likely be easier to use handycam, which is what's used for the example.

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 682
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby mariobrigade2018 » Wed Aug 23, 2023 11:24 am

MrDoubleA wrote:
Sat Aug 19, 2023 8:19 am
animationPal

animationPal can create "animator" objects, which can be given animation sets and used to make animation easier. However, it also includes the ability to completely replace a player character's animation and rendering systems entirely. It is also fully multiplayer compatible.
Wait...does that mean...your able to make this?

Image

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby MrDoubleA » Wed Aug 23, 2023 11:40 am

mariobrigade2018 wrote:
Wed Aug 23, 2023 11:24 am
Wait...does that mean...your able to make this?

Image
You mean SMA2 Luigi's kicking animations when jumping? That's really basic and not something that you need this for.

Dor_78
Spiny
Spiny
Posts: 28
Joined: Wed Mar 30, 2022 2:08 pm

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby Dor_78 » Fri Aug 25, 2023 4:31 am

Can we add attack animations for the actor?

Mal8rk
Snifit
Snifit
Posts: 217
Joined: Mon Oct 25, 2021 11:04 pm
Flair: English Speaking Spanish Speaker
Pronouns: He/Him
Contact:

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby Mal8rk » Sun Aug 27, 2023 9:27 pm

I don't really understand how the routines work & how to put them in the code

Max Flower
Fighter Fly
Fighter Fly
Posts: 32
Joined: Mon Apr 22, 2019 11:30 pm
Pronouns: He/Him

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby Max Flower » Thu Nov 02, 2023 9:14 pm

Hi so I made a LunaLua pack that uses mostly original code except for animationPal.lua, is it fine if I include it in the download or would I have to direct people to download it seperately?

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby MrDoubleA » Sat Nov 04, 2023 2:33 pm

Max Flower wrote:
Thu Nov 02, 2023 9:14 pm
Hi so I made a LunaLua pack that uses mostly original code except for animationPal.lua, is it fine if I include it in the download or would I have to direct people to download it seperately?
I would personally recommend just linking this forum post, but you could also just include it if you wish.

cold soup
Swooper
Swooper
Posts: 73
Joined: Wed May 13, 2020 8:29 pm
Flair: yeah
Pronouns: they/she
Contact:

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby cold soup » Sun Jan 28, 2024 9:58 pm

not really a bug report per se, but as far as i can tell the skipExitDuration property in cutscenePal.lua doesn't do anything

Dor_78
Spiny
Spiny
Posts: 28
Joined: Wed Mar 30, 2022 2:08 pm

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby Dor_78 » Mon Mar 25, 2024 12:21 pm

Can we make that the player walks and looks up at the same time?

SpoonyBardOL
Bot
Bot
Posts: 57
Joined: Thu Aug 04, 2016 5:56 pm

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby SpoonyBardOL » Mon May 13, 2024 5:59 am

EDIT: Disregard. I was still using v1.1 of littleDialogue and didn't realize I hadn't updated it. Doing that fixed everything.

SpoonyBardOL
Bot
Bot
Posts: 57
Joined: Thu Aug 04, 2016 5:56 pm

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby SpoonyBardOL » Mon Jun 03, 2024 7:12 pm

Ok so actual question. I'm trying to create a text box linked to an actor that auto-closes after a short wait without input from the player. I'm using the talkAndWait function for it but I can't figure out how to close the box before moving on to the next one. This is an example of a box I want to close after about a Routine.wait of 2.0:

Code: Select all

link:talkAndWait{
	settings = {typewriterEnabled = true,textMaxWidth = 324},
	pauses = false,uncontrollable = true,
	style = "tt", silent = true,
	text = "<tremble 1>HYAUGH!</tremble>",
	}
Normally I'd assign a littleDialogue.create to a variable and use that variable name to close the box, but I want this text to stay attached to the NPC as the scene is moving so the talkAndWait function works for positioning but now I can't close this instance. Is there a way to close the talkAndWait function without player input or am I better off using littleDialogue.create with scene coordinates instead?

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 544
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby Marioman2007 » Tue Jun 04, 2024 1:26 am

Both actor:talk and and actor:talkAndWait return a textbox object created with littleDialogue.create so you can use that to close the box.

SpoonyBardOL
Bot
Bot
Posts: 57
Joined: Thu Aug 04, 2016 5:56 pm

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby SpoonyBardOL » Tue Jun 04, 2024 4:34 am

I thought that was the case, but I can't figure out what the textbox object is identified as to do that. Normally I'd do x:close() when I assign it to a variable, but what's the name of it in this case?

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 544
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby Marioman2007 » Tue Jun 04, 2024 7:35 am

SpoonyBardOL wrote:
Tue Jun 04, 2024 4:34 am
I thought that was the case, but I can't figure out what the textbox object is identified as to do that. Normally I'd do x:close() when I assign it to a variable, but what's the name of it in this case?

The name could be anything, just like any other variable.

Code: Select all

local box = actor:talkAndWait(...)
Routine.wait(2)
box:close()

SpoonyBardOL
Bot
Bot
Posts: 57
Joined: Thu Aug 04, 2016 5:56 pm

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby SpoonyBardOL » Tue Jun 04, 2024 10:49 am

Hmm, that doesn't seem to work, it doesn't give an error at least but the box doesn't close.

Added in 4 hours 31 minutes 54 seconds:
Ok I was able to get it working, but I had to change it from the talkAndWait function to regular talk. Weird, but whatever works. Thanks!

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby MrDoubleA » Thu Jun 13, 2024 7:17 am

SpoonyBardOL wrote:
Tue Jun 04, 2024 3:21 pm
Ok I was able to get it working, but I had to change it from the talkAndWait function to regular talk. Weird, but whatever works. Thanks!
For future reference, talkAndWait didn't work because it waits for the text box to close before the routine can continue, hence the name.

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

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby FutureNyanCat » Tue Sep 10, 2024 12:05 am

Has anyone figured out how to make a cutscene actor do a floating movement eg. a hovering Koopa Paratroopa actor?

PizzaNoob
Swooper
Swooper
Posts: 60
Joined: Wed May 29, 2024 8:36 pm
Flair: I like to make comics!
Pronouns: he/him

Re: animationPal.lua & cutscenePal.lua - Custom player animation and a framework for cutscenes!

Postby PizzaNoob » Sat Sep 28, 2024 11:59 am

How do you attach particles to an actor?


Return to “LunaLua”

Who is online

Users browsing this forum: Petal [Bot] and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari