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

Share and discuss custom LunaLua code and content packs for SMBX2.
User avatar
MrDoubleA
Snifit
Snifit
Posts: 241
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

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.
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image diagonal!

I support: show
Image
Image


Image

User avatar
Drifloon
Boomerang Bro
Boomerang Bro
Posts: 1308
Joined: Thu Dec 10, 2015 7:53 am
Flair: Boost
Pronouns: he/him

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

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

User avatar
MrDoubleA
Snifit
Snifit
Posts: 241
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

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.
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image diagonal!

I support: show
Image
Image


Image

JamesR624
Bob-Omb
Bob-Omb
Posts: 24
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.

User avatar
MrDoubleA
Snifit
Snifit
Posts: 241
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

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.
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image diagonal!

I support: show
Image
Image


Image

JamesR624
Bob-Omb
Bob-Omb
Posts: 24
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.

User avatar
MrDoubleA
Snifit
Snifit
Posts: 241
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

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!)
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image diagonal!

I support: show
Image
Image


Image

User avatar
SpoonyBardOL
Rex
Rex
Posts: 35
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.

User avatar
IttaBaby
Rex
Rex
Posts: 31
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.

User avatar
chuckster
Ninji
Ninji
Posts: 917
Joined: Fri Apr 15, 2016 1:41 am
Flair: formerly theloaflord

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

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

wow

User avatar
MrDoubleA
Snifit
Snifit
Posts: 241
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

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!
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image diagonal!

I support: show
Image
Image


Image

Enzo Ferracini
Cheep-Cheep
Cheep-Cheep
Posts: 14
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?

User avatar
MrDoubleA
Snifit
Snifit
Posts: 241
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

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.
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image diagonal!

I support: show
Image
Image


Image

MrNew_Greenman
Goomba
Goomba
Posts: 3
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


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest