Page 1 of 3
warpTransition.lua (v1.1.3) - Spruce up your warps!
Posted: Tue May 19, 2020 4:05 pm
by MrDoubleA
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.
Download
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 1:02 am
by Emral
awesome!
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 5:50 am
by SpoonyBardOL
I'm getting this error when I start a level using it:
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?
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 6:54 am
by MrDoubleA
SpoonyBardOL wrote: ↑Wed May 20, 2020 5:50 am
I'm getting this error when I start a level using it:
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 7:26 am
by SpoonyBardOL
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?
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 8:28 am
by MrDoubleA
That's probably possible... I'll look into that when I can.
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 9:21 am
by MegaDood
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 9:39 am
by MrDoubleA
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Wed May 20, 2020 9:49 am
by Chilly14
Looks nice! Can you add player death transitions?
Re: warpTransition.lua - Spruce up your warps!
Posted: Thu May 21, 2020 9:53 am
by SpoonyBardOL
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?
Re: warpTransition.lua - Spruce up your warps!
Posted: Thu May 21, 2020 10:31 am
by FireSeraphim
There's a serious lack of step by step documentation on how to use it, like can we get an example level for this?
Re: warpTransition.lua - Spruce up your warps!
Posted: Thu May 21, 2020 10:40 am
by Emral
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Thu May 21, 2020 12:38 pm
by MrDoubleA
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
Re: warpTransition.lua - Spruce up your warps!
Posted: Thu May 21, 2020 1:33 pm
by SpoonyBardOL
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Sat May 23, 2020 1:50 am
by JulianSteve_18
I did not understand how to use it. Could you do each of the effects in separate files?
Re: warpTransition.lua - Spruce up your warps!
Posted: Sat May 23, 2020 2:44 am
by Emral
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?
Re: warpTransition.lua - Spruce up your warps!
Posted: Sat May 23, 2020 12:05 pm
by JulianSteve_18
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Sat May 23, 2020 12:14 pm
by Emral
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.
Re: warpTransition.lua - Spruce up your warps!
Posted: Sat May 23, 2020 12:34 pm
by JulianSteve_18
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?
Re: warpTransition.lua - Spruce up your warps!
Posted: Sat May 23, 2020 12:51 pm
by Emral
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.