Disabling trees from map gen

Replaces resource spawning system, so that the distances between resources are much bigger. Railway is needed then.

Moderators: orzelek, Dark

User avatar
RedDagger
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Sep 07, 2015 7:32 pm
Contact:

Disabling trees from map gen

Post 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?
User avatar
MalcolmCooks
Filter Inserter
Filter Inserter
Posts: 253
Joined: Mon Apr 06, 2015 8:32 pm
Contact:

Re: Disabling trees from map gen

Post 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.
User avatar
RedDagger
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Sep 07, 2015 7:32 pm
Contact:

Re: Disabling trees from map gen

Post 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.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Disabling trees from map gen

Post 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.
User avatar
MalcolmCooks
Filter Inserter
Filter Inserter
Posts: 253
Joined: Mon Apr 06, 2015 8:32 pm
Contact:

Re: Disabling trees from map gen

Post by MalcolmCooks »

you could also try making alterations to this mod: https://mods.factorio.com/mods/Emmote/fewerTrees
Post Reply

Return to “Resource Spawner Overhaul”