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

Share and discuss custom LunaLua code and content packs for SMBX2.
MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

warpTransition.lua (v1.1.3) - 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.

Image

Download
Last edited by MrDoubleA on Fri Jan 29, 2021 4:19 pm, edited 5 times in total.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9722
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: warpTransition.lua - Spruce up your warps!

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

awesome!

SpoonyBardOL
Swooper
Swooper
Posts: 52
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?

MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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.

SpoonyBardOL
Swooper
Swooper
Posts: 52
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?

MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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.

MegaDood
Torpedo Ted
Torpedo Ted
Posts: 1723
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.

MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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.

Chilly14
Snifit
Snifit
Posts: 234
Joined: Thu Jul 18, 2019 10:28 pm
Flair: wash your hands and stay at home
Pronouns: he/him

Re: warpTransition.lua - Spruce up your warps!

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

Looks nice! Can you add player death transitions?

SpoonyBardOL
Swooper
Swooper
Posts: 52
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?

FireSeraphim
Bit
Bit
Posts: 76
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?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9722
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: warpTransition.lua - Spruce up your warps!

Postby Emral » 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.

MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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

SpoonyBardOL
Swooper
Swooper
Posts: 52
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
Koopa
Koopa
Posts: 18
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?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9722
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: warpTransition.lua - Spruce up your warps!

Postby Emral » 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?

JulianSteve_18
Koopa
Koopa
Posts: 18
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.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9722
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: warpTransition.lua - Spruce up your warps!

Postby Emral » 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.

JulianSteve_18
Koopa
Koopa
Posts: 18
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?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9722
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: warpTransition.lua - Spruce up your warps!

Postby Emral » 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.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari