Page 1 of 1

Disabling trees from map gen

Posted: Sat Dec 17, 2016 3:44 pm
by RedDagger
Hello, I want to play a game where trees and rock chunks do not spawn outside the starting area. Since I'm already using RSO, I thought I could make some slight changes to the copy I have installed to accomplish this result. If I understand it, what I need is to add a few snippets of code in /resourceconfings/vanilla.lua, is that it?

Re: Disabling trees from map gen

Posted: Sat Dec 17, 2016 7:13 pm
by MalcolmCooks
as far as I know trees are handled by the world generation, not resource generation, so they are not touched by RSO. certainly nothing in any of the config files will affect trees.

Re: Disabling trees from map gen

Posted: Sat Dec 17, 2016 7:56 pm
by RedDagger
In case anybody is curious, I managed to achieve something close to what I was looking for:
- in the config.lua file, I changed useStraightWorldMod = false to useStraightWorldMod = true
- int the /libs/straight_world.lua file, I commented (added "--") the lines fill(surface, x0,y0,haveTree,nil,4) and fill(surface, x0,y0,haveDecor,nil,2,1)

The result is not exactly what I was looking for, but close enough for my uses.

Re: Disabling trees from map gen

Posted: Sat Dec 17, 2016 11:26 pm
by orzelek
RSO doesn't touch terrain generation and I think trees are part of that.

Using straight world generator in this way is indeed possible but you'll get the straight world effect.

I think it would be much easier to figure out a way to disable tree generation completly or to remove then from chunks when they spawn. Removal could be easily applied only to chunks generated after starting area by looking at map tick.

Undecorator mod could be easily modified to achieve this effect by changing entity type it's removing.

Re: Disabling trees from map gen

Posted: Sat Dec 17, 2016 11:38 pm
by MalcolmCooks
you could also try making alterations to this mod: https://mods.factorio.com/mods/Emmote/fewerTrees