NSMBWalls.lua [DEPRECATED -- Use FakeWalls.lua instead]

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Halzk
Koopa
Koopa
Posts: 15
Joined: Tue Apr 16, 2019 10:20 am

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Halzk » Tue Aug 13, 2019 12:05 pm

THIS IS THE DEFINITIVE WORKAROUND:

EDIT: you just can get rid of the xRays[k]:ScaleTexture() and overlays[k]:ScaleTexture() lines, but watch out the following step:

Before each ScaleTexture, imagic.Circle{} is assigned to xRays and overlays respectively. Look for "filltype", then change imagic.TEX_FILL for imagic.TEX_PLACE. For example:
CODE: SELECT ALL

xRays[k] = imagic.Circle { radius = r, x = playerCenterX, y = playerCenterY, scene = true, texture = xRayBuffer, filltype = imagic.TEX_PLACE, texoffsetX = (centerOnScreenX - 400)/800, texoffsetY = (centerOnScreenY - 300)/600 }
And now we're done! Now it is exactly zoomed, and the effect works properly!
Don't know if I did something wrong but for me the result is kinda weird Image
Last edited by Halzk on Thu Jun 03, 2021 6:03 am, edited 1 time in total.

hacheipe399
Swooper
Swooper
Posts: 64
Joined: Mon Feb 10, 2014 12:29 pm

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby hacheipe399 » Tue Aug 13, 2019 2:32 pm

TheMaeru wrote:
Tue Aug 13, 2019 12:05 pm
Don't know if I did something wrong but for me the result is kinda wierd
Maybe you forgot to build the things behind the wall? Remember the layer nsmbwalls should be hidden in the editor, it works like a charm for me:
Image

Halzk
Koopa
Koopa
Posts: 15
Joined: Tue Apr 16, 2019 10:20 am

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Halzk » Tue Aug 13, 2019 5:31 pm

Maybe you forgot to build the things behind the wall? Remember the layer nsmbwalls should be hidden in the editor, it works like a charm for me:
No, it's not that I've checked

MegaDood
Charged Spiny
Charged Spiny
Posts: 1825
Joined: Wed Nov 01, 2017 2:43 am

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby MegaDood » Sat Aug 17, 2019 8:49 pm

I can't get anything other than the dummy block to display as the graphic when using this script. I've checked that my graphics are all PNGs, I don't know where I would look other than my level folder and default graphics folder. Does anyone know how I would fix this?

Daring Tombstone
Blooper
Blooper
Posts: 160
Joined: Mon Aug 28, 2017 10:57 pm
Flair: What? Not 1000 posts? That means I suck right?

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Daring Tombstone » Sat Aug 31, 2019 6:56 pm

I get the same effect as the Maeru.

Image

Everything in the circle is slightly blurry looking. You can tell by the orange mushroom on the left. The right side is warped while the left is fine.

I can deal with it though. Just wondering if this is what everyone else gets.

Dannygarbage
Goomba
Goomba
Posts: 2
Joined: Mon Sep 02, 2019 3:19 pm
Flair: Alien Garbage
Contact:

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Dannygarbage » Mon Sep 02, 2019 3:35 pm

hey, im not sure if this has been asked/fixed already so sorry if this is a repost, but im trying to implement this in a level, and it worked but the x ray showed a zoomed out version of the whole camera. i found a way to fix that by changing the scaletexture to 128 and the (2 * r)'s to 2.5, but now the textures are squished a bit and i can't figure out how to make it look like it does in the video. any help would be appreciated! heres images of the problems.
Image

Image

FirestarPlays
Chain Chomp
Chain Chomp
Posts: 301
Joined: Tue Feb 28, 2017 1:26 pm
Pronouns: he/him

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby FirestarPlays » Tue Oct 08, 2019 9:27 pm

Dannygarbage wrote:
Mon Sep 02, 2019 3:35 pm
hey, im not sure if this has been asked/fixed already so sorry if this is a repost, but im trying to implement this in a level, and it worked but the x ray showed a zoomed out version of the whole camera. i found a way to fix that by changing the scaletexture to 128 and the (2 * r)'s to 2.5, but now the textures are squished a bit and i can't figure out how to make it look like it does in the video. any help would be appreciated! heres images of the problems.
Image

Image
I'm having the exact same issue!

Wiimeiser
Snifit
Snifit
Posts: 215
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Wiimeiser » Thu Oct 10, 2019 1:26 am

Looks like this is in need of a compatibility update...

Dannygarbage
Goomba
Goomba
Posts: 2
Joined: Mon Sep 02, 2019 3:19 pm
Flair: Alien Garbage
Contact:

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Dannygarbage » Thu Oct 10, 2019 2:06 am

big oof

Soronexle
Swooper
Swooper
Posts: 67
Joined: Sun Jan 29, 2017 10:34 pm
Contact:

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Soronexle » Tue Nov 19, 2019 9:59 pm

I tried to use the walls in one of my recent levels, but the wall in question still acts like a real wall. What am I missing that needs to be changed?

IAmPlayer
Volcano Lotus
Volcano Lotus
Posts: 560
Joined: Sun May 21, 2017 3:36 am
Flair: I'm a hellspawn.
Pronouns: he/him
Contact:

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby IAmPlayer » Tue Nov 19, 2019 11:04 pm

Dark Soron wrote:
Tue Nov 19, 2019 9:59 pm
I tried to use the walls in one of my recent levels, but the wall in question still acts like a real wall. What am I missing that needs to be changed?
You need to place/move the blocks that wanted to be the fake walls to the layer named "nsmbwalls".

Soronexle
Swooper
Swooper
Posts: 67
Joined: Sun Jan 29, 2017 10:34 pm
Contact:

Re: NSMBWalls.lua - Fake Walls! (IMPORTANT UPDATE) - link fixed

Postby Soronexle » Wed Nov 20, 2019 6:32 am

1AmPlayer wrote:
Tue Nov 19, 2019 11:04 pm
Dark Soron wrote:
Tue Nov 19, 2019 9:59 pm
I tried to use the walls in one of my recent levels, but the wall in question still acts like a real wall. What am I missing that needs to be changed?
You need to place/move the blocks that wanted to be the fake walls to the layer named "nsmbwalls".
I do have the blocks in the "nsmbwalls" layer. I think what i'm missing is the code itself. This is the first time working with a luna.lua file so I'm not sure how to type in the code so that it functions.
And before you mention it, I have been watching the tutorials for it as well.

Sambo
Snifit
Snifit
Posts: 211
Joined: Fri Jan 24, 2014 6:43 pm

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby Sambo » Wed Mar 25, 2020 1:24 pm

I just posted a fixed version of this library. Please look at the OP for more info and a download link.

Maxjacinto2
Swooper
Swooper
Posts: 73
Joined: Sat Dec 28, 2013 5:21 pm
Flair: YNWA

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby Maxjacinto2 » Wed Mar 25, 2020 3:17 pm

Sambo wrote:
Wed Mar 25, 2020 1:24 pm
I just posted a fixed version of this library. Please look at the OP for more info and a download link.
So, if I am not mistaken, do we just put the text document on our level's file and that is it? If so, it'll be incredibly handy! Props for making this Sambo, an extremely helpful script for many people :D

PdizzleParker
Chain Chomp
Chain Chomp
Posts: 324
Joined: Fri Aug 10, 2018 11:26 am
Flair: doin your mom
Pronouns: they/them
Contact:

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby PdizzleParker » Wed Mar 25, 2020 3:25 pm

Maxjacinto2 wrote:
Wed Mar 25, 2020 3:17 pm
Sambo wrote:
Wed Mar 25, 2020 1:24 pm
I just posted a fixed version of this library. Please look at the OP for more info and a download link.
So, if I am not mistaken, do we just put the text document on our level's file and that is it? If so, it'll be incredibly handy! Props for making this Sambo, an extremely helpful script for many people :D
You must also copy and paste this bit of code into your level's luna.lua file.

Code: Select all

require("nsmbwalls")
If your level doesn't have one, make one.

Maxjacinto2
Swooper
Swooper
Posts: 73
Joined: Sat Dec 28, 2013 5:21 pm
Flair: YNWA

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby Maxjacinto2 » Wed Mar 25, 2020 4:10 pm

thegameseum wrote:
Wed Mar 25, 2020 3:25 pm
Maxjacinto2 wrote:
Wed Mar 25, 2020 3:17 pm
Sambo wrote:
Wed Mar 25, 2020 1:24 pm
I just posted a fixed version of this library. Please look at the OP for more info and a download link.
So, if I am not mistaken, do we just put the text document on our level's file and that is it? If so, it'll be incredibly handy! Props for making this Sambo, an extremely helpful script for many people :D
You must also copy and paste this bit of code into your level's luna.lua file.

Code: Select all

require("nsmbwalls")
If your level doesn't have one, make one.
Oh, got it. Thanks a lot!

IAmPlayer
Volcano Lotus
Volcano Lotus
Posts: 560
Joined: Sun May 21, 2017 3:36 am
Flair: I'm a hellspawn.
Pronouns: he/him
Contact:

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby IAmPlayer » Wed Mar 25, 2020 10:42 pm

This new fix doesn't require the dummy images anymore, am I right?

SpoonyBardOL
Bot
Bot
Posts: 57
Joined: Thu Aug 04, 2016 5:56 pm

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby SpoonyBardOL » Thu Mar 26, 2020 11:03 am

Glad to see this updated. I've been running with a thrown-together fix but this proper update works much better. However there is an issue I've come across previously that still exists and now that this is being looked at again I should point it out. The effect doesn't seem to play nice with some of the shaders added in Beta 4:
Spoiler: show
Image
It seems to adjust to the wavy effect of underwater fine, but it renders over the ocean spray shadow. Not to mention the Lava Lotus spores going behind it, but that at least can be worked around in level design.

Sambo
Snifit
Snifit
Posts: 211
Joined: Fri Jan 24, 2014 6:43 pm

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby Sambo » Thu Mar 26, 2020 5:45 pm

1AmPlayer wrote:
Wed Mar 25, 2020 10:42 pm
This new fix doesn't require the dummy images anymore, am I right?
That is correct.
SpoonyBardOL wrote: It seems to adjust to the wavy effect of underwater fine, but it renders over the ocean spray shadow. Not to mention the Lava Lotus spores going behind it, but that at least can be worked around in level design.
Unfortunately, because of how the wave effect works (technically it's called caustics), I can't do anything about this right now. It's possible that it will be fixed in the future, though. There's talk (though nothing official) of possibly adding this to basegame and making it play well with the other built-in effects. If this happens, it won't probably be for some time.

Now, the lava lotus thing could be fixed by lowering the render priority of the fake wall, but it renders above them intentionally, so that NPCs can be hidden behind it. What I would recommend is just doing a custom render to make the spores have a higher priority.

PdizzleParker
Chain Chomp
Chain Chomp
Posts: 324
Joined: Fri Aug 10, 2018 11:26 am
Flair: doin your mom
Pronouns: they/them
Contact:

Re: NSMBWalls.lua - Fake Walls! (Beta 4 Fix)

Postby PdizzleParker » Thu Mar 26, 2020 5:54 pm

SpoonyBardOL wrote:
Thu Mar 26, 2020 11:03 am
Glad to see this updated. I've been running with a thrown-together fix but this proper update works much better. However there is an issue I've come across previously that still exists and now that this is being looked at again I should point it out. The effect doesn't seem to play nice with some of the shaders added in Beta 4:
Spoiler: show
Image
It seems to adjust to the wavy effect of underwater fine, but it renders over the ocean spray shadow. Not to mention the Lava Lotus spores going behind it, but that at least can be worked around in level design.
For me, what I'd do to make the Volcano Lotus thing look a bit better is to put the entire piece of ground onto the nsmbwalls layer, rather than just the hidden part. That way, the fireballs go behind the whole thing rather than just clipping behind part of it. This is what also the NSMB games do, by the way.


Return to “LunaLua”

Who is online

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

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari