Is there a way to tell the chunk generator to only place a resource on specific terrain?
I've got a 'clay' resource that I want autoplaced on the map, but ideally only on 'dirt-dark' terrain.
[solved] How to match resource placement with terrain?
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
[solved] How to match resource placement with terrain?
Last edited by aubergine18 on Thu Sep 29, 2016 5:02 pm, edited 1 time in total.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- LuziferSenpai
- Filter Inserter
- Posts: 393
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: How to match resource placement with terrain?
I think the only way to get that is by placing it with control.lua ^^
- Ranakastrasz
- Smart Inserter
- Posts: 2179
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: How to match resource placement with terrain?
I would suggest looking a the Homeworld Mod.
I seem to recall it filling the desert with sand ore.
---
I would increase resource frequency significantly, and then via script, on chunk generation, delete any offending resource patches.
I seem to recall it filling the desert with sand ore.
---
I would increase resource frequency significantly, and then via script, on chunk generation, delete any offending resource patches.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: How to match resource placement with terrain?
Excellent info, it does indeed restrict to sand in that mod, here's how:Ranakastrasz wrote:I would suggest looking a the Homeworld Mod.
Code: Select all
tile_restriction = {"sand", "sand-dark"},

Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Ranakastrasz
- Smart Inserter
- Posts: 2179
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [solved] How to match resource placement with terrain?
Oh. Really? I didn't expect that. Interesting to know.
Thought it was a script.
Thought it was a script.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16