smwMap.lua (v1.2.1) - The Levels are using Levels!

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

Re: smwMap.lua (v1.1) - The Levels are using Levels!

Postby MrDoubleA » Wed Mar 31, 2021 4:15 pm

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.

Radiance
Boomerang Bro
Boomerang Bro
Posts: 1335
Joined: Thu Dec 10, 2015 7:53 am
Pronouns: he/him

Re: smwMap.lua (v1.1) - The Levels are using Levels!

Postby Radiance » 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)

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

Re: smwMap.lua (v1.1) - The Levels are using Levels!

Postby MrDoubleA » Thu Apr 01, 2021 6:10 am

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.

JamesR624
Spiny
Spiny
Posts: 29
Joined: Wed Aug 09, 2017 4:24 pm

Re: smwMap.lua (v1.1) - The Levels are using Levels!

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

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

Re: smwMap.lua (v1.1) - The Levels are using Levels!

Postby MrDoubleA » Mon Apr 05, 2021 11:21 am

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.

JamesR624
Spiny
Spiny
Posts: 29
Joined: Wed Aug 09, 2017 4:24 pm

Re: smwMap.lua (v1.1) - The Levels are using Levels!

Postby JamesR624 » Mon Apr 05, 2021 11:40 am

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.

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

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby MrDoubleA » Sun Apr 11, 2021 5:40 pm

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!)

SpoonyBardOL
Swooper
Swooper
Posts: 52
Joined: Thu Aug 04, 2016 5:56 pm

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby SpoonyBardOL » Wed Apr 14, 2021 5:54 am

Is it possible to do a setup like this:
Image

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.

IttaBaby
Swooper
Swooper
Posts: 53
Joined: Sat Apr 08, 2017 8:19 pm

Re: smwMap.lua (v1.2) - The Levels are using Levels!

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

erkyp3rky
Ninji
Ninji
Posts: 934
Joined: Fri Apr 15, 2016 1:41 am
Flair: formerly theloaflord

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby erkyp3rky » Thu Apr 15, 2021 11:44 pm

wow

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

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby MrDoubleA » Fri Apr 16, 2021 2:14 am

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!

Enzo Ferracini
Cheep-Cheep
Cheep-Cheep
Posts: 13
Joined: Fri Mar 22, 2019 12:05 pm
Flair: no

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby Enzo Ferracini » Sun Apr 18, 2021 2:12 pm

How I Do The Path?

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

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby MrDoubleA » Sun Apr 18, 2021 2:39 pm

Enzo Ferracini wrote:
Sun Apr 18, 2021 2:12 pm
How I Do The Path?
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.

MrNew_Greenman
Shy Guy
Shy Guy
Posts: 7
Joined: Thu Apr 01, 2021 3:04 pm
Pronouns: he/him

Re: smwMap.lua (v1.1) - The Levels are using Levels!

Postby MrNew_Greenman » Mon Apr 19, 2021 4:10 am

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

SpoonyBardOL
Swooper
Swooper
Posts: 52
Joined: Thu Aug 04, 2016 5:56 pm

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby SpoonyBardOL » Sat May 15, 2021 2:18 pm

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.

Images:
Spoiler: show
Image

Image

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:
Last edited by SpoonyBardOL on Fri Apr 05, 2024 10:59 am, edited 2 times in total.

Locus
Rex
Rex
Posts: 31
Joined: Sun Mar 17, 2019 12:47 pm
Pronouns: he/him

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby Locus » Sun May 16, 2021 2:47 pm

Image

I don't understand why the scenery elements are flashing like that...

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

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby MrDoubleA » Sun May 16, 2021 3:48 pm

Locus wrote:
Sun May 16, 2021 2:47 pm
Image

I don't understand why the scenery elements are flashing like that...
Did you change anything at all?

IttaBaby
Swooper
Swooper
Posts: 53
Joined: Sat Apr 08, 2017 8:19 pm

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby IttaBaby » 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

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

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby MrDoubleA » Sun May 16, 2021 7:39 pm

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.

IttaBaby
Swooper
Swooper
Posts: 53
Joined: Sat Apr 08, 2017 8:19 pm

Re: smwMap.lua (v1.2) - The Levels are using Levels!

Postby IttaBaby » Sun May 16, 2021 8:43 pm

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


Return to “LunaLua”

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari