Page 2 of 7
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Wed Mar 31, 2021 4:15 pm
by MrDoubleA
JamesR624 wrote: ↑Wed Mar 31, 2021 3:03 pm
Loving this so far! It's working really well!
But I am a bit stuck on the syntax of the spline configuration for the path. So far it seems to kinda be trial and error?
Would anyone be able to put together a reference guide on this, or perhaps even "sets of points" for different path curves and lines?
Well, the points field should be "x,y, x,y, x,y" etc. All of those positions are relative to the centre of the path object itself. For actually placing them, I recommend turning on the grid and counting the individual squares. As for the "set of points" thing... that's not really how they work. I recommend checking out the example for more help.
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Wed Mar 31, 2021 10:53 pm
by Radiance
Are instant warps possible here? (where if the player is in a specific coordinates, they will be warped instantly regardless of user input)
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Thu Apr 01, 2021 6:10 am
by MrDoubleA
Drifloon wrote: ↑Wed Mar 31, 2021 10:53 pm
Are instant warps possible here? (where if the player is in a specific coordinates, they will be warped instantly regardless of user input)
Yes. Both the transparent pipe and doors are instant warps. They can warp you to another warp, or put you on another path.
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Mon Apr 05, 2021 10:46 am
by JamesR624
So I did figure out the pathing system. It's still quite complex but able to be figured out.
What is completely stumping me is that after completing a level, it does return to the map but does not unlock any paths.
What I've tried and made sure of:
1. Taken into account smwMap.lua and all the individual lua files to match the changes in npc numbers that I had to make to the files to make them work (just like any other custom NPC).
2. Copied the blank .wld file to my episode and renamed it to match the episode (just in case it was a .wld file issue).
3. Made sure the level object has the correct path names entered for their directional exits.
4. Made sure path names are all correct. (They do work properly even with the levels when using the "select button in testing mode to simulate level completion)
5. Double checked "win types" for each level object (card roulette, keyhole, goal tape, etc).
6. Doublec checked the paths actually connect to both levels.
From my testing, the ONLY difference between my setup and the example setup you included is the different numbers for the NPCs I had to change so they take up unused slots (instead of the usual starting at npc-751.lua and npc-751.ini). [see item 1. on list.]
So I was just wondering is there anything in smwMap.lua or the individual level npc lua files that I've forgotten to change? There is no error log to post or anything. The level is completed, goes back to the map, but doesn't unlock any paths despite having all the proper preferences setup in both the path and two connecting level npcs. It DOES when testing in the example, even when adding my test lvlx file to your example into the YOSHI'S ISLAND 2 slot, and it still works, so I can rule out issues with the lvlx files themselves.
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Mon Apr 05, 2021 11:21 am
by MrDoubleA
JamesR624 wrote: ↑Mon Apr 05, 2021 10:46 am
So I did figure out the pathing system. It's still quite complex but able to be figured out.
What is completely stumping me is that after completing a level, it does return to the map but does not unlock any paths.
What I've tried and made sure of:
1. Taken into account smwMap.lua and all the individual lua files to match the changes in npc numbers that I had to make to the files to make them work (just like any other custom NPC).
2. Copied the blank .wld file to my episode and renamed it to match the episode (just in case it was a .wld file issue).
3. Made sure the level object has the correct path names entered for their directional exits.
4. Made sure path names are all correct. (They do work properly even with the levels when using the "select button in testing mode to simulate level completion)
5. Double checked "win types" for each level object (card roulette, keyhole, goal tape, etc).
6. Doublec checked the paths actually connect to both levels.
From my testing, the ONLY difference between my setup and the example setup you included is the different numbers for the NPCs I had to change so they take up unused slots (instead of the usual starting at npc-751.lua and npc-751.ini). [see item 1. on list.]
So I was just wondering is there anything in smwMap.lua or the individual level npc lua files that I've forgotten to change? There is no error log to post or anything. The level is completed, goes back to the map, but doesn't unlock any paths despite having all the proper preferences setup in both the path and two connecting level npcs. It DOES when testing in the example, even when adding my test lvlx file to your example into the YOSHI'S ISLAND 2 slot, and it still works, so I can rule out issues with the lvlx files themselves.
Are you loading smwMap.lua in the episode luna.lua or the map level's luna.lua? If it's not the episode's one, it can't carry over the win type.
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Mon Apr 05, 2021 11:40 am
by JamesR624
MrDoubleA wrote: ↑Mon Apr 05, 2021 11:21 am
Are you loading smwMap.lua in the episode luna.lua or the map level's luna.lua? If it's not the episode's one, it can't carry over the win type.
Welp, I am a dummy. I didn't remember to check my main luna.lua file to actually load the map API. I guess cause everything else just appeared to be working. Can't believe I didn't remember that, but I guess that just goes to show how amazing your code is. No error messages or anything. (Not being sarcastic. I genuinely mean that I'm impressed at how well the code still works even if the user doesn't do everything properly, as opposed to random error messages like many APIs and custom NPCs throw.)
Thank you very much for the help.
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun Apr 11, 2021 5:40 pm
by MrDoubleA
v1.2 is out! Most notably, there's now txt files for paths and a bunch of settings for them (see the read me for the list of them), but also added a star coin counter for the HUD and a (disabled-by-default) start point selection menu.
(Edit: I forgot to actually include the updated smwMap.lua file... whoops... it'll be fixed tomorrow, sorry!)
(Edit 2: Okay, it's actually up now!)
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Wed Apr 14, 2021 5:54 am
by SpoonyBardOL
Is it possible to do a setup like this:
I know the crossroads can be used to have splits in a path, but what it doesn't seem to do (or I can't figure out) is to have the paths connected to a crossroads draw once the crossroads is visible. I can make the branching paths always unlocked so that the initial path leading to the crossroads just needs to be unlocked, but that doesn't look great. Maybe if crossroads had a property that auto unlocks selected paths once the crossroads itself is unlocked?
Also, could you add an X offset for Cheep-Cheeps? So they can also jump up to the left or right of their trigger as well as above or below.
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Thu Apr 15, 2021 7:15 pm
by IttaBaby
the difference in pixel size is going to slowly murder me, but this is still some of the coolest shit on this whole site.
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Thu Apr 15, 2021 11:44 pm
by erkyp3rky
wow
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Fri Apr 16, 2021 2:14 am
by MrDoubleA
IttaBaby wrote: ↑Thu Apr 15, 2021 7:15 pm
the difference in pixel size is going to slowly murder me, but this is still some of the coolest shit on this whole site.
Do you mean in the paths? If so, it'll be fixed soon!
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun Apr 18, 2021 2:12 pm
by Enzo Ferracini
How I Do The Path?
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun Apr 18, 2021 2:39 pm
by MrDoubleA
Give it a list of X and Y positions, and it'll connect them together. You must also give it a name. I suggest checking out the example.
Re: smwMap.lua (v1.1) - The Levels are using Levels!
Posted: Mon Apr 19, 2021 4:10 am
by MrNew_Greenman
JamesR624 wrote: ↑Wed Mar 31, 2021 3:03 pm
Loving this so far! It's working really well!
But I am a bit stuck on the syntax of the spline configuration for the path. So far it seems to kinda be trial and error?
Would anyone be able to put together a reference guide on this, or perhaps even "sets of points" for different path curves and lines?
Same problem. If someone wants to make it, i'll highly appreciate it
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sat May 15, 2021 2:18 pm
by SpoonyBardOL
I've made some extras for use with this lua pack. First off is a Crossroad object that auto-opens any selected paths once the crossroad itself is revealed, its appearance changes based on which paths are currently unlocked (thanks mutantvine code!) and it even has a locked function where you can set any combination of Stars or Star Coins to unlock it.
I've also ported some of the map sprites from Level Contest Japan (which were created by Enjl, I believe?), floating blocks, Walking NPCs, Jumping NPCs, and Patrolling NPCs (Charlie).
EDIT 3/28/24: Fixed an oversight which caused the requirements of unlockable Crossroads to display incorrectly if viewed in a certain order.
EDIT 4/5/24: Fixed another oversight which caused the crossroad object to return an error.
EDIT 4/15/25: Super belated edit but I realize now I neglected to mention the crossroads need to have names assigned, especially if you are using their locking functionality. And, much like paths, the names need to be distinct from one another. No update added or needed for this, just forgot this bit of instruction.
Images:
Some of the path connections to the crossroads look a bit odd since they were left as-is from MDA's demo map, otherwise I'd make sure they connected more naturally to the crossroad.
Download:
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun May 16, 2021 2:47 pm
by Locus
I don't understand why the scenery elements are flashing like that...
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun May 16, 2021 3:48 pm
by MrDoubleA
Locus wrote: ↑Sun May 16, 2021 2:47 pm
I don't understand why the scenery elements are flashing like that...
Did you change anything at all?
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun May 16, 2021 7:23 pm
by IttaBaby
Can we maybe have some simple built in splines to speed things up? Like a small array of predefined paths? Like ╯╰╭ ╮ect
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun May 16, 2021 7:39 pm
by MrDoubleA
IttaBaby wrote: ↑Sun May 16, 2021 7:23 pm
Can we maybe have some simple built in splines to speed things up? Like a small array of predefined paths? Like ╯╰╭ ╮ect
As I've said before, splines don't really work like that.
Re: smwMap.lua (v1.2) - The Levels are using Levels!
Posted: Sun May 16, 2021 8:43 pm
by IttaBaby
as in you can copy past a path
just have some example numbers I suppose
0,0, 32,0, 64,32
it makes a ‾\
sorta aligned to grid? I'm no good at it but it seems like that would work