Making add-ons for Constellation Colonies
Add new buildings and resources to colonies, or give existing buildings new models, by dropping a folder into KSP's GameData. No programming and no plugin needed. Use the Add-on Creator app, or write one text file by hand.
What an add-on is
An add-on is a folder inside Kerbal Space Program/GameData that holds one or more .cfg files describing colony buildings (COLONY_STRUCTURE) and, if it needs them, new colony resources (COLONY_RESOURCE). Constellation Colonies reads every .cfg in GameData when KSP starts, so it finds your add-on by itself. There's nothing to register.
Once installed, your add-on shows up in three places in the game:
- Construction mode: your buildings get their own tab group above the category tabs, named after your add-on (the Core's buildings are under Core).
- The colony bar and the Tracking Station's Colonies window: the Add-ons menu lists every installed add-on with its version, author, what it adds, and any mistakes it found.
- Every colony: your resources can be used, made, stored and moved like the Core's, and appear in a colony's resource bars once one of its buildings can hold them.
Add-on Creator
A Windows app with a form for every setting, drop-down lists of the parts you have installed, a checker that explains mistakes, and buttons to install and zip your add-on.
One text file
Write ColonyAddon.cfg in any text editor, in the same format as KSP's own part files. Everything the app can do, a hand-written file can do too.
Quick start: with the app
The app is AddonCreator/ColonyAddonCreator.exe in the Constellation Colonies download. It needs Windows with .NET Framework 4.5 or newer, which every current Windows has. It finds KSP through Steam by itself; if it can't, use Tools > Set KSP folder.
- Make the add-on. Click New add-on. Give it a folder name (letters, digits and
_, for exampleKerbalFarms), a title and your name. Leave Create in as KSP's GameData so you can test it straight away. - Add a building. On 2. Structures, click New... and pick a starting point: Producer, Power, Storage, Habitat or Decoration. The app fills in sensible values.
- Set it up. Change the title and pick a Part from the list of every part installed, which gives the building its look. Click ... next to Inputs, Outputs, Storage or Costs to edit those lists. Each setting's explanation shows below the grid when you click it.
- Add resources only if you need new ones. Your buildings can already use the Core's resources and those of other add-ons. Add new ones on 3. Resources.
- Check and save. Open 5. Check & Publish. Red lines are errors to fix, orange are warnings, green are tips. Click Save (or Ctrl+S). The bottom half shows the exact file being written.
- Try it. Start KSP. Your buildings are in Construction mode under your add-on's tab group. If the add-on folder isn't in GameData, click Install into KSP first.
- Share it. Click Export .zip. See Sharing your add-on.
Quick start: by hand
- Make a folder in GameData, for example
GameData/KerbalFarms. - In it, make a text file named
ColonyAddon.cfg(any name ending in.cfgworks). Save it as UTF-8. - Paste this in and change it to suit:
COLONY_ADDON
{
name = KerbalFarms
title = Kerbal Farms
version = 1.0
author = Your Name
description = Farms and food stores for colonies.
minCoreVersion = 0.20
}
COLONY_STRUCTURE
{
name = KerbalFarms_HydroponicsBay
title = Hydroponics Bay
category = Life support
description = Grows food under lamps.
part = Large.Crewed.Lab // any installed part; _ in a part's name becomes .
scale = 1.5
INPUT
{
resource = Water
rate = 2 // units per game hour
}
INPUT
{
resource = ElectricCharge
rate = 6
}
OUTPUT
{
resource = Food
rate = 3
}
COST
{
resource = MaterialKits
amount = 60 // taken from the colony when it's built
}
funds = 5000 // Career games only
}
- Start KSP, land at a colony, open the colony bar (the toolbar button) and click its Add-ons icon. Your add-on should be listed with no warnings. Then open Construction mode and find your building under Kerbal Farms.
KSP reads configs only at start-up, so restart the game after each change. The format is KSP's own: key = value lines, nodes in braces, and // for comments. Tabs or spaces both work.
Folder layout
GameData/
ConstellationColonies/ the Core (don't put your files in here)
KerbalFarms/ your add-on; the folder name is its id
ColonyAddon.cfg COLONY_ADDON, COLONY_RESOURCE and COLONY_STRUCTURE nodes
Models/ optional: your own .mu models
hydro_bay.mu
hydro_bay.png its texture, next to it, as KSP expects
Icons/ optional: parts-panel icons
hydro_bay.png
Everything in the folder belongs to your add-on, however many .cfg files it has and however they're arranged. The app keeps everything in ColonyAddon.cfg; a hand-made add-on can split its nodes over several files.
COLONY_ADDON
One per add-on. It's optional: without it, the folder name is used as the title. Put it in any .cfg in your folder.
| Key | Default | What it does |
|---|---|---|
| name | folder | Your add-on's id. Use the folder name. |
| title | folder name | Shown in the Add-ons list, and as the tab group of your buildings in Construction mode. |
| version | none | Your add-on's version, shown in the Add-ons list. |
| author | none | Shown in the Add-ons list. |
| description | none | A sentence or two, shown in the Add-ons list. |
| minCoreVersion | none | The oldest Constellation Colonies your add-on works with, like 0.20. Older versions show a warning for your add-on in the Add-ons list. |
COLONY_STRUCTURE
One per building. Only name and something to give it a look (part, model or sceneModel) are required.
Basics
| Key | Default | What it does |
|---|---|---|
| name | required | Internal name, saved in players' games. Start it with your add-on's name (KerbalFarms_Silo) and never change it after release. See Names. |
| title | name | Shown in the parts panel, the colony bar's menus and the hover panel. |
| category | Structures | The tab it goes in within your tab group. Core uses Production, Life support, Power, Storage and Warehouses, and you can make your own. |
| description | none | Shown in the parts panel when the building is picked. |
| pack | your title | The tab group it goes in. Leave it out to use your add-on's title. Setting it to Core puts it in the Core's group. |
Look
| Key | Default | What it does |
|---|---|---|
| model | none | Your own model: its path under GameData without .mu, like KerbalFarms/Models/hydro_bay. Tried first. |
| sceneModel | none | Advanced: names of stock KSC building objects to copy, comma-separated, like ksp_pad_cylTank. Tried after model. KSP.log lists the names (search for "Stock building objects"). |
| part | none | A part whose model is used, from stock or any mod. Only its look is copied, not its behaviour. In part names, _ becomes .: the file says Large_Crewed_Lab, you write Large.Crewed.Lab. |
| icon | shared icon | Your own parts-panel icon: a texture's path under GameData without the extension, like KerbalFarms/Icons/hydro_bay. 64×64 PNG works well. |
| scale | 1 | Model scale. Changing it in an update resizes buildings players already placed, and keeps them on the ground. |
| fallbackScale | scale | The scale used for part when the sceneModel isn't found. |
| rotation | 0, 0, 0 | Extra rotation, x, y, z in degrees. 90, 0, 0 stands up a part that's made to lie flat or sit on a side. |
| animation | deploy | An animation to pose the model with. Leave it out to use the part's deploy animation, so solar panels show open. |
| animationTime | 1 | Where in that animation to pose it: 0 is the start, 1 the end. |
Production, housing and cost
| Key | Default | What it does |
|---|---|---|
| INPUT { } | none | A resource it uses: resource and rate (units per game hour). Add one block per resource. |
| OUTPUT { } | none | A resource it makes: resource and rate. |
| STORAGE { } | none | A resource it stores: resource and amount. |
| COST { } | free | A resource taken from the colony when it's built: resource and amount. |
| funds | 0 | Funds it costs to build, in Career games only. |
| solar | false | true: its outputs follow sunlight at the colony, like a solar panel. The rates you give are at full sun (sun straight overhead); there's nothing at night. Time warp and time away use a day-and-night average. Eclipses and terrain shadows aren't counted. |
| sciencePerHour | 0 | Science it makes per hour, in Career and Science games. Paid into R&D in whole points. |
| fundsPerHour | 0 | Funds it makes per hour, in Career games. Paid in amounts of 100 or more. |
| techRequired | none | A tech-tree node id, like advConstruction. In Career and Science games the building can't be built until that node is researched; the parts panel says which one. The app lists every node installed. |
| colonyTech | none | The id of a colony tech node this building will need once colony research is in the game. It's stored and shown in the parts panel now, but not enforced yet. Needs Core 0.26. |
| tag | none | A capability tag, like tag = launchpad; repeat the line (or separate with commas) for more. Tags do nothing by themselves: plugin add-ons find buildings by them. Needs Core 0.27. |
| SPAWN_POINT | none | A node with name, position and direction: a place on the building where a plugin could put a vessel. See Plugin hooks. Needs Core 0.27. |
| maxPerColony | 0 (no limit) | The most of these one colony can have, for one-off buildings like a headquarters. |
| priority | 50 | When resources run short, lower numbers get them first. Buildings with no inputs (like solar arrays) always run first. |
| buffer | 2 | Hours of each input and output the building holds itself, at least 10 units of each. |
| crewCapacity | 0 | Kerbals it can house. Its rates are for a full house and scale with how many live there, so an empty habitat uses nothing. |
| node | top, bottom, sides | An attach node; add one line per node. See Attach nodes. |
| startingSupplies | false | For the Core's Supply Cache only. Leave it out. |
Inputs, outputs, storage, cost
All four are blocks inside a COLONY_STRUCTURE, one block per resource. Inputs and outputs use rate, storage and cost use amount:
INPUT { resource = Ore rate = 10 } // on separate lines in a real file
OUTPUT { resource = MaterialKits rate = 5 }
STORAGE { resource = Ore amount = 3000 }
COST { resource = MaterialKits amount = 80 }
A building can use any colony resource: the Core's, your own, and those of other installed add-ons. The Core has:
| Name | Moves by | Notes |
|---|---|---|
| Ore | cable | Dug by the Ore Drill. Also a KSP resource, so vessels can load and unload it. |
| MaterialKits | cable | What most buildings are built from. Made by the Workshop from ore. |
| Food, Water, Oxygen | cable | Life support. Habitats use them for each kerbal living there. |
| ElectricCharge | wire | Power. Made by solar arrays and RTGs, stored in battery banks. |
| LiquidFuel, Oxidizer, MonoPropellant | cable | Fuel, made by the Refinery. Vessels can load it. |
COLONY_RESOURCE
Add a resource only when no existing one fits. Every colony can use it as soon as your add-on is installed, including colonies founded before it. Colonies founded afterwards also get its starting amount in their Supply Cache.
| Key | Default | What it does |
|---|---|---|
| name | required | Internal name, saved in games. If a KSP resource with the same name exists (stock or from a mod), vessels can load and unload it over cables and wires. |
| displayName | name | Shown in the game. |
| abbreviation | first 3 letters | Short name for compact lists and tooltips. |
| unit | u | Shown after amounts. |
| category | General | Grouping label. |
| sortOrder | 100 | Order in the resource bars, lowest first. The Core uses 0 to 32. |
| network | cable | cable for anything physical, wire for anything that moves like electricity. |
| startingAmount | 0 | How much each new colony starts with, in its Supply Cache. |
| startingCapacity | 0 | How much the Supply Cache holds. With 0, colonies can only hold it in buildings that store it. |
| color | white | Bar colour as r, g, b from 0 to 1, like 0.6,0.85,0.9. |
| alert | false | true: an on-screen alert when a colony runs short of it. The Core sets it for Food, Water, Oxygen and ElectricCharge. |
Model packs (COLONY_RESKIN)
A model pack gives buildings that already exist (the Core's, or another add-on's) a new look, without changing what they do, cost or store. It's how a modeler's work ships: its own folder in GameData, which players can add or remove at any time. Buildings already placed in saves change look too, and go back when the pack is removed. Module Manager isn't needed.
COLONY_RESKIN
{
structure = Workshop // the building's internal name
model = MyModelPack/Models/workshop // MyModelPack/Models/workshop.mu
icon = MyModelPack/Icons/workshop // optional parts-panel icon
scale = 1 // optional
node = 0, 1, 0, 0, 1, 0 // optional: attach nodes for the new model
}
A reskin can set model, part, sceneModel, icon, scale, fallbackScale, rotation, animation, animationTime and node lines, with the same meaning as in COLONY_STRUCTURE. Anything it leaves out stays as it was, except that a new model replaces a stock-building sceneModel. If it gives any node lines, they replace the building's nodes. If two packs reskin the same building, the last one loaded wins and both show a note in the Add-ons list.
Internal names of every building are in GameData/ConstellationColonies/PluginData/BuildingReference.txt, which the game writes each time the Space Center loads, along with each building's size and attach nodes. The Example Model Pack shows a working pack.
Colony tech tree (COLONY_TECH)
Each colony will have its own tech tree, separate from the save's. Colony research isn't in the game yet: for now the colony bar's Tech icon opens a preview where every node shows as locked, and nothing about it is saved. Add-ons can already add nodes, so their trees are ready when research arrives. The Core's nodes and every add-on's join into one tree, and a node can name any installed node as a parent: the Core's, another add-on's or its own. Needs Core 0.26.
COLONY_TECH
{
id = MyPack_Glassmaking // unique: start it with your add-on's name
title = Glassmaking
description = Melt local ore into glass.
parent = materialFabrication // repeat the line for more than one parent
position = 2, 3 // column, row. Leave it out to place it automatically
icon = MyPack/Icons/glass // optional
}
| Key | Default | What it does |
|---|---|---|
| id | required | The node's unique name. Other nodes use it as a parent, and buildings use it in colonyTech. |
| title | the id | Shown on the node. |
| description | none | Shown when the node is picked. |
| parent | none | A node that comes before this one. A node without parents is a starting node. |
| position | automatic | Grid column and row. Column 0 is the left and row 0 the top; the Core uses columns 0 to 3 and rows 0 to 2. Without it, the node goes one column right of its furthest parent, in the first free row. |
| icon | none | A texture shown on the node, as a GameData path without the extension. |
The Core's nodes are in GameData/ConstellationColonies/Tech/ColonyTech.cfg: basicHabitation, hydroponics, closedLoopLifeSupport, basicIndustry, materialFabrication, advancedConstruction and selfSufficientColony. The game checks the tree when it loads and lists problems in the Add-ons list: an id used twice (the first one wins), a parent that doesn't exist (the link is dropped), and parents that loop back to the node (one link is ignored).
The same window has a Save Tech Tree tab: the save's own tech tree, read-only, showing what's researched and what can be researched next. It's locked in Sandbox games, which have no tech tree.
Recycling (COLONY_RECYCLING)
Players can recycle a landed, uncrewed vessel at a colony from the colony bar's Vessels menu (Recycle vessels). It uses only KSP's own data, so parts and resources from any mod work without extra settings:
- Every resource the vessel carries that the colony also has (by name: ElectricCharge, LiquidFuel, Oxidizer, MonoPropellant, Ore, and Food, Water or Oxygen from life support mods) comes back as itself.
- Every other resource becomes Material Kits by its mass (its KSP density).
- The vessel's dry mass, including anything in part inventories, becomes Material Kits too.
- It all goes into the colony's buildings that have room. The confirmation shows what fits; the rest is lost.
The rates are one node in the Core's Resources/ColonyResources.cfg. A Module Manager patch or an add-on can change them:
| Key | Default | What it does |
|---|---|---|
| kitsPerTonne | 40 | Material Kits per tonne of dry mass, and per tonne of resources the colony doesn't have. |
| resourceShare | 1 | Share of matching resources recovered, from 0 to 1. |
| reach | 50 | How far outside the colony's zone, in metres, a vessel can be and still be recycled. |
Plugin hooks (add-ons with their own DLL)
Most add-ons are config files only. Features that need code, like a launchpad that builds vessels at a colony or a bay that recovers them, can be plugin add-ons: their own folder in GameData with a .dll that builds on Constellation Colonies through its plugin API. Core 0.27 has the hooks such a plugin needs, but no launchpad or recovery feature of its own. The API's version is ColonyAPI.ApiVersion (1 in Core 0.27). It only grows: a plugin written for version 1 keeps working with later Cores. The Add-ons list and KSP.log show it.
In the config: tags and spawn points
COLONY_STRUCTURE
{
name = MyPads_LaunchPad
...
tag = launchpad // capability tags: plugins find buildings by them
SPAWN_POINT
{
name = pad // unique within the building
position = 0, 1, 0 // share of the half-size, like attach nodes: middle of the top
direction = 0, 0, 1 // the way a vessel there would face
}
}
Positions use the building's own axes, the same way as attach nodes. A COLONY_RESKIN with SPAWN_POINT nodes replaces the building's points, so a model pack can move them to fit its model. Core only stores and reports spawn points; it never puts a vessel there.
In the DLL: the API
Reference GameData/ConstellationColonies/Plugins/ConstellationColonies.dll (the .xml next to it gives your editor the descriptions), and add [assembly: KSPAssemblyDependency("ConstellationColonies", 0, 27)] so KSP loads your plugin after Core and skips it when Core is too old. Use only these three classes; the others can change between versions.
| Class | What it gives you |
|---|---|
| ColonyAPI | Colonies: Colonies, GetColony(id), ColonyAt, ColonyNear(body, lat, lon, margin), ColonyNear(vessel, margin), ColonyOf(building). Buildings: Buildings(colony), BuildingsNamed, BuildingsTagged(colony, tag), BuildingsTagged(tag), DefinitionOf, HasTag, Efficiency. Resources: Amount and Capacity per colony or building, TrySpend (all or nothing), Add (returns what fitted). Costs: Shortfall, TryPay(colony, resources, funds, reason), BuildShortfall, CostOf. Places: TryGetPose, SpawnPoints(building), TryGetSpawnPoint (world position and rotation, plus latitude, longitude and altitude). Crew: CrewOf, CrewCapacity. |
| ColonyEvents | ColonyFounded, ColonyAbandoning, ColonyAbandoned, BuildingPlaced, BuildingRemoved, StructureReskinned, ResourcesChanged (at most once per colony per update, about twice a second), CrewMoved, VesselRecycled, and two you can cancel: BeforeBuildingRemove and BeforeRecycle (set Cancel and a Reason the player sees, like "a vessel is on the pad"). |
| ColonyUI | AddColonySection(id, title, draw, visible): your own foldable section in the colony bar's Plugins menu (the icon appears when a plugin adds a section). AddBuildingAction(id, label, appliesTo, onClick, unavailable): a button in the menu the player gets by right-clicking a building. AddInfoLine(id, text): a line in the building hover panel. Remove(id). |
Handlers and callbacks run on Unity's main thread. One that throws is logged and skipped, so a broken plugin can't break colonies. With the Infinite Colony Resources cheat on, TrySpend and TryPay succeed without taking anything, the same as building.
A minimal plugin
This finds every launchpad-tagged building and logs its spawn points. It's C# 5, like KSP 1.12 mods.
using ConstellationColonies;
using UnityEngine;
[assembly: KSPAssemblyDependency("ConstellationColonies", 0, 27)]
[KSPAddon(KSPAddon.Startup.Flight, false)]
public class PadLogger : MonoBehaviour
{
void Start()
{
if (ColonyAPI.ApiVersion < 1 || !ColonyAPI.Ready) return;
foreach (PlacedObjectData pad in ColonyAPI.BuildingsTagged("launchpad"))
foreach (ColonySpawnPoint p in ColonyAPI.SpawnPoints(pad))
Debug.Log("[PadLogger] " + ColonyAPI.ColonyOf(pad).Name + " " + p.Name +
" at " + p.Latitude + ", " + p.Longitude + ", " + p.Altitude + " m");
}
}
Examples/ColonyExamplePlugin is a complete one, as source: a pretend pad with a launchpad tag and a spawn point, and a plugin that uses every kind of hook (an info line, a right-click action, a section in the Plugins menu and events). Set KSP to your KSP folder and run Build.bat to build it with the C# compiler that comes with Windows, then copy its GameData/ColonyExamplePlugin folder into GameData.
How the colony uses your numbers
- Time. Rates are per game hour. A colony keeps running while players are away or time-warping; the time is caught up when they come back, in steps of up to an hour.
- Each building has its own store. A producer holds
bufferhours of each input and output; a storage building holds itsSTORAGE. Buildings share what they hold only when they're connected: snapped together (directly or through the same plates), or joined by a cable (physical resources) or a wire (electricity). A drill that isn't connected to anything stops when its own buffer is full. - Shortages. A building short of an input runs at the share it can afford, and the colony bar's Structures menu says what it's short of. A building whose outputs are all full stops, so it doesn't waste inputs.
- Order. Buildings with no inputs run first, then the rest by
priority, lowest first. - Sunlight. A building with
solar = truegets its full rates with the sun overhead, less as the sun gets lower, and nothing at night. Over time away it averages out to about a third of the full rate at the equator, less towards the poles. - Science and funds.
sciencePerHourandfundsPerHourscale the same way as outputs: with crew, sunlight and shortages. They're saved with the colony until there's a whole point of science or 100 funds to pay out. - Alerts. When a running building can't get enough of a resource marked
alert = true, an on-screen alert names the colony and the resource, once until it recovers. - Housing. With
crewCapacity, rates scale with how full the building is: a 4-kerbal habitat with 2 kerbals uses half its listed rates. - Costs. Building takes the full
COSTfrom any of the colony's buildings, connected or not. Undo gives all of it back; removing a building gives half back. Players can't place a building they can't afford.
Models and icons
Using an existing part
The quickest look is any part already installed: set part and adjust scale and rotation. Only the model is copied. The building gets one box collider around it, so it can be stood on, snapped to and removed like any other.
Your own model
- Make the model in Unity with KSP Part Tools and export a
.mu, exactly as for a part. Put the.muand its textures in your folder, for exampleModels/. - Set
model = YourFolder/Models/name, without.mu. Its centre doesn't matter: the building is centred on the model's bounding box and stood on the ground. - Keep a
parttoo if you like. It's used if the model can't be loaded.
Icons
Put a PNG (64×64 works well) in your folder and set icon = YourFolder/Icons/name, without the extension. It's shown untinted. Without one, the building gets the shared building icon.
Attach nodes
Placed buildings show free attach nodes as green dots in Construction mode, and new parts join them node to node, like in the VAB. Every building gets a node on its top and bottom and one on each side, which suits box-shaped models. Add your own with one node line each:
node = 0, 1, 0, 0, 1, 0 // top centre, facing up
node = 1, -0.8, 0, 1, 0, 0 // right side, low down, facing right
The first three numbers are the position as a share of the building's half-size, from -1 to 1 on each axis (x is left to right, y is bottom to top, z is back to front). The last three are the direction it faces. If a building has any node lines, it has only those nodes.
Names and compatibility
- Structure names must be unique across every add-on. Start them with your add-on's name:
KerbalFarms_Silo, notSilo. If two add-ons use the same name, only the first one loaded is used, and the other add-on shows a warning. - Never rename a structure after release. Players' games save buildings by name. A renamed or deleted structure turns their buildings into grey boxes. Change its
titleinstead. - Resource names. Use an existing resource when one fits. A new resource with the same name as a KSP resource (stock, or from a resource pack like the Community Resource Pack) links up with it, so vessels can carry it. Two add-ons that define the same colony resource name clash: the second is skipped with a warning.
- The Core's folder. Never put your files in
GameData/ConstellationColonies; Core updates replace that folder. - Module Manager. The game database is read after Module Manager runs, so
@COLONY_STRUCTURE[Workshop] { @funds = 3000 }style patches work if Module Manager is installed.
Testing and fixing
- Check before starting KSP. The app's Check & Publish tab catches most mistakes: unknown parts, resources nothing defines, duplicate names, missing model files and more. Without the app, read your file against the reference above.
- Look at the Add-ons list. In the colony bar or the Tracking Station's Colonies window, open Add-ons. Each add-on shows what it added and lists any problem found when the game loaded it.
- Read KSP.log. In the KSP folder, search for
[ConstellationColonies]. You'll find a line per add-on, likeAdd-on Kerbal Farms v1.0 (GameData/KerbalFarms): 3 structures, 1 resources, followed by any warnings.
| You see | Why, and what to do |
|---|---|
| Add-on not listed | KSP didn't find any COLONY_ nodes in the folder. Check the folder is directly in GameData, the file ends in .cfg, and the node names are spelled exactly, in capitals. |
| A grey box | No model was found. Check the part name (_ becomes .) or the model path (no .mu, starts with your folder name). |
| "Short of X" forever | Nothing connected to it makes X, or X isn't a defined resource. Connect it with a cable or wire, or snap it to a building that has X. |
| "Storage full" | Its outputs have nowhere to go. Connect it to storage. |
| "…was skipped" | Another add-on uses the same structure or resource name. Rename yours (before release). |
| "Needs Constellation Colonies X or newer" | The player's Core is older than your minCoreVersion. |
Sharing your add-on
- Zip it so the zip contains
GameData/YourFolder/.... The app's Export .zip does this. Players unzip it into their KSP folder. - Raise
versionwith every release, and setminCoreVersionto the Core version you tested with. - Say in your release notes that it needs Constellation Colonies, which version, and anything else it needs (a parts mod, if your buildings borrow its parts).
- If you borrow models from another mod's parts, that mod must be installed. Players without it get grey boxes. Stock parts are always there.
- Include a licence. Releasing on SpaceDock or CurseForge needs one.
App reference
| Where | What it does |
|---|---|
| 1. Add-on | Title, version, author, needed Core version and description: the COLONY_ADDON node. |
| 2. Structures | The buildings. New... starts from a template, or from a copy of any installed building (the Core's or another add-on's) under a new name. Duplicate copies the selected one. Drop-downs list installed parts, resources, categories, and the models and icons in your folder; you can also type any value. Part, building and tech settings also have a ... button that opens a searchable list. The panel under the settings shows what the building uses and makes per hour and per Kerbin day, what it costs, and its own errors and warnings. |
| 3. Resources | New resources. Colours use a colour picker. |
| 4. Reskins | The model pack part: pick an installed building from the list and give it your model, a part, an icon, a scale, a rotation or attach nodes. |
| 5. Tech Tree | Colony tech nodes. New adds a node after the selected one; Duplicate copies it. Parents have a ... button with a searchable, tickable list of every installed node. The preview below shows the whole colony tree, with the Core's nodes grey, other add-ons' blue and yours green; click an empty spot to move the selected node there. Buildings can pick a node under Colony tech. |
| Plugin hooks | On the Structures tab, the 6. Plugin hooks settings: tags (with a list of tags installed buildings use) and spawn points. The panel under the settings lists them, and the check catches bad tags and spawn points. |
| 6. Check & Publish | The check (errors, warnings, tips), the exact file Save writes, and Save, Install and Export buttons. The tab's title keeps a live count, for example (2 errors) or (ready). |
| Keyboard | Ctrl+S save, Ctrl+O open, Ctrl+N new, F5 check, Ctrl+D duplicate the selected building or tech node, Delete removes the selected list item. In pickers, type to filter and press Enter. File > Open recent lists the last 8 add-ons. |
| File > Open add-on folder | Opens any add-on folder, including hand-written ones. If its definitions are in other files, Save moves them into ColonyAddon.cfg and renames the old files to .cfg.disabled, so nothing loads twice. Nothing is deleted. |
| Install into KSP | Copies the folder into GameData. Not needed when you made the add-on in GameData. |
| Export .zip | Saves, then makes YourFolder-version.zip containing GameData/YourFolder, leaving out .disabled files. |
| Tools > Rescan GameData | Re-reads installed parts and add-ons, for example after installing a parts mod. |
| Command line | ColonyAddonCreator.exe --check "path\to\YourFolder" checks an add-on without opening the window. The result is written to ColonyAddonCreator-check.txt in your temp folder, and the exit code is 1 if there are errors. --open "folder" opens a folder on start. |
| Settings | The KSP folder and the last add-on are kept in %APPDATA%\ColonyAddonCreator\settings.txt. |
The examples
Examples/ColonyExampleModelPack is a small model pack. It gives the Workshop the Mobile Processing Lab's look and the Ore Silo a Rockomax tank with its own attach nodes, using stock parts so it works without any model files. Its comments show where your own model and icon lines go.
Examples/ColonyExamplePack is a complete add-on, written by hand and fully commented. It adds a Glass resource, a Glass Kiln that makes glass from ore and power, a Dome Farm that costs glass to build and grows food, a Glass Store, and a Glassmaking colony tech node after the Core's Material Fabrication (the Dome Farm names it as its colonyTech). Copy the folder into GameData to try it, or open it in the app to see how each setting looks there.
COLONY_STRUCTURE
{
name = ColonyExamplePack_DomeFarm
title = Dome Farm
category = Life support
description = A glass dome that grows food from water and light.
part = Large.Crewed.Lab
scale = 1.5
priority = 12
INPUT { ... Water 2/h ... } INPUT { ... ElectricCharge 4/h ... }
OUTPUT { ... Food 3/h ... }
COST { ... MaterialKits 60 ... } COST { ... Glass 40 ... }
funds = 8000
}