Ability to use noise layer in mod

Post Reply
orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Ability to use noise layer in mod

Post 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).

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Ability to use noise layer in mod

Post 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.
If you want to get ahold of me I'm almost always on Discord.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Ability to use noise layer in mod

Post 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?

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Ability to use noise layer in mod

Post 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?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Ability to use noise layer in mod

Post by Boodals »

This has been implemented recently: LuaSurface.calculate_tile_properties

Post Reply

Return to “Implemented mod requests”