Porting autoplace from peaks to probability_expression

Place to get help with not working mods / modding interface.
Luaan
Inserter
Inserter
Posts: 26
Joined: Tue May 06, 2014 5:23 pm
Contact:

Porting autoplace from peaks to probability_expression

Post by Luaan »

Hi,
I'm working on porting a mod from Factorio 1.1.110 to 2.0, and I've hit a bit of a snag with making the map generation compatible with old saves now that peaks have been removed from autoplace. I've been able to reproduce most things well enough in the "new" probability_expression (it's not 100% accurate, but good enough not to be obvious, other than small things like tree or rock generation - I can see that changed in vanilla too, so not much I can do about it anyway); I mainly care about tile placement.

The problem I have is with the noise_X values, and the "magic" top_property_limit. I tried dozens of variations of multioctave_noise, but I can't get it to produce the same results as peaks in the old system. Is it possible to reproduce those in the new system? Is there some extra scaling or offsetting I have to do on the noise, or do I actually have to build a new octave system from the basis noise?
Natha
Fast Inserter
Fast Inserter
Posts: 229
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: Porting autoplace from peaks to probability_expression

Post by Natha »

where do noise_x and top_property_limit come from?
If not already done, a good approach is to dive into the built-in autoplace expressions and see how they work
Luaan
Inserter
Inserter
Posts: 26
Joined: Tue May 06, 2014 5:23 pm
Contact:

Re: Porting autoplace from peaks to probability_expression

Post by Luaan »

It's pretty much the first version where mods could customize map generation; all part of the "peaks" system that was removed in 2.0. It's actually fairly well documented overall, but there isn't enough detail on a few things like this.
Post Reply

Return to “Modding help”