Page 1 of 1

tileRandomizer.lua - Rudimentary aestheticizer

Posted: Mon May 06, 2019 8:51 am
by Enjl
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.

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Mon May 06, 2019 2:01 pm
by Eri7
Well damn, i didn't believe this was possible but you just made our lives way, way easier, thanks Enjl.

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Mon May 06, 2019 7:45 pm
by Hoeloe
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)

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Mon May 06, 2019 7:48 pm
by Enjl
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.

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Mon May 06, 2019 7:49 pm
by Hoeloe
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.

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Wed May 08, 2019 9:14 am
by AndrewPixel
Image

Re: tileRandomizer.lua - Rudimentary aestheticizer

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

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Wed May 08, 2019 11:22 pm
by Rhosty
AndrewPixel wrote:
Wed May 08, 2019 9:14 am
Image
Don't we all?

Re: tileRandomizer.lua - Rudimentary aestheticizer

Posted: Thu May 09, 2019 8:26 am
by AndrewPixel
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