Page 1 of 2

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

Posted: Sat Aug 19, 2023 8:19 am
by MrDoubleA
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.

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

Posted: Sat Aug 19, 2023 11:47 am
by JackTBS
This is great! I was wondering if this is compatible with your camera lua?

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

Posted: Sat Aug 19, 2023 1:39 pm
by MrDoubleA
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.

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

Posted: Wed Aug 23, 2023 11:24 am
by mariobrigade2018
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

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

Posted: Wed Aug 23, 2023 11:40 am
by MrDoubleA
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.

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

Posted: Fri Aug 25, 2023 4:31 am
by Dor_78
Can we add attack animations for the actor?

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

Posted: Sun Aug 27, 2023 9:27 pm
by Mal8rk
I don't really understand how the routines work & how to put them in the code

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

Posted: Thu Nov 02, 2023 9:14 pm
by Max Flower
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?

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

Posted: Sat Nov 04, 2023 2:33 pm
by MrDoubleA
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.

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

Posted: Sun Jan 28, 2024 9:58 pm
by cold soup
not really a bug report per se, but as far as i can tell the skipExitDuration property in cutscenePal.lua doesn't do anything

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

Posted: Mon Mar 25, 2024 12:21 pm
by Dor_78
Can we make that the player walks and looks up at the same time?

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

Posted: Mon May 13, 2024 5:59 am
by SpoonyBardOL
EDIT: Disregard. I was still using v1.1 of littleDialogue and didn't realize I hadn't updated it. Doing that fixed everything.

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

Posted: Mon Jun 03, 2024 7:12 pm
by SpoonyBardOL
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?

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

Posted: Tue Jun 04, 2024 1:26 am
by Marioman2007
Both actor:talk and and actor:talkAndWait return a textbox object created with littleDialogue.create so you can use that to close the box.

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

Posted: Tue Jun 04, 2024 4:34 am
by SpoonyBardOL
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?

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

Posted: Tue Jun 04, 2024 7:35 am
by Marioman2007
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()

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

Posted: Tue Jun 04, 2024 10:49 am
by SpoonyBardOL
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!

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

Posted: Thu Jun 13, 2024 7:17 am
by MrDoubleA
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.

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

Posted: Tue Sep 10, 2024 12:05 am
by FutureNyanCat
Has anyone figured out how to make a cutscene actor do a floating movement eg. a hovering Koopa Paratroopa actor?

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

Posted: Sat Sep 28, 2024 11:59 am
by PizzaNoob
How do you attach particles to an actor?