Starter Veins


Control a planet's starting resources. Keep any native resource to its starter vein only, or write extra starter veins for any planet, vanilla or modded. Made for low resource starts: just enough ore to get a run going.

Tweaks
3 hours ago
2.0
0
Environment Mining Fluids Cheats
Owner:
codytnewman
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
3 hours ago
Latest Version:
1.0.0 (3 hours ago)
Factorio version:
2.0
Downloaded by:
0 users

Starter Veins

Control a planet's starting resources. Keep any native resource to its starter vein only, or write extra starter veins for any planet.

The game runs exactly the same until you actually change the settings. Every setting is a map setting: set it in the new-game dialog under this mod's tab, and it lives in the save.

I needed this mod to have a way to do a "low resources start", since the base game allows for either no resources at all, or practically infinite resources, even if very rare. This lets you actually control how much you spawn with, so you can technically have just enough resources for other mods, such as Prospecting Drill, to kick in and actually run (which I put at roughly 1200 iron plates minimum plus copper, in the best case scenario).

Starter vein only

Default ores and planets are handled using simple toggles for convenience. Just flip one on and it overrides the spawning for that ore: the starter patch stays and every other patch on the planet is cleared (or if you have the ore disabled in the map settings, it spawns one regardless). This also works for liquids such as oil. I didn't add it for water, as that always spawns regardless.

The starter zone is 120 tiles around the starting point, which is where the game puts its own starter patches. A patch that touches the zone is a starter vein and stays whole.

Extra starter veins

If you want better configuration, you can use the configuration free text field to add custom patches and their sizes. Some working examples below:

vulcanus: iron-ore=300k, copper-ore=200k, coal=150k
nauvis: uranium-ore=50k; aquilo: iron-ore, copper-ore

Ores can go where the game never puts them. Either of these lines gives Nauvis a tungsten vein and Vulcanus an iron and a copper vein, the first at the amount a starter patch of each would get, the second at the amounts written:

nauvis: tungsten-ore; vulcanus: iron-ore, copper-ore
nauvis: tungsten-ore=100k; vulcanus: iron-ore=300k, copper-ore=200k

Amounts accept k and m. Without an amount, a vein gets what the map would give a starter patch of that resource. For crude oil and other wells the number is a well count, four by default and at most 16. Modded resources and modded planets work the same way; a line for a planet you have not reached yet applies when you land. A typo is reported in chat at map start, in plain words, and the rest of the line still applies. If you are not sure if you configured correctly, save before reaching the planet, and reload if you did it wrong.

Two multipliers

Starter zone size scales the 120 tiles. Starter vein size scales every vein the toggles place, on top of the map's frequency, size and richness sliders. An amount written in the line is used as written.

In a running game

Added to an existing save, the mod acts on new surfaces and on chunks generated from then on. Nothing already on the map changes. Turning a toggle off later stops the removal; nothing is restored.

Without Space Age

Only the Nauvis toggles are shown. A line that names a resource your game does not have is reported as a typo and skipped, and a group for a planet that never exists does nothing.

With other mods

Prospecting Drill grows ore at runtime and is never touched. Proliferation's matter nodes are placed at runtime and are never touched. Planet Picker chooses the planet you start on; this mod gives that planet a start, so a Vulcanus start with an iron line just works. Space platforms are never touched. Mod and scenario authors can flip any of these settings from their own code through the remote interface starter-veins-bridge and its set_setting(name, value) call.

Limits

Placed veins are script-shaped: a blob with a falling density and some noise, not the map generator's own hand. Wells are single entities, spaced apart. If the starter zone has too little free ground for the amount asked, the vein is as big as the ground allows and the debug setting says so.

Author

Cody T. Newman.