Page 1 of 1

Ability to use noise layer in mod

Posted: Mon Jun 25, 2018 6:25 pm
by orzelek
Would it be possible to be able to calculate value from noise layer in lua?

Main idea would be to define noise layer and it's parameters in data stage somehow and then in lua query for value from that layer for certain position.

It would be useful for RSO to be able to create localised seeds in this way - currently I need to do some tricky math to try and make sure that those seeds are unique and non-repeating (no mirroring on coords etc).

Re: Ability to use noise layer in mod

Posted: Tue Jun 26, 2018 4:11 pm
by Rseding91
I'm not against the idea however the entire noise system is setup purely for generating a chunks worth of entities at once and as such doesn't support anything like this.

Re: Ability to use noise layer in mod

Posted: Tue Jun 26, 2018 7:12 pm
by orzelek
Would it be easier if that noise layer would be specified in lua in runtime to have an object representing that layer and then making queries against it for certain coordinates?

Re: Ability to use noise layer in mod

Posted: Tue Jun 26, 2018 7:23 pm
by Ranakastrasz
It sounds like the system is already geared for an "On Chunk Created" mechanic.

I guess it creates data for a chunk, does everything for it, and then deletes the chunk's noise data?

I mean, why can't we hook into it as a simple call?

Re: Ability to use noise layer in mod

Posted: Mon Jul 22, 2019 9:12 am
by Boodals
This has been implemented recently: LuaSurface.calculate_tile_properties