Custom generator

This is the place to share custom user maps, scenarios, and campaigns.
Post Reply
brammel
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Mar 14, 2015 1:50 am
Contact:

Custom generator

Post by brammel »

I was thinking about writing my own map generator to override the one currently in the game.

though, after a bit of searching, I could find no documentation whatsoever on how to override the current generator.
the only information i could find is either: requirements it must meet, and how it currently works (in terms of what algorithms it uses etc)

ive noticed that its possible to store maps as an image to edit them there, so i could probably write a generator that exports an image, then import in in factorio.
but i can see this approach would fail if i reach the border of the map (so a new chunk gets generatoed)

is this possible? and if yes, is there any place where i can find some documentation on this?

Kevin94
Inserter
Inserter
Posts: 46
Joined: Mon Dec 08, 2014 10:39 pm
Contact:

Re: Custom generator

Post by Kevin94 »

It is possible. The RSO mod already does it, maybe it even fits your needs and you dont have to write your own.

Afaik the mod adds -1000 peeks to the vanilla generator making it is impossible to spawn anything.

hoho
Filter Inserter
Filter Inserter
Posts: 677
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: Custom generator

Post by hoho »

I'm fairly certain RSO only deals with resource spawns.
I'm also almost certain there is currently no way to modify how the actual terrain gets generated via mods.

Kevin94
Inserter
Inserter
Posts: 46
Joined: Mon Dec 08, 2014 10:39 pm
Contact:

Re: Custom generator

Post by Kevin94 »

you are right, RSO doesn't alter the map genration but only resource genation.
But there's another mod slightly modifying the base map generation: Straight World. It uses the settiles function and the onchunkgenerated event. You could use the same mechanism to write your map generator but basicly it would generate the chunk twice (once by vanilla, than deleting all entities, second time by custom generation code)

Post Reply

Return to “Maps and Scenarios”