tileRandomizer.lua - Rudimentary aestheticizer

Share and discuss custom LunaLua code and content packs for SMBX2.
User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7211
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

tileRandomizer.lua - Rudimentary aestheticizer

Postby Enjl » Mon May 06, 2019 8:51 am

Ever worked with a tileset that has multiple options for fill tiles or other shenanigans? Don't feel like placing all those SMB2 LEGOs yourself?
Well...

Download:
https://pastebin.com/eu4t5EWT

Screenshot:
Spoiler: show
Image
Image
How to use:
tileRandomizer.register(98, {68, 70, 71})
First argument is the source ID, second is a list of possible transformations. There's, by default, a 1/5 chance that the block gets transformed at all. You can edit the file directly to
-change the chance
-change the seed

Seed, you ask? Oh yeah. This library uses a standalone instance of rng.lua to ensure your level doesn't magically look different on repeat playthroughs. The seed can be any number, so feel free to experiment until you find something that suits your level.
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
Eri7
Banned
Posts: 1654
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Hard work pays off sooner or later
Current Project: SMNZ (38A) + SMNP1 (38A) + MKA(2.0) + TNV (2.0/38A) + TNVL (2.0/38A) + SMNP2 (2.0) + SMNR (2.0)
Chat Username: Eri7
Contact:

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby Eri7 » Mon May 06, 2019 2:01 pm

Well damn, i didn't believe this was possible but you just made our lives way, way easier, thanks Enjl.
Image
Image
Image
Image

User avatar
Hoeloe
Eerie
Eerie
Posts: 988
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby Hoeloe » Mon May 06, 2019 7:45 pm

Enjl wrote:
Mon May 06, 2019 8:51 am
Seed, you ask? Oh yeah. This library uses a standalone instance of rng.lua to ensure your level doesn't magically look different on repeat playthroughs.
This is unnecessary. The version of RNG.lua that exists in the maglx3 build lets you generate RNG objects for precisely this purpose.

You don't even need to load any libraries, it's just:

Code: Select all

RNG.new(seed)

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7211
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby Enjl » Mon May 06, 2019 7:48 pm

Hoeloe wrote:
Mon May 06, 2019 7:45 pm
Enjl wrote:
Mon May 06, 2019 8:51 am
Seed, you ask? Oh yeah. This library uses a standalone instance of rng.lua to ensure your level doesn't magically look different on repeat playthroughs.
This is unnecessary. The version of RNG.lua that exists in the maglx3 build lets you generate RNG objects for precisely this purpose.

You don't even need to load any libraries, it's just:

Code: Select all

RNG.new(seed)
Didn't know about that. I presume this returns the rng object and that object can then be used just like the library itself? myRngObject.irandomEntry, for example.
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
Hoeloe
Eerie
Eerie
Posts: 988
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Current Project: A2XT Episode 2

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby Hoeloe » Mon May 06, 2019 7:49 pm

Enjl wrote:
Mon May 06, 2019 7:48 pm
Didn't know about that. I presume this returns the rng object and that object can then be used just like the library itself? myRngObject.irandomEntry, for example.
Yep. It's a useful feature.

User avatar
AndrewPixel
Bronze Yoshi Egg
Bronze Yoshi Egg
Posts: 353
Joined: Sun Mar 12, 2017 8:07 am
Flair: The Italian that likes time travel
Current Project: ???
Chat Username: AndrewPixel#2486
Contact:

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby AndrewPixel » Wed May 08, 2019 9:14 am

Image
ImageImageImageImageImageImageImageImageImage
ImageImage
Switch Friend Code: SW-2755-4824-8495
[PGE Italian Translator] [I make logos for your episodes, ask me via Discord or PM]

User avatar
Eri7
Banned
Posts: 1654
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Hard work pays off sooner or later
Current Project: SMNZ (38A) + SMNP1 (38A) + MKA(2.0) + TNV (2.0/38A) + TNVL (2.0/38A) + SMNP2 (2.0) + SMNR (2.0)
Chat Username: Eri7
Contact:

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby Eri7 » Wed May 08, 2019 1:03 pm

AndrewPixel wrote:
Wed May 08, 2019 9:14 am
Image
IIRC he did state he likes watching CarlSagan42 who is mario maker focused youtuber.
Image
Image
Image
Image

User avatar
Rhosty
Larry Koopa
Larry Koopa
Posts: 2347
Joined: Sun Dec 11, 2016 8:02 pm
Flair: You know what they say, all toasters toast toast!
Current Project: something idk
Chat Username: *practical

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby Rhosty » Wed May 08, 2019 11:22 pm

AndrewPixel wrote:
Wed May 08, 2019 9:14 am
Image
Don't we all?

User avatar
AndrewPixel
Bronze Yoshi Egg
Bronze Yoshi Egg
Posts: 353
Joined: Sun Mar 12, 2017 8:07 am
Flair: The Italian that likes time travel
Current Project: ???
Chat Username: AndrewPixel#2486
Contact:

Re: tileRandomizer.lua - Rudimentary aestheticizer

Postby AndrewPixel » Thu May 09, 2019 8:26 am

Eureka wrote:
Wed May 08, 2019 11:22 pm
AndrewPixel wrote:
Wed May 08, 2019 9:14 am
Image
Don't we all?
definitely lol
ImageImageImageImageImageImageImageImageImage
ImageImage
Switch Friend Code: SW-2755-4824-8495
[PGE Italian Translator] [I make logos for your episodes, ask me via Discord or PM]


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 4 guests