warpTransition.lua (v1.1.2) - Spruce up your warps!

Share and discuss custom LunaLua code and content packs for SMBX2.
User avatar
MrDoubleA
Swooper
Swooper
Posts: 123
Joined: Mon Aug 20, 2018 7:02 am
Contact:

warpTransition.lua (v1.1.2) - Spruce up your warps!

Postby MrDoubleA » Tue May 19, 2020 4:05 pm

This is just a small library to add transitions when using warps or entering the level. Additionally, it also offers music fading between sections.
See bottom of file for settings.

Showcase
Download
Last edited by MrDoubleA on Mon Jul 27, 2020 9:39 am, edited 4 times in total.
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8742
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: warpTransition.lua - Spruce up your warps!

Postby Enjl » Wed May 20, 2020 1:02 am

awesome!
Ideas are useless if you can't make them real.
Image

User avatar
SpoonyBardOL
Koopa Troopa
Koopa Troopa
Posts: 28
Joined: Thu Aug 04, 2016 5:56 pm

Re: warpTransition.lua - Spruce up your warps!

Postby SpoonyBardOL » Wed May 20, 2020 5:50 am

I'm getting this error when I start a level using it:

Image

There's no other lua code running in this level, or the episode folder, outside of loading the warpTransition lua. Is there anything else I should be doing, or some documentation I'm missing?

User avatar
MrDoubleA
Swooper
Swooper
Posts: 123
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: warpTransition.lua - Spruce up your warps!

Postby MrDoubleA » Wed May 20, 2020 6:54 am

SpoonyBardOL wrote:
Wed May 20, 2020 5:50 am
I'm getting this error when I start a level using it:

Image

There's no other lua code running in this level, or the episode folder, outside of loading the warpTransition lua. Is there anything else I should be doing, or some documentation I'm missing?
Looks like you don't have the patch 2 hotfix.
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

User avatar
SpoonyBardOL
Koopa Troopa
Koopa Troopa
Posts: 28
Joined: Thu Aug 04, 2016 5:56 pm

Re: warpTransition.lua - Spruce up your warps!

Postby SpoonyBardOL » Wed May 20, 2020 7:26 am

Huh, I was certain I did, but I just did a fresh full install of SMBX2 and it seems I didn't! I re-applied the hotfox to my original Beta 4 folder and now it all works fine, so I'm not sure how I messed that up but at least that's all it was!

Is there any possibility of getting this to work with overworld transitions? Or is overworld stuff still too hard to work with?

User avatar
MrDoubleA
Swooper
Swooper
Posts: 123
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: warpTransition.lua - Spruce up your warps!

Postby MrDoubleA » Wed May 20, 2020 8:28 am

That's probably possible... I'll look into that when I can.
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

User avatar
MegaDood
Birdo
Birdo
Posts: 1494
Joined: Wed Nov 01, 2017 2:43 am

Re: warpTransition.lua - Spruce up your warps!

Postby MegaDood » Wed May 20, 2020 9:21 am

This looks really good!
But I'm having a bit of trouble using it, I'm confused.
Should any options appear in the Warps and Doors tab? The level loads with Mario with a circle effect (The one which extends outwards, I don't know the name) but other than that Im not sure on how to use it.
There aren't any errors that display either, but I would appreciate any help.
My Project:
Image
I don't really have a signature but here's what I support:


Image
Image
Image

User avatar
MrDoubleA
Swooper
Swooper
Posts: 123
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: warpTransition.lua - Spruce up your warps!

Postby MrDoubleA » Wed May 20, 2020 9:39 am

MegaDood wrote:
Wed May 20, 2020 9:21 am
This looks really good!
But I'm having a bit of trouble using it, I'm confused.
Should any options appear in the Warps and Doors tab? The level loads with Mario with a circle effect (The one which extends outwards, I don't know the name) but other than that Im not sure on how to use it.
There aren't any errors that display either, but I would appreciate any help.
No, it doesn’t add any more settings to warps (since that’s seemingly not really possible at the moment). All the settings are at the bottom of the lua file.
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

User avatar
Chilly14
Hoopster
Hoopster
Posts: 150
Joined: Thu Jul 18, 2019 10:28 pm
Flair: wash your hands and stay at home

Re: warpTransition.lua - Spruce up your warps!

Postby Chilly14 » Wed May 20, 2020 9:49 am

Looks nice! Can you add player death transitions?
Discord username: Chilly Bean BAM!#8857
Image
For the love of god, please use an adblocker (I prefer uBlock Origin) when using MediaFire to download my stuff.
Check out my levels!
Chilly14's Graphics Pack
Chilly's NPCs
screenRotate.lua
venusFireTrapPlus.lua
I support:
Spoiler: show
Image
Image

User avatar
SpoonyBardOL
Koopa Troopa
Koopa Troopa
Posts: 28
Joined: Thu Aug 04, 2016 5:56 pm

Re: warpTransition.lua - Spruce up your warps!

Postby SpoonyBardOL » Thu May 21, 2020 9:53 am

For a future update, would it be possible to add a blacklist? Like if you want to use it for a level but there's just one warp that goes from one end of a section to the other that you just don't want to pan?

User avatar
FireSeraphim
Spiny
Spiny
Posts: 52
Joined: Wed Apr 16, 2014 4:21 pm
Flair: Verified Professional Vampire Hunter
Contact:

Re: warpTransition.lua - Spruce up your warps!

Postby FireSeraphim » Thu May 21, 2020 10:31 am

There's a serious lack of step by step documentation on how to use it, like can we get an example level for this?
Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8742
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: warpTransition.lua - Spruce up your warps!

Postby Enjl » Thu May 21, 2020 10:40 am

FireSeraphim wrote:
Thu May 21, 2020 10:31 am
There's a serious lack of step by step documentation on how to use it, like can we get an example level for this?
Step 1: Open the lua file.
Step 2: To quote the main post: "See bottom of file for settings".
Step 3: Create your own luna.lua for your level.
Step 4: load warpTransition
Step 5: Set the documented entries to your liking in your luna.lua.
Step 6: Done

An example level would literally just load the library in luna.lua and be done with it. I'm unsure with what part you're struggling, so it would be good if you could elaborate further.
Ideas are useless if you can't make them real.
Image

User avatar
MrDoubleA
Swooper
Swooper
Posts: 123
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: warpTransition.lua - Spruce up your warps!

Postby MrDoubleA » Thu May 21, 2020 12:38 pm

SpoonyBardOL wrote:
Thu May 21, 2020 9:53 am
For a future update, would it be possible to add a blacklist? Like if you want to use it for a level but there's just one warp that goes from one end of a section to the other that you just don't want to pan?
Well, you can change the current warp types at any time. So an example script for something to change the warp type for a certain warp would just be:

Code: Select all

local warpTransition = require("warpTransition")

function onTick()
    local currentWarp = player:mem(0x15E,FIELD_WORD)
    if currentWarp == yourWarpsIndexHere then -- If the player is using a certain warp
        warpTransition.sameSectionTransition = warpTransition.TRANSITION_NONE -- Set the same-section transition to 'none'
    else -- If not using that warp
        warpTransition.sameSectionTransition = warpTransition.TRANSITION_PAN -- Set the same-section transition to 'pan'
    end
end
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

User avatar
SpoonyBardOL
Koopa Troopa
Koopa Troopa
Posts: 28
Joined: Thu Aug 04, 2016 5:56 pm

Re: warpTransition.lua - Spruce up your warps!

Postby SpoonyBardOL » Thu May 21, 2020 1:33 pm

Ah, awesome. I probably could have figured that out if I looked over the code a bit more closely but it's good to have an example.

JulianSteve_18
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Sat Dec 28, 2019 3:32 pm

Re: warpTransition.lua - Spruce up your warps!

Postby JulianSteve_18 » Sat May 23, 2020 1:50 am

I did not understand how to use it. Could you do each of the effects in separate files?

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8742
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: warpTransition.lua - Spruce up your warps!

Postby Enjl » Sat May 23, 2020 2:44 am

JulianSteve_18 wrote:
Sat May 23, 2020 1:50 am
I did not understand how to use it. Could you do each of the effects in separate files?
What part is difficult to understand? What is your goal?
Ideas are useless if you can't make them real.
Image

JulianSteve_18
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Sat Dec 28, 2019 3:32 pm

Re: warpTransition.lua - Spruce up your warps!

Postby JulianSteve_18 » Sat May 23, 2020 12:05 pm

Added in 53 seconds:
Enjl wrote:
Sat May 23, 2020 2:44 am
JulianSteve_18 wrote:
Sat May 23, 2020 1:50 am
I did not understand how to use it. Could you do each of the effects in separate files?
What part is difficult to understand? What is your goal?
I want to use only one single effect on one level, and another effect on another level. How do I do it? I know you gave an example, but I didn't understand it. If you could do each effect separately I would appreciate it.

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8742
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: warpTransition.lua - Spruce up your warps!

Postby Enjl » Sat May 23, 2020 12:14 pm

JulianSteve_18 wrote:
Sat May 23, 2020 12:06 pm
Added in 53 seconds:
Enjl wrote:
Sat May 23, 2020 2:44 am
JulianSteve_18 wrote:
Sat May 23, 2020 1:50 am
I did not understand how to use it. Could you do each of the effects in separate files?
What part is difficult to understand? What is your goal?
I want to use only one single effect on one level, and another effect on another level. How do I do it? I know you gave an example, but I didn't understand it. If you could do each effect separately I would appreciate it.
The transition types are defined at the top of the lua file. The variables to set are defined at the bottom. So you can use those for example like how MrDoubleA said:
warpTransition.sameSectionTransition = warpTransition.TRANSITION_NONE
In order to get different effects in different levels, drop the warpTransition.lua file into your episode folder, and then make a luna.lua file in each level's level folder. In those files you can set the variables to different things depending on which level's luna.lua you're editing. That's the simplest way to do it, without requiring a large amount of knowledge in lua. Does this make sense to you? If not, please let me know which part I should elaborate on.
Ideas are useless if you can't make them real.
Image

JulianSteve_18
Cheep-Cheep
Cheep-Cheep
Posts: 17
Joined: Sat Dec 28, 2019 3:32 pm

Re: warpTransition.lua - Spruce up your warps!

Postby JulianSteve_18 » Sat May 23, 2020 12:34 pm

Enjl wrote:
Sat May 23, 2020 12:14 pm
JulianSteve_18 wrote:
Sat May 23, 2020 12:06 pm
Added in 53 seconds:
Enjl wrote:
Sat May 23, 2020 2:44 am

What part is difficult to understand? What is your goal?
I want to use only one single effect on one level, and another effect on another level. How do I do it? I know you gave an example, but I didn't understand it. If you could do each effect separately I would appreciate it.
The transition types are defined at the top of the lua file. The variables to set are defined at the bottom. So you can use those for example like how MrDoubleA said:
warpTransition.sameSectionTransition = warpTransition.TRANSITION_NONE
In order to get different effects in different levels, drop the warpTransition.lua file into your episode folder, and then make a luna.lua file in each level's level folder. In those files you can set the variables to different things depending on which level's luna.lua you're editing. That's the simplest way to do it, without requiring a large amount of knowledge in lua. Does this make sense to you? If not, please let me know which part I should elaborate on.
Excuse my ignorance, but I still don't understand. I use Google translator to translate words from English to Spanish, and that is why your explanation is not understood. And since I don't know English, this is the reason why I don't understand the warptransition file.

Added in 4 minutes 33 seconds:

Code: Select all

local warpTransition = require("warpTransition")

function onTick()
    local currentWarp = player:mem(0x15E,FIELD_WORD)
    if currentWarp == yourWarpsIndexHere then -- If the player is using a certain warp
        warpTransition.sameSectionTransition = warpTransition.TRANSITION_NONE -- Set the same-section transition to 'none'
    else -- If not using that warp
        warpTransition.sameSectionTransition = warpTransition.TRANSITION_PAN -- Set the same-section transition to 'pan'
    end
end
This code uses the effect of TRANSITION_NONE and TRANSITION_PAN. for it to have the effect of TRANSITION_IRIS_OUT or TRANSITION_MOSAIC what do I have to change?

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8742
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: warpTransition.lua - Spruce up your warps!

Postby Enjl » Sat May 23, 2020 12:51 pm

I'm not sure if I can troubleshoot past a language barrier like that, sorry. Maybe someone who is familiar with lunalua and can speak spanish can talk to you through private message, but I'm not familiar with many people who speak spanish so I can't contact one for you.
Ideas are useless if you can't make them real.
Image


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest