This document describes everything about outposts, how they work and how they grow, as well as connections via trade routes
Global vars
Each outpost has this data tied to it:
- Outpost name {autogenerated}
- Outpost faction
- Outpost level {how big it is}
- Structures {class, position, rotation}
- Population {how many human NPCs to spawn}
Outpost parts
Every outpost has multiple required elements in order to impact gameplay. Those are:
- Workshop - source of all crafting and upgrading. Here you bring materials and money for someone to craft an item (Limited recipes that change per outpost), or if you are a firefly you just craft the stuff there
- Shop - provides materials and unique items based on the biome as well as being affected by economic adjustments based on how many of that item are in the storage of the outpost
- Storage - the inventory of the outpost that stores all resources that can be sold, as well as resources bought from the player or trade routes. Only one per outpost
- Campfire - the center of the outpost, around which this outpost grows and generates
- Monolith - a place for cartographers which creates a waypoint with the outpost name
Generation algorithm
The algorithm consists of several stages that create an outpost:
- Generate tents & structures at random locations around the campfire at R radius where
R = 3 + outpost_lvl*2 . The tents are rotated adequately depending on the walls that are next to that tent, set via a table. The density of tents falls off the farther from the campfire it is
- Find the 4 farthest tents of the outpost and then spawn barricades/makeshift walls/doors/entrances around the camp in a rectangle shape
- Generate paths that connect