[solved] How to match resource placement with terrain?

Place to get help with not working mods / modding interface.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[solved] How to match resource placement with terrain?

Post by aubergine18 »

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.
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.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: How to match resource placement with terrain?

Post by LuziferSenpai »

I think the only way to get that is by placing it with control.lua ^^
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

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

Re: How to match resource placement with terrain?

Post by Ranakastrasz »

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.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: How to match resource placement with terrain?

Post by aubergine18 »

Ranakastrasz wrote:I would suggest looking a the Homeworld Mod.
Excellent info, it does indeed restrict to sand in that mod, here's how:

Code: Select all

	      tile_restriction = {"sand", "sand-dark"},
So I can do same in my mod. Problem solved! Thanks Ranakastrasz! :D
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.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: [solved] How to match resource placement with terrain?

Post by Ranakastrasz »

Oh. Really? I didn't expect that. Interesting to know.

Thought it was a script.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Post Reply

Return to “Modding help”