Pre-Warp Age Modding Guide
Create your first mod, understand how it works, and add your own technologies, buildings, and events to the game.
Find a word in the reference
1. Where to start
This guide describes Pre-Warp Age 1.0.24 beta. Choose the released 1.0.23 guide in the version selector when modding that version.
A mod lives in its own folder. It can contain a new exploration cost, your own technology, or an entire corporation. Your text, images, and sounds go there too. You do not need to program in C#: mod rules are written in JSON text files.
Start with ‘Your first mod’: you will create two files and check the change in the game. ‘Language basics’ then explains each part of a statement, and ‘Recipes’ adds new content. The detailed reference is at the end of the guide. Use it to look up a particular rule once you know what you want to make.
The language of game rules is called Nexus. It combines existing capabilities: for example, a technology can increase production, unlock a building, or provide income. If the engine does not support your intended mechanic at all, a JSON mod alone will not be enough. The game itself will need changes.
Mods are available in the full desktop game. They are disabled in the demo. Official achievements are disabled while mods are enabled or Vanilla files are modified.
2. Your first mod
Let us make exploration cheaper by setting its base cost to one Mineral. We need only two files, with no images or translations yet. To try a ready-made version first, download the Quick Survey ZIP at the top of the page.
From the main menu, open Play → Mods → Mods folder. This always opens the same Modding folder, regardless of the selected mod. Open Local inside it, create a quick-survey folder, and a Logic folder inside that. You should have this structure:
Modding/
Local/
quick-survey/
modinfo.json
Logic/
Explore.jsonThe first file, quick-survey/modinfo.json, contains the mod's name and version. Copy this entire block into it:
{
"id": "quick-survey",
"version": "1.0.0",
"title": "Quick Survey",
"description": "Reduces the base exploration cost to one Mineral."
}The second file, quick-survey/Logic/Explore.json, changes the cost. Its contents are:
[
["Explore", "Cost.Minerals", 1]
]The inner line reads: ‘The base cost of exploration, Explore, in Minerals is 1.’ The outer square brackets collect the file's statements into a list. There is just one statement for now. We will look at adding more below.
- Save both files as UTF-8 JSON. If you unpack the ready-made archive, check that modinfo.json is directly inside Modding/Local/quick-survey, with no extra folder level.
- Return to the Mods screen and enable Quick Survey. Close the screen: the game will reread the files and refresh the new-game menu.
- Create a new game. Choose the G-type system scenario, Casual mode, and Miners corporation. Skip the Solar System tutorial for now: it limits the actions available.
- Select an unexplored body and hover over the exploration action. Check the cost in its tooltip. The mod sets a base of 1. Remoteness surcharges and other active modifiers can increase or decrease the final cost.
Now replace 1 with 2 in Explore.json. Open and close the Mods screen and create a new game: the base cost will be two Minerals. For an exact comparison, use the same seed, scenario, corporation, and body. The base cost changes, while the distance to the body stays the same.
An existing game continues to use the old data even after the mod files change. Start again also keeps the current game's content set. To test an edit, create a new game from the refreshed menu. If the game reports a file error, fix it first, then open and close the Mods screen again.
3. Language basics
3.1. Subject, predicate, and value
["Explore", "Cost.Minerals", 1]Let us examine the exploration cost we already know. It has three parts: Explore is exploration, Cost.Minerals is its cost in Minerals, and 1 is the new base cost. The whole line means: ‘Exploration costs one Mineral before discounts and surcharges.’ A statement with three parts is called a triplet.
- Subject - what the statement is about: Explore.
- Predicate - the property being set: Cost.Minerals.
- Value - how much it is: 1. This third part is also called the object of a triplet in the literature.
The subject and predicate are always strings. The value can be a number, a string, or true/false. A string may be text, a translation key, an option name, or an entity reference. The particular field determines its meaning, rather than the quotation marks. Identifiers are case-sensitive: Tech and tech are different words.
A single statement and a complete file are different things. Above we looked at one statement. Here is a complete Logic/Explore.json containing it, ready to copy:
[
["Explore", "Cost.Minerals", 1]
]Now let us also change the base cost of an Outpost. Replace the contents of the same file with the following. It now contains two statements:
[
["Explore", "Cost.Minerals", 1],
["Outpost", "Cost.Minerals", 8]
]Exploration now has a base cost of 1, and an Outpost of 8. Notice the comma at the end of the first statement: it separates it from the second. There is no comma after the second statement. The top and bottom brackets enclose the file's entire list of statements.
Later in the reference you will see short fragments containing only new statements, without the rest of the file. The text before the code explains their purpose. Complete files, like the two examples above, are always shown in full.
The game already knows Explore, Cost, Is, and Tech. You choose your own technology's name, such as SurveyScience. You can use a new name on the left to describe an object, but cannot arbitrarily put it in the predicate position. The Predicate article explains how to declare your own words. Existing properties are enough for your first mods.
For names in your first mods, Latin letters and, when needed, digits are convenient: SurveyScience, MyMiner2. Choose unique names without spaces, distinct from existing ones. Dots, underscores, and colons have special purposes: a dot separates a part of a definition, underscores are used in instance names, and colons in map cell addresses. Do not put them in a standalone definition's name. Latin letters are also convenient for translation keys. Write player-facing names in English in the dictionary.
3.2. Definitions, instances, and inheritance
Mod files usually describe a kind of object: a technology, corporation, building, or world. This is a definition. During a game, the engine creates specific objects from it, called instances. For example, a technology's description is shared, while each player has their own research state. The game assigns instance names. Do not copy an incidental name such as SurveyScience_0 from a save into a mod.
[
["MyMiner", "Is", "CorpMiner"],
["MyMiner", "Name", "MyMinerName"]
]This fragment describes a new corporation, MyMiner, based on the existing CorpMiner. The first line gives it the Miners' properties, and the second changes its name. Receiving another definition's properties is called inheritance. Unspecified properties stay as they are in CorpMiner. An explicit value of your own, such as Name, replaces the inherited one.
Now let us take properties from two existing corporations. In this separate example, MyHybrid has no Name of its own. The complete Logic/MyHybrid.json is:
[
["MyHybrid", "Is", "CorpMiner"],
["MyHybrid", "Is", "CorpColonist"]
]Properties are inherited from both parents. However, both parents set Name. For a conflict like this, the first in the list wins: here the name will be the Miners' name. Swap the lines to give the Colonists' Name priority. Adding a Name directly to MyHybrid would override both parents.
Inheritance is prepared when a game is created. Start a new game after editing the file. Changing Is on a live object does not copy all its properties again. Inheritance chains must not form loops: you cannot make MyMiner a child of CorpMiner and CorpMiner a child of MyMiner.
We used Is to receive a parent's properties. The separate Type field does a different job: it selects the type label in the tooltip. The ‘Type - an object's type label’ article shows an example where the choice changes the result. Changing Type alone does not inherit a parent's properties.
3.3. Compound predicates and sub-subjects
Dots occur in different places in a statement. We will first look at a dot in a property, then in the name of the object being described. These are two different cases.
In the familiar exploration cost, Cost means cost and Minerals specifies the resource used to pay:
["Explore", "Cost.Minerals", 1]Cost.Minerals occupies the entire second position of the triplet. It is a compound predicate: one property written as several words separated by dots. A cost in Energy would use Cost.Energy. The dot specifies which cost we are describing.
A sub-subject isolates one of a subject's behaviors from its others. For example, a corporation might receive one bonus when it has a large stock of money and another regardless of that stock. Each behavior has its own conditions and effects. A condition on one part must not enable or disable its neighbor. Sub-subjects let us describe one subject's behavior in different situations and states.
Let us see how to write this. The Magnates corporation, CorpMagnate, earns interest on its stock of Credits. This is described in the CorpMagnate.Interest sub-subject: CorpMagnate is the subject and Interest names a separate behavior. Interest is an author-chosen name. The word itself neither pays interest nor sets a condition.
First specify which quantity this part uses to calculate income. Here is one statement from the corporation's definition:
["CorpMagnate.Interest", "Per", "Credits"]Per Credits means ‘for each Credit in the stock of this corporation's player.’ No income rate is set yet. This line selects a quantity but pays nothing by itself.
The next statement sets the income rate to 0.03 Credits per turn for each unit of the selected quantity:
["CorpMagnate.Interest", "Adds.Income.Credits", 0.03]Adds.Income.Credits means an addition to Credit income per turn. Together, the two statements give the interest rule. Read them as one part of the definition:
["CorpMagnate.Interest", "Per", "Credits"],
["CorpMagnate.Interest", "Adds.Income.Credits", 0.03]With 100 Credits in stock, this part adds 100 × 0.03 = 3 Credits of income per turn before other modifiers. Both lines belong to CorpMagnate.Interest. There is no condition yet: interest is calculated at any stock level. A sub-subject does not have to be conditional.
Now change the rule for this exercise: pay interest only when the stock is at least 100 Credits. Add the condition specifically to Interest:
["CorpMagnate.Interest", "Requires.Has.Credits.Min", 100]Requires.Has.Credits.Min 100 checks that the player has at least 100 Credits in stock. At 50 this part gives no income, at 100 it gives 3, and at 200 it gives 6. The condition applies to the Interest part, rather than to every ability of the corporation.
Add a second behavior: a fixed payment of 2 Credits per turn. Give it a different sub-subject, Support:
["CorpMagnate.Support", "Adds.Income.Credits", 2]Support has neither a condition nor a per-Credit calculation: it is a fixed +2. Interest's condition and Per do not apply to it. At a stock of 50, Support still pays 2 even though Interest is inactive. At 100 both parts work: 3 Credits of interest plus the fixed payment of 2 add 5 Credits of income per turn. Together the statements look like this:
["CorpMagnate.Interest", "Per", "Credits"],
["CorpMagnate.Interest", "Adds.Income.Credits", 0.03],
["CorpMagnate.Interest", "Requires.Has.Credits.Min", 100],
["CorpMagnate.Support", "Adds.Income.Credits", 2]Interest and Support are names chosen by the author. Each part gets its meaning from its Requires, Per, and Adds. Distinguish these language words from author-chosen names. The Is article separately explains how existing parts are added and replaced.
Compare the two dot positions: in Cost.Minerals the dot is in the second element and qualifies the property. In CorpMagnate.Interest it is in the first element and separates the part's name from the corporation's name. Following a related object through a dot is another case. We will examine it separately using an owner condition in ‘Condition sources and parameter adjustments’. An arbitrary chain of familiar words does not create a new rule.
3.4. Roles, resources, and effects
Let us create a Scientific Survey technology. First declare that SurveyScience is a technology. SurveyScience is our name, and Tech is a category the game knows:
["SurveyScience", "Is", "Tech"]Is Tech gives the object technology behavior: it can be researched. We will call a category with behavior like this a role. Building means a building, Event an event, and Corporation a corporation. The Is article lists existing categories and definitions.
Now include the technology in the player's tree:
["Player", "Has", "SurveyScience"]Player Has SurveyScience means the technology belongs to the player's set. When a game is created, it will be in the tree but not yet researched. Has does not award the bonus here.
Set the bonus itself: one Science per turn after research:
["SurveyScience", "Adds.Income.Science", 1]Income.Science is Science income per turn. Adds increases it by the stated number. The player who researches SurveyScience receives this addition. If their income was 2, it becomes 3 after research, provided nothing else changes. Replacing 1 with 2 gives an addition of 2 per turn.
Give the technology a name:
["SurveyScience", "Name", "SurveyScienceName"]Name specifies a string key. The game uses SurveyScienceName to find the English name in Text/enUS.json. This dictionary appears below with the complete Logic file. SurveyScience identifies the technology itself, while SurveyScienceName identifies the string for its name.
Use the existing flask icon for its picture:
["SurveyScience", "Icon", "flask"]Icon flask uses an existing game image. This example needs no custom PNG. Finally, specify the first tier of the tree:
["SurveyScience", "Tier", 1]Tier controls the node's position. The number 1 puts it in the first tier. This line sets neither a cost nor a prerequisite technology.
Now put those lines together. In the mod folder from the first example, create Logic/Technology.json. Its full contents are:
[
["SurveyScience", "Is", "Tech"],
["SurveyScience", "Name", "SurveyScienceName"],
["SurveyScience", "Tier", 1],
["SurveyScience", "Icon", "flask"],
["SurveyScience", "Adds.Income.Science", 1],
["Player", "Has", "SurveyScience"]
]Create a Text folder in the mod's root, and an enUS.json file inside it. If the file already exists, add the key to its existing dictionary. JSON cannot contain a second outer object. A new file contains exactly this:
{
"SurveyScienceName": "Scientific Survey"
}Open and close the Mods screen, create a new game, and open Technologies. Find Scientific Survey in the first tier. Science income is unchanged before research and increases by one per turn afterward. Research settings in the base game determine the cost, so the example does not set it. Replace 1 with 2 in Adds.Income.Science and start a new game after reloading the mod to receive two per turn instead.
Here we changed income per turn. The Income, Count, and Production articles compare it with stock and production by one Worker. Each quantity has its own example.
The building recipe below uses Income.Science without Adds. On a completed building, this is its own income, which the game includes in its owner's economy. On the technology we wrote Adds.Income.Science: an addition to the player's income after research. These statements do different jobs. Removing Adds from the technology or adding it to the building will not preserve the result.
Use Logic for your mod's rules and initial data. Do not copy the contents of a saved game into it: the engine stores current stocks, cards already drawn, action results, and other changes during play itself. The internal records needed to continue a game are not mod settings.
4. Recipes
The following are independent changes. Choose a recipe and add its files to the mod from the first example. All paths are relative to the mod folder. Complete files include their outer brackets. Individual statements are marked as fragments. Names for the new objects are collected in ‘Example text’. The numbers here are for teaching, rather than balance recommendations.
4.1. Costs and balance
Keep two costs in one file. Replace the entire contents of Logic/Explore.json with this array. No new filename is needed:
[
["Explore", "Cost.Minerals", 1],
["Outpost", "Cost.Minerals", 8]
]The base exploration cost becomes one Mineral, and the Outpost base cost becomes eight. There is a comma between statements but none after the last one. The Outpost's other properties, including its requirements and duration, stay unchanged. Active discounts and surcharges still affect the final cost. Check it in an exploration or Outpost construction tooltip in a new game.
4.2. A corporation
Add a separate corporation with the Miners' abilities and its own name. Create Logic/Corporation.json:
[
["MyMiner", "Is", "CorpMiner"],
["MyMiner", "Name", "MyMinerName"],
["MyMiner", "Description", "MyMinerDesc"],
["MyMiner", "Order", 10]
]MyMiner is our new definition's name. CorpMiner is the existing Miners definition. Through Is, the new corporation receives their abilities and image. Name and Description replace its name and description. Order affects its card's position in the list. Add MyMinerName and MyMinerDesc from ‘Example text’ to Text/enUS.json.
Reload the mod through the Mods screen and begin creating a new game. My Miners will appear among the corporations, alongside the original Miners. Select the new card: it should show the inherited abilities. To give a corporation its own set of abilities, use Is Corporation instead of Is CorpMiner and specify the effects separately.
4.3. A technology
In ‘Roles, resources, and effects’ we added SurveyScience without a predecessor. Now make it follow the existing OutpostConstruction technology, named Outpost Construction in the English interface. Replace the entire Logic/Technology.json from that example:
[
["SurveyScience", "Is", "Tech"],
["SurveyScience", "Name", "SurveyScienceName"],
["SurveyScience", "Tier", 2],
["SurveyScience", "Icon", "flask"],
["SurveyScience", "Requires", "OutpostConstruction"],
["SurveyScience", "Adds.Income.Science", 1],
["Player", "Has", "SurveyScience"]
]Keep the same name dictionary. Requires prevents research until OutpostConstruction is researched. Tier 2 moves the node to the second tier. Tier alone creates no such restriction. Reload the mod and start a new game. Scientific Survey is unavailable before its prerequisite is researched and becomes available afterward. Researching Scientific Survey itself increases Science income by one per turn. Tier and Order control placement, rather than research cost.
4.4. A building
Create a scientific Outpost variant. It uses normal Outpost construction requirements but also produces Science. The complete Logic/Building.json is:
[
["SurveyOutpost", "Is", "Outpost"],
["SurveyOutpost", "Name", "SurveyOutpostName"],
["SurveyOutpost", "Description", "SurveyOutpostDesc"],
["SurveyOutpost", "Income.Science", 1]
]Is Outpost inherits the building role, technology and location requirements, cost, duration, and upkeep of an Outpost. Its own Income.Science adds Science income to the completed building. Add SurveyOutpostName and SurveyOutpostDesc to Text/enUS.json from ‘Example text’.
In a new game, research Outpost Construction (OutpostConstruction) and explore a suitable rocky world where a normal Outpost is allowed. Select it and find the Scientific Outpost construction action. Build it if you have enough resources. Construction is instant in Casual. In a mode with timed tasks, wait for completion. The building adds one Science of income per turn. Its Energy upkeep is the same as a normal Outpost's. Running out of Energy can disrupt its operation.
For a definition made from scratch, Is Building alone is insufficient. You must also specify where to build, what is required, what to pay, and what is created. The ‘Building, Project, Upgrade’ reference article covers these questions. This recipe inherits those details from Outpost.
4.5. An event
Create an event that adds Minerals to the player's stock once, and test it on turn two. First set the amount of Minerals, then schedule the event. After testing, include it in random selection. Follow the steps in order.
The event and its Mineral reward
Call the event SurveyGift. One statement declares that it is an event:
["SurveyGift", "Is", "Event"]As with a technology, Is sets its role. However, Event means an occurrence with a result, rather than a researchable node. Now set its result:
["SurveyGift", "Adds.Minerals.Scaled", 1]This line sets a one-time Mineral reward. Scaled uses the selected mode's scale; 1 sets its coefficient. This recipe uses Casual, where population and research determine the scale. With 10 Workers and no completed technologies, the scale is 10 and the reward is 10 × 1 = 10 Minerals. A stock of 30 becomes 40, ignoring other changes during the turn.
Replace only the coefficient 1 with 2. In the same situation the event adds 10 × 2 = 20 Minerals. This is a one-time reward. Later turns do not repeat it automatically. We will examine the full formula including technologies at the end of the recipe.
Name, Description, and Icon are already familiar from the technology. Put the event definition into a complete Logic/Event.json:
[
["SurveyGift", "Is", "Event"],
["SurveyGift", "Name", "SurveyGiftName"],
["SurveyGift", "Description", "SurveyGiftDesc"],
["SurveyGift", "Icon", "ore_iron"],
["SurveyGift", "Adds.Minerals.Scaled", 1]
]Add SurveyGiftName and SurveyGiftDesc from ‘Example text’ to Text/enUS.json. The event is now described, but no trigger time is set yet. Enabling the mod alone does not award the reward.
Triggering on a known turn
Game events are drawn from groups. Create a test group, SurveyGiftCheck:
["SurveyGiftCheck", "Is", "Events"]Events is a group from which the game selects an event. Event from the previous step is the event itself. Put just one card in our group:
["SurveyGiftCheck", "Deck.SurveyGift", 1]Deck.SurveyGift includes one SurveyGift card. There are no other cards in the group, so this is the card that will be drawn. All that remains is scheduling the draw:
["SurveyGiftCheck", "Turn.Starts", 2]Turn.Starts 2 means the second turn of the game. It is not a two-turn delay from installing the mod. The three statements form a complete Logic/EventCheck.json:
[
["SurveyGiftCheck", "Is", "Events"],
["SurveyGiftCheck", "Deck.SurveyGift", 1],
["SurveyGiftCheck", "Turn.Starts", 2]
]The game finds these groups through Is Events. No extra inclusion link is needed. Reload the mod and start a new G-type system in Casual. End the first turn: Extra Minerals appears on turn two and increases your stock by the reward amount. With 10 Workers, no completed technologies, and coefficient 1, that is 10 Minerals. Different population or research counts change the amount. This test group does not award the reward again on turn three.
Choosing among several cards
Now change only the familiar group's contents. Use the base game's existing SuppliesScience event: it adds Science to the player's stock once. Adding its card to EventCheck.json gives:
[
["SurveyGiftCheck", "Is", "Events"],
["SurveyGiftCheck", "Deck.SurveyGift", 1],
["SurveyGiftCheck", "Deck.SuppliesScience", 1],
["SurveyGiftCheck", "Turn.Starts", 2]
]The first draw chooses one of two events: SurveyGift with a Mineral reward, or SuppliesScience with a Science reward. Their chances are equal because there is one copy of each card. A single draw does not trigger both events.
Change only the number for Deck.SurveyGift from 1 to 2. The deck now holds two SurveyGift cards and one SuppliesScience card. The first draw has a 2-in-3 chance of the Mineral event. The amount of Minerals awarded stays the same. Adds.Minerals.Scaled in Event.json controls it, rather than the card count.
For normal play, replace the turn-two test with inclusion in the existing RandomEvents group. The complete separate Logic/RandomGift.json is:
[
["RandomEvents", "Deck.SurveyGift", 1]
]Then remove EventCheck.json from Logic, reload the mod, and create a new game. Keep Event.json and RandomGift.json. SurveyGift now participates in normal random selection with the other events and need not appear on turn two. The event definition and reward remain unchanged.
How research changes the Mineral reward
We began with a player who had no completed technologies. Now look at what changes after research. Keep the reward statement unchanged:
["SurveyGift", "Adds.Minerals.Scaled", 1]Casual enables Rule.ScaledByPlayer: scale = population × (1 + completed technology count × Rule.ScaledByPlayer.TechMod). Population 100, ten completed technologies and coefficient 0.04 give scale 140. Scaled 1 awards 140 Minerals. Classic and Hardcore enable Rule.ScaledByTurn, so event rewards and difficulty depend on the turn rather than the economy. The scale is fixed when the event appears. The Rule reference below explains the turn formula and settings.
The mod author sets the reward coefficient; the game mode selects the scale source. For a guaranteed test, use a group containing only the SurveyGift card. Fixed rewards using Adds.Minerals.Count are used in action and choice outcomes. Putting that line alone on a standalone Event does not create a Mineral-awarding event. The EventChoice article contains a complete choice example.
4.6. A scenario
Make your own G-type system variant. First choose an existing basis:
["SurveySystem", "Is", "ScenarioG"]SurveySystem receives ScenarioG's parameters. But defining a card and creating a star are separate tasks. The actual map center needs its own statement:
["SurveySystem", "Orbit.Center", "ClassG"]This selects ClassG, a yellow star. Replacing only ClassG with ClassK puts an orange K star at the center. Parameters inherited from ScenarioG do not automatically become ScenarioK parameters when you make this change.
Now add the familiar card name and description. Order sets its position in the list. The complete Logic/Scenario.json is:
[
["SurveySystem", "Is", "ScenarioG"],
["SurveySystem", "Name", "SurveySystemName"],
["SurveySystem", "Description", "SurveySystemDesc"],
["SurveySystem", "Orbit.Center", "ClassG"],
["SurveySystem", "Order", 10]
]SurveySystem is the new scenario's name. It inherits ScenarioG's parameters, while Name and Description give its card new labels. Add SurveySystemName and SurveySystemDesc to Text/enUS.json. After reloading the mod, find My Yellow Star when choosing a scenario for a new game. Selecting it should place a G-class star at the center of the system.
Compare two edits. Replacing the explicit Orbit.Center ClassG with ClassK changes the created star to K. Removing that entire Orbit.Center line has a different result: the scenario description may still see ClassG on the ancestor, but this example will not create the G star itself. Keep an explicit center statement for a working new scenario.
When changing starting resources, remember the rule for inheriting parts. This recipe takes its resources from the parent's Start. A SurveySystem.Start of your own replaces that entire part: list every starting stock you need there, rather than only the one you changed. See Is for details.
A random system is the easier basis for your first scenarios. The Solar System has an authored map and tutorial. It is not an empty template with a different star name.
4.7. Example text
Recipes with new names need a Text/enUS.json dictionary. The complete dictionary for all examples in this section is below. You may keep only the keys for your chosen recipe. If the dictionary already exists, add keys inside its braces, separated by commas. Do not append a second dictionary after the closing brace.
{
"SurveyScienceName": "Scientific Survey",
"MyMinerName": "My Miners",
"MyMinerDesc": "A corporation based on the Miners.",
"SurveyOutpostName": "Scientific Outpost",
"SurveyOutpostDesc": "An Outpost with extra Science income.",
"SurveyGiftName": "Extra Minerals",
"SurveyGiftDesc": "The event adds Minerals to your stock.",
"SurveySystemName": "My Yellow Star",
"SurveySystemDesc": "A scenario based on a yellow star."
}The keys used in Name and Description are on the left, and the phrases players see are on the right. You can rewrite the phrases while keeping the keys. Renaming a key also requires changing every reference to it in the mod's rules.
5. Files and installation
Open Play → Mods → Mods folder. One Modding folder brings together links to Vanilla — base game files, Local — your local mods, and Workshop-<itemId> — each downloaded Steam mod. These are links to the actual directories, not copies of their files. Place your own mod's folder inside Local.
Modding/
Vanilla/
Local/
quick-survey/
modinfo.json
Logic/
Explore.json
Text/ (if translations are needed)
Art/ (if images are needed)
Sounds/ (if sounds are needed)
preview.png (preview for Workshop)
Workshop-<itemId>/modinfo.json stores information about the mod, and Logic stores rule changes. Add Text, Art, and Sounds when you need your own text, images, or sounds. Choose your own JSON filenames inside Logic: the game finds objects by the names in the statements themselves. For example, you can change Explore's cost in either Explore.json or Prices.json.
Save JSON as UTF-8. It cannot contain comments or a comma after the last element. Check the file extension: Explore.json.txt is an ordinary text file and will not load as a game rule.
All JSON files inside Logic, including subfolders, are read in relative-path order. For example, 10-base.json is read before 20-prices.json. Comparison is exact and case-sensitive, rather than based on the interface language's alphabet. Use lowercase Latin filenames and numeric prefixes when order matters. When the same field is written again, a later file may replace an earlier file's values. Statement order inside each file is preserved.
To read the base game data, open Play → Mods → Mods folder → Vanilla. Logic contains rules, Text contains text, Art contains images, and Sounds contains sounds and music. Open JSON in an ordinary text editor, PNG in an image viewer, and OGG in a media player.
Logic files are organized by topic: Corporations.json contains corporations, Techs.json technologies, Builds.json buildings, Events.json events, Scenarios.json scenarios, and Map.json worlds. Use them as examples. Keep your own changes in a mod so game updates do not replace them.
Use Vanilla as a reference to read. Do not edit the installed game's files. Copy the statements you need into your own mod folder. For example, to change a cost from Vanilla/Logic/Simulation.json, put the new cost in Modding/Local/quick-survey/Logic/Explore.json, as in the first mod. After editing, open and close the Mods screen and create a new game. Workshop-<itemId> directories appear for downloaded subscriptions; itemId is the Steam Workshop item number. Steam updates these files. To make your own version, copy the subscribed mod's folder into Local and give it your own id in modinfo.json; remove the workshop section belonging to the original publication. Publish your local copy instead of editing the subscribed files.
5.1. The modinfo.json manifest
This file describes the mod for the Mods list and Workshop. A complete example is in ‘Your first mod’. For a new mod, replace id, title, and description with your own values. The version can start at 1.0.0.
- id - a unique mod identifier, such as quick-survey. It starts with a lowercase Latin letter, followed by lowercase Latin letters, digits, or hyphens. Keep the same id when updating.
- version - a mod version consisting of three numbers. Start with 1.0.0 and increase it when you update the content.
- title and description - the name and short description that players see.
The shell creates the workshop fields when publishing. Do not manually enter someone else's itemId or SteamID. The identifier vanilla is reserved for the base game.
5.2. Text
To change text or add new text, create Text/enUS.json. It is a dictionary: a unique key on the left and the phrase players see on the right.
{
"MyMinerName": "My Miners",
"MyMinerDesc": "A corporation of subsurface explorers."
}In the rules, Name specifies the name key and Description the description key. For example, the statement below links MyMiner to MyMinerName. In English, players will see My Miners. MyMiner and MyMinerName are different names: the first identifies the corporation, and the second finds its name in the dictionary.
["MyMiner", "Name", "MyMinerName"]Text/enUS.json needs only the keys you use. To replace existing text, take its key from the base game's dictionary. Write plain text without HTML or color tags. Keep any placeholders such as {0} and {1} from the original string: numbers or names replace them during the game.
Create a separate file for each language, using the exact name from the list below. Filenames have no hyphens: enUS.json, rather than en-US.json. You do not need to add every language at once.
- ruRU.json - Russian
- enUS.json - English
- ukUA.json - Ukrainian
- deDE.json - German
- frFR.json - French
- esES.json - Spanish
- itIT.json - Italian
- ptBR.json - Brazilian Portuguese
- plPL.json - Polish
- csCZ.json - Czech
- roRO.json - Romanian
- trTR.json - Turkish
- jaJP.json - Japanese
- koKR.json - Korean
- zhCN.json - Simplified Chinese
- zhTW.json - Traditional Chinese
- arSA.json - Arabic
- hiIN.json - Hindi
- idID.json - Indonesian
- thTH.json - Thai
- viVN.json - Vietnamese
For the selected language, the game combines the base game's text with enabled mods. A later mod's string replaces the same key from an earlier one. If you have not translated an existing key, the translation from the game or another mod remains. If the key is entirely absent in the selected language, the game looks in English, enUS. If it is absent there too, the key itself appears instead of a phrase. Adding Text/enUS.json is therefore useful for new strings. Russian does not automatically replace missing English text.
5.3. Images
PNG images go in Art. To replace an image, use its original filename: for example, Art/logo.png replaces the logo. Other images stay unchanged. Subfolders help organize files by topic, but icon lookup uses the filename without its extension.
For a new icon, create Art/Icons/my_survey.png and write ["MyMiner", "Icon", "my_survey"]. Use a transparent PNG with a unique name: two my_survey.png files in different subfolders are not independent icons. The engine does not fix the PNG's dimensions. A 256 × 256 pixel square is a convenient starting point for an ordinary icon. Do not include .png in Icon.
preview.png in the mod's root is a separate image for the Mods list and Workshop. It does not replace game icons.
5.4. Sounds and music
First replace one action's sound. Save your OGG sound as Sounds/FX/my_scan.ogg inside the mod. The complete Logic/ExploreSound.json is:
[
["Explore", "Sound", "my_scan"]
]Exploration will use my_scan.ogg. Sound takes the name without .ogg. Choose a unique name: two my_scan.ogg files in different subfolders are not independent sounds. If you use a base-game sound's name, the file replaces it in other places that use the same name too.
Now set background music separately. Add your file Sounds/Music/my_theme.ogg. The complete Logic/Music.json with one track is:
[
["Simulation", "Music", "my_theme"]
]Music on Simulation sets the game's music list. This version contains one track, my_theme.ogg. Sound on Explore affected only exploration, while Music affects the entire game's background. See ‘Sound and Music’ for sound variants and additional settings.
Music may contain several tracks. To replace the whole list with two existing game tracks, create Logic/Music.json with the following contents. This example needs no extra OGG files.
{
"set": [
["Simulation", "Music", "interstellar_waltz"],
["Simulation", "Music", "molten_core"]
]
}Both lines belong to the same Simulation + Music pair. set replaces the previous list with all the specified values at once, in their written order. Keep the entire new list in one file. If you split the tracks between two files, the later file replaces the earlier file's list. For your own tracks, replace the names and add matching OGG files in Sounds.
6. Using several mods
A mod changes only what you specify. The example above changes the exploration cost while keeping the other game rules. Do not copy an entire base-game file for one cost.
If two mods change the same cost, the value from the mod loaded last applies. When needed, set the optional order field in modinfo.json: a larger number means later loading. Dependencies in requires and incompatibilities in conflicts list other mods' ids. Your first mod needs none of these fields.
If a local folder and Workshop downloads contain mods with the same id, the game uses the local folder. Disabling a mod restores the original rules in new games. Simply deleting a statement from your mod removes nothing from the base game.
7. Workshop and saves
A local mod works without Steam. Share it as a folder or ZIP archive. To install from Workshop, subscribe to the package, wait for the download, then return to the Mods screen. A subscription does not overwrite your mod's working folder.
To publish, sign in to Steam, open the Mods screen, and select your local author package. Check its title, description, preview, and version, then click Publish. Publication does not happen automatically on launch. On first publication, the game saves Workshop information in modinfo.json. Updates check the author's SteamID.
Increase version manually before publishing changed content. A version lower than the published one is rejected. If Steam asks you to accept the Workshop agreement, follow the link shown by the game. If an update fails, keep the existing itemId: it links the mod to its publication. Replacing it with a random number does not fix the error.
A save records the ordered ids, versions and fingerprints of its loaded mods. Loading requires the same ids in the same order. A changed version or fingerprint alone does not prevent loading: mod balance, text, images and behavior can be updated. Versions and fingerprints record which content was used. The package format and saved-data schema must still be supported; there is no automatic migration between schemas.
Toggling mods and editing files does not rewrite an existing game. Start again uses the current session's pinned content set. To test a new version, refresh the Mods screen and create a new game from the updated menu.
8. If your mod does not work
- The mod is missing from the list. Check that modinfo.json is directly inside the mod folder, contains valid JSON, and has its own id. Make sure the extension has not become .json.txt. Reopen the Mods screen and read any error message.
- The change is not visible in the game. Check that the mod is enabled, then close the Mods screen and create a new game. Do not use an existing game or Start again for this test. If other mods are enabled, check the loading order: a later package may change the same cost or property.
- The game reports a JSON error. Open the named file and find the position from the message. Check paired brackets, quotation marks around strings, and commas between elements. Each rule statement must contain exactly three elements.
- Unknown predicate. Check the statement's second part: capitalization and every word after a dot must match a supported form in the reference. Your own technology name can go on the left, but inventing it does not make it a new property.
- A bonus does not work. For a technology, check both Is Tech and Player Has, then research it in a new game. For a conditional bonus, check which object's condition is read and whether it is met. Do not expect a one-time reward from a statement that changes per-turn income.
- The amount differs from the example. First check what you are comparing: stock, production by one Worker, or income per turn. Then check discounts, surcharges, assigned Workers, and conditions. Reducing a base cost does not necessarily give the same number in the final tooltip.
- A save will not open after a mod update. Compare the mod ids and their order with the game's message. Check that the required packages are loaded and that the package format and saved-data schema are supported.
If you use data validation and see PARTIAL, this only means that no errors were found in the rules the validator checks. It does not prove that every word combination is supported or has the intended effect. The final check is a new game and performing the changed action.
To let someone reproduce a problem, provide the mod folder, game seed, and selected scenario, mode, and corporation. Describe the action, the expected result, and what actually happened. Include the full error message: its filename and position help locate the cause.
9. Additional file features
Use this section when a mod depends on other mods or needs to remove part of an original definition. For your first mod, the ordinary fact array in ‘Your first mod’ is enough.
Optional modinfo.json fields
- enabled - true or false, whether the mod is enabled on first discovery. The default is true. Later player choices are stored separately.
- order - an integer, 0 by default. Larger values load later. Equal values are ordered by id.
- requires - an array of mod ids that must be enabled and loaded before this mod, such as ["my-library"]. Version ranges are not specified.
- conflicts - an array of incompatible mod ids. If enabled together, the game excludes the conflicting packages and shows the reason on the Mods screen. Disable one and close the screen to reload the remaining set.
- titleKey and descriptionKey - Text dictionary keys for translating the mod's title and description. Lookup tries the current language, then English, then plain title and description.
- tags - an array of Workshop strings, such as ["Corporation"]. It adds no game properties.
The game fills the workshop fields itemId, account, and author when publishing. They describe the publication and authorship. Do not copy someone else's values into a new mod.
Replacing, adding, and removing statements
Start with the cost we already know. The base game has its own exploration definition. Our Logic/Explore.json changes only its base cost in Minerals:
[
["Explore", "Cost.Minerals", 1]
]The result is that Explore's Cost.Minerals property has the value 1. Exploration's name, sound, and other properties stay unchanged. There is no need to copy all of Explore to replace one cost.
Deleting this line from the mod restores the base-game cost in a new game. Removing our override does not remove the original cost. Actually removing a property needs the separate remove operation, explained below.
Some statements list contents. For example, Has adds a technology to the player's set. The next file assumes SurveyScience is already defined, as in section 3.4:
[
["Player", "Has", "SurveyScience"]
]SurveyScience is added to the existing technologies. OutpostConstruction and the others remain. Is and Blocks are likewise extended in an ordinary array. Repeating the exact same statement does not create a duplicate element.
Now look at operations for more precise changes. First is set: specify the property's entire new value set. For example, to keep only two tracks in the music list, use this complete Logic/Music.json:
{
"set": [
["Simulation", "Music", "interstellar_waltz"],
["Simulation", "Music", "molten_core"]
]
}After set, Music contains exactly those two tracks in that order. Old tracks not listed here are absent from the new list. This distinguishes set from addition: it replaces the whole list rather than appending lines.
The next operation, add, extends the list. Keep Music.json from the previous example and create another file, Logic/zz-more-music.json. It loads after Music.json:
{
"add": [
["Simulation", "Music", "interstellar_drift_1"]
]
}There are now three tracks: interstellar_waltz, molten_core, and the added interstellar_drift_1. The first two have not disappeared. All three already exist in the game, so this exercise needs no custom OGG files.
For the next exercise, disable zz-more-music.json by moving it out of Logic, then create Logic/zz-remove-music.json. Remove just molten_core from the two tracks in Music.json:
{
"remove": [
["Simulation", "Music", "molten_core"]
]
}This three-element remove deletes only the exact statement. interstellar_waltz stays in the list. To clear the entire Music property instead, give remove only two elements:
{
"remove": [
["Simulation", "Music"]
]
}The second version leaves an empty music list. Do not apply both versions at once: they are two alternative contents for one test file.
delete removes an entire definition, rather than a property. If you created MyMiner in the corporation recipe and want to remove that corporation, the complete Logic/zz-delete-corporation.json is:
{
"delete": ["MyMiner"]
}MyMiner's card is absent in a new game, while other corporations remain. Its MyMiner.anything parts are deleted along with the definition. The zz filename prefix makes this deletion run after the file declaring MyMiner.
Once the individual operations are clear, you can combine them. The following complete Logic/Music.json first clears Music and then adds one track:
{
"remove": [
["Simulation", "Music"]
],
"add": [
["Simulation", "Music", "interstellar_waltz"]
]
}Only interstellar_waltz remains. Within one such file, the operation order is always delete → remove → set → add. Rearranging these keys in the text does not change it. Only listed operations run. Omit the others if you do not need them.
The value false does not remove a statement: it sets a false value. Use remove for deletion, rather than false or null. Triplets cannot contain null.
Try these exercises one at a time: several test files would all change the same music list. After changing the file set, reload the mod through the Mods screen and create a new game. An ordinary cost is easier to set with the array from the first example. An operation object is useful for addition, exact removal, or replacing an entire list.
10. Predicate reference
The reference is grouped by task: relationships, conditions, effects, economy, events, worlds, and presentation. An alphabetical index is at the top of the page. Each article explains supported forms and their result. Examples say whether they are complete files or definition fragments. Game-state fields are marked separately: do not write them in a mod.
Is - membership and inheritance
Is states what an object is. Start with a new technology:
["SurveyScience", "Is", "Tech"]SurveyScience is an invented name, and Tech an existing technology category. This statement gives the object technology behavior. ‘Roles, resources, and effects’ separately shows how to include it in the player's tree.
The right side can also name a particular existing definition. The new object then receives its properties. This complete Logic/MyMiner.json creates a Miners variant:
[
["MyMiner", "Is", "CorpMiner"],
["MyMiner", "Name", "MyMinerName"]
]MyMiner inherits CorpMiner's properties: the corporation role, abilities, and image. Its own Name replaces only the name. The MyMinerName dictionary entry supplies the visible name. A ready-made dictionary is in the corporation recipe. Using CorpColonist instead of CorpMiner makes Colonists the basis and changes the inherited abilities.
Parts of a definition have a separate inheritance rule. Section 3.3 explained interest income in CorpMagnate.Interest. Now create a Magnates variant with its own Interest part. The complete Logic/MyMagnate.json is:
[
["MyMagnate", "Is", "CorpMagnate"],
["MyMagnate", "Name", "MyMagnateName"],
["MyMagnate.Interest", "Adds.Income.Credits", 1]
]Add MyMagnateName to Text/enUS.json for the new corporation's name. If the dictionary does not yet exist, its full contents are:
{
"MyMagnateName": "My Magnates"
}Your own Interest replaces the entire parent Interest. The parent's Per Credits does not remain: the new part gives a fixed income of 1 Credit per turn. For an additional ability alongside interest, choose a different name such as ExtraIncome. The parent's Interest will then remain. The same rule applies to scenarios' Start parts.
Existing categories and definitions for Is
Choose the name to the right of Is from the appropriate group. A category sets what kind of thing it is. A specific definition is a ready-made basis with its own properties. The main PreWarpAge options are listed below. Read their exact definitions in the specified Vanilla/Logic files and write changes in your own mod.
- A corporation with its own abilities - Corporation. Existing corporations: CorpMiner - Miners, CorpColonist - Colonists, CorpMagnate - Magnates, CorpTechnocrat - Technocrats. Definitions: Corporations.json.
- A researchable technology - Tech. For an existing inherited bonus, use DeepExtraction or ResearchAutomation, for example. Techs.json contains all technologies. The complete name list is below.
- A building - Building, surface placement - SurfaceBuilding, orbital placement - Orbital. Existing bases in Builds.json: SpaceStation, HQ, Metropolis, Outpost, Colony, City, DomeMegacity, GasExtractor, SkyExtractor, StellarFarm, DysonRing, WarpDrivePrototype.
- A scenario - Scenario. Bases in Scenarios.json: ScenarioK, ScenarioG, ScenarioF, ScenarioM, ScenarioA, ScenarioBrownDwarf. ScenarioSol is the Solar System tutorial, with its own map and training.
- A game mode - Rule. Existing modes in Modes.json: ModeMeditation - Casual, ModeClassic - Classic, ModeHardcore - Hardcore. The internal ModeMeditation identifier is unchanged.
- A resource - Resource. Existing resources in Simulation.json: Workers, Water, Minerals, Science, Energy, Credits, Approval. Additional roles: Workforce - Workers, Currency - currency, Stat - a displayed statistic. Resource articles explain their uses and combinations.
- A world and its categories: World - world, Rocky - Rocky Worlds, Icy - icy composition (UI category: Cold Worlds), Earthlike - Earthlike Worlds. Existing rocky and icy worlds are listed below. Definitions: Map.json.
- A star - Star. Profiles in Map.json: ClassK, ClassG, ClassF, ClassM, ClassA, Substellar, BrownDwarf. Sun is the authored Sun in Solar.json.
- A giant - Giant. Existing models: HotJupiter, GasGiantSmall, IceGiantSmall, GasGiantMedium, IceGiantMedium, GasGiantLarge. An asteroid - Asteroid, with RockyAsteroid and IceAsteroid models. Definitions: Map.json.
- An event - Event, a response option - EventChoice, a conditional ability - Trait, an action - Action. Event and choice examples are in Events.json. Specific actions are declared in Simulation.json. A role alone does not replace a required schedule, contents, or action result.
Existing technologies in Techs.json. These definition names can be used to the right of Is. Use the same names in Requires for research prerequisites:
- OutpostConstruction, DeepExtraction, NuclearDrives, ResearchAutomation, AdvancedThermalInsulation, RegolithShielding, FrostTapping, FusionDrives, BlockchainGovernance, FusionWeapons.
- CryoInsulation, RefractoryCeramics, ClosedBiosystems, CloudMining, StellarEnergy, MantleDrilling, QuantumComputing, QuantumInsulation, UltraCarbides, PlanetaryUrbanization.
- DenseConstruction, SkyMining, CryoRefining, AntimatterDrives, AIManagement, AGI, SyntheticMaterials, Megaengineering, CoreExtraction, AdvancedGeoSurvey.
- MindDigitization, ASI, WarpDrives, PostTechnologies, SpaceStations, AdvancedSpaceStations, ComplexSpaceStations.
Existing world models in Map.json. Use these names when inheriting a particular world rather than the general World category:
- Tiny bodies: TinyRock, TinySulfuric, TinyIce, TinyCryogenic.
- Small worlds: SmallLava, SmallRock, SmallIce, SmallCryogenic.
- Standard-sized worlds: StandardLava, StandardChthonian, StandardHothouse, StandardOcean, StandardEarthlike, StandardAmmonia, StandardIce, StandardCryogenic.
- Large worlds: LargeLava, LargeChthonian, LargeHothouse, LargeOcean, LargeAmmonia, LargeIce.
For example, Is TinyRock takes the existing basis of a tiny Rock World. Is World takes only the general world basis. See Solar.json for authored Solar System planets and moons. Names are case-sensitive: TinyRock and tinyrock are different strings.
Has - contents and quantity ownership
Has means ‘has’ and lists an object's contents. A player has a set of technologies, for example, and an event has a set of response options. Put the owner of the contents on the left and the added definition's name on the right. A new Has statement extends the existing set. You do not need to list every player technology again.
["Player", "Has", "SurveyScience"]This includes SurveyScience in the player's technology tree. The technology itself must be defined, as in the tutorial example. Its bonus appears after research. On an event, Has with a response name would add a choice button. The same contents relationship is used for different objects, but does not mean immediately executing the added element.
Checking a resource stock inside a condition is a different task, explained step by step in Requires. Here Has was used to include a technology in the player's set.
Adds - a numeric addition
Start with an addition to Science income. This statement extends the SurveyScience definition from section 3.4:
["SurveyScience", "Adds.Income.Science", 1]After research, the player receives +1 Science income per turn. Income of 2 becomes 3 if nothing else changes. The addition is inactive before the technology is researched. In Adds.Income.Science, Adds means ‘adds’, Income means income per turn, and Science names the resource.
Now reduce income by one instead. Replace only the number in the same statement:
["SurveyScience", "Adds.Income.Science", -1]An earlier income of 2 becomes 1. A negative addition reduces the same quantity. This still changes income each turn, rather than removing Science once.
Another task is awarding Minerals once after a player choice. In the complete EventChoice example, Recycle Samples leads to the OGSamplesRecycled outcome. You can change its reward amount with this fragment:
["OGSamplesRecycled", "Adds.Minerals.Count", 20]After choosing Recycle Samples, the outcome adds 20 Minerals to stock. The next turn does not give another 20 from the same choice. Count means the amount in stock, while Income.Science in the earlier example meant income per turn. EventChoice shows how to connect an outcome to a response and a response to a message. A reward line alone creates neither a message nor a button.
A third task is increasing production by one Worker. This is a fragment of the existing DeepExtraction technology:
["DeepExtraction", "Adds.Production.Minerals", 0.2]After research, the Mineral production rate gains 0.2 per Worker. For example, a rate of 1 becomes 1.2 before other modifiers. Three assigned Workers produce 3.6 instead of 3. If no Workers are assigned, the bonus alone produces no Minerals.
Several additions to the same property are summed if their conditions are met. Target limits bonus recipients, and Per calculates it per unit of another quantity. Their reference articles show both rules.
We have examined three different changes: stock once, income per turn, and production per Worker. ‘Combining effects, base values, and one-time rewards’ explains addition and multipliers step by step. For new mods, use explicit Adds.property forms. Old numeric Target and bare Adds statements are not examples to follow.
Conditions and numeric effects
Start with three separate tasks. First require one technology before another. Then give a researched technology income. Finally increase income with a multiplier. The following articles explain each rule in detail.
A requirement. ResearchAutomation and OutpostConstruction exist in the base game. This complete Logic/Requirement.json makes Outpost Construction a prerequisite for ResearchAutomation:
[
["ResearchAutomation", "Requires", "OutpostConstruction"]
]Requires means ‘requires’. The player must research OutpostConstruction before ResearchAutomation becomes available. This line awards nothing and does not itself complete research.
An addition. A separate complete Logic/Bonus.json sets ResearchAutomation's bonus:
[
["ResearchAutomation", "Adds.Income.Science", 2]
]Adds adds the specified number. Income.Science is Science income per turn. ResearchAutomation grants +2 Science per turn after research and no bonus beforehand. This replaces the existing technology's bonus amount rather than adding another contribution to its old value.
A multiplier. CloudMining is an existing technology. This complete Logic/Multiplier.json changes its bonus:
[
["CloudMining", "Multiplies.Income.Energy", 1.1]
]Multiplies multiplies. After CloudMining is researched, positive Energy receipts are multiplied by 1.1, turning 10 into 11. Independent Energy expenses do not increase. This example needs neither previous file. Test the three tasks separately.
The examples above are complete Logic files. Later short blocks may show only changed statements in a named existing definition. The preceding text identifies them. If you have not added statements to an existing file, first see the complete one- and two-statement examples in ‘Subject, predicate, and value’.
Requires and Or - requirements
Start with a technology requirement. This complete Logic/ResearchRequirement.json changes existing ResearchAutomation:
[
["ResearchAutomation", "Requires", "OutpostConstruction"]
]The left side is the technology the player wants to research, and the right its prerequisite. ResearchAutomation is unavailable until Outpost Construction (OutpostConstruction) is researched. Selecting the prerequisite with the mouse is insufficient: completion is checked.
Now specify a construction location separately. These are requirement lines for a new SurveyStation, rather than a complete building recipe. The two Is lines classify it as a building and orbital structure. Requires World is the new statement:
["SurveyStation", "Is", "Building"],
["SurveyStation", "Is", "Orbital"],
["SurveyStation", "Requires", "World"]World is the world category. The station's location must now be a world. A giant outside World does not qualify. Requires checks the construction site here, while the first example checked player knowledge. The right-hand reference, a location category or technology, determines the difference.
Allow another location, a giant. Add this to the station's three lines:
["SurveyStation", "Requires.Or", "Giant"]Or means ‘or’. A world or giant now qualifies. Ordinary Requires Giant without Or would demand both World and Giant simultaneously, a different requirement.
Finally combine both rules: the site must be a world or giant, and the player must know Outpost Construction. All requirement lines are below. A complete building also needs a name, icon, and cost, explained in Building.
["SurveyStation", "Is", "Building"],
["SurveyStation", "Is", "Orbital"],
["SurveyStation", "Requires", "OutpostConstruction"],
["SurveyStation", "Requires", "World"],
["SurveyStation", "Requires.Or", "Giant"]The player must research OutpostConstruction, and the site must belong to World or Giant. Requires.Or adds an alternative to requirements of the same kind: either location works, but the technology is still needed. Without Or both location categories are mandatory. Requires.Corporation and Requires.Corporation.Or likewise list suitable corporations.
The game reads a requirement from its referent. A technology reference checks that player's research. A world category checks the site. A building reference on an upgrade checks its immediate player-owned base. On a trait, a requirement checks the potential recipient. Requires Homeworld demands the homeworld. Mentioning a name elsewhere is insufficient.
Two ordinary location requirements can intersect categories. This SurveyStation fragment demands specifically an icy world:
["SurveyStation", "Requires", "World"],
["SurveyStation", "Requires", "Icy"]Both memberships are required. Requires.Or Icy would instead mean any World or any Icy. Replace the previous site list entirely to test this version: do not leave Requires.Or Giant from before. Do not declare one definition as a technology, upgrade base, and location category simultaneously, making the reference ambiguous.
A numeric condition checks a particular value. Add this to SurveyGift from the event recipe to make its one-time Mineral reward available only to a player with at least 10 Minerals in stock:
["SurveyGift", "Requires.Has.Minerals.Min", 10]Has.Minerals reads the event recipient's Mineral stock. Min 10 means at least 10: false at 9, true at 10 or 11. It checks before the reward and neither spends nor awards Minerals.
To allow only stocks from 10 to 20 inclusive, use two bounds:
["SurveyGift", "Requires.Has.Minerals.Min", 10],
["SurveyGift", "Requires.Has.Minerals.Max", 20]Both hold at 10 and 20, but not 9 or 21. Or on a location requirement does not cancel these separately checked numeric bounds. Other comparisons follow for reference. F is the checked property, V a value, and N a numeric threshold.
- Requires.F = V or Requires.F.Equal = V: field F equals V. For a multivalue field, containing V is enough. A missing field is neither false nor numeric zero.
- Requires.F.More = N: strictly greater than N. Less: strictly less. AtLeast or Min: at least. Max: at most. Both range bounds without Or are mandatory.
- Requires.F.Any = V: match one of the listed alternatives for this field. Requires.F.Not = V: exclude the specified alternative. Prefer Or for a simple subject-matter alternative.
- Requires.Not = Category: the checked object does not belong to that category and has no such active trait. Requires.Trait = TraitName: that trait is active on it.
- Requires.Has.R.Min = N: resource R stock on the checked object is at least N. Requires.Owner.Has.R.Min checks its owner's stock. For world production rates use Production.R, for example Requires.Production.Minerals.More = 0 checks positive Mineral production rather than player stock.
- Some comparisons allow a path to another number instead of a numeric threshold. Requires.Size.Less = Owner.Size compares an object's size with its owner's size. It only makes sense with an actual Owner and Size on that owner.
A descendant's own site requirements replace inherited site requirements including their Or. Technology requirements are considered separately. One list cannot express two independent location groups ‘A or B’ and ‘C or D’, or ‘with technology A on a world, with B on an asteroid’. Use separate building variants. Line order and definition-part names create no condition parentheses.
An event can calculate a threshold once on appearance. Consider four alternative conditions in HeadquartersQuest.Done. Goal contains the full working quest framework, which chooses a world and triggers an outcome when its goal is met. Here change only the check: replace Goal.Has HQ with a required target-world size. The condition does not change size. Suppose target size is 12.5 and player economic scale 20 when the quest appears. Each version replaces the previous one. First require size to grow by a factor of 1.4.
["HeadquartersQuest.Done", "Requires.Target.Size.Min.Mult", 1.4]Target.Size reads the chosen world's size. Mult takes the full initial value: 12.5 × 1.4 = 17.5. A lower threshold rounds upward to 18. Size 17 still fails and 18 succeeds. Later size changes do not change the threshold.
Instead of a multiplier, require an addition to the initial integer part.
["HeadquartersQuest.Done", "Requires.Target.Size.Min.Add", 3]Add takes the integer part of 12.5, namely 12, and adds 3. The threshold is 15 rather than 15.5. Size 14 fails and 15 succeeds. Track uses the same technique to require three new completions after a quest is issued.
The next version ignores initial world size and uses economic scale for its threshold.
["HeadquartersQuest.Done", "Requires.Target.Size.Min.Scaled", 0.5]At scale 20, coefficient 0.5 gives threshold 10. Initial size 12.5 already exceeds it, so this version qualifies immediately. Scaled does not mean adding half the size.
Only now combine addition and scale.
["HeadquartersQuest.Done", "Requires.Target.Size.Min.Add.Scaled", 0.5]Add.Scaled combines initial integer part 12 with scaled addition 20 × 0.5 = 10. The saved threshold is 22. Size 21 fails and 22 succeeds. All four versions set a particular quest's threshold rather than a constantly recalculated cost. To test the working example, replace Goal.Has HQ with just one of these lines and retain the rest of the quest framework.
The threshold does not grow alongside the checked value. For an ordinary resource-growth quest use Goal.R from Goals. These endings work where an event mechanism saves an initial threshold. Adding them to an arbitrary condition does not create that mechanism.
Target - recipient, location, and target filters
First select recipients for a technology bonus. RegolithShielding exists in the base game and increases Worker slots. Target limits which worlds receive it.
First configure existing RegolithShielding, already in the player's tree. This excerpt sets an addition of four Worker slots on owned rocky worlds after research. It is the additive part of the bonus: the definition's other effects remain, and final capacity also includes their multipliers. World.Rocky means simultaneous membership in World and Rocky.
["RegolithShielding", "Target", "World.Rocky"],
["RegolithShielding", "Adds.Workplaces", 4]Workplaces stay unchanged before research. Afterward the bonus affects suitable owned worlds, including future acquisitions. Target neither creates worlds nor replaces research.
Now choose an event location. SuppliesWater is an existing Water delivery. Begin with one restriction: its location must belong to World. Write the change as:
["SuppliesWater", "Target", "World"]The game finds a suitable world and links the delivery message to it. World is not a particular planet's name yet. An already occurred event in a save may instead reference the selected body: selection has finished by then.
Require exploration of the selected world. Add one filter:
["SuppliesWater", "Target.Explored", true]Explored true checks that player's knowledge of the selected body. An unexplored world no longer qualifies. Target World remains: both category and exploration are required.
Exclude the homeworld in a separate line:
["SuppliesWater", "Target.Not", "Homeworld"]Not means exclusion. Home does not qualify even when explored. Other explored worlds remain candidates. Combine all three statements:
Now change existing SuppliesWater's location. The base game already gives it a reward, image, and membership in Supplies. This permits delivery to an explored world other than home. It does not trigger delivery immediately.
["SuppliesWater", "Target", "World"],
["SuppliesWater", "Target.Explored", true],
["SuppliesWater", "Target.Not", "Homeworld"]Add another location property, rocky composition. Events need a separate Target.Is line:
["SuppliesWater", "Target", "World"],
["SuppliesWater", "Target.Is", "Rocky"]This chooses a rocky world. Do not copy World.Rocky shorthand from the technology bonus: a numeric bonus reads it as two categories, while an event looks for a category with that full name. Without a declared World.Rocky category no location is found. Event and Mission share this location-selection rule.
Another independent filter checks construction availability. This retains only places where the player can currently build HQ:
["SuppliesWater", "Target.Build", "HQ"]The filter neither builds nor awards a Headquarters. It uses the building's current requirements. Combine it with previous filters only if all should be required simultaneously.
Target.Has checks related property of the specified kind when it actually exists in this game. Conditions on different fields apply together. Or gives alternatives for one field, such as Target.Has and Target.Has.Or.
In a numeric ability, Target PlacedAt selects objects placed on the ability holder: their PlacedAt references it. Target Target.PlacedAt selects objects placed on its target. This is reverse selection of placed objects, rather than following a building to the world beneath it.
In event outcomes, Parent is the invoking message and Parent.Target its body. The links must already exist: a missing reference is not replaced with a random body. Filters follow Target directly. There is no general Target.If prefix.
Preferences can search rocky worlds first, then icy worlds if none are found. Here is another SuppliesWater fragment. A and B are invented rule-part names. General event requirements remain. Parts are checked by Order, then name for ties. The first part with suitable bodies is selected.
["SuppliesWater", "Target", "World"],
["SuppliesWater", "Target.Explored", true],
["SuppliesWater.A", "Order", 1],
["SuppliesWater.A", "Target.Is", "Rocky"],
["SuppliesWater.B", "Order", 2],
["SuppliesWater.B", "Target.Is", "Icy"]A savings quest can select a body by the shortfall for exploration. First specify the cost to read. This version concerns SuppliesWater and retains its ordinary Target restrictions.
["SuppliesWater", "Target.Cost.Minerals.Count", "Explore"]For each candidate, the game compares today's Explore cost in Minerals with player stock. Suppose body cost is 50, stock 10, and economic scale 20. The shortfall is 40 Minerals, or 40 / 20 = 2 scale units. This is not next-turn income forecasting.
First set a lower bound on the shortfall.
["SuppliesWater", "Requires.Scaled.Min", 1.5]Shortfall 2 qualifies, 1 does not, and exactly 1.5 qualifies. Now exclude excessively expensive targets with an upper bound.
["SuppliesWater", "Requires.Scaled.Max", 2.5]Together the bounds retain shortfalls from 1.5 to 2.5 inclusive. Our body at 2 remains a candidate, while 3 is excluded. A definition allows only one such bound source: costs in different resources are not added automatically.
Per - a quantity per unit
Per means ‘for each unit’. Income of 0.03 Credits for each saved Credit gives 3 per turn at stock 100. The Adds number sets income per unit, while Per selects the unit count. The action is not repeated a hundred times: one total income is calculated.
The Magnates corporation CorpMagnate already has interest income. Interest is part of its definition. Look only at that ability:
Adds.Income.Credits sets income 0.03 per unit. Per Credits names that unit: a Credit in the player's stock. The result depends on stock rather than button click count.
["CorpMagnate.Interest", "Per", "Credits"],
["CorpMagnate.Interest", "Adds.Income.Credits", 0.03]Stock 100 gives 100 × 0.03 = 3 Credits per turn, and stock 200 gives 6. Stock is read on the player who chose Magnates and is not consumed by this calculation.
A multiplier per size unit works similarly. This separate fragment belongs to the existing world ability SizeScale:
["SizeScale", "Per", "Size"],
["SizeScale.Places", "Multiplies.Workplaces", 0.2]Per Size reads world size. At size 4, the multiplier is 4 × 0.2 = 0.8, and at size 5 it is 1. It multiplies 0.2 by size rather than raising it to a power. Missing Size contributes nothing. Existing Size equal to zero gives multiplier zero: absence and zero differ.
Resource reads can choose precision. Per Credits in the first example takes the integer part of stock. To include fractions, change only that Magnates line:
["CorpMagnate.Interest", "Per", "Credits.Count"]Stock 100.5 now contributes 100.5 rather than 100, giving 100.5 × 0.03 = 3.015 before rounding. WorkersFree instead of Credits would mean free Worker count. Per still only reads a quantity.
A related object can supply the quantity. In a building effect part, Per PlacedAt.Size reads the supporting world's size rather than the building's. This needs an actual PlacedAt link. Owner.Size likewise reads an owner's Size if present.
Shared Per also applies to definition parts. In SizeScale, Places receives Per Size from its parent. An explicit Per on Places replaces the parent's for that part. This does not change the object checked by Requires: Per chooses only the calculation quantity.
Multiplies - a field or ability-strength multiplier
Multiplies multiplies a value. Income 10 at multiplier 1.1 becomes 11: ten percent is added, rather than ten units. The multiplier applies while its technology, corporation, or trait is active.
First change only existing CloudMining. It need not be added to the player's tree again. This sets its Energy bonus:
Income.Energy means positive Energy receipts per turn. 1.1 means multiplying by 1.1. The technology's multiplier starts only after research.
["CloudMining", "Multiplies.Income.Energy", 1.1]Receipts of 10 become 11, and 20 become 22. Separate Energy expenses, such as building upkeep, stay unchanged. Multiplier 1 would change nothing. Multiplier 0 would zero the result if the property permits zero.
Now a separate corporation example. This changes existing Colonists, CorpColonist:
["CorpColonist", "Multiplies.Workplaces", 1.4]In a Colonists game, Worker slots on suitable owned objects are multiplied by 1.4. 10 becomes 14 before further rounding and modifiers. This bonus activates by corporation selection, rather than researching CloudMining.
Two multipliers on one field multiply together: 1.1 and 1.2 give 1.32. This applies to numbers. Multiplies does not change Name, Icon, or true/false. Target can limit recipients as in its article.
Now make an income multiplier depend on population. This separate fragment adds a part to DeepExtraction. PopulationIncome is our invented technology-part name:
["DeepExtraction.PopulationIncome", "Per", "Workers"],
["DeepExtraction.PopulationIncome", "Adds.Multiplies.Income.Science", 0.1]After research, Per Workers reads player population. Adds.Multiplies.Income.Science starts the multiplier at 1 and adds 0.1 per Worker. Population 4 gives 1 + 0.1 × 4 = 1.4. Science income 2 becomes 2.8, or 3.2 at population 6 if no other Science flows exist. Ordinary Multiplies.Income.Science 0.1 with that Per would give multiplier 0.4 at four Workers. Adds changes the formula here.
This existing NuclearDrives fragment weakens RemotenessTrait surcharges to 80% strength. Actual homeworld distances remain unchanged. The base game already links this family to Distance:
["NuclearDrives", "Multiplies.RemotenessTrait", 0.8]This multiplies trait strength rather than distance or a single field. At strength 0.8, a trait addition of 10 becomes 8. If the trait supplies multiplier 2, only its excess above 1 is weakened: 1 + (2 − 1) × 0.8 = 1.8. The answer is therefore not 2 × 0.8.
The same form changes a family of traits related through Is. Do not name the family after a modified numeric field: the statement must not have two meanings. Each completed repeatable research applies its effect again. Additions sum and multipliers multiply. Tech gives a detailed repetition example.
Combining effects, base values, and one-time rewards
Examine income with one example. Test in a separate mod as Miners, with no Workers assigned to Minerals, so Worker production does not mix with the income under study. First create the complete Logic/MineralIncome.json:
[
["Minerals", "Income", 10]
]Minerals now has its own income of 10 per turn, the initial value or calculation base. Without other sources and expenses, the player receives 10 Minerals per turn. Stock and per-turn amounts differ: this does not replace stock with 10.
Now add a technology bonus. Replace that entire file:
[
["Minerals", "Income", 10],
["DeepExtraction", "Adds.Income.Minerals", 2]
]After Deep Extraction (DeepExtraction) is researched, +2 joins base 10, giving 12 Minerals per turn. Before research, only base 10 applies. The mod line replaces this DeepExtraction bonus's previous amount, rather than adding its old value again. Its per-Worker production bonus remains, which is why no Mineral Workers are assigned for this test.
Next introduce another technology's multiplier. Replace the file again in full:
[
["Minerals", "Income", 10],
["DeepExtraction", "Adds.Income.Minerals", 2],
["CloudMining", "Multiplies.Income.Minerals", 1.5]
]With both technologies researched, the game adds 10 and 2 before multiplying by 1.5. Income is (10 + 2) × 1.5 = 18. The multiplier applies to the whole positive sum rather than only +2. JSON statement order does not change this. With only CloudMining researched, it is 10 × 1.5 = 15.
Independent additions first sum with the base. Multipliers then multiply together. Another active 1.2 multiplier turns 18 into 21.6. Stocks may store fractions. ‘Min, Max, and Round’ explains each statistic's rounding rules.
The base here is Income 10 on Minerals. Some other properties provide a separate Base form with meaning explained in their article. It is not mandatory for every effect. After numeric calculation the game respects the changed quantity's bounds and rounding.
Now separate income from a one-time reward. Take SurveyGift from the event recipe. In Logic/Event.json change only its reward coefficient from 1 to 2, keeping the other statements:
["SurveyGift", "Adds.Minerals.Scaled", 2]At economic scale 10, the event adds 10 × 2 = 20 Minerals once. A stock of 7 becomes 27. This line does not change per-turn income. Test it using EventCheck.json with SurveyGiftCheck from that recipe, triggering it on turn two. Opening a tooltip or loading an already saved outcome does not award another 20.
Compare the statements. Adds.Income.Minerals 2 on a researched technology grants +2 every subsequent turn. Adds.Minerals.Scaled 2 on SurveyGift grants a reward once, with amount depending on economic scale. EventChoice separately explains a fixed one-time Adds.Minerals.Count reward on a choice outcome. Minerals alone cannot tell you when the player receives it: read the complete statement and its context.
‘Temporary effects and Blocks’ separately covers income limited by an event's duration. ‘Corporation, Rule, and Scenario’ shows one-time starting resources. These use the same numeric operations with their own application timing.
Buildings can also provide income. SurveyOutpost Income.Science 1 in the building recipe is the completed Outpost's own income, active after construction. This is a different source: technology bonuses start after research, and building income after the building appears. Workplaces and Production separately cover surface-building capacity and independent station assignments.
A trait attached through Has may change its holder or objects it owns. ‘Trait and Grants’ explains the difference and why Has on a building does not mean a bonus to every player world. Use event duration for a temporary addition, rather than manually restoring an initial number.
Per selects quantity, while Target selects recipients. Changing Target does not automatically make Per read the new target's properties. Per Size reads the ability holder's size. For the related placement site's size, use supported PlacedAt.Size. See Per for examples.
Adds and Multiplies work on the game's supported numeric properties. They do not change names, icons, references, Is, Has, or true/false. A new name with a number does not itself declare a numeric property. A new material needs Is Resource first, as in ‘Resource, Stat, and Currency’.
Some numbers are read-only: Change.R, WorkersFree, Build.Cost, Explore.Cost, Researching.Steps, and Track counters. The game also writes Completed itself. Use them in supported conditions, but do not rewrite them with Adds.
Other tasks have their own forms: discounts use Cost, recurring upkeep Upkeep, trade prices and volumes Price and Trade. Mission offer parameters change through its choices, while Progress has its own operations. Their articles explain forms and limits. One general addition does not replace their rules.
Trait and Grants - conditional traits
A trait describes a bonus once for use on different objects. First only declare ExtraCapacity with two added Worker slots. Trait is the existing trait category and ExtraCapacity our chosen name.
This first fragment describes the bonus without attaching it to anyone:
["ExtraCapacity", "Is", "Trait"],
["ExtraCapacity", "Adds.Workplaces", 2]Is Trait declares the trait and Adds.Workplaces its effect. ExtraCapacity's definition alone changes no world. Permanent attachment to existing TinyRock needs another line:
["TinyRock", "Has", "ExtraCapacity"]Every TinyRock now gets two additional Worker slots in a new game. This creates no Workers: a Worker slot and an assigned Worker differ. Removing the trait later removes its addition rather than original world capacity.
Now move to conditional granting. Remove TinyRock Has ExtraCapacity before testing it, or permanent attachment keeps the bonus regardless of the new condition. Retain ExtraCapacity's definition.
Traits can form a family: declare the family with Is Trait and each variant with Is naming that family. A variant with Requires is automatically given to objects meeting its conditions and removed when they fail. Neither the family itself nor an unconditional variant is automatically granted. Use Has for permanent attachment and Marks for event grants.
["SmallWorldTrait", "Is", "Trait"],
["CompactWorld", "Is", "SmallWorldTrait"],
["CompactWorld", "Requires", "World"],
["CompactWorld", "Requires.Size.Max", 4],
["CompactWorld", "Multiplies.Cost.Build", 0.9]CompactWorld automatically grants a 10% construction discount on worlds no larger than four. SmallWorldTrait is the family and CompactWorld the variant. Different families select independently.
A family can link to an existing property for variants to appear in its label and tooltip. The base game's Distance is the distance property and RemotenessTrait its trait family. ["Distance", "Has", "RemotenessTrait"] connects the property description to the family. It does not grant every variant to every world. Variant conditions still determine the suitable choice.
A separate Grants rule is another approach. This gives ExtraCapacity only to worlds of size at least 10. BigWorld names the rule. It is an alternative to permanent Has above. Do not retain both if shrinking should remove the bonus.
["BigWorld", "Grants", "Size"],
["BigWorld", "Requires", "World"],
["BigWorld", "Requires.Size.Min", 10],
["BigWorld", "Has", "ExtraCapacity"],
["ExtraCapacity", "Is", "Trait"],
["ExtraCapacity", "Adds.Workplaces", 2]Grants Size links the rule to the existing size property. Requires World limits it to worlds and Requires.Size.Min sets the threshold. Has on the rule lists granted traits. Do not also place that Has on the world. Below size 10, the bonus disappears. Rechecking does not add Worker slots again: while true, the addition remains two.
Grants naming a property or family belongs to a separate granting rule that is not itself a Trait-family variant. A variant can supply its own properties and use Has for additional independent traits. Adds and Multiplies change numbers. Grants only selects active abilities. String Adds declares no classification. Root Requires on a trait checks its recipient. Target and Requires on a separate numeric part can further limit that part's recipient.
Make ExtraCapacity random. Start with only BigWorld above and add weight 30. This exercise must have no other random Grants Size rules.
["BigWorld", "Chance", 30]A suitable size-10 world has a 30/100, or 30%, chance of ExtraCapacity. The remaining 70% gives no randomly chosen trait. The result persists: reopening a tooltip provides no retry.
Add another suitable variant with a distinct result, one Worker slot instead of two. BothWorlds is a separate rule for the same Size property.
["ExtraPlace", "Is", "Trait"],
["ExtraPlace", "Adds.Workplaces", 1],
["BothWorlds", "Grants", "Size"],
["BothWorlds", "Requires", "World"],
["BothWorlds", "Requires.Size.Min", 10],
["BothWorlds", "Has", "ExtraPlace"],
["BothWorlds", "Chance", 20]Suitable weights total 30 + 20 = 50. Chances are 30% ExtraCapacity, 20% ExtraPlace, and 50% no random trait. No result grants both random choices at once.
Increase only the second weight from 20 to 90.
["BothWorlds", "Chance", 90]The total 120 now exceeds 100. ExtraCapacity gets 30/120 = 25% and ExtraPlace 90/120 = 75%, with no empty result. The denominator rule is max(100, sum of suitable weights). Chance is nonnegative. A conditional child part can refine it. Adds.Weight and Adds.Chance do not serve this purpose.
Deterministic granting works separately from random selection. For the next comparison, remove Chance from BothWorlds rather than setting zero.
["BothWorlds", "Grants", "Size"],
["BothWorlds", "Requires", "World"],
["BothWorlds", "Requires.Size.Min", 10],
["BothWorlds", "Has", "ExtraPlace"]Every suitable world now gets ExtraPlace independently of random BigWorld. One extra place is guaranteed, with two more from ExtraCapacity at 30%. Missing Chance differs from Chance 0.
Who receives a Has trait's addition? If the property is declared on the holder's class or Is ancestor, the trait changes the holder itself. A world already has Workplaces, so an attached Adds.Workplaces trait changes its own Worker slots.
If a property belongs to other classes and is absent from this holder's class, a numeric ability may address objects it owns through Owner. Thus Has on a building does not automatically mean a bonus to all player worlds or the world beneath it. For a local trait, declare the property's base on the building class, such as Workplaces 0. This makes the building itself the recipient.
Zero Production.R is also a declared local rate that an addition can make positive. This differs from absent production. Target PlacedAt selects objects placed on the ability holder, rather than following a building down to its world. See Target for recipient selection.
Now examine two alternatives for one bonus. This ExtraCapacity version replaces its previous numeric-effect definition. Do not retain earlier random Grants or permanent Has.
["ExtraCapacity", "Is", "Trait"],
["ExtraCapacity", "Requires", "World"],
["ExtraCapacity", "Adds.Workplaces", 2],
["ExtraCapacity.Small", "Requires.Size.Max", 4],
["ExtraCapacity.Big", "Requires.Size.Min", 10]Small and Big contain only conditions. They are alternatives for shared +2: size 3 gets +2 through Small, size 12 gets +2 through Big, and size 6 gets nothing. Root Requires World always applies. Multiple conditions within one part must all hold.
Now give Small its own operation. Read the result anew: this is a different bonus model.
["ExtraCapacity.Small", "Adds.Workplaces", 1]Small becomes an independent numeric ability, giving its own +1 on size 3. Big remains the purely conditional alternative for shared +2, so size 12 still gets +2 and size 6 gets nothing. One ability's condition must not disable its neighbor. To keep Small as the earlier shared alternative, do not give it a separate operation.
Condition sources and parameter adjustments
Sometimes a world receives a bonus while its owner supplies the condition. For example, add 2 capacity while the player has at least 100 Science. Requires.Owner.Has.Science.Min names whose stock is checked: the owner's. The world remains the recipient, with other capacity multipliers applied normally.
This attaches a trait to the existing World category. WellFundedWorld is our trait name. An owned world's Owner references the player whose Science is checked. Add the code inside a Logic array.
["World", "Has", "WellFundedWorld"],
["WellFundedWorld", "Is", "Trait"],
["WellFundedWorld", "Requires.Owner.Has.Science.Min", 100],
["WellFundedWorld", "Adds.Workplaces", 2]At player Science 99 the addition is inactive, at 100 active, and spending below 100 removes it again. Removing Owner from Requires.Owner.Has.Science.Min checks the world's own Science instead. The trait follows current stock. Meeting the condition once does not make it permanent. Saving initial event thresholds with Requires or Goal is a different mechanism.
Existing definitions may use Adds.Source. It selects a shared object for Requires checks: a direct Owner, Parent, Target, or PlacedAt relation, or an existing object's name. Arbitrary Owner.Size paths are unsupported in Adds.Source. An unresolved reference keeps the check on the original object. A typo does not imply an always-false condition.
A part's own Adds.Source replaces the parent's. There is no separate Source predicate. Current limitation: changes in a related object's stock through Adds.Source may not update an already active bonus. Use direct Requires.Owner.Has.Science.Min for owner conditions as above.
Distinguish the checked object from Per, the calculation quantity, and Target, the recipient.
This changes an existing ability's strength as RobotUprising develops. The event has Progress and Cap reduces building contributions to the target world's Worker slots. Target.PlacedAt selects buildings placed on the event's target, without reducing the world's own base Worker slots. This changes an ability coefficient, rather than creating the event or its schedule.
First select whose contributions will shrink, the first setting of existing Cap.
["RobotUprising.Cap", "Target", "Target.PlacedAt"],
["RobotUprising.Cap", "Multiplies.Workplaces", 1]Target.PlacedAt finds buildings on the uprising's world target. Multiplier 1 leaves contributions unchanged for now. A building contributing 8 still gives 8 Worker slots. The world's own Worker slots are excluded.
Now adjust this ability's coefficient by uprising Progress. Target has a new specific role here: it references Cap itself rather than the world or buildings.
["RobotUprising.Cap.Adjustment", "Target", "RobotUprising.Cap"],
["RobotUprising.Cap.Adjustment", "Per", "Progress"],
["RobotUprising.Cap.Adjustment", "Adds.Multiplies.Workplaces", -0.2]At Progress 1, Cap's coefficient is 1 − 0.2 = 0.8, turning contribution 8 into 6.4 before rounding. Progress 2 gives 0.6 and contribution 4.8. The world's own base remains. This is the familiar multiplier addition with an existing persistent numeric ability's parameter as recipient. It does not permit arbitrary fields to be changed by string address. Both parts together follow.
["RobotUprising.Cap", "Target", "Target.PlacedAt"],
["RobotUprising.Cap", "Multiplies.Workplaces", 1],
["RobotUprising.Cap.Adjustment", "Target", "RobotUprising.Cap"],
["RobotUprising.Cap.Adjustment", "Per", "Progress"],
["RobotUprising.Cap.Adjustment", "Adds.Multiplies.Workplaces", -0.2]The parameter must already exist on a persistent numeric operation. This form does not set one-time reward or random-choice parameters. Do not create cycles of abilities endlessly adjusting each other or use one name for both a recipient category and ability parameter. Ordinary bonuses need only direct Adds.F, Multiplies.F, and Per.
Min, Max, and Round - bounds and rounding
Start with a stock lower bound. This allows up to a thousand Minerals of debt for existing Minerals:
["Minerals", "Count.Min", -1000]Stock may become −200 or −1000 but must not go below −1000. Count.Min 0 prevents negative stock. This bounds a quantity rather than checking a condition or awarding resources. Voluntary purchases still need affordable payment.
Now separately choose rounding for the Worker upper bound. Ceil rounds up and Floor down. A calculated maximum of 3.2 gives 4 with Ceil and 3 with Floor. Upward rounding is:
["Workers", "Count.Max.Round", "Ceil"]Round concerns calculated Count.Max specifically. It does not round all Worker numbers in the game. An explicit rule replaces an inherited one. For downward rounding, replace Ceil with Floor in the same line.
After those separate explanations, combine both independent settings in one file:
["Minerals", "Count.Min", -1000],
["Workers", "Count.Max.Round", "Ceil"]Min and Max depend on their construction: Count.Min bounds stock, Requires.F.Min checks at least, Random.Min sets a range edge, and Goal.R.Min a minimum quest gain. Not every numeric property enforces arbitrary bounds. Weight.Max alone does not constrain mass. Icon does not become numeric from a .Max ending.
Adds.Round and Multiplies.Round round a one-time operation's change rather than its coefficient or remaining stock. Multiplies.Workers.Count 0.9 reduces stock 11 by 1.1. With Multiplies.Round Floor, change −1.1 rounds down to −2, leaving 9 Workers. Without Round there is no mandatory minimum deduction. Trade.Max has its own upward-rounding rule and needs no Trade.Max.Round.
Resources, population, and economy
Resource, Stat, and Currency - resource roles
Create a resource named Alloy. First only declare it as a resource:
["Alloy", "Is", "Resource"]Resource gives Alloy quantity rules. It is only described so far: this neither awards it nor creates sources. Now attach player stock:
["Player", "Has", "Alloy"]The player gets independent Alloy stock in a new game. Without Count it starts at zero. Set its initial amount next:
["Alloy", "Count", 10]Stock now starts at 10. This is a one-time initial value rather than 10 production per turn. Another object with Has Alloy has stock independent of the player's.
Add Stat separately to show its quantity in the statistics panel:
["Alloy", "Is", "Stat"]Stat displays the number. It neither creates production nor makes Alloy money. Base-game Credits additionally has Currency, for example:
["Credits", "Is", "Currency"]This illustrates the existing game, rather than adding a second currency. A data set permits one Currency. Alloy remains an ordinary resource here.
Resource need not be Stat and Stat need not be Resource. One loaded game permits one Currency. Is Predicate allows the resource name itself as a predicate. Without it, the name can still follow Cost or Production and be a Has value, but cannot stand alone in the triplet's middle position.
Version A gives the player 10 Alloy with no production or sources. Alloy is an invented resource name and ore_iron an existing icon.
["Alloy", "Is", "Resource"],
["Alloy", "Is", "Stat"],
["Alloy", "Is", "Predicate"],
["Alloy", "Icon", "ore_iron"],
["Alloy", "Count", 10],
["Player", "Has", "Alloy"]Count sets initial stock. A new Resource starts at zero without it. Has on another holder creates independent stock. Is Resource alone enables neither production, sources, nor trade. Set these separately. Resource names must have no dots. Do not redeclare a built-in word as your predicate. Such a name can be an argument only in constructions permitting it.
Now add production separately. In version B, homeworld Workers make Alloy. First examine only the rate in a new corporation's Factory part:
["NewAlloyCorp.Factory", "Production.Alloy", 0.5]Production.Alloy 0.5 means half an Alloy per assigned Worker per turn. Two produce 1, four produce 2. Without assignments output is zero. Require raw materials with a cost per same Worker:
["NewAlloyCorp.Factory", "Cost.Minerals", 1]Each Worker here needs 1 Mineral. Two therefore produce 1 Alloy and spend 2 Minerals. This is a per-turn production expense rather than a hiring price. Now specify where they work and assemble version B. Use it instead of A: its initial Count is 0 rather than 10.
NewAlloyCorp inherits Miners abilities from CorpMiner. Select it for a new game, select home, and assign two free Workers. Factory is a corporation-definition part. Target World.Homeworld directs it to the owned homeworld. With sufficient inputs, each assigned Worker there additionally produces 0.5 Alloy and spends 1 Mineral per turn.
Two give 1 Alloy and consume 2 Minerals beyond the world's ordinary flows. With insufficient materials, only fully funded production units execute. Price enables Alloy trade in the existing currency. Resource generation covers natural sources and exploration choices.
Save the full array as Logic/Alloy.json inside your mod. Set the mod's name and modinfo.json as in the first guide example. Add the following Text/enUS.json dictionary for resource and corporation names.
[
["Alloy", "Is", "Resource"],
["Alloy", "Is", "Stat"],
["Alloy", "Is", "Predicate"],
["Alloy", "Name", "AlloyName"],
["Alloy", "Icon", "ore_iron"],
["Alloy", "Count", 0],
["Alloy", "Price", 4],
["Player", "Has", "Alloy"],
["NewAlloyCorp", "Is", "CorpMiner"],
["NewAlloyCorp", "Name", "NewAlloyCorpName"],
["NewAlloyCorp.Factory", "Target", "World.Homeworld"],
["NewAlloyCorp.Factory", "Production.Alloy", 0.5],
["NewAlloyCorp.Factory", "Cost.Minerals", 1]
]Text/enUS.json for version B:
{
"AlloyName": "Alloy",
"NewAlloyCorpName": "Alloy Producers"
}After starting as Alloy Producers, Alloy appears in the resource panel. Output is zero before assignment. Assign two Workers at home, check Alloy income and Mineral expense, then end the turn. Changing Production.Alloy 0.5 to 1 makes these two produce 2 Alloy per turn at the same 2-Mineral expense.
Is Resource allows the new material in Income.Alloy, Production.Alloy, Upkeep.Alloy, Cost.Alloy, Growth.Alloy, and Alloy.Count. These compound forms need no Is Predicate. That declaration is required only when Alloy itself is the middle-position word.
Count - quantity and bounds
Count sets stock quantity. Continue Alloy from the previous article and replace its initial 10 with 12:
["Alloy", "Count", 12]Player Alloy starts at 12 in a new game. The resource definition holds the initial value, while each holder has independent mutable stock. One spending Alloy does not change another's amount. Scenario starting rewards apply separately: starting Water may gain resources from Start, for example. Our scenario awards no Alloy.
Count on a resource definition sets its initial amount, including fractions. Count.Min and Count.Max bound it. Resource's default lower bound is zero. Each holder has its own stock, checked by Requires.Has.Minerals.Min and changed once by Adds.Minerals.Count. These forms set no world production rate.
["Water", "Count", 12],
["Minerals", "Count.Min", -1000],
["Credits", "Count.Max", 100000],
["Player", "Has", "Water"]A negative minimum allows forced debt but not voluntary purchases without funds. Losses and rewards obey bounds and messages show actual changes. Distinguish bounds: Count.Max limits quantity itself, R.Max resource capacity on a holder. Workers.Max on a player limits total population, while Workplaces on a world limits assignments there.
Count can also describe an independent non-resource quantity. Include its Count-bearing definition in an object's Has to create an owned quantity instance. This makes it neither a commodity, production, nor currency. Do not include two unrelated definitions of the same inherited quantity simultaneously, making lookup ambiguous.
Production.Minerals on a world is Minerals per Worker per turn. Minerals.Count on a player is accumulated stock. Changing Count creates neither production nor Worker assignments.
Old or brief examples may use Adds.Minerals without Count. It remains available for existing resources, but Adds.Minerals.Count states stock changes more clearly. An action, scenario start, or choice outcome applies a one-time reward. A line on a persistent technology effect alone does not refill stock. ‘Events and Event’ explains standalone events' scaled rewards.
Workforce and FreeWorkers - Workers and assignments
Workers belong to a shared player pool. With 10 Workers and three assigned to a world, seven remain free. Assign another to leave six. Moving the slider changes employment of existing population.
Is Workforce belongs to one Worker resource. Its shared stock belongs to the player. World, building, or task assignments occupy whole Workers without creating a second population. Fractional total stock remains but cannot yet be assigned. Population loss releases assignments exceeding the available count.
Workers is the existing population resource and WorkersFree the derived free remainder. This shows the base game's structure. Free Workers need no second Resource/Count.
["Workers", "Is", "Resource"],
["Workers", "Is", "Predicate"],
["Workers", "Is", "Workforce"],
["WorkersFree", "Is", "FreeWorkers"],
["WorkersFree", "Is", "Predicate"],
["WorkersFree", "Is", "Stat"]WorkersFree is the integer part of population minus employed Workers. Ordinary trade occupies none. Rule.TradeWorker can change that, as in game rules. WorkersFree needs no Has, Resource, or Count: it is read-only. Apply it to familiar income as an additional DeepExtraction ability active after research.
["DeepExtraction.FreeScience", "Per", "WorkersFree"],
["DeepExtraction.FreeScience", "Adds.Income.Science", 1]With 10 Workers and three world assignments, this adds 7 Science per turn. Base income 2 gives total 9. Assign another free Worker: the addition becomes 6 and total 8. Assigned-Worker production is calculated separately.
Workplaces - assignment capacity
Places limit assignments without creating people. World base 3 plus an Outpost's 8 gives 11 before other multipliers and limits.
First set the world's own Worker slots. This sets World's base:
["World", "Workplaces", 3]A world with this base has three Worker slots before other rules. Add Worker slots from a completed Outpost:
["Outpost", "Adds.Workplaces", 8]Construction adds 8 Worker slots to its world: base 3 plus building makes 11. Population does not grow, only assignment capacity. Now select a separate Colonists multiplier:
["CorpColonist", "Multiplies.Workplaces", 1.4]Only a CorpColonist game multiplies the sum by 1.4: 11 × 1.4 = 15.4 before rounding. Control or other assignment limits may reduce availability further. Tooltip and slider use the same effective limit.
World is the existing world category, Outpost a Building/SurfaceBuilding, and CorpColonist the selectable Colonists corporation. This edits existing definitions. The Outpost must actually be built and the corporation selected.
["World", "Workplaces", 3],
["Outpost", "Adds.Workplaces", 8],
["CorpColonist", "Multiplies.Workplaces", 1.4]Outpost's Adds.Workplaces adds to its world without creating people. Surface buildings do not each have separate sliders. A multiplier without base Worker slots creates none. Blockade, control, and Workers quantity maxima may further limit assignments. Multiple limits use the smaller.
Without a building's own Workers quantity, its Worker slots add to the world, which receives assignments. With its own Workers quantity, assignments are independent and Worker slots are not also added to the world. A surface Outpost and an independently staffed station must not count the same contribution twice.
Production - output through labor
Production is output from assigned Workers. Rate 0.5 means half a product per person per turn. Cost on the producing ability sets input per employed Worker, rather than a factory purchase price.
Take version B from Resource: additional homeworld Alloy output for NewAlloyCorp. First read only its rate, part of the complete definition below.
["NewAlloyCorp.Factory", "Target", "World.Homeworld"],
["NewAlloyCorp.Factory", "Production.Alloy", 0.5]Factory affects the owned homeworld. Each assigned Worker adds 0.5 Alloy per turn: two give 1, four give 2. No assignments means no output. Production already counts people. Do not add Per Workers for the same people.
Now require materials for this output.
["NewAlloyCorp.Factory", "Cost.Minerals", 1]Cost here is expense per Worker per turn. Two spend 2 Minerals for 1 Alloy. Changing Production.Alloy 0.5 to 1 yields 2 Alloy for the same 2 Minerals: cost is per Worker, rather than per Alloy. The full version B follows. Do not repeat the file if already added from Resource.
[
["Alloy", "Is", "Resource"],
["Alloy", "Is", "Stat"],
["Alloy", "Is", "Predicate"],
["Alloy", "Name", "AlloyName"],
["Alloy", "Icon", "ore_iron"],
["Alloy", "Count", 0],
["Alloy", "Price", 4],
["Player", "Has", "Alloy"],
["NewAlloyCorp", "Is", "CorpMiner"],
["NewAlloyCorp", "Name", "NewAlloyCorpName"],
["NewAlloyCorp.Factory", "Target", "World.Homeworld"],
["NewAlloyCorp.Factory", "Production.Alloy", 0.5],
["NewAlloyCorp.Factory", "Cost.Minerals", 1]
]Save the array as Logic/Alloy.json. Resource contains Text/enUS.json for AlloyName and NewAlloyCorpName. Select the new corporation and assign two homeworld Workers. With sufficient inputs they add 1 Alloy and spend 2 Minerals per turn. Check resource tooltips and stock after the turn. Assign people with the world slider.
Production.R = K means K of declared resource R per assigned Worker per turn. On a world it is extraction rate, and on a factory ability additional production rate. Without Workers, output is zero. Income instead needs no assignments, while Adds.R.Count changes stock once.
Production ability Cost is per Worker rather than per product. Doubling Production.Alloy therefore doubles output without increasing Mineral cost. On a world, Production.R sets the rate and Production.R.Base adds a base contribution.
A building with its own Workers is different. Examine where it gets its rate. These settings concern existing MyLab, defined and built in Building. In both exercises the world has Mineral rate 2, the building two assigned Workers, and no other bonuses.
["MyLab", "Has", "Workers"],
["MyLab", "Workplaces", 2]Without its own Production.Minerals, MyLab uses world rate 2: its two assigned Workers produce 4 Minerals per turn. These are building Workers rather than world Workers counted again. An explicitly declared world base contributes to the inherited rate.
Now explicitly give the building its own rate.
["MyLab", "Production.Minerals", 0.5]Its own 0.5 replaces world rate 2. The same two MyLab Workers produce 1 Mineral per turn rather than 5. Zero also counts as an explicit own rate: absence differs from zero. Adds.Production.R and Multiplies.Production.R change rates without assigning people. Production.R.Name, Description, and Hide control explanation and presentation.
A separate exercise uses a surface addition without building Workers. Remove MyLab Has Workers from the previous version and leave two Workers assigned to the world.
["MyLab", "Is", "SurfaceBuilding"],
["MyLab", "Production.Minerals", 0.5]MyLab now has no independent production. Its 0.5 adds to world rate 2: two world Workers give 2 × (2 + 0.5) = 5 Minerals instead of 4. Returning an owned Workers quantity separates producers again, rather than retaining the addition and counting it independently too. No extra Per for the same people is needed.
So far bonuses remain active with their sources. Another mechanism changes existing rates once. In existing SuppliesMinerals, replace the one-time Mineral award with a change on its explicit target. Do not retain both effects for this exercise.
["SuppliesMinerals", "Target.Adds.Production.Minerals", 1]A selected body's Mineral rate 2 becomes 3 after the one-time application. This changes the body statistic rather than temporarily adding player income. The event still needs valid triggering and target selection.
Demonstrate existing-resource iteration at scenario creation separately. MyScenario inherits ScenarioG in Scenarios. Add a one-time starting adjustment reducing only rates strictly greater than 1.
["MyScenario.Poor", "Target.Adds.Production.Resource", -1],
["MyScenario.Poor", "Requires.Production.Resource.More", 1]A created body had 3 Minerals and 1 Water per Worker per turn, with no Science production. Afterward Minerals becomes 2, Water stays 1 because the check is strictly greater than 1, and no Science source appears. Resource iterates existing rates and Requires checks each separately. Short Target.Adds.Resource likewise iterates existing extraction without this check. Persistent Adds.Production.Resource is unsupported: name a particular resource.
A Production.R source tooltip shows its production rate and applicable bonuses. Resource stock, total inflow and outflow per turn, limits and forecasts belong in the resource stock's own tooltip. Production.R alone does not give that source a stock of the resource. A modified rate tooltip shows its base, applied changes and final value.
Income - independent receipts per turn
Income is a per-turn receipt without Worker assignments. Here is an independent income setting for existing Science:
["Science", "Income", 2]Each holder of Science stock gets 2 per turn. Starting at 10 with no other flows, stock becomes 12 after a turn and 14 after another. No assignments are needed.
Income.R sets an object's own resource change per turn without assigned Workers. It can be positive or negative. On a resource definition use bare Income: [Science, Income, 2] gives each holder 2 Science per turn. Bare Income on an arbitrary object does not replace Income.R.
Science already belongs to the player's resources. The first statement sets independent income. The second changes CorpMagnate interest: Interest is its part and Per Credits reads the Magnates player's money. No planetary properties are needed.
["Science", "Income", 2],
["CorpMagnate.Interest", "Per", "Credits"],
["CorpMagnate.Interest", "Adds.Income.Credits", 0.03]Per Credits and Adds.Income.Credits calculate from stock's integer part. Multiplies.Income.Credits multiplies positive receipts. Negative own Income differs from separate Upkeep. Consider stock 100 Credits, interest 0.03, and income multiplier 1.1, with no other flows.
- Case A: the player has Income.Credits −2. It combines with interest 100 × 0.03 = 3 into own flow +1. The positive result is multiplied by 1.1: (−2 + 3) × 1.1 = +1.1 Credits per turn.
- Case B: no negative Income.Credits, but separate player Upkeep.Credits 2. Income 3 is multiplied by 1.1 before upkeep 2 is subtracted: 3 × 1.1 − 2 = +1.3 Credits per turn. The income multiplier does not increase upkeep itself.
Negative Income is a term in the object's own flow, while Upkeep is a separate maintenance expense. Choose by rule meaning rather than sign alone. Each ability keeps its conditions. Removing one income source must not remove others.
Upkeep - maintenance per turn
Upkeep is recurring maintenance expense. First consider only a completed Outpost:
["Outpost", "Upkeep.Energy", 2]Each operating Outpost needs 2 Energy per turn. The number is positive because Upkeep already means expense. Construction's one-time price uses Cost. Insufficient Energy disables the Outpost.
Upkeep.R = N requires N of R per turn. N is nonnegative: no minus sign is needed. On buildings, operation depends on this expense. On a player it is mandatory maintenance. Per Workers and Adds.Upkeep.Water express expense per person.
Population Water use is separate. Player.WaterUpkeep already exists. Per Workers reads player population and Adds.Upkeep.Water the per-person rate. At 10 Workers, coefficient 0.4 demands 4 Water per turn before other rules. Compare it with fixed building expense:
["Outpost", "Upkeep.Energy", 2],
["Player.WaterUpkeep", "Per", "Workers"],
["Player.WaterUpkeep", "Adds.Upkeep.Water", 0.4]Existing Starvation responds to Water shortages and defines Worker losses. Blocks Upkeep.Water removes Water use itself, while Blocks Starvation prevents only starvation losses. Hide conceals the interface line while retaining expense and consequences.
Growth, Change, and Threshold - growth and accumulation
Start with population growth. Existing ModeHardcore uses its Natural part. Reading exact Worker quantity is familiar from Per:
["ModeHardcore.Natural", "Per", "Workers.Count"],
["ModeHardcore.Natural", "Adds.Growth.Workers", 0.01]With this mode selected, population 100 grows by 100 × 0.01 = 1 Worker per turn before limits. At 50 it grows by half a Worker, retained in shared stock. Growth describes growth rather than current assignments.
Another version grows one resource from another's flow. These player lines link Science growth to the player's own Mineral flow:
["Player", "Growth.Science.Source", "Minerals"],
["Player", "Growth.Science.PerUnit", 0.1]Source names the resource and PerUnit the coefficient. Own Mineral flow 10 gives Science growth 1 before other rules. Both resources must belong to this player. Do not automatically include source trades: this reads own flow rather than the whole turn result.
ModeHardcore is an existing selectable mode, Natural its growth part. When chosen, Per Workers.Count reads exact population: 100 Workers at 0.01 give initial growth 1 before limits. Growth.Science.Source and PerUnit belong to the holder of both resources.
["ModeHardcore.Natural", "Per", "Workers.Count"],
["ModeHardcore.Natural", "Adds.Growth.Workers", 0.01]Change.R shows net resource change per turn including trade and tasks. Read it in conditions or tutorial text. Do not write Change.R or modify it with Adds: the game derives it. Forecasts show full demand, while turns execute funded work only. Shortages can therefore make actual changes differ from forecasts.
Now accumulate Nutrients and spend them on new Workers. First declare the resource, player stock, and receipts. This fragment contains only that setup:
["Nutrients", "Is", "Resource"],
["Nutrients", "Is", "Stat"],
["Nutrients", "Count", 0],
["Player", "Has", "Nutrients"],
["Player", "Income.Nutrients", 1]Nutrients is a new resource. It starts at zero and gains one per turn, reaching 2 after two turns. None of these lines creates people. Exchanging accumulation for a Worker needs two more:
["Player", "Threshold.Nutrients", 3],
["Player", "Threshold.Nutrients.Grows", "Workers"]Threshold sets 3 and Grows names Workers. At 3 Nutrients the game spends them and adds a Worker. Excess stock remains. Checks repeat while enough remains, without exceeding Workers maximum.
After each crossing, threshold becomes max(old + 1, floor(old × Increasing)). Increasing defaults to 1, so thresholds still grow 3, 4, 5… This is neither a price nor Goal. A declared Resource, player quantity, and flow are required. Do not use a negative accumulator balance as a new punishment system: Shortage handles life support.
["Nutrients", "Is", "Resource"],
["Nutrients", "Is", "Stat"],
["Nutrients", "Count", 0],
["Player", "Has", "Nutrients"],
["Player", "Income.Nutrients", 1],
["Player", "Threshold.Nutrients", 3],
["Player", "Threshold.Nutrients.Grows", "Workers"],
["Player", "Threshold.Nutrients.Increasing", 1]In an ordinary Worker game without other Nutrients flows or growth limits, the third such turn adds one Worker and empties Nutrients. The next Worker needs four. Set Name and Icon normally. Translation does not affect the mechanic.
Price and Trade - exchange rates and trade
First set a commodity's base price. Minerals already exists and Credits is the base-game currency:
["Minerals", "Price", 1]One Mineral's base price is one Credit. This alone buys nothing. A shared coefficient additionally affects purchase price:
["Trade", "Price.Buy", 1.2]Without personal discounts, one Mineral costs 1 × 1.2 = 1.2 Credits. Selling uses a separate coefficient:
["Trade", "Price.Sell", 0.8]Selling one Mineral earns 0.8 Credits. Different buy and sell rates make selling and immediately buying back unprofitable. Another resource's Price sets that commodity's base.
Actual trading requires an order on the Trade screen. Buy 2 Minerals repeats each turn, demanding 2.4 Credits at price 1.2. Order quantity and price are independent. With insufficient money or goods, only the funded part executes.
Resource Price is its unit base in currency. Without Price it cannot trade, but price 0 still allows trade. Trade.Price.Sell and Trade.Price.Buy set shared coefficients. Player Price.R, Price.R.Sell and Price.R.Buy refine a particular commodity's price. A resource named Buy or Sell remains a resource name wherever the construction expects one.
Now limit one commodity row's volume. Assume enough goods and currency for these calculations. Stock limits follow separately.
["Trade", "Count.Max", 4]Limit 4 prevents buying six Minerals per turn: the order caps at four. At the familiar 1.2 rate it buys 4 for 4.8 Credits. Volume changes do not change unit price.
Increase the limit through one actually built player Outpost.
["Outpost", "Adds.Trade.Max", 3]One owned Outpost gives limit 4 + 3 = 7. Set an order for 6 again to buy 6 for 7.2 Credits. An unbuilt menu Outpost grants no limit. Raising the limit need not restore a previously clipped order automatically.
Separately change Magnates' purchase rate without changing volume.
["CorpMagnate", "Adds.Trade.Price.Buy", -0.24]For CorpMagnate, purchase coefficient 1.2 becomes 0.96. At base Mineral price 1 and no other adjustments, six cost 6 × 0.96 = 5.76 Credits rather than 7.2. This discounts the rate rather than adding three trade capacity. All settings together follow.
["Minerals", "Price", 1],
["Trade", "Price.Sell", 0.8],
["Trade", "Price.Buy", 1.2],
["Trade", "Count.Max", 4],
["Outpost", "Adds.Trade.Max", 3],
["CorpMagnate", "Adds.Trade.Price.Buy", -0.24]Rate is commodity base price multiplied by the shared buy/sell coefficient and its personal commodity coefficient. Player Trade.Count.R separately sets the per-turn order: positive buys, negative sells, zero stops it. Price changes alone buy nothing. Players set orders on Trade.
Count.Max on Trade limits one commodity row. Trade.Max reads it and personal contributions, rounded up. Without a bound, this limit does not constrain volume. Orders become integers and are capped. Losing home does not itself forbid trade. Old Trade.R and Trade.Sell/Buy.Mult fields are unused.
Finally consider payment across rows. In a separate exercise take two commodities at base price 1 and the familiar rates. This is a calculation assumption rather than changing all game commodities. Order sales of three units of one and purchases of two of the other.
["Trade", "Price.Sell", 0.8],
["Trade", "Price.Buy", 1.2]Without personal adjustments, selling three earns 2.4 Credits. Sales execute before purchases, so even starting at zero those 2.4 buy two at 1.2. With only two available to sell, proceeds are 1.6, enough for one whole purchased unit rather than two. The funded part of the order executes.
Control - available Worker slot fraction
Control.Here limits the available fraction of Worker slots. Consider OccupiedSector:
["OccupiedSector", "Is", "Trait"],
["OccupiedSector", "Control.Here", 0.5]An object receiving this trait can use half its Worker slots. 11 becomes 5 after rounding down. People do not disappear: permitted assignments shrink. Removing the trait restores normal availability. Attach it to existing TinyRock below.
Control.Here is a fraction from 0 to 1. Multiple restrictions use the smallest fraction and round Worker slots down. Zero prevents work, 1 retains all Worker slots. On a trait, it restricts the attached holder.
OccupiedSector is declared here, while TinyRock is an existing rocky-world class. Has attaches it to new bodies of this class. Is Trait alone changes no control without Has or event Marks.
["OccupiedSector", "Is", "Trait"],
["OccupiedSector", "Control.Here", 0.5],
["TinyRock", "Has", "OccupiedSector"]Control.Rating is a separate 0–6 rating rather than a Worker slot fraction. Bare Control sets neither. Is Trait only declares: attach through Has or a granting rule for an effect. Removing the last restriction restores capacity automatically.
Approval and Expectations - approval and expectations
First consider board approval itself. Approval is an existing resource. Count sets initial trust:
["Approval", "Count", 3]The player starts with three approval. Reaching the lower bound triggers the game's defeat. This is stock changed by quest outcomes, rather than completed-quest count. Now separately set board expectations:
["Approval", "Expectations", 1]Expectations live on the Approval quantity and start at 1. They determine the next judgment's strictness. Existing success outcome BoardPleased can raise them:
["BoardPleased", "Approval.Judgment", 0.5]At expectations 1, this success raises them to 1.5. Approval award itself is separate. For failure, consider:
["BoardDispleased", "Approval.Judgment", -1]Failure first removes Approval according to current expectations, then reduces expectations by 1 without going below 1. At expectations 2, the player loses 2 Approval and expectations become 1. All four independent settings are combined below.
Approval uses initial stock and bounds like other quantities. Reaching its player lower bound invokes Defeat from Approval's Has. Expectations on the Approval quantity is a finite number at least one, default minimum one.
BoardPleased and BoardDispleased are existing board-quest outcomes. Success Judgment 0.5 raises expectations, such as 1 to 1.5. Failure Judgment −1 first deducts Approval by current expectations, then lowers them by 1 with minimum 1: expectations 2 loses 2 Approval and becomes 1. Success Approval awards are separate from Judgment.
["Approval", "Count", 3],
["Approval", "Expectations", 1],
["BoardPleased", "Approval.Judgment", 0.5],
["BoardDispleased", "Approval.Judgment", -1]Positive Approval.Judgment raises future expectations. Negative judgment deducts Approval by current expectations before reducing them by the declared amount, preserving minimum one. This differs from Adds.Approval.Count: addition changes stock, while Judgment describes board assessment. Holders have independent expectations. An arbitrary Expectations on Player does not replace the Approval quantity's property.
TechLevel - a location's technological level
Begin with a world's numeric description. Set it for authored Earth in the Solar System as:
["Earth", "TechLevel", 8]Earth receives descriptive level 8 without researching player technologies. Tier places technologies in the tree and Level counts repeatable research. Next add a translatable label to TechLevel.
TechLevel = N sets a settlement's or another eligible object's numeric technological level. Tier is tree position, while Level counts completed repeatable studies. Changing TechLevel alone researches no technologies and unlocks no automatic set of buildings.
Authored Earth below exists only in the Solar System. This does not create it on random maps. MyDigitalAge is an invented label rule for level at least 8. Add MyDigitalAgeName as Digital Age to Text/enUS.json. This describes a world rather than awarding technology.
["Earth", "TechLevel", 8],
["MyDigitalAge", "Grants", "TechLevel"],
["MyDigitalAge", "Requires.TechLevel.Min", 8],
["MyDigitalAge", "TechLevel.Text", "MyDigitalAgeName"]The conditional variant adds a translated level label. Without one, the number is shown. Multiple active labels are listed. Keep the number and descriptive consequences separate. For research cost use Cost.Research, and for repetition Repeatable and Level, rather than TechLevel.
Turn calculation order and shortages
A turn starts by producing 4 Minerals. Trade then sells 2 for money. Upkeep and a task installment are paid after trade. If any payment resource is insufficient, the task waits. A funded operation means the part of work or trade with enough actual resources.
Shared order is all resource receipts, trade, upkeep, processes, life support. Sales see current-turn production, and upkeep sees trade results. Mandatory player expense is reserved before disableable consumers. A shortage of one payment resource can halt an entire task step without partially spending the others. Labor production and trade execute funded units.
Forecasts show all planned receipts minus expenses even when work cannot yet be funded. A negative number warns of shortage rather than guaranteeing negative stock: forbidden debt does not occur. History and messages show actual changes. No duplicate income or expense layers are needed to compensate for this distinction.
Actions, construction, and research
Cost - price and its scale
Start with one action's cost in one resource. The complete Logic/ExplorePrice.json is:
[
["Explore", "Cost.Minerals", 5]
]Cost.Minerals is price in Minerals. Base exploration costs 5, modified by local discounts and surcharges. This is action payment, unlike trade Price or per-turn Upkeep. Costs cannot be negative.
A data-defined action can require two resources together. Take ExchangeWater already created in Action, first setting only Water:
["ExchangeWater", "Cost.Water", 20]The exchange requires 20 Water. An extra statement also requires Energy:
["ExchangeWater", "Cost.Energy", 5]Both 20 Water and 5 Energy are now required. They are not alternatives. Data-defined actions and event choices support this. Existing Build, Research, Explore, Colonize, GeoSurvey, and Probe read one direct cost resource. Do not automatically extend this two-resource ExchangeWater example to them.
Repeat-use prices can grow separately. This belongs to the same action:
["ExchangeWater", "Cost.Multiplies", 1.5]The first exchange needs 20 Water and 5 Energy. After an attempt the next costs 30 Water and 7.5 Energy before applicable rounding. Each further attempt multiplies again by 1.5. This does not boost awarded Minerals. The game tracks uses. A new event-choice card starts its own history from the original cost. Invest's percentage cost is separate below.
Invest is an existing experiment-investment choice. Examine only its Mineral cost. Its Credit cost remains. For the first exercise, keep only ten percent in Minerals. Remove any previous direct or scaled Mineral additions you edited.
["Invest", "Cost.Minerals.Percent", 10]At proposal issuance with 100 Minerals, the percentage part is 10. At 20, it is 2. These amounts are saved on the proposal. Later receipts do not increase this part automatically. A positive percentage costs at least one unit even if calculated below one. Invest's Credit cost is paid separately.
Now introduce an explicit three-Mineral minimum.
["Invest", "Cost.Minerals.Percent", 10],
["Invest", "Cost.Minerals.Min", 3]Initial stock 20 would give 2, but Min raises the Mineral part to 3. At stock 100, ten percent gives 10 and the minimum changes nothing. Minimum is a lower bound rather than an extra payment. The Credit price remains.
Add a fixed five-Mineral component to that percentage cost.
["Invest", "Cost.Minerals", 5],
["Invest", "Cost.Minerals.Percent", 10],
["Invest", "Cost.Minerals.Min", 3]At initial stock 20, first add 5 and 2 to get 7. Min 3 then leaves it at 7. The minimum bounds the sum rather than each component. Credits still need separate payment.
An alternative component uses economic scale. This version replaces direct Cost.Minerals 5 with scaled cost while retaining percentage and minimum.
["Invest", "Cost.Minerals.Scaled", 0.5],
["Invest", "Cost.Minerals.Percent", 10],
["Invest", "Cost.Minerals.Min", 3]At scale 20 and stock 20, scaled cost is 10 and percentage cost 2. Total 12 exceeds minimum 3. Retaining direct cost 5 too would add it, totaling 17. Credit cost remains. A short assembly of exchange and the original percentage Invest follows. It does not require retaining all exercise versions together.
Existing Explore stores its cost as Cost.Minerals. The examples also use ExchangeWater from Action and existing Invest. Add ExchangeWater's complete definition from the next article first. Cost lines alone create no new button.
Cost.R = N requires N of declared R. N is nonnegative. Explicit zero means free. Missing cost is not always zero: some actions become unavailable without it. Data-defined actions and choices may require multiple resources together. Existing Build, Research, Explore, Colonize, GeoSurvey, and Probe read one direct cost resource.
This replaces ExchangeWater's cost with 20 Water and 5 Energy, each next attempt 1.5 times more expensive. Invest's Mineral cost becomes percentage-based with minimum 3. New values apply to defined operations.
["ExchangeWater", "Cost.Water", 20],
["ExchangeWater", "Cost.Energy", 5],
["ExchangeWater", "Cost.Multiplies", 1.5],
["Invest", "Cost.Minerals.Percent", 10],
["Invest", "Cost.Minerals.Min", 3]- Cost.R.Scaled K: K × event economic scale. Cost.R.Percent N: N percent of stock at issuance, with minimum one for a positive percentage. Cost.R.Min bounds the sum of fixed, percentage, and scaled costs for one resource from below.
- Cost.Target = Parent: a choice pays the originating card's declared cost. That cost must exist on the event rather than be guessed from the choice name.
- Cost.R.PerTurn N: recurring expense in a supported context. Use Upkeep.R for persistent building maintenance. Cost.R alongside Production is raw materials per Worker, rather than purchase price.
- Cost.R.PerValue K: price per added cargo unit on a choice with Contains.Target and a declared addition. Invalid without that addition.
- Cost.Multiplies K: coefficient for the next action or choice use. Actual application holders retain cost history. A new card starts from its original price. This is not a one-time income multiplier.
Discounts use multipliers: Multiplies.Cost.Build changes construction, Multiplies.Cost.Research research, Multiplies.Cost.Building buildings, and Multiplies.Cost.Outpost Outposts. These cover different purchase sets. Cost.Build.Hot and Cost.Build.Distance are separate price axes for heat and remoteness. Direct Multiplies.Cost.Build.Distance multiplies the axis's full coefficient: 1.6 with a factor of 0.7 becomes 1.12. This differs from reducing trait strength through Multiplies.RemotenessTrait; the Multiplies article explains that formula and example. Cost multipliers do not shorten duration. When resource and action names coincide, meaning follows what is described: payment in that resource or a bonus to that action's cost.
Check a modified price in the action tooltip: it shows the base price, modifiers actually applied, and final value after rounding and limits. A running process shows its unpaid remainder rather than a new full purchase. Without modifiers, identical base and final values are not repeated. The final price already includes the displayed discount; do not subtract it again.
Action - a data-defined action
Create Exchange Water, starting with its declaration:
["ExchangeWater", "Is", "Action"]ExchangeWater is new, Action an existing role. This only declares an action, without saying where it is offered or what it does. Provide it on worlds:
["World", "Able", "ExchangeWater"]Able permits the action. Selecting a suitable World can offer ExchangeWater. Now set familiar cost and one-time reward:
["ExchangeWater", "Cost.Water", 5],
["ExchangeWater", "Adds.Minerals.Count", 3]Execution pays 5 Water and awards 3 Minerals once without changing per-turn income. Timed-action modes award the result after task completion. Processing.Duration below separately sets its base duration. Now assemble name and icon too.
ExchangeWater is our action name. Add the fragment inside a Logic array and ExchangeWaterName as Exchange Water in Text/enUS.json. ore_iron already exists. If you added Cost's example earlier, select one intended exchange price rather than accidentally keeping it in two files.
A new action needs at least a cost or nonzero one-time reward: Is Action alone does not explain its result. Able says where the button is available and Requires when it can be clicked. For corporation-specific actions use Requires.Corporation. Do not attach the action through Corporation Has: a location provides it, while corporation membership is a condition.
["World", "Able", "ExchangeWater"],
["ExchangeWater", "Is", "Action"],
["ExchangeWater", "Name", "ExchangeWaterName"],
["ExchangeWater", "Icon", "ore_iron"],
["ExchangeWater", "Cost.Water", 5],
["ExchangeWater", "Adds.Minerals.Count", 3],
["ExchangeWater", "Processing.Duration", 1]Start a new game, select a world, and find the exchange button. Execution leaves the player with 5 less Water and 3 more Minerals, subject to stock bounds. Processing.Duration sets the base, which a mode may make instant. To offer a button without world selection, provide it to Player instead of a location.
Requires.Corporation CorpRobots restricts it to robots. Optional Chance gives failure risk, zero by default. Include a failure outcome through Has and mark it Failure. Even a failed attempt may raise the next price.
Increase only the Mineral award after each attempt. Start from fixed cost 5 Water, reward 3 Minerals, without other repetition coefficients. Add one line.
["ExchangeWater", "Adds.Minerals.Count.Multiplies", 2]Successful attempts award 3, then 6, then 12 Minerals before bounds. Each still costs 5 Water: reward growth does not raise price. The multiplier advances after an attempt, so the first reward is not doubled yet.
To distinguish one-resource growth from shared growth, add a second award.
["ExchangeWater", "Adds.Energy.Count", 1]With the Mineral multiplier, the first reward is 3 Minerals and 1 Energy, the second 6 Minerals and the same 1 Energy. Energy is not named by Adds.Minerals.Count.Multiplies and does not grow.
Now replace the Mineral multiplier with a shared one: remove Adds.Minerals.Count.Multiplies 2 and use this instead.
["ExchangeWater", "Adds.Multiplies", 2]The first success still gives 3 Minerals and 1 Energy. The second gives 6 and 2: the shared coefficient grows both. It takes a number, with no Random range support here.
Finally distinguish attempts from successful awards. For a separate failure test, add a failed outcome and 100% risk. This is a teaching version rather than a useful exchange.
["ExchangeWater", "Chance", 100],
["ExchangeWater", "Has", "ExchangeFailed"],
["ExchangeFailed", "Is", "Event"],
["ExchangeFailed", "Is", "Failure"],
["ExchangeWater", "Cost.Multiplies", 2]The first attempt costs 5 Water and fails without reward. The second nevertheless costs 10 Water and its potential reward is already 6 Minerals and 2 Energy. At the same risk it fails again. If testing the next attempt as successful, it awards those quantities. Cost and reward histories advance after attempts regardless of success. Remove all exercise lines to return to fixed exchange, rather than accumulating them in the permanent recipe.
Building, Project, Upgrade - things to construct
First declare MyLab a building:
["MyLab", "Is", "Building"]Building lets shared construction rules handle it, without setting location, cost, or result yet. Specify a surface laboratory next:
["MyLab", "Is", "SurfaceBuilding"]SurfaceBuilding means surface construction. Orbital would replace it for an orbital building. Now add familiar Requires and Cost for site, technology, and price, then completed-lab income and upkeep. The complete example combines them.
MyLab below is a new surface laboratory. World is the world category and OutpostConstruction the existing prerequisite. Once researched, Minerals build a laboratory providing Science income and requiring Energy. This recipe creates no Workers. Translate MyLabName as Laboratory.
SurfaceBuilding means surface and Orbital orbital construction. Requires specifies technology, suitable site categories, and an Upgrade's immediate base. The player supplies research checks, the selected body site checks. Existing World, Giant, Asteroid, Earthlike, and other declared categories can be sites.
["MyLab", "Is", "Building"],
["MyLab", "Is", "SurfaceBuilding"],
["MyLab", "Name", "MyLabName"],
["MyLab", "Icon", "outpost"],
["MyLab", "Requires", "World"],
["MyLab", "Requires", "OutpostConstruction"],
["MyLab", "Cost.Minerals", 15],
["MyLab", "Duration", 2],
["MyLab", "Income.Science", 1],
["MyLab", "Upkeep.Energy", 1]In a new game, research OutpostConstruction and select a world to build the lab. It costs 15 Minerals, then gives 1 Science and needs 1 Energy per turn. Duration 2 is base construction time, rather than completed-building lifetime. Mode affects actual time. Ordinary actions use Processing.Duration, but it does not replace Duration here. Before research the lab is visible but unavailable. Set an intended zero price explicitly.
Project is another construction-project result. A new MyProject might start with:
["MyProject", "Is", "Project"]This is only classification rather than a complete project. Project uses construction cost and process but is not Building: a Building-specific discount need not affect it. The laboratory keeps Is Building.
Additional Is Unique limits simultaneous building instances. SpaceStation is an orbital-station family whose variants can be offered separately. Player Has MyLab is unnecessary for construction options. Blocks MyLab or its category at a location prohibits construction even when Or site requirements pass.
Conditions can read Build, the locally available buildings, and Build.Cost, their cheapest one-resource price. Explore.Cost reads today's exploration price. These are derived facts rather than price settings. Target.Build HQ selects places where HQ really can be built, without repeating every Headquarters requirement in the quest.
For an existing upgrade, HQ is Headquarters and Metropolis its improvement. Metropolis already has Building/SurfaceBuilding, technology, price, and effect. These lines show the required base rather than declaring an empty building:
["Metropolis", "Is", "Upgrade"],
["Metropolis", "Requires", "HQ"]The player needs their own completed HQ at the same location. The upgrade replaces one such base, rather than another player's HQ or any previous object. Ordinary MyLab without Upgrade replaces nothing.
Tech, Researching, and Repeatable - research
Declare MyStudy a technology, then include it in the player's tree. These are separate statements:
["MyStudy", "Is", "Tech"],
["Player", "Has", "MyStudy"]Is Tech sets its role and Player Has includes it for every player. One may research it while another does not. Add a bonus active only after completion:
["MyStudy", "Adds.Income.Science", 1]The first completion adds 1 Science per turn. Repeating this technology needs a separate setting:
["MyStudy", "Repeatable", true]A completed second level adds another 1, totaling 2 Science per turn. While the second level is being researched, the first remains active. The full lines below add name, icon, and prerequisite without replacing Repeatable.
Add Field Research, MyStudy. Existing OutpostConstruction must be researched first. Every completed new level adds 1 Science per turn. Add the fragment to Logic and MyStudyName as Field Research to Text/enUS.json.
Is Tech declares the kind and Player Has includes it in each player's tree, creating independent researched instances. Requires sets prerequisites and Or alternatives. Tier and Order set tree layout. Persistent Adds and Multiplies apply after research, including future suitable holdings. This declaration gives no one-time reward.
["MyStudy", "Is", "Tech"],
["MyStudy", "Name", "MyStudyName"],
["MyStudy", "Icon", "flask"],
["MyStudy", "Tier", 2],
["MyStudy", "Requires", "OutpostConstruction"],
["MyStudy", "Adds.Income.Science", 1],
["MyStudy", "Repeatable", true],
["Player", "Has", "MyStudy"]Researching is instance state InProgress or Done. Absence means first research has not started. Do not set Done in a source definition to imitate starting technology. Repeatable is boolean permission. An explicit false overrides inherited true. Level stores completions. Earlier levels stay active during repeat research. Canceling the first removes status, while canceling a repeat retains completed levels.
Technologies need no numeric Adds/Multiplies. Is Tech, Player.Has inclusion, and necessary name, icon, position, and research cost suffice. Their sole result may unlock an event or mission: put Requires.Researched referencing the technology on the unlocked card. With a card Name, the technology's effect description automatically shows ‘Unlocks event’ and its name. Unnamed nested decks produce no separate line. No dummy bonus or copied unlock list is needed.
Default cost comes from Research's Cost.R and growth from Cost.Multiplies. Each completed player research, including repeats, multiplies the already rounded base if the coefficient exceeds one. Base 10 at 1.23 gives 10, 13, 16, 20. Personal discounts apply afterward without reducing the next step's base. A technology's own Cost.R and Cost.Multiplies replace corresponding Research settings. Missing growth or coefficients at most 1 leave the base unchanged. Tier does not affect cost.
Rule.AccumulatedResearch true pays from saved stock: the selected technology waits for its effective Science cost, then spends it all. Canceling preserves stock. Ordinary Research pays and completes immediately. Researching.Steps derives the minimum studies to a goal, including itself and the shared prerequisite path. Do not set it manually. Then links post-research events, rather than a one-time reward on Tech.
A technology's own Description explains it in its tooltip. Keep the report shown after research on a separate reaction included through Has. For MyStudy, add these lines alongside its existing definition:
["MyStudy", "Description", "MyStudyHelp"],
["MyStudy", "Has", "MyStudyResearched"],
["MyStudyResearched", "Is", "TechResearched"],
["MyStudyResearched", "Description", "MyStudyCompleted"]Add MyStudyHelp and MyStudyCompleted to the mod's Text dictionary. The first explains the technology before research; the second is the completion message. TechResearched is the base game's Completed reaction with its standard presentation and sound. MyStudyResearched is this example's reaction name, not a required naming suffix. It is linked by Has and inherits Notifies Completed through Is. This message does not grant another technology bonus.
Unlock previews use ordinary definitions, without a separate copy of their effect text. A building preview shows the result under After construction; an upgrade shows its difference from its immediate predecessor. An unlocked action shows its declared gains and base price. When a technology changes an action with one common base price, its tooltip compares the price before and after research; for a repeatable technology, after the next level. Current player bonuses are included, but a particular world's surcharges are not. A discount on a building category or trait strength cannot yield one universal price without a specific purchase.
Processing and Duration - tasks and durations
Start with already defined ExchangeWater from Action. This sets its base execution time to three turns:
["ExchangeWater", "Processing.Duration", 3]In timed-action modes, exchange creates a task awarding resources after completion. Instant modes may reduce actual duration to zero. Cost still sets payment independently of Processing.Duration.
An existing task adds Processing to its work location. This is only an example of reading game state. Do not write it into a mod:
["Earth_0", "Processing", "Construction_0"],
["Construction_0", "Progress", 2]The first line says Earth_0 has task Construction_0. The second says two work steps are completed. These are neither two new durations nor two buildings. Processing links a task, Progress stores completed work, and Duration configured required time. Live instance names may differ in another game.
Timed-task Progress counts completed steps. Paid resources are separate. Worker-driven tasks may track accumulated resource and threshold. Elapsed turns do not equal work: missing payment makes a task wait. Event Progress also serves conflict scales, covered separately.
What a countdown ends depends on its holder. Building Duration is construction time and does not delete the completed building. Action Processing.Duration is task time. A temporary event's Duration is time until its message and effect expire.
Tasks pay installments on successful steps. At fixed cost 12 Minerals over 3 steps, each payment is 4. Two steps pay 8. If any resource for the third is short, the entire step waits without partial deductions or result. Work and payment survive saves. Cost/duration changes respect amounts already paid. Lowering price below payment does not refund excess.
Canceling removes the task and releases assigned Workers without refunding installments. Incomplete construction gives no finished building and incomplete exploration no revealed body. Accumulated research differs: it waits for full stock without installments, so canceling preserves that stock.
Do not invent Cancel.Refund or JSON completion handlers. Demolish is a separate completed-building action with its own refund. Ordinary Event Duration is effect lifetime rather than financial installments. A launched Mission finishes under its own Duration.
Action Processing.Duration sets base turns, default 1. The action determines completion: construction creates, exploration reveals, exchange awards. An invented task name alone specifies no result.
ExchangeWater already has Is Action, cost, one-time reward, and World Able ExchangeWater from Action. Explore is existing exploration and NuclearDrives existing nuclear propulsion. This only changes existing or already declared operations' durations.
["ExchangeWater", "Processing.Duration", 3],
["Explore", "Processing.Duration", 1],
["NuclearDrives", "Adds.Explore.Duration", -1]Exploration uses base time, orbital distance from home, and Explore.Duration additions, rounded up with minimum one turn. Price discounts do not shorten it. Multiplies.Action.Duration 0 disables timed actions, after which construction and exploration respect Rule.ProgressTasks. These are existing execution modes, rather than a way to make any event a task.
Live Processing references a created task. Progress stores completed turns and resource quantities on tasks actual payment. Processing.Accumulates belongs to a created accumulating process. These records belong to the game. Do not write them instead of action definitions. Worker tasks use assignments and funded labor units. A new task-kind name alone creates no completion behavior.
Bare Duration on an event, effect, or live entity sets lifetime in turns. Absence means indefinite. Birth turn does not reduce it. Expiry executes the declared outcome and removes the entity and temporary contributions. Early resolution and destruction are not expiry. Mission Duration is flight time and Expires the proposal deadline. Duration.Turn is an internal stamp rather than an author setting.
An event category's duration uses the same numeric operations. GameEvent is PreWarpAge's existing Event descendant; quests, opportunities, threats and missions inherit it. Casual uses this setting:
["ModeMeditation", "Multiplies.GameEvent.Duration", 1.5]A positive lifetime in this category is multiplied by 1.5, rounded down and lasts at least one turn: 3 becomes 4. Is categories and named modifiers such as BoardQuest.Duration or EventChoice.Duration are included. This also applies to a selected choice's own effect when the choice is also Event. A choice outside Event keeps its existing term. Action.Duration is processing time and does not change an event's lifetime even when a choice has both roles.
The factor creates no missing lifetime and does not turn an event's zero term positive. A Mission flight plan is calculated at birth and preserved; launch and loading use it, while Expires remains a separate acceptance deadline. Medals and ordinary notifications without GameEvent are not lengthened by this setting. Requires.Turn.More/Less and world Turn.Max remain absolute turn conditions rather than lifetime factors. A warning of the selected ending without its own Duration shows the remaining world Turn.Max time.
Creates and Then - result and continuation
Completed work often continues a story: construction chooses a finale, or research opens another event group. Then links an existing result to that continuation. Creates names what a supporting mechanism creates, without executing anything alone.
First continue real construction. WarpDrivePrototype is the existing warp prototype and WarpVictories its finale group.
["WarpDrivePrototype", "Then", "WarpVictories"]Only completing the prototype passes control to WarpVictories, which selects an available result. Then neither builds the prototype nor cancels cost. Normal group continuation respects Turn.Pause.
Events use Then.Now for immediate continuation. TutorialContinue and Quests are the existing tutorial continuation and quest group.
["WarpDrivePrototype", "Then", "WarpVictories"],
["TutorialContinue", "Then.Now", "Quests"]After actual prototype completion, Then passes selection to finales. Event Then.Now continues immediately, while normal group Then respects Turn.Pause. A reference does not turn an arbitrary name into an event.
Creates also uses existing training: Tut29 is its declared step, TutorialAsteroid the asteroid event to create, and Europa an existing tutorial body.
["Tut29", "Creates", "TutorialAsteroid"],
["Tut29", "Creates.Target", "Europa"]The asteroid appears when the Solar System tutorial reaches Tut29. These lines neither enable training elsewhere nor create an asteroid immediately on file load. A custom step needs Is TutorialStep, set inclusion, order, and transition conditions, explained in Tutorial.
A continuation into a shared Events deck uses the human player and that player's interval modifiers, like the deck's ordinary draw. A direct Then to a named event keeps the initiating player as recipient. This recipient distinction changes neither Turn.Pause nor the meaning of Then.Now.
Toggle - choosing a statistic's policy
Switchable policies through Is Toggle and Stat are unsupported in current Pre-Warp Age mods. Such statements attach no policy-choice buttons, and a Stat-predicate statement fails loading.
For persistent Science income after research, use a technology with Adds.Income.Science. ‘Tech, Researching, and Repeatable’ gives the complete inclusion steps. This creates a researchable bonus rather than a switch with buttons choosing between two policies.
Events, choices, missions, and quests
Events and Event - a group and a game event
Create an event awarding Minerals once and include it among random events. First declare the event. Its interface message is called a card below. A file definition and a particular occurrence in play are different.
["MySupply", "Is", "Event"],
["MySupply", "Adds.Minerals.Count.Scaled", 1]Event declares it, while Adds.Minerals.Count.Scaled 1 awards Minerals once using the selected mode's scale. Throughout this reference, Rule selects Scaled's base for prices, rewards, cargo and quests: the player economy in Casual, the turn in Classic and Hardcore. Scale 11 gives 11 Minerals before stock bounds. Loading the definition awards nothing until the event actually happens.
Now add MySupply to existing RandomEvents.
["RandomEvents", "Deck.MySupply", 1]Deck.MySupply 1 adds one event card. An Events group selects according to Turn scheduling. Minerals arrive when the group selects and triggers MySupply, rather than on mod enablement. Deck inclusion needs no Has. Add presentation next.
Is Events declares a group or nested deck, and Is Event an event. Event name, description, icon, location, and consequences determine whether it awards resources, enables effects, offers choices, waits for expiry, or launches a mission. Is Event without contents is insufficient.
This adds MySupply and its one-time Minerals to RandomEvents using Deck.MySupply, without Has. In Text/enUS.json add MySupplyName, such as Extra Minerals, and MySupplyDescription explaining the award.
["MySupply", "Is", "Event"],
["MySupply", "Name", "MySupplyName"],
["MySupply", "Description", "MySupplyDescription"],
["MySupply", "Icon", "ore_iron"],
["MySupply", "Adds.Minerals.Count.Scaled", 1],
["RandomEvents", "Deck.MySupply", 1]The event appears when RandomEvents draws it, rather than on installation. Scaled calculates Minerals from the selected mode's scale. This one-time reward uses Scaled: fixed Adds.Minerals.Count on a standalone Event does not award resources the same way. The next article shows fixed rewards on choice outcomes. Requires.Turn.Min limits appearance turn and Requires.Researched checks player technology. Target separately chooses location. Unavailable event cards return to the deck.
For an event that may remain open, prohibit a second simultaneous card. Add this to the existing comet, for example.
["CometMinerals", "Is", "Unique"]While the player has CometMinerals, no second appears. Closing the first allows later draws again. Permanently prohibiting repeats after a successful occurrence uses a different role.
["MySupply", "Is", "Once"]Once allows MySupply only once per game. After awarding Minerals it cannot award again through this event. This differs from limiting simultaneously open windows. Mutual exclusion of different events is independent.
["MySupply", "Conflicts", "CometMinerals"]Conflicts is symmetric: no reverse line is needed. Both sides follow Is inheritance, so a category relation applies to its descendants. It checks the same player, rather than every player in the world. A relation may belong to a conditional Requires branch: conditions are checked on the player, with Simulation paths for world facts. This conditions the conflict rather than separately forbidding either event.
["BadEvent", "Conflicts", "BadEvent"]BadEvent is PreWarpAge's existing threat category. This line already prevents overlapping draws in every mode, including another occurrence of the same kind. While a conflicting card or its forecast lives, a new card is skipped and returned to the deck. Continuations and choice results are not filtered again: a warning does not block its own consequence. Unique separately prevents duplicates of a particular event. Events.Level, Held and draw counters are game state rather than mod settings.
The tutorial pause is another boundary, unnecessary for an ordinary custom deck:
Events.Hold true on Simulation pauses shared event scheduling for tutorials. Group deadlines shift by elapsed turns. Neither scheduled cards nor conditional group branches execute. Existing events also cannot resolve early through child Requires/Goal, including Progress boundaries.
After release, suitable branches are checked again on state changes. Do not use Hold just to disable an inconvenient random deck. Change that group's contents instead.
Events.Hold does not stop world time: existing cards' Duration and Progress steps continue, expiry permits its outcome, and triggered Progress step branches with Has may give immediate consequences. Events explicitly created by actions or continuations are not automatically forbidden either.
For custom scenarios leave Events.Hold absent or false unless this partial pause is intentional. Do not leave it permanently true expecting early Goal/Progress resolutions to work.
Adds.Minerals.Count.Scaled and short Adds.Minerals.Scaled both mean an economic-scale quantity. Old reward Adds.Minerals.Percent is unsupported. Event cargo uses Contains.Percent for stock fractions. ‘EventChoice, Failure, and choice outcomes’ shows fixed Adds.Minerals.Count on an outcome.
A forecast before an event has two independent settings: the event declares its warning time, and the selected mode enables forecasts. These lines enable them in the already declared MyInstantMode and give the existing comet a five-turn forecast:
["MyInstantMode", "Rule.EventWarns", true],
["CometMinerals", "Warns.Turns", 5]Warns.Turns is a finite nonnegative integer. Zero or disabled Rule.EventWarns keeps activation without a forecast. PreWarpAge enables forecasts in Classic and Hardcore and disables them in Casual. Ordinary Is inheritance applies: quests inherit the marker from BoardQuest. For a nested deck, mark the selected event rather than the deck itself. A positive or negative reward and a paid choice do not create a forecast by themselves.
A draw first creates a forecast with a countdown. Until it ends, effects and quest goals are inactive, choices are unavailable, and ending the turn is not blocked. The event then starts with its own full lifetime. The selected target is retained; if it disappears or no longer qualifies, the forecast is canceled without another target, reward or penalty, and the schedule continues its pause. A forecast occupies the slot for Unique and Conflicts. Saving preserves its countdown and continuation rather than rolling them again.
The forecast window derives resource names from choice costs, resource goals and the actions needed for research, building or exploration. These names help preparation; they promise neither payment nor a fixed amount. No separate resource list is authored. Put Warns.Turns on the original card: its outcomes and continuations should not receive another forecast just to repeat the delay.
A deck's interval uses ordinary numeric modifiers. For example, this alternative Casual setting multiplies only RandomEvents intervals by 1.5:
["ModeMeditation", "Multiplies.RandomEvents.Turn.Every", 1.5]This example replaces a setting rather than adding to the existing Multiplies.Turn.Every 1.5 in Modes.json: simultaneous factors combine by the ordinary rules. Deck categories also follow Is. The modifier applies to each new interval; an integer sample is rounded to a whole turn, while an authored fractional period stays fractional. The first Turn.Starts, Turn.Pause and an already appointed Turn.Next are not rewritten. Loading does not roll the appointed turn again.
EventChoice, Failure, and choice outcomes
EventChoice is an option in an event window. The player selects it, pays, and receives an Event outcome. Failure additionally marks failed outcomes. Samples, for example, can become Minerals or temporary Science income. Choosing one excludes the other.
First examine one future button, sample recycling. This is part of a definition, rather than a standalone event.
["OGSampleDilemma", "Has", "OGRecycleSamples"],
["OGRecycleSamples", "Is", "EventChoice"]Has links OGSampleDilemma to OGRecycleSamples, and EventChoice declares its role. The button has no outcome yet, so no Minerals are awarded.
Assign its sole successful outcome now.
["OGRecycleSamples", "Has", "OGSamplesRecycled"],
["OGSamplesRecycled", "Is", "Event"],
["OGSamplesRecycled", "Adds.Minerals.Count", 8]The second Has connects the button to its result. Choosing adds 8 Minerals once: stock 10 becomes 18 if bounds permit. The reward belongs to the outcome rather than the button. Below we combine it with another choice and window presentation. One choice may belong to several events and acts on the card where it was selected.
For the second button take familiar Science income and give it a duration.
["OGSampleResearch", "Is", "Event"],
["OGSampleResearch", "Adds.Income.Science", 2],
["OGSampleResearch", "Duration", 3]Triggering this outcome gives +2 Science on each of the next three turns. Only this event's addition then disappears. Permanent income 5 becomes 7 temporarily, then 5 again. Duration belongs to the bonus-giving outcome.
Successful outcomes use Is Event. Failed ones also use Is Failure. We return to risk after a working nonrandom example.
Save the complete array as Logic/Samples.json and the following dictionary as Text/enUS.json. If it exists, add keys inside its object and retain other translations. Enable the mod, start a new game, and wait for Geological Samples from RandomEvents. The first choice gives 8 Minerals, the second 2 Science per turn for three turns.
[
["OGSampleDilemma", "Is", "Event"],
["OGSampleDilemma", "Name", "OGSampleDilemmaName"],
["OGSampleDilemma", "Description", "OGSampleDilemmaDesc"],
["OGSampleDilemma", "Icon", "ore_iron"],
["OGSampleDilemma", "Has", "OGRecycleSamples"],
["OGSampleDilemma", "Has", "OGStudySamples"],
["RandomEvents", "Deck.OGSampleDilemma", 1],
["OGRecycleSamples", "Is", "EventChoice"],
["OGRecycleSamples", "Name", "OGRecycleSamplesName"],
["OGRecycleSamples", "Description", "OGRecycleSamplesDesc"],
["OGRecycleSamples", "Icon", "ore_iron"],
["OGRecycleSamples", "Order", 1],
["OGRecycleSamples", "Cost.Credits", 0],
["OGRecycleSamples", "Has", "OGSamplesRecycled"],
["OGSamplesRecycled", "Is", "Event"],
["OGSamplesRecycled", "Name", "OGSamplesRecycledName"],
["OGSamplesRecycled", "Description", "OGSamplesRecycledDesc"],
["OGSamplesRecycled", "Icon", "ore_iron"],
["OGSamplesRecycled", "Adds.Minerals.Count", 8],
["OGStudySamples", "Is", "EventChoice"],
["OGStudySamples", "Name", "OGStudySamplesName"],
["OGStudySamples", "Description", "OGStudySamplesDesc"],
["OGStudySamples", "Icon", "flask"],
["OGStudySamples", "Order", 2],
["OGStudySamples", "Cost.Credits", 0],
["OGStudySamples", "Has", "OGSampleResearch"],
["OGSampleResearch", "Is", "Event"],
["OGSampleResearch", "Name", "OGSampleResearchName"],
["OGSampleResearch", "Description", "OGSampleResearchDesc"],
["OGSampleResearch", "Icon", "flask"],
["OGSampleResearch", "Duration", 3],
["OGSampleResearch", "Adds.Income.Science", 2]
]Text/enUS.json for this example:
{
"OGSampleDilemmaName": "Geological Samples",
"OGSampleDilemmaDesc": "The samples can be recycled or studied.",
"OGRecycleSamplesName": "Recycle Samples",
"OGRecycleSamplesDesc": "Recover Minerals from the collected rock.",
"OGSamplesRecycledName": "Samples Recycled",
"OGSamplesRecycledDesc": "The raw material has reached storage.",
"OGStudySamplesName": "Study Samples",
"OGStudySamplesDesc": "Run a temporary research program.",
"OGSampleResearchName": "Sample Research",
"OGSampleResearchDesc": "The samples support current research."
}Both choices are free. Cost.Credits 0 explicitly means zero rather than one Credit. Only one outcome is selected. The first awards exactly eight Minerals once before stock bounds. The second gives +2 Science income for three following turns, then removes only its bonus. Duration belongs to the temporary outcome rather than the free choice or proposal.
Notice reward location: Adds.Minerals.Count belongs to OGSamplesRecycled rather than OGRecycleSamples. Selecting triggers the fixed award. Moving that line to an empty standalone Event does not award Minerals the same way. Use Scaled for events without choices as above.
Choice Requires checks the player rather than the card's target body. Unavailable choices stay gray without spending. Do not rely on inherited Requires for a derived choice: state its condition explicitly. Order controls choice order.
Without Duration the example proposal waits for a choice and blocks ending the turn. Positive Duration lets the player defer until expiry, but waiting alone awards no chosen reward. Outcomes with their own choices or lasting effects appear as separate events and inherit a permissible original target.
An event can warn first and award a result after waiting. No new role is needed: it has Is Event and its own Has links Event outcomes rather than EventChoice buttons. Duration sets waiting time. Expiry selects an eligible outcome, using risk to choose success or Failure when present.
Without Duration, such an event resolves on appearance. If defensive choices remove the warning early, its deferred outcome does not occur. Do not put outcome Has on the sample proposal's root: that changes how and when its result is received.
After ordinary choices, add risk. RiskTest is a separate alternative to the simple dilemma, rather than a required extension. It includes roles, Has, and RandomEvents inclusion.
First set the sole possible failure-risk percentage for future RiskTest cards, as part of the separate example below.
["RiskTest", "Chance.Deck.25", 1]Chance.Deck chooses a failure percentage at birth. One value-25 card gives risk 25%, hence success 75%. It does not set RiskTest's appearance chance.
Now allow two risk values with equal card counts.
["RiskTest", "Chance.Deck.25", 1],
["RiskTest", "Chance.Deck.50", 1]A specific card receives risk 25% or 50% on appearance and retains it, rather than rerolling on each display. The complete button has one success and two failures.
Finally split failure into mild and severe. Both must be declared Failure and included in the button's Has.
["AttemptRiskTest", "Deck.RiskLostSmall", 1],
["AttemptRiskTest", "Deck.RiskLostLarge", 1]This Deck chooses severity only after failure has occurred. At saved risk 25%, success is 75% and each failure 12.5%. At risk 50%, success is 50% and each failure 25%. All roles, links, and rewards follow.
Author percentages range from 0 to 100. Chance.Deck values on the right are finite card counts, including fractions. Positive remainders participate and lose min(1, remainder) on selection. Nonpositive cards are excluded.
Deck on EventChoice uses finite proportional one-time selection weights. Only positive weights participate, including fractions. This choice does not consume an ordinary deck's remaining cards.
["RiskTest", "Is", "Event"],
["RiskTest", "Name", "RiskTestName"],
["RiskTest", "Icon", "flask"],
["RiskTest", "Chance.Deck.25", 1],
["RiskTest", "Chance.Deck.50", 1],
["RiskTest", "Has", "AttemptRiskTest"],
["AttemptRiskTest", "Is", "EventChoice"],
["AttemptRiskTest", "Name", "AttemptRiskTestName"],
["AttemptRiskTest", "Cost.Credits", 0],
["AttemptRiskTest", "Has", "RiskWon"],
["AttemptRiskTest", "Has", "RiskLostSmall"],
["AttemptRiskTest", "Has", "RiskLostLarge"],
["AttemptRiskTest", "Deck.RiskLostSmall", 1],
["AttemptRiskTest", "Deck.RiskLostLarge", 1],
["RiskWon", "Is", "Event"],
["RiskWon", "Name", "RiskWonName"],
["RiskWon", "Adds.Science.Count", 5],
["RiskLostSmall", "Is", "Event"],
["RiskLostSmall", "Is", "Failure"],
["RiskLostSmall", "Name", "RiskLostSmallName"],
["RiskLostSmall", "Adds.Minerals.Count", -1],
["RiskLostLarge", "Is", "Event"],
["RiskLostLarge", "Is", "Failure"],
["RiskLostLarge", "Name", "RiskLostLargeName"],
["RiskLostLarge", "Adds.Minerals.Count", -5],
["RandomEvents", "Deck.RiskTest", 1]- One successful Has without Failure is safe: a card's overall failure chance cannot invent a missing failure outcome.
- One success and one Failure in Has use the card's success/failure risk. No risk means no invented failure.
- Several Failure outcomes require Deck on the choice. Every deck member must also be its Has outcome and Is Failure. This deck does not select among successful results.
- Several successful Has outcomes do not all execute. The first eligible by Order, then ordinal definition identifier, is used rather than translated Name. Keep one success or nonoverlapping conditions for clarity.
- Chance.Add with Chance.Target Parent.Part improves a Progress branch's chance, shown below, rather than RiskTest's saved failure chance. For adjustable shared risk use Mission and Risk, rather than unsupported Chance.Target Parent on ordinary Event.
Failure chance belongs to a particular mission or risky-deck card. Has connects successes and failures, and choice Deck can distribute several failure weights. This is not JSON execution order. Damage, Progress, cargo, and mission-improvement choices may leave the original card alive. Their result follows the operation rather than the choice name.
In Has, EventChoice takes precedence over Event: a definition with both categories remains a choice button rather than another outcome. If the selected choice creates its own temporary Event effect, its card retains the choice as the source of the effect, duration and history. An ordinary Action in an event's Has is a separate action button: such an event can keep a persistent window, but Action does not become EventChoice, gain an invented outcome or give up ownership of availability and execution.
Temporary effects and Blocks
Temporary effects last a specified number of turns and are then removed. A season might give 20% more Energy for five turns. Blocks prohibits a building, action, growth, or another supported concept. Duration and prohibition are independent event properties.
First set only a temporary bonus. MyEnergySeason is our invented event name, adding duration to a familiar multiplier.
["MyEnergySeason", "Is", "Event"],
["MyEnergySeason", "Multiplies.Income.Energy", 1.2],
["MyEnergySeason", "Duration", 5]On appearance, Energy income 10 becomes 12 for five following turns. Its multiplier then disappears, restoring 10 if nothing else changed. Add name, icon, and RandomEvents inclusion as below. Translate MyEnergySeasonName in Text/enUS.json, for example Energy Season.
Separately prohibit quest penalties in Casual. This does not need the temporary bonus's duration.
["ModeMeditation", "Blocks", "QuestPenalty"]ModeMeditation and QuestPenalty already exist. Blocks prohibits that penalty category in the mode without changing Energy income or limiting prohibition to five turns. The next set simply puts two independent settings together.
Without Duration an event's numeric effect survives its message. Repeated awards add contributions or reapply multipliers. Duration makes it temporary. Expiry removes only its contribution while retaining other bonuses and base values. Closing a message does not itself expire an ability.
["MyEnergySeason", "Is", "Event"],
["MyEnergySeason", "Name", "MyEnergySeasonName"],
["MyEnergySeason", "Icon", "energy"],
["MyEnergySeason", "Duration", 5],
["MyEnergySeason", "Multiplies.Income.Energy", 1.2],
["ModeMeditation", "Blocks", "QuestPenalty"],
["RandomEvents", "Deck.MyEnergySeason", 1]On a selected corporation, Blocks prohibits a concept or flow for its player. On a mode it is a game rule. Blocks Growth.Workers disables natural growth and Blocks Upkeep.Water Water maintenance, for example. Name declared categories or supported fields. Prohibition does not automatically cover everything indirectly related to a name.
On an event, Blocks World or Blocks Icy selects blockade location categories and needs positive Duration. A particular site is chosen on appearance, disabling consumers and Worker slots. Removing the final blockade permits operation again. This differs from [Earthlike, Blocks, Outpost], which prohibits Outpost construction on Earth-like worlds.
Do not combine a blockade card itself with one-time Adds.Minerals.Scaled or Target.Adds body changes. Ordinary draws process such a card as a one-time change without enabling blockade. Put post-blockade rewards in a separate outcome.
Resource - an exploration resource choice
After exploration, a body may offer several resources. The player chooses one to mine, with each rate shown beforehand. Resource on the choice names the world's selected resource. Selecting awards no stored resources.
WorkFocus is the existing production-choice window and FocusMinerals its Mineral option. This shows the complete window connection. Parent.Target means the body being explored in WorkFocus.
Resource references a declared resource as an exploration option rather than stock. EventChoice needs Resource.Target with an explicit body path, such as Parent.Target. Possible output is drawn at proposal birth, shown numerically, and applied to the body after selection. Incompatible resources are not offered.
["WorkFocus", "Has", "FocusMinerals"],
["FocusMinerals", "Is", "EventChoice"],
["FocusMinerals", "Name", "Minerals"],
["FocusMinerals", "Resource", "Minerals"],
["FocusMinerals", "Resource.Target", "Parent.Target"]Explore opens WorkFocus when several compatible candidates exist. A body incompatible with Minerals under its decks does not offer this choice. This does not force every world to be mineral-bearing. A new resource needs declaration, player stock, compatible body decks, and a connected EventChoice like this. Resource generation gives the full Cryo Ore example.
Find - a discovery and probe investigation
A discovery is an unknown object or cache on a revealed body, dealt separately and investigated with Probe for a price. Its result is an event rather than automatic new resource stock.
MyCache is a new discovery and MyFinds its deck for existing ScenarioG. Rocky is its site category. Existing SuppliesMinerals is the outcome, already with Event, reward, name, and presentation.
First declare the discovery and investigation cost.
["MyCache", "Is", "Find"],
["MyCache", "Cost.Minerals", 5]MyCache becomes a discovery. Probe pays base 5 Minerals, with exploration multipliers determining the final cost. This is investigation cost rather than cache reward.
Now specify suitable sites and probe outcome.
["MyCache", "Target", "Rocky"],
["MyCache", "Deck.SuppliesMinerals", 1]This part applies to rocky bodies. Paid investigation triggers existing SuppliesMinerals, awarding player Minerals once. Its event controls the amount, unaffected by Find Cost. Different site categories use separate discovery parts with their own Target and Deck. Two different outcome sets in one context are ambiguous.
Finally distribute discoveries across newly revealed scenario bodies.
["MyFinds", "Deck.MyCache", 1],
["MyFinds", "Deck.None", 3],
["ScenarioG", "Has", "MyFinds"]The deck has one discovery and three empty cards. Four suitable bodies dealt without replacement receive one MyCache and three absences. Links and presentation follow. Do not set Find None on a live body: it records an already completed deal.
["MyCache", "Is", "Find"],
["MyCache", "Name", "MyCacheName"],
["MyCache", "Icon", "question"],
["MyCache", "Cost.Minerals", 5],
["MyCache", "Target", "Rocky"],
["MyCache", "Deck.SuppliesMinerals", 1],
["MyFinds", "Deck.MyCache", 1],
["MyFinds", "Deck.None", 3],
["ScenarioG", "Has", "MyFinds"]On first revelation of suitable scenario bodies, the deck deals discoveries or None without replacement. SuppliesMinerals already exists in the base game. This discovery and its target context concern rocky bodies. None is an empty deck card. For an authored body without discoveries, omit Find None: on a live body it fixes a completed deal.
[BodyClass, Find, MyCache] fixes an authored discovery ahead of random dealing. Probe pays exploration-modified cost under the selected mode. Investigation removes the discovery and places its outcome at the same body. If a result increases a selected resource's production, that resource must already be determined or investigation is unavailable. Put outcome decks on the discovery rather than Find.MyCache.Deck on the body.
Contains - event cargo
Cargo belongs to a live event proposal until collected. A comet, for example, holds a saved Mineral amount transferred to stock by successful collection. Another choice may grow that card's cargo without taking it or closing the proposal.
First choose existing CometMinerals' cargo. Editing an existing event needs no repeated name, icon, or choices.
["CometMinerals", "Contains", "Minerals"]Contains names Minerals as cargo, without awarding player stock. With no separate amount, the game calculates scale-1 cargo at comet appearance and saves it.
Now use a fraction of player stock. CometMinerals already has Contains.Scaled, but Contains.Percent takes priority, so it need not be removed for this exercise.
["CometMinerals", "Contains", "Minerals"],
["CometMinerals", "Contains.Percent", 10]With stock 100 at appearance, cargo is 10. Later stock 200 leaves cargo 10 because it was saved at birth. Positive cargo has minimum one and needs a declared resource. The next version uses Contains.Scaled 2.5, multiplying economic scale by 2.5. Omit Contains.Percent for it, or percentage still takes priority.
CometMinerals is an existing Mineral comet, CometCollect its collection choice, and CometReturn its success. All are already declared and connected. This shows the required cargo chain:
["CometMinerals", "Contains", "Minerals"],
["CometMinerals", "Contains.Scaled", 2.5],
["CometMinerals", "Has", "CometCollect"],
["CometCollect", "Has", "CometReturn"],
["CometReturn", "Contains.Target", "Parent"]At scale 10 this comet holds 10 × 2.5 = 25 Minerals, calculated at card appearance. With stock 100 before successful collection, CometReturn transfers the saved 25, giving 125. Appearance alone does not raise stock. CometCollect's existing failure risk remains: Contains does not cancel it.
For cargo growth, use another existing chain: SpaceFashion attracts migrating Workers and SpaceFashionBoost pays to promote it. This is separate from the comet:
["SpaceFashion", "Has", "SpaceFashionBoost"],
["SpaceFashionBoost", "Contains.Target", "Parent"],
["SpaceFashionBoost", "Contains.Percent", 5]Cargo is Workers, declared on SpaceFashion through Contains. 5 means 5% of player population rather than existing cargo. At population 100, a paid click adds 5 applicants. Cargo 10 becomes 15, while player population remains 100 and the window stays open.
Now click existing SpaceFashionAccept. Its SpaceFashionAcceptDone outcome has only Contains.Target Parent and collects all 15. If population has not changed, it rises from 100 to 115. The same Parent path serves two operations: Percent on a choice grows cargo, while an outcome without its own amount transfers saved cargo to the player. Using Scaled instead of Percent on promotion would calculate the addition by economic scale as with the comet.
An outcome with only Contains.Target Parent collects its card's saved cargo. A choice with the same path and a declared amount adds to cargo, remains repeatable, and keeps the card alive. It must have no independent outcomes or effect masking repeat application. Contains.Name labels cargo. Contains.Count.R stores the calculated result, rather than being a cargo declaration. Cost.R.PerValue may pay for each added unit.
Mission, Expires, Risk, Reward, and Launched
A mission first appears as a proposal. Paying launch in time starts a flight, after which risk decides success or failure. Success awards a precalculated reward. Failure alone refunds nothing. Expires limits launch deferral, while Duration measures the launched flight.
MyExpedition is a new Science expedition. Reward.Scaled multiplies the selected mode's scale by a coefficient, fixed at proposal issuance. Later population growth or turns do not automatically increase the promised reward. Put both initial blocks in one Logic array: the first declares the proposal and the second launch and outcomes.
Start with decision time. This first MyExpedition fragment has no launch button yet. Mission is already Event in the base game, so a second Is Event is unnecessary.
["MyExpedition", "Is", "Mission"],
["MyExpedition", "Expires", 8]Expires 8 allows eight turns to decide. A proposal born on turn 10 can be accepted on turns 10–17. Entering 18 removes it if launch is unpaid. These eight turns do not describe flight time.
Set the paid flight duration separately.
["MyExpedition", "Duration", 4]Duration 4 begins a new countdown on launch. Launch on turn 12 resolves on 16. Unused proposal time does not affect flight duration.
Now add the risk of returning without a reward.
["MyExpedition", "Risk", 30]Risk 30 means 30% failure and 70% success. It is saved on the particular proposal and not rerolled on load. Failure does not automatically refund launch payment.
The final proposal parameter is the successful flight's reward.
["MyExpedition", "Reward", "Science"],
["MyExpedition", "Reward.Scaled", 2]Reward selects Science and Reward.Scaled 2 twice the economic scale at appearance. Scale 11 promises 22 Science, not automatically increased by later population. The full formula is below. Risk, Reward, Expires, and Launched are already author words declared through Is Predicate. Do not redeclare them. Assemble proposal parameters, then launch and outcomes.
["MyExpedition", "Is", "Mission"],
["MyExpedition", "Name", "MyExpeditionName"],
["MyExpedition", "Expires", 8],
["MyExpedition", "Duration", 4],
["MyExpedition", "Risk", 30],
["MyExpedition", "Reward", "Science"],
["MyExpedition", "Reward.Scaled", 2]The proposal needs a launch choice with Has outcomes. Duration, Risk, and Reward alone declare none. Duration and Risk use ordinary Random: a fixed number, a Min/Max range, or repeated .Random facts listing allowed values. Random choices and bounds must be finite integers from 0 to 2147483647, with Duration at least 1. Both range bounds are required, but a child may inherit a missing bound. A child's own fixed value overrides an ancestor's random declaration; do not mix a fixed value and Random on the same definition. Step, Peak and PowerLaw follow the Random article. The result is saved on the proposal and is not rerolled on reading or loading. Expires supports ordinary Random. Reward names a declared resource rather than a random number.
The base game's Risky Experiments use only 40%, 60% or 80% initial failure risk. This excerpt shows the Warp Isolation definition and their shared investment choice; the other two experiments use the same three values:
["ExperimentWarp", "Risk.Random", 40],
["ExperimentWarp", "Risk.Random", 60],
["ExperimentWarp", "Risk.Random", 80],
["Invest", "Adds.Risk", -20]Each listed value has an equal independent chance. Adds.Risk −20 removes 20 percentage points, rather than multiplying risk by 0.8: 40 becomes 20, then 0 after two paid investments. The experiments already declare Risk.Min 0, so risk stops at zero and further investment is unavailable without charging. Costs and their growth remain on Invest. A Deck instead consumes its weighted cards without replacement; use it when that different distribution is intended.
["MyExpedition", "Has", "LaunchMyExpedition"],
["LaunchMyExpedition", "Is", "EventChoice"],
["LaunchMyExpedition", "Name", "LaunchMyExpeditionName"],
["LaunchMyExpedition", "Cost.Minerals", 10],
["LaunchMyExpedition", "Has", "MyExpeditionSuccess"],
["LaunchMyExpedition", "Has", "MyExpeditionFailure"],
["MyExpeditionSuccess", "Is", "Event"],
["MyExpeditionSuccess", "Name", "MyExpeditionSuccessName"],
["MyExpeditionFailure", "Is", "Event"],
["MyExpeditionFailure", "Is", "Failure"],
["MyExpeditionFailure", "Name", "MyExpeditionFailureName"],
["RandomEvents", "Deck.MyExpedition", 1]Together these create an eight-turn proposal. Payment launches four-turn flight, then saved risk chooses success or failure. Success pays Reward, so do not duplicate it with Adds on the successful outcome. Translate names with an ordinary Text dictionary.
Reward = Science and Reward.Scaled = K mean a Science reward rather than Reward.Science. Proposal birth uses the selected mode's scale: the player in Casual, the turn in Classic and Hardcore. Initial reward is max(1, floor(|K| × scale)), with K defaulting to 1. Scale 11 and Reward.Scaled 3 give 33 Science. The Rule article explains formulas and settings.
This amount is fixed at proposal appearance rather than launch or return. Later population, research, and trade do not change it automatically. Paid improvements explicitly declared through Adds.Reward.Count or Multiplies.Reward.Count change this card's saved reward.
Success credits it within current Science bounds and reports the actual amount. Failure awards no Reward and refunds no launch cost by itself. Any refund or extra penalty needs its own outcome facts.
For birth turn B and integer Expires E, acceptance is possible on B…B+E−1 inclusive. Entering B+E removes an unaccepted proposal. Expires 6 at turn 10 permits 10…15, disappearing on 16. Positive fractional Expires expires on the first exhausted countdown, B+ceil(E). Without launch, launch outcomes do not roll and payment is not deducted. A separate expiry story requires explicit declaration.
Launch on turn L replaces remaining proposal time with duration D and restarts the countdown. Result arrives on L+D: a four-turn launch at 12 resolves at 16. Launch turn does not consume the first turn. Target deletion or transformation is handled by the event kind rather than an assumed timer continuation. Use integer Expires and Duration for a clear calendar.
Add a paid risk-reduction button alongside launch on MyExpedition. It edits the open card rather than creating another flight. Translate ReduceMyRiskName normally.
["MyExpedition", "Has", "ReduceMyRisk"],
["MyExpedition", "Risk.Min", 10],
["ReduceMyRisk", "Is", "EventChoice"],
["ReduceMyRisk", "Name", "ReduceMyRiskName"],
["ReduceMyRisk", "Cost.Credits", 1],
["ReduceMyRisk", "Adds.Risk", -10]Initial risk 30 becomes 20 after one paid click and 10 after two. At the limit the button grays out without charging. The proposal remains open and unlaunched. Risk.Min belongs to the mission rather than being a Requires button condition.
Risk can also use a multiplier. For an alternative exercise replace Adds.Risk −10 with this, keeping cost and inclusion.
["ReduceMyRisk", "Multiplies.Risk", 0.5]Risk 30 becomes 15, then reaches minimum 10 rather than 7.5. Risk is saved to 0.1 percentage point precision. It multiplies failure risk, changing success from 70% to 85%, then 90%.
The next alternative shortens flight time. Keep ReduceMyRisk's framework, change its translated name, and replace only the risk operation with duration. Rename the button identifier too if helpful. The operation and mission limit are:
["ReduceMyRisk", "Multiplies.Duration", 0.5],
["MyExpedition", "Duration.Min", 1]Duration 4 becomes 2, then 1. A third click is unavailable and charges nothing. This changes future flight rather than proposal Expires. Duration is integer turns with minimum 1. Adds.Duration adds or subtracts fixed turns instead of using Multiplies.Duration.
Finally change saved reward the same way. In a separate version replace duration with this operation, rather than retaining both in the exercise button.
["ReduceMyRisk", "Multiplies.Reward.Count", 2]Promised 22 Science becomes 44, then 88 before later crediting bounds. This changes Reward.Count rather than choosing another Reward resource. Rewards round to whole units. Adds.Reward.Count gives a fixed addition, such as +3 turning 22 into 25. Put the lower bound on the mission as Reward.Count.Min, not Reward.Min. An improvement is payable only while it can actually change its parameter.
Launched true launches at birth. It needs Duration and Has outcomes on the event itself, without Expires or a launch choice. Available improvements may remain in the window. Ordinary proposal launch turns it into a process and hides choices until resolution. Notifies Started in mission Has sets the launch message's name and presentation. Loading rerolls neither reward nor risk.
Risk.Show = Success displays 100 − risk without changing the roll. Other Show values are unsupported. Failure.Description is an explicit failure-consequence key. Visual = Departure enables the supported departure effect. Outside missions, Multiplies.Risk improves an existing card chance without creating a mission. Mission.Duration, Mission.Risk, Mission.Reward, and card Reward.Count are historical results rather than initial author parameters.
To unlock this flight through separate research and schedule it independently, replace MyExpedition's RandomEvents inclusion with the following. Keep other mission and launch facts. This technology deliberately has no numeric bonus.
["MyCartography", "Is", "Tech"],
["MyCartography", "Name", "MyCartographyName"],
["MyCartography", "Icon", "flask"],
["MyCartography", "Tier", 1],
["MyCartography", "Cost.Science", 9],
["Player", "Has", "MyCartography"],
["MyDispatches", "Is", "Events"],
["MyDispatches", "Turn.Starts", 3],
["MyDispatches", "Turn.Every", 7],
["MyDispatches", "Deck.MyExpedition", 1],
["MyExpedition", "Requires.Researched", "MyCartography"],
["MyExpedition", "Target", "World"],
["MyExpedition", "Target.Is", "Rocky"],
["MyExpedition", "Target.Explored", true],
["MyExpedition", "Target.Not", "Homeworld"]The proposal is checked on turns 3, 10, 17, and so on while play can continue. It needs researched MyCartography and an explored rocky world other than home. Research after a missed check does not issue it immediately: wait for the next deadline. Add Is Unique to prevent simultaneous proposals. Translate MyCartographyName in Text normally.
Progress - completed work and scales
Progress stores how far a particular process has advanced or its state changed. It is a shared numeric mechanism used for completed Processing steps or an event conflict scale. Conflict is one example rather than Progress's mandatory meaning.
Processing links a task, and its action manages payment and completion. Progress stores a value without creating construction, reward, or victory. Duration limits time while Progress may rise, fall, or remain fixed. Discontent, for example, grows per turn, concessions reduce it, and boundaries lead to declared outcomes. The event use follows. Tasks are explained in ‘Processing and Duration - tasks and durations’.
Examine future PressureTest in parts. First its initial point and limits, with the rest connected in the complete file.
["PressureTest", "Progress", 2],
["PressureTest", "Progress.Min", 0],
["PressureTest", "Progress.Max", 5]A new card starts at 2 and may reach 0 or 5 without exceeding them. Boundaries award nothing yet. Declare outcomes separately.
Add a button reducing this open event's scale.
["PressureRelief", "Progress.Target", "Parent"],
["PressureRelief", "Progress.Gain", -1]Parent is the clicked button's card. Clicks change 2 to 1 then 1 to 0. This does not itself close the proposal. The complete example's lower-bound check resolves it. Button role, cost, and Has inclusion follow below.
Time can change the scale instead of clicks. Set one random adverse step.
["PressureTest.Drift", "Progress.Add", 1],
["PressureTest.Drift", "Chance", 30]Drift is an event part. Each later turn it has a 30% chance to add 1, such as 2 becoming 3. A failed roll leaves 2. Birth turn does not step. Without Chance it would add each turn.
Finally assign a lower-bound outcome.
["PressureTest.Lower", "Requires.Progress", 0],
["PressureTest.Lower", "Has", "PressureWon"]Lower checks exactly 0 and triggers PressureWon when reached, awarding 5 Science in the full file. Before that branch, zero was only a number. Now it means success. Upper similarly connects 5 to failure. Add optional Insurance only after trying the completed conflict.
This complete independent conflict lasts 12 turns. Duration sets its deadline rather than permission to end turns. An event with a Progress scale does not block ending the turn even without Duration. Close the window without Relief and end a turn to give Drift its 30% roll.
Free Relief reduces the scale by one and keeps the event open until resolved. Two clicks from 2 reach zero and success. The lower bound awards Science and upper loses Minerals. Suitable branches resolve early even with Duration. If neither boundary is reached by expiry, root Has sets failure.
[
["PressureTest", "Is", "Event"],
["PressureTest", "Name", "PressureTestName"],
["PressureTest", "Icon", "flask"],
["PressureTest", "Duration", 12],
["PressureTest", "Progress", 2],
["PressureTest", "Progress.Min", 0],
["PressureTest", "Progress.Max", 5],
["PressureTest", "Has", "PressureRelief"],
["PressureTest", "Has", "PressureLost"],
["PressureTest.Drift", "Progress.Add", 1],
["PressureTest.Drift", "Chance", 30],
["PressureTest.Lower", "Requires.Progress", 0],
["PressureTest.Lower", "Has", "PressureWon"],
["PressureTest.Upper", "Requires.Progress", 5],
["PressureTest.Upper", "Has", "PressureLost"],
["PressureRelief", "Is", "EventChoice"],
["PressureRelief", "Name", "PressureReliefName"],
["PressureRelief", "Cost.Credits", 0],
["PressureRelief", "Progress.Target", "Parent"],
["PressureRelief", "Progress.Gain", -1],
["PressureWon", "Is", "Event"],
["PressureWon", "Name", "PressureWonName"],
["PressureWon", "Adds.Science.Count", 5],
["PressureLost", "Is", "Event"],
["PressureLost", "Is", "Failure"],
["PressureLost", "Name", "PressureLostName"],
["PressureLost", "Adds.Minerals.Count", -5],
["RandomEvents", "Deck.PressureTest", 1]
]Progress = N initializes an event scale. Progress.Min and Progress.Max bound it, with a default lower bound of zero. All edits stay within range. Progress.Name and Progress.Hide set its label and visibility. A child with Progress.Add changes it each turn, and Progress.Set assigns a value. Branch Chance sets the probability of the step. Without Chance it happens each turn.
PressureRelief instantly lowers its card's scale while retaining it. Progress.Set with Progress.Target Parent sets an exact value. Step branches sort by Order, then ordinal definition identifier. Random branches with Chance or Chance.Deck are alternatives within one turn: after the first successful one, later random branches are not rolled. Branches without a chance apply independently of this selection. The first branch actually reaching a boundary ends the whole step. Birth turn does not step.
Scale resolutions use ordinary Requires.Progress and Has outcomes on the part. A minimum or maximum alone names no victory. A suitable branch may resolve a card on state changes before its deadline, including with Duration.
Without Duration, a scale event may wait indefinitely for its resolution; its scale and declared branches still govern completion. An ordinary mandatory choice without a scale or lifetime remains a separate turn-blocking case. Progress.Turn and Progress.Fired are saved internal facts, not mod input. Processing shares the numeric mechanism, but event outcomes do not replace task payment and work.
After learning basic PressureTest, optionally add paid insurance against Drift. Include this in the same Logic array. It is not an independent new event.
Add this choice to control PressureTest.Drift's chance. Each click costs one Credit and reduces this open event's adverse-step chance by 10 percentage points. The event remains open and does not step during the click. Chance stays within 0..100. At the lower limit no further decrease is possible.
Chance.Target takes Parent.<part name> rather than arbitrary addresses. Chance.Max on the part limits positive Chance.Add, default 100. This edits a Progress-branch chance rather than an ordinary scaleless Event's overall risk.
["PressureTest", "Has", "PressureInsurance"],
["PressureInsurance", "Is", "EventChoice"],
["PressureInsurance", "Name", "PressureInsuranceName"],
["PressureInsurance", "Cost.Credits", 1],
["PressureInsurance", "Chance.Target", "Parent.Drift"],
["PressureInsurance", "Chance.Add", -10]Goal - a quest objective
A quest asks the player to achieve a result by a deadline. Goal checks it, while Event and its branches define success and the late outcome.
HQ is existing Headquarters. Before issuance the player must really be able to build it: technology researched, suitable location, no prohibition. Target.Build HQ checks this. A new player without construction rights cannot receive the card yet.
Start with the future quest's goal: wait for a completed owned HQ at the selected location. Familiar Target already selects it. Only the result check follows.
["HeadquartersQuest.Done", "Goal.Has", "HQ"],
["HeadquartersQuest.Done", "Has", "HeadquartersBuilt"]Goal.Has HQ checks a completed player Headquarters on this quest's world. Construction, a foreign HQ, or an owned HQ elsewhere does not qualify. Done triggers HeadquartersBuilt as soon as met, awarding 8 Science in the full file. Goal itself builds nothing.
Now limit the wait and assign a fallback outcome.
["HeadquartersQuest", "Duration", 12],
["HeadquartersQuest", "Has", "HeadquartersLate"]Duration allows 12 turns. If Done still fails at expiry, root Has triggers HeadquartersLate, losing 3 Minerals here. Success may resolve earlier. Assemble declaration, site selection, branches, and outcomes into a complete file. Translate names through Text normally.
[
["HeadquartersQuest", "Is", "Event"],
["HeadquartersQuest", "Name", "HeadquartersQuestName"],
["HeadquartersQuest", "Icon", "flask"],
["HeadquartersQuest", "Duration", 12],
["HeadquartersQuest", "Target", "World"],
["HeadquartersQuest", "Target.Explored", true],
["HeadquartersQuest", "Target.Build", "HQ"],
["HeadquartersQuest", "Has", "HeadquartersLate"],
["HeadquartersQuest.Done", "Goal.Has", "HQ"],
["HeadquartersQuest.Done", "Has", "HeadquartersBuilt"],
["HeadquartersBuilt", "Is", "Event"],
["HeadquartersBuilt", "Name", "HeadquartersBuiltName"],
["HeadquartersBuilt", "Adds.Science.Count", 8],
["HeadquartersLate", "Is", "Event"],
["HeadquartersLate", "Is", "Failure"],
["HeadquartersLate", "Name", "HeadquartersLateName"],
["HeadquartersLate", "Adds.Minerals.Count", -3],
["RandomEvents", "Deck.HeadquartersQuest", 1]
]A suitable branch can resolve early on world changes. Duration is a deadline rather than a ban on early success. At the final check, eligible success takes priority over fallback failure. Multiple eligible children use the first full name in ordinal comparison. Name priority branches A…, B… and keep conditions nonoverlapping.
Losing or destroying the site does not redirect Goal.Has to the player: the unmet goal eventually fails. A custom site-loss outcome needs its own checked branch and Has. Disappearance invents no outcome. If general quest-existence conditions fail or the game ends, cleanup awards neither reward nor penalty automatically.
Goal.F checks state with Requires comparisons. Goal.Has HQ needs a completed owned Headquarters on the card's selected world, not foreign, incomplete, or elsewhere. A missing target is not replaced by the player. Without declared site selection, state concerns the quest owner.
Goal.R = N requires additional resource growth after issuance rather than current stock N. Goal.R.Percent bases growth on initial stock, Goal.R.Scaled on economic scale, and Goal.R.Min sets minimum growth. The threshold is fixed at birth rather than moving with current stock.
For population growth, use another goal instead of Goal.Has HQ. First only set a percentage as an alternative Done version, not an addition to Headquarters.
["HeadquartersQuest.Done", "Goal.Workers.Percent", 40]At issuance population 20, gain 8 more Workers to reach 28. Existing 20 do not satisfy it. The saved threshold does not recalculate with current population.
If eight is too few, add minimum growth.
["HeadquartersQuest.Done", "Goal.Workers.Percent", 40],
["HeadquartersQuest.Done", "Goal.Workers.Min", 15]At initial 20, require 15 more for total 35. At initial 100, percentage growth 40 exceeds minimum, so target 140. Keep the rest: deadline, outcomes, and group inclusion.
Goal amounts are positive. Min allows zero and needs the same resource's main amount. Independent branches have independent thresholds. Goal describes success while Requires describes general circumstances such as target loss. Complete quests need Event, deadline, success/failure branches with Has outcomes, and group inclusion. Bare Goal, old Request, and technical Goal.*.Required are not author forms.
A quest reward is an ordinary Event outcome linked to its successful branch by Has. A quest has no separate Reward setting. Its window and tooltip automatically show the outcome's one-time resources and permanent modifiers. For example, the already declared HeadquartersBuilt can receive a separate percentage Worker gain and a permanent discount:
["HeadquartersBuilt.Growth", "Target", "Workers.Count"],
["HeadquartersBuilt.Growth", "Adds.Percent", 20],
["HeadquartersBuilt.Growth", "Adds.Percent.Min", 5],
["HeadquartersBuilt.Growth", "Adds.Round", "Floor"],
["HeadquartersBuilt", "Multiplies.Cost.Build", 0.9]The separate Growth part changes the owner's Worker stock rather than the quest's target world. Its 20% is rounded down, then the minimum of 5 Workers applies. With population 20 at issuance, the promised gain is 5; if population reaches 40 before completion, the reward remains 5 rather than 8. The amount is fixed when the active quest is born, including for outcomes not yet eligible, and survives saving. A one-time gain does not become an ongoing percentage effect; the independent discount therefore belongs to a different subject. Multiplies.Cost.Build 0.9 remains an ordinary permanent outcome effect rather than part of the percentage snapshot.
Outcome Requires conditions and Blocks are checked when paying the reward. A reached goal does not resolve early while none of its branch's declared outcomes is eligible; the quest keeps waiting within its lifetime. Its declared expiry resolution still applies at the deadline. Do not remove conditions just to preview a future reward. Board reward Approval is displayed after other resources and modifiers. Percentage resources, a permanent discount and Approval need no separate window code.
For an event carried through Player Has, its own Duration runs from birth; Requires.Turn.More/Less only limits eligible appearance. Without its own term, an upper Requires.Turn.Less sets the remaining window. These are different time definitions rather than two values to add. Shared medal categories give preliminary goals and final outcomes the same windows; a displayed goal name does not select a medal instead of its conditions.
Notifies - a reaction and message
Notifies links a message to a case: completed exploration, an unfunded task, or lost Workers. Action/resource Has lists reactions and each reaction's Notifies names the case. Name and Icon are ordinary presentation fields. Real results trigger messages, rather than these fields existing alone.
Explore is existing exploration and ExploreDone its translated completion reaction. This is an existing connection rather than a new event:
["Explore", "Has", "ExploreDone"],
["ExploreDone", "Notifies", "Completed"],
["ExploreDone", "Name", "ExploreDone"]Actual completed exploration produces ExploreDone. It needs no extra Event role. Explore owns the operation and result.
Explore Has includes ExploreDone, whose Notifies Completed means notify completion rather than a translation reference. Reactions may have Name, Description, Icon, Color, Popup, and Sound. Ordinary messages need neither Is Notification nor Is Event. Name, Has, or Adds alone do not trigger them.
- Completed: successful action, result, or reward completion. Started: mission process launch. Unlocked: newly available capability.
- Shortage: resource shortage and its causal effect. Offline: consumer disabled by shortage. Stopped: a paused task.
- Destroyed: object destruction. Spread: spreading. Defeat: defeat reason.
- Casualties: actual Worker losses. Withdrawn: released assignments. An arbitrary new case is not declared simply with Notifies.
Shortage can apply consequences as well as notify. Replace Water starvation with a custom rule. Save the whole object as Logic/WaterShortage.json: remove clears Starvation and add attaches MyWaterShortage. No earlier separate Has removal is needed.
Base-game Water maintenance uses Upkeep.Water measured by Workers. If the turn calculation would put stock below zero, Water reaches zero and the reaction applies Worker loss once. Exactly zero without shortfall causes no loss. Shortfall size does not multiply the penalty. Continued shortage next turn checks the smaller population. No Is Event is needed: life support invokes it.
{
"remove": [
["Water", "Has", "Starvation"]
],
"add": [
["Water", "Has", "MyWaterShortage"],
["MyWaterShortage", "Notifies", "Shortage"],
["MyWaterShortage", "Name", "MyWaterShortageName"],
["MyWaterShortage", "Icon", "cosmo_helmet_minus"],
["MyWaterShortage", "Multiplies.Workers.Count", 0.9],
["MyWaterShortage", "Multiplies.Round", "Floor"]
]
}Add MyWaterShortageName, such as Water Shortage, to Text/enUS.json. At population 11, multiplier 0.9 changes it by −1.1. Multiplies.Round Floor rounds that loss down to −2, leaving 9. Blocks MyWaterShortage cancels the consequence. Missing Popup changes only presentation.
A new life-support resource needs more than a Has reaction: Upkeep with Per S.Count identifies the supported quantity S. Fixed expense without that measure does not. One Shortage reaction changes exactly one quantity.
Reactions inherit with their including action/resource. Blocks can suppress the shared message when replacing it, avoiding duplicate notices. Shortage belongs to the missing resource, such as Water Has Starvation, while changing another quantity such as Workers.Count. Hidden messages still apply consequences. An ordinary Is Event needs no extra Notifies just to have a title.
Marks and Unmarks - a target's permanent trait
A captured world's state can remain after its event message closes. Marks attaches it and Unmarks removes it after liberation. Trait suits state with properties and behavior. A simple Is tag states category membership only.
Use the existing robot uprising. First read captured-world state.
["RobotHeldTrait", "Is", "Trait"],
["RobotHeldTrait", "Control.Here", 0]Existing RobotHeldTrait removes available working territory. Its definition alone attaches it to no world.
Attach it on the uprising's actual failed outcome.
["WorldLost", "Target", "Parent.Target"],
["WorldLost", "Marks", "RobotHeldTrait"]WorldLost receives the original event's selected world through Parent.Target. Marks leaves RobotHeldTrait there for the affected player. Previously usable Worker slots become unavailable, and closing the message does not remove it.
Liberation needs the reverse operation in the retake mission's actual result.
["RetakeDone", "Target", "Parent.Target"],
["RetakeDone", "Unmarks", "RobotHeldTrait"]RetakeDone removes precisely this trait from the reclaimed world. Other prohibitions remain. The complete existing chain follows. Its events, mission, and launch already exist.
["RobotHeldTrait", "Is", "Trait"],
["RobotHeldTrait", "Control.Here", 0],
["WorldLost", "Target", "Parent.Target"],
["WorldLost", "Marks", "RobotHeldTrait"],
["RetakeDone", "Target", "Parent.Target"],
["RetakeDone", "Unmarks", "RobotHeldTrait"]WorldLost leaves a work restriction that closing a card cannot remove. The corresponding retake removes it while preserving other restrictions. A custom chain needs declared Event outcomes, actual triggering, and transferred target. Marks on an arbitrary name captures nobody.
Marks = Definition attaches it to an explicit target at event birth or outcome resolution. Unmarks removes it. An ordinary category becomes a body Is tag. An Is Trait definition gives that target a permanent trait for the affected player. The event or its outcome needs Target and an existing definition.
Sector loss forbids local work until explicit retake. Event-card disappearance does not remove the permanent trait. Removing one presence preserves others' or another source's remaining presence. No intermediate technical tag or name-guessing rule is needed. For temporary numeric effects, use Duration and ordinary operations.
Turn - turns and scheduling
Each completed player turn advances world time by one. Events groups attempt draws on their calendars. Start 3 and interval 7, for example, mean attempts on turns 3, 10, 17.
Simulation Turn stores turn number. Event authors usually schedule groups rather than editing it. Start with one attempt for MyEvents, later connected to an existing one-time Mineral event.
["MyEvents", "Is", "Events"],
["MyEvents", "Turn.Starts", 3]Turn.Starts 3 schedules the first attempt for turn 3 of ordinary play. Without an interval it is the only attempt. No suitable card then means no automatic turn-4 retry.
Set an interval to keep attempting.
["MyEvents", "Turn.Every", 7]Every 7 leaves seven turns between attempts: 3, 10, 17, and so on. An unavailable card does not shift the next attempt to the nearest turn. Connect the Mineral event and assemble the schedule. Turn.Max and Then follow afterward.
MyEvents is a new independent group. Existing SuppliesMinerals awards Minerals once. Its game name, “Supplies found”, comes from translation key Supplies. This includes it in a separate schedule without repeating rewards:
["MyEvents", "Is", "Events"],
["MyEvents", "Turn.Starts", 3],
["MyEvents", "Turn.Every", 7],
["MyEvents", "Deck.SuppliesMinerals", 1]Turn.Starts 3 and Turn.Every 7 schedule attempts on turns 3, 10, 17, and onward. Initial world preparation does not draw: if Starts is already at or before the initial turn, the first opportunity is the next ordinary check after time advances. Starts alone gives one scheduled attempt. Every without Starts schedules its first deadline from the next group check rather than immediately on creation. Set Starts explicitly when the first turn number matters.
The game discovers a new scheduled Is Events group itself. No second Events pointer or event Deck on Simulation is needed. Group children with Requires and Deck are conditional branches, not independent persistent timers. A branch without Requires is invalid. Scheduling on an arbitrary subject without an event consumer executes nothing. Standard Random ranges support random starts and pauses. Turn.Next is internal scheduled state rather than initial author input.
Next-attempt time is set before selection. Cards unavailable due to research, conflict, active Unique, or no target return to the deck and are not drawn again in that same attempt. Other available cards in the set are tried. If none qualify, nothing appears but the next attempt keeps its schedule.
With Starts 3 and Every 7, an unsuccessful turn-3 attempt does not retry on 4. The next is 10. Research or exploration between them does not bypass the period.
Without Every, a single attempt does not repeat even when every card was unavailable. Then can separately hand off another attempt using Turn.Pause. Conditional branches and state-reactive goals have their declared contexts rather than implicitly retrying missed schedules. Tutorial pauses shift group deadlines, so the calendar example assumes ordinary unpaused play.
Another handoff rule: Then can reschedule group time, unlike independent periodic attempts.
Group Turn.Pause delays Then rather than every Turn.Every. Normal Then schedules current turn + Pause, no earlier than Starts, replacing the previous deadline. If strictly above Turn.Max, the deadline is removed with no attempt on Max. Equality permits that attempt.
After the scheduled attempt, Every sets the next from its actual turn. Handoff on 10 with Pause 3, Starts 20, Every 5 gives 20 then 25, 30… Without Starts the first is 13. Then.Now bypasses Pause and draws immediately, calculating Every from the current turn afterward.
Initial independent Starts and later handoffs can reschedule the same group's clock. Declare two groups for two independent story schedules.
Turn.Max on Simulation or the selected mode limits the game, and Turn.Ending names its ending event. Attempting to pass the last turn resolves it instead of ordinary calculation. Requires.Turn.Max N checks turn ≤ N without setting a time limit. These uses differ.
Game setup, tutorial and results
Corporation, Rule and Scenario - selected definitions
Before a new game, the player chooses a corporation, mode and scenario. The corporation provides abilities, the mode sets rules such as how actions are paid for, and the scenario defines the map and starting conditions. These are three separate definitions with different purposes.
MyCorporation below is a new corporation with a production bonus. MyScenario derives from ScenarioG, the yellow-star scenario with an ordinary start. Inheritance preserves Workers and all basic stocks, while ExtraStart adds Minerals. Translate the new name keys in Text/enUS.json.
Start with the corporation's ability. The full example adds its card presentation. Here are just its declaration and bonus:
["MyCorporation", "Is", "Corporation"],
["MyCorporation", "Adds.Production.Minerals", 0.2]Choosing MyCorporation adds 0.2 to its player's mineral production rate. At an original rate of 1, each assigned miner produces 1.2 instead of 1. The corporation creates neither these Workers nor Minerals before they work.
Independently, create a scenario with an additional starting stock:
["MyScenario", "Is", "ScenarioG"],
["MyScenario.ExtraStart", "Adds.Minerals.Count", 20]MyScenario inherits ScenarioG's map and entire starting set. ExtraStart adds 20 Minerals once on top of the ordinary start: an original M becomes M + 20. The separate name ExtraStart preserves the parent's Start part. The full cards below add their names, icons and scenario parameters.
In a game, the selected corporation is stored on the player, while Rule and Scenario belong to Simulation. One Default true supplies an initial option, and the player's explicit selection takes priority. Name, Icon and Description describe the option card. The player's own corporation name uses InputName rather than changing that card's Name.
["MyCorporation", "Is", "Corporation"],
["MyCorporation", "Name", "MyCorporationName"],
["MyCorporation", "Icon", "corp_miner"],
["MyCorporation", "Color", "orange"],
["MyCorporation", "Adds.Production.Minerals", 0.2],
["MyScenario", "Is", "ScenarioG"],
["MyScenario", "Name", "MyScenarioName"],
["MyScenario", "Icon", "star_yellow00"],
["MyScenario", "Difficulty", "DifficultyNormal"],
["MyScenario", "Orbit.Center", "ClassG"],
["MyScenario.ExtraStart", "Adds.Minerals.Count", 20]A corporation needs a name and icon. If the options use Color, give every option a color. InputName for the player's own name belongs to the corporation. Starting technologies may appear in its Has. An action instead belongs to a place and is restricted by Requires.Corporation. Scenarios require Name, Icon and Difficulty. Orbit.Center explicitly selects the star to generate.
Set Orbit.Center explicitly even for a derived scenario. Starting grants apply once to the player. Start defines the complete main set, while a separate ExtraStart adds to the inherited set.
Is ScenarioG preserves the entire parent ScenarioG.Start while the child has no Start part of its own. This inherits the current game's starting Workers and resources. An ordinary child field replaces the corresponding parent field, but parts work differently: even one MyScenario.Start line replaces the whole parent Start block, not just one resource line. This is why the example uses ExtraStart.
["MyYellowScenario", "Is", "ScenarioG"],
["MyYellowScenario", "Name", "MyYellowScenarioName"],
["MyYellowScenario", "Orbit.Center", "ClassG"],
["MyYellowScenario.ExtraStart", "Adds.Science.Count", 3]ScenarioG's ordinary starting grants remain, and ExtraStart adds three Science. To replace the starting set completely, declare your own Start containing every desired grant. A single MyScenario.Start Adds.Minerals.Count fact does not preserve the other parent Start lines. A part and a compound predicate remain different constructions. Check the new scenario's duration, location, requirements and consequences in a new game.
A Rule mode needs Name, Icon and Description. Its ordinary effects use Multiplies, Adds, Blocks, Has and durations. A permanent bonus needs no new Rule flag when existing effects or durations already express the rule. A main-menu selection becomes a world fact when the game starts and does not retroactively change a running game.
Starting resources may depend on the selected corporation. Keep the ordinary Start and add a separate part for Miners:
["MyScenario.MinerStart", "Requires.Corporation", "CorpMiner"],
["MyScenario.MinerStart.Grant", "Adds.Science.Count", 5]Only a CorpMiner player receives another 5 Science once at game start. The parent MinerStart condition also gates the nested Grant. The starting-stock preview accounts for the selected corporation. Changing the selection, reapplying the scenario or loading does not grant starting stock again. This is a conditional starting grant rather than per-turn income.
Rule.* - supported game and scene settings
Rule.* sets supported game or scene options. On a mode definition they apply after selection, and on Simulation they are general world settings. A new mode needs Is Rule, Name, Description and Icon. Inventing a name after Rule creates no new law. Supported settings are listed below.
Distinguish world settings from the displayed scene. Game rules belong to Simulation or the selected mode. View settings are read from the current scene: the game map and main menu may have different values. Changing a menu label therefore need not change labels in an already running game.
Action execution and payment. An observable example is choosing a mode where construction pays immediately instead of using installments.
First remove action duration in a new mode. MyInstantMode is still a draft, with its full card below:
["MyInstantMode", "Multiplies.Action.Duration", 0]This makes effective duration zero. Alone, however, it does not make construction instant: with ordinary Rule.ProgressTasks true, a task staffed by assigned Workers replaces the timer.
Now disable that way of carrying out the work:
["MyInstantMode", "Rule.ProgressTasks", false]Combined with zero duration, construction and exploration pay their entire current cost and finish immediately. An available building costing 12 Minerals with a stock of 20 appears immediately and leaves 8. With positive duration a timed task still pays in installments: ProgressTasks false alone does not remove that duration. Both settings form a selectable mode below.
Accumulated research is separate: Rule.AccumulatedResearch waits for the full stock without installments or Workers. All these paths use the same current price and preserve the meaning of work already paid for and cancellation.
["MyInstantMode", "Is", "Rule"],
["MyInstantMode", "Name", "MyInstantModeName"],
["MyInstantMode", "Description", "MyInstantModeDescription"],
["MyInstantMode", "Icon", "gear"],
["MyInstantMode", "Multiplies.Action.Duration", 0],
["MyInstantMode", "Rule.ProgressTasks", false]- Rule.AccumulatedResearch: true/false, default false. True makes research accumulate the full current price. It does not switch other actions to accumulation.
- Rule.ProgressTasks: true/false, true when absent. Chooses a Worker task or immediate payment for construction and exploration after checking their timed duration. It does not replace an ordinary event's duration.
- Rule.TradeWorker: a reference to a declared resource. Each trade-order unit occupies one unit of that resource. Workforce uses its free pool. Without this rule, trade occupies no Workers.
Allowing a game without Workers is a separate task. Add this setting to the declared MyInstantMode. It is unrelated to construction speed:
["MyInstantMode", "Rule.ExtinctionEnds", false]A Worker stock below one no longer ends the game specifically through extinction. At zero Workers, play continues, while dismissal by the board or another declared ending remains possible. Below are event and ending settings. The scale source affects new events, preserving existing offers, prices and quest thresholds.
- Rule.ScaledByPlayer true selects the economy; Rule.ScaledByTurn true selects the turn. Do not enable both. Casual uses the player; Classic and Hardcore use the turn. Without a selection, player scaling applies. Scaled prices, rewards, cargo and quest thresholds share this base, including Requires.Scaled.Min/Max.
- Rule.ScaledByPlayer.TechMod: technology coefficient, 0.05 when absent. Base = population × (1 + completed technology count × coefficient). The base game uses 0.04. Repeated levels of one technology do not increase the count. This is not a production multiplier.
- Rule.ScaledByTurn.ResMin, Rule.ScaledByTurn.ResMax and Rule.ScaledByTurn.TurnWin define base = ceil(ResMin + (ResMax − ResMin) × ((Turn − 1) / (TurnWin − 1))²). ceil rounds upward. Settings 5, 3000, 120 give base 5 on turn 1 and 3000 on turn 120; growth continues afterward. Population and research do not affect it. The common Scaled K magnitude is max(1, floor(|K| × base)), even for K = 0. One-time Adds gains also preserve K's sign: negative K means a loss and K = 0 gives 0. The scale is fixed when the event appears, so later turns or economic changes do not alter it.
- Rule.ExtinctionEnds: true/false, true when absent. False disables only defeat from Worker stock below one, preserving other endings.
- Rule.SuppressNotifications: true/false, default false. True suppresses ordinary notifications, changing message display rather than canceling their gameplay consequences.
- Rule.EventWarns: true/false, default false. Enables forecasts for events declaring Warns.Turns. It does not add a warning to every event by itself. Forecast time, target and resources are described in Events and Event.
- Rule.ScaledByPlayer and Rule.ScaledByTurn take true/false and cannot both be enabled after mode, inheritance and Simulation settings are resolved. An explicit false on the mode can disable the world policy. Turn scaling requires all three parameters: finite ResMin and ResMax at least zero, ResMax at least ResMin, and TurnWin greater than 1. TechMod must be finite and nonnegative.
A new map may reveal the neighborhood of the homeworld at game creation:
["MyInstantMode", "Rule.StartExplore", 2]StartExplore 2 reveals bodies within initial simulation distance 2 of home for free. This uses orbits and nested moons, not screen pixels. Without it, only home is revealed. The change does not reveal an existing map again. Generation settings follow:
- Rule.StartExplore: radius of free initial revelation. Without the fact, only home is revealed. Distance includes orbits and moon nesting rather than pixels.
- Rule.FlankOrbit: orbital ring number. Bodies at or beyond it are placed on horizontal arcs while their orbits remain circular. Without the setting this restriction is absent.
- Rule.SatelliteMinSize: numeric lower bound for a generated moon's typical Size, default 0 without filtering. It uses explicit class Size or the midpoint of its range. Units follow the simulation's Size: in PreWarpAge this is territory, not universally kilometers.
Finally, show body names on the game map, using Simulation as the owner of world settings:
["Simulation", "Rule.MapNames", true]MapNames true shows body labels in the displayed game scene without changing stocks, production or map contents. A separate menu-scene setting affects the menu rather than replacing the world setting. Further view and input settings each have their own role:
- Rule.Language: repeatable locale codes such as ruRU and enUS. Without a list, all loaded locales are available. A code is not a display language name.
- Rule.Zoom: positive integer count of visible orbits in the initial view. Without a positive value, the view fits the contents.
- Rule.Zoom.Target: Center or Home, for the system center or player's homeworld. Center wins with multiple values and is the default. Used with Rule.Zoom.
- Rule.MapNames: true/false, false when absent. Enables map labels in the displayed scene.
- Rule.OrbitMotion: true/false, false when absent. True adds visual movement to all orbital bodies even without physical periods. False is not a general command to stop every physical animation.
- Rule.OrbitPauseOnSelect: true/false, false when absent. Pauses orbital movement on selection.
- Rule.WorkersSlider: true/false, false when absent. Enables Worker sliders and related display without creating population, assignments or Worker slots.
- Rule.GuiSkin: shared appearance name, default steel. The supported alternative is classic. This is neither an arbitrary CSS path nor a declaration of a new UI component.
- Rule.NoSubMaps: true/false, false when absent. Disables submaps outside decorative mode. In Decorative it affects a flat sector while retaining companions of a separate radial system.
Start a new game to test generation changes. Minimum moon size and placement edits do not recreate an existing map. UI settings likewise change neither resource stocks nor the meaning of conditions.
Tutorial and TutorialStep - guided learning
A tutorial consists of steps such as selecting home, assigning a Worker and ending a turn. Tutorial connects a scenario to a set, and Is TutorialStep declares a step with its instruction, anchor and completion condition. No separate UI panel is needed.
Save the complete array below as Logic/Training.json and its dictionary as Text/enUS.json. Start a new game with the Training System scenario and CorpMiner. SmallTutorial is the invented three-step set, while Homeworld is the existing reference to the player's home.
First examine the initial step on its own. The full file connects the scenario and set:
["SelectHome", "Is", "TutorialStep"],
["SelectHome", "Order", 1],
["SelectHome", "Text", "SelectHomeText"],
["SelectHome", "Target", "Homeworld"],
["SelectHome", "Tutorial.Awaits", "Select"]Order 1 places the step first. Text names its instruction key, Target the homeworld, and Tutorial.Awaits Select waits for the player to select it. Merely displaying the instruction does not finish the step. Selection advances to step two.
Step two waits for a particular number of assigned people rather than mere selection:
["StaffHome", "Target", "Homeworld"],
["StaffHome", "Tutorial.Awaits", "Workers.Count"],
["StaffHome", "Tutorial", 1],
["StaffHome", "Tutorial.Unlocks", "Workers.Count"]Tutorial 1 here means exactly one of your Workers on home. Zero or two does not qualify. Unlocks allows assignment changes at this step, while Worker slots remain the world's. StaffHome's role, order and text appear in the full file. Step three waits for time to advance through Requires.Turn. Unlocks EndTurn alone does not check that.
Connect all three steps to a scenario inheriting ScenarioG's map. CorpMiner in the set's Has restricts the tutorial to Miners. Other corporations are neither replaced automatically nor given this tutorial. Options remains allowed throughout, and Workers.Count changes are allowed at step two.
[
["TrainingScenario", "Is", "ScenarioG"],
["TrainingScenario", "Name", "TrainingScenarioName"],
["TrainingScenario", "Orbit.Center", "ClassG"],
["TrainingScenario", "Tutorial", "SmallTutorial"],
["SmallTutorial", "Has", "CorpMiner"],
["SmallTutorial", "Tutorial.Unlocks", "Options"],
["SmallTutorial", "Has", "SelectHome"],
["SmallTutorial", "Has", "StaffHome"],
["SmallTutorial", "Has", "PassTurn"],
["SelectHome", "Is", "TutorialStep"],
["SelectHome", "Order", 1],
["SelectHome", "Text", "SelectHomeText"],
["SelectHome", "Target", "Homeworld"],
["SelectHome", "Tutorial.Awaits", "Select"],
["StaffHome", "Is", "TutorialStep"],
["StaffHome", "Order", 2],
["StaffHome", "Text", "StaffHomeText"],
["StaffHome", "Target", "Homeworld"],
["StaffHome", "Tutorial.Awaits", "Workers.Count"],
["StaffHome", "Tutorial", 1],
["StaffHome", "Tutorial.Unlocks", "Workers.Count"],
["PassTurn", "Is", "TutorialStep"],
["PassTurn", "Order", 3],
["PassTurn", "Text", "PassTurnText"],
["PassTurn", "Target", "EndTurn"],
["PassTurn", "Requires.Turn.More", 1],
["PassTurn", "Tutorial.Unlocks", "EndTurn"]
]The complete Text/enUS.json for this example follows. If it already exists, add these keys inside its object while keeping other translations.
{
"TrainingScenarioName": "Training System",
"SelectHomeText": "Select your homeworld.",
"StaffHomeText": "Leave one Worker on your homeworld.",
"PassTurnText": "End the turn."
}Tutorial TutorialName on a scenario connects its tutorial. The set lists steps through Has. Every step needs Is TutorialStep, a unique finite Order greater than zero (fractional ranks such as 1.5 are allowed) and a Text instruction key. Target supplies the anchor and checked object. A narrative step without Tutorial.Awaits or Requires waits for an instruction click.
Supported UI targets follow. An anchor is an existing object or button to which an instruction is attached:
Target names an existing definition: Homeworld or another body class resolves to its map instance. An Action such as Technologies or EndTurn resolves to its button, EventChoice to an option button, a resource/stat such as Science to the player's indicator, Tech to the player's technology card, Event to its live card, and Building to its construction option.
An invented name creates no UI anchor. For Trade, the target resource identifies its trade order. Workers.Count switches the anchor between body and Worker slider. Build.Class switches between body and construction button. Tutorial.Marks Panel highlights an existing panel rather than creating one.
- Tutorial.Awaits Select: target selected. Deselect: windows and selection closed. Tooltip: target tooltip displayed.
- Explore: target explored. Research: target technology researched. Build.ClassName: a completed own building of that class on the target.
- Workers.Count with Tutorial N: exactly N own Workers on the target. Trade with Tutorial N: order for the target resource equals N. Tutorial is a number on these steps but a reference on the scenario.
- An Event name in Tutorial.Awaits: the player has a card of that class. Unaffordable: the target option is no longer affordable.
- Requires.Turn and other step conditions check the world. Creates generates an event on entry, and Creates.Target chooses its location.
- Tutorial.Unlocks on a step additionally permits an action, field or category. On the whole set it declares what is always permitted. Permissions depend on the current step and do not accumulate from earlier steps.
- Tutorial.Marks Panel highlights the anchor's panel. Tutorial.Side accepts Above or Below. Without an explicit side the client places the instruction according to available space.
The set's Has may restrict selected-axis options, for example to one corporation. Random-event clocks pause during the tutorial. Reversible waits may return to the previous step when state is undone. Tutorial.Step and Tutorial.Done are saved game state, not manual tutorial-skipping settings. Text placeholders read live values: {Workers.Count}, {Change.Water}, {Cost}, {Damage}, {Target.Size}, {ClassName.Cost}, {ChoiceName.Shortfall}. Do not copy their numbers manually into translations.
Steps can be included by direct Has facts on the tutorial or by its conditional parts. For example, a part with Requires.Corporation CorpTechnocrat and Has pointing to a step adds it only for Technocrats. Conditions use the current player, then direct and matching conditional steps are combined without duplicates and sorted by Order. Remove the complete example's Has CorpMiner restriction if the course should also run for other corporations; selecting an axis member through Has and including a TutorialStep are different roles.
Tutorial.Awaits can also name a declared action such as Cloning. Such an action waits for the player's real Completed result rather than a button press alone. Target Cloning names its existing action anchor; {Cost} and {Gains} read its effective quote and result without hardcoded amounts in the text.
TutorialDisable stops the course without restarting the world or marking it completed. Current events, worker assignments and trade orders are preserved. The tutorial pause ends with the course, but a separately authored Events.Hold remains. Tutorial.Step stores the current step reference rather than its Order number; it is saved runtime state, not a Logic shortcut for skipping lessons.
History and Statistics - chronicle and counters
History records actual results such as a completed building, delivered cargo or expired offer. Statistics counts actions and receipts throughout the game. The chronicle stores phrases, statistics stores numbers, and neither replaces the other.
First change the entry for actually receiving comet cargo. CometReturn is its existing successful collection outcome:
["CometReturn", "History", "MyCargoReceivedHistory"]History refers to translation key MyCargoReceivedHistory. If Text/enUS.json says 'Comet cargo received.', that phrase appears after successful collection. History alone creates no comet and grants no cargo.
Recording only the first outpost built in a game is a different task:
["Outpost", "History", "MyLabBuiltHistory"],
["Outpost", "History.OnlyFirst", true]The first Outpost completion adds the phrase, later completions of the same class do not. OnlyFirst controls the chronicle without forbidding another outpost. Combine these entries and add a separate phrase for an expired SpaceFashion offer:
["CometReturn", "History", "MyCargoReceivedHistory"],
["Outpost", "History", "MyLabBuiltHistory"],
["Outpost", "History.OnlyFirst", true],
["SpaceFashion.Ignored", "Requires.Duration", 0],
["SpaceFashion.Ignored", "History", "MyOfferIgnoredHistory"]These replace existing result texts rather than creating events through History alone. Text/enUS.json:
{
"MyCargoReceivedHistory": "Comet cargo received.",
"MyLabBuiltHistory": "Built {subject} on {target}.",
"MyOfferIgnoredHistory": "The migration offer expired."
}History holds a Text key. History.OnlyFirst true keeps only the first completion of that class per game. History.Independent true starts a separate entry sequence. History.Begin on Simulation names its initial corporation-founding event. {subject} inserts the saved name of the building or other subject, and {target} the target's name. These names survive the body's disappearance.
SpaceFashion.Ignored adds a phrase upon expiry without creating an event or granting its effect. Closing a window, removal and expiry differ. Simultaneously matching different History texts are an error. Without History, a completed result uses its own Name or its main event's name. A name alone does not put any unfinished offer into the chronicle.
Enable statistics independently of chronicle phrases, on the player:
["Player", "Statistics", true]For a separate test, begin with zero stock of a resource and no prior receipts. A real reward of 5 makes both stock and Received equal 5. Spending 3 leaves stock 2 while Received stays 5. Total received is not the remaining stock. The game changes the counter after real receipt rather than a mod line declaring a desired total.
Seconds, Loads, Explored, Built, Studied, Received, Mined, Bought and Sold are updated by the game. Declared rates and currency identify trade resources without a Statistics.Resource.R list. History.Entry/Turn/Source and Statistics.Run are internal state, not authoring commands or a way to inflate progress. An absent Statistics counter reads as zero, including in Requires, without creating a fact. That does not prove complete history: a player lacking its own Statistics.Loads fact has no evidence that the game was never loaded.
Use History.Hide to keep a technical notification out of the corporation chronicle without hiding the notification itself. The existing TradeShortage definition is shared by the trade-shortage notices. This example hides their history and explicitly restores it for the Minerals notice:
["TradeShortage", "History.Hide", true],
["TradeMineralsShortage", "History.Hide", false]The setting belongs to the source definition. It inherits through Is; the nearest explicit false overrides an ancestor's true. A hidden source creates no new chronicle entry, and a hidden technical face cannot overwrite an existing story. Old saved entries from that source are excluded when reading history, without deleting their facts. Notification icons, popups, durations and gameplay effects remain active. History.Hide suppresses explicit History text as well as the event-name fallback.
Completed and Track - confirmed results
Track counts performed actions and results, such as completed outposts including ones later demolished, but not unfinished construction. The game saves Completed records with their circumstances. Track reads those records without building or performing anything itself.
Completed may describe an action, object creation, production, population change or ending. Requires.Completed reads the particular result currently being checked. Requires.Completed.Credits.Min compares money at completion even if it was spent later. Do not create these records manually in Logic: they must represent real game results.
Track with an action or object name declares a completion counter including Is descendants. Its invented name must be simple and not collide with a built-in field, predicate or operator. The name is immediately readable in conditions without Is Predicate. Counter Requires adds result conditions rather than repeating what Track already specifies.
Count completed outposts. MyBuiltOutposts is our counter name, and Outpost already exists:
["MyBuiltOutposts", "Track", "Outpost"]After three completions the counter is 3. Demolishing one does not reduce it: it counts completions, not remaining buildings. Started construction is not counted. Neither Player Has nor Is Predicate is needed.
Exploration may need distinct places. Declare an Explore observation and then identify its results:
["MyExploredPlaces", "Track", "Explore"],
["MyExploredPlaces", "Track.Key", "Completed.Target"]Completed.Target preserves the body's identifier. MyExploredPlaces reads completions and MyExploredPlaces.Unique distinct keys. Two results for one target would give 2 and 1 respectively. This explains counters rather than promising repeatable exploration. Full-map coverage also needs a fixed list, introduced after the outpost task.
["MyBuiltOutposts", "Track", "Outpost"],
["MyExploredPlaces", "Track", "Explore"],
["MyExploredPlaces", "Track.Key", "Completed.Target"]Use a counter in CensusTask to require three completed outposts during the game. These lines form one example inside a shared Logic array. Add CensusTaskName, CensusWonName and CensusLateName to Text/enUS.json.
First require three completions over the entire game. This checks the future CensusTask branch:
["CensusOutposts", "Track", "Outpost"],
["CensusTask.Done", "Requires.CensusOutposts.Min", 3]Two completions fail, three pass. Outposts completed before task issuance also count, as do Outpost descendants. This version is used in the full example below.
For three new outposts after task issuance, replace the condition with this one rather than keeping both:
["CensusTask.Done", "Requires.CensusOutposts.Min.Add", 3]If two were complete at issuance, the threshold is fixed once at 2 + 3 = 5. Completions three and four do not finish the task, five does. The threshold does not follow the growing counter. This requires new work while retaining a game-wide counter.
["CensusWon", "Name", "CensusWonName"],
["CensusLate", "Name", "CensusLateName"],
["CensusOutposts", "Track", "Outpost"],
["CensusTask", "Is", "Event"],
["CensusTask", "Name", "CensusTaskName"],
["CensusTask", "Icon", "outpost"],
["CensusTask", "Duration", 20],
["CensusTask", "Has", "CensusLate"],
["CensusTask.Done", "Requires.CensusOutposts.Min", 3],
["CensusTask.Done", "Has", "CensusWon"],
["CensusWon", "Is", "Event"],
["CensusWon", "Adds.Science.Count", 10],
["CensusLate", "Is", "Event"],
["CensusLate", "Is", "Failure"],
["RandomEvents", "Deck.CensusTask", 1]Full-map checking distinguishes explored bodies through Track.Key Completed.Target. Track.Required Owner.Explored.Required compares them against bodies requiring exploration at game start. Requires.ChartedBodies.Covers true requires that entire nonempty list. ChartedBodies.Unique merely counts distinct bodies without proving coverage.
The game creates Explored.Required at world creation and Researching.Required as the fixed set of required technologies. These are not arbitrary declarations: do not manually put class names where stable instance identifiers belong. Use ordinary conditions or Goal for custom task sets. There is no separate universal authoring mechanism for arbitrary Required lists.
["ChartedBodies", "Track", "Explore"],
["ChartedBodies", "Track.Key", "Completed.Target"],
["ChartedBodies", "Track.Required", "Owner.Explored.Required"],
["CensusTask.Done", "Requires.ChartedBodies.Covers", true]The last line, CensusTask.Done Requires.ChartedBodies.Covers true, adds another mandatory condition to CensusTask: explore every initially required body. Do not add it when checking only three outposts. ChartedBodies declarations may serve another task independently.
Track.Required references a fixed identifier list such as Explored.Required or Researching.Required. Then name.Covers true checks completeness. The plain name still reads matching result count, and Count does not replace the list. Arbitrary Sum, Streak, Max and Track.Operation are unsupported. The game fills counters and lists: rereading or loading does not count actions again. Incomplete history does not prove zero violations.
- Readable numeric evidence fields include Completed.Turn, BirthTurn, Duration, Age, Mission.Risk, Amount, Workers, Rate and Distance when the result actually publishes them.
- Completed.From, In, Previous, Target, Corporation, Scenario, Mode and Resource are references or reference sets for the completion context. They need not exist for every result type. Missing is not zero or success.
- Completed.R and Completed.R.Count preserve resource R's stock at the result. Completed.R.Delta preserves the same numerical change shown in the HUD, including losses from famine, rounded to hundredths. A positive ordinary net flow may still have a negative famine forecast; the snapshot keeps that shown loss. Nonnumeric growth forecasts in turns are not resource deltas. Requires.Completed.Science.Min 20 compares historical Science stock rather than today's stock.
- Completed.EpisodeClosed and HistoryComplete indicate reliability. EpisodeKey, Sequence, Batch and Run are internal identifiers and ordering. Readability does not permit invented evidence in Logic.
A counter can be limited to one event episode when the real completion publishes that context. Existing SpaceFashionBoost increases one offer's cargo and preserves confirmation. Observe its results within an episode:
["MyEpisodeBoosts", "Track", "SpaceFashionBoost"],
["MyEpisodeBoosts", "Track.Scope", "Episode"]Compare the same operation over the whole game:
["MyRunBoosts", "Track", "SpaceFashionBoost"],
["MyRunBoosts", "Track.Scope", "Run"]Suppose the player pays for two boosts on the first SpaceFashion offer and one on the second. In the actual second-offer boost confirmation, MyRunBoosts reads 3 game completions and MyEpisodeBoosts 1 for its episode. The first two clicks belong to another card. This comparison is available only when the game passes real result confirmation with an episode reference. An ordinary active task does not receive that context.
Track.Scope accepts Run, the default whole game, or Episode, one card episode. Track.Key names a stable confirmed-result key. The observation name reads matches and name.Unique distinct keys. Requires.MyBuiltOutposts.Min 3 requires three completed outposts. Episode checks use evidence from that particular card, not totals from earlier cards.
Episode scope limits the counter but does not turn an ordinary CensusTask into an observer of its card. The counter is readable when checking a real completion for which the game supplies Completed.Evidence with Completed.EpisodeKey.
Ordinary active-task Requires checks have no such evidence and return no value. Writing Completed.Evidence in a mod to fake this association is forbidden. For new tasks use Run counters with .Add thresholds or Goal. Episode suits results whose episode membership the game actually records.
A completed episode counter survives until the next evidence batch. The evidence itself remains the durable result.
Official PreWarpAge achievements are defined outside moddable Vanilla, and active mods disable them. Do not copy Achievement.Eligible, Completed.HistoryComplete, internal evidence numbers or runtime Track counters into Logic. Completed conditions may read real-result fields such as Completed.From, Completed.Target, Completed.In, Completed.Age and resource stocks Completed.R. Absence of evidence is not successful fulfillment.
Custom tasks generally need only Goal, Requires and event outcomes. Mods may use actual history, statistics and action results but do not add official profile awards. That is a separate system outside mod task construction.
GameOver and Victory - ending the game
An event with Is GameOver ends the game. Adding Is Victory makes it a win. After prototype construction, Then can hand off to a group selecting the winning outcome. An award icon alone does not end the game.
WarpDrivePrototype already has Building, technology, price and location rules. MyPrototype inherits it, so it has a working construction path. Then replaces its continuation with MyWinDeck, whose only declared outcome is MyWin.
First declare the winning outcome without its invocation path:
["MyWin", "Is", "Event"],
["MyWin", "Is", "GameOver"],
["MyWin", "Is", "Victory"]Actually launching MyWin stops the game as a victory. GameOver ends it, Victory marks the result. Declaring these roles does not launch the ending upon mod loading.
Connect the ending to actual prototype completion:
["MyWinDeck", "Is", "Events"],
["MyWinDeck", "Deck.MyWin", 1],
["MyPrototype", "Then", "MyWinDeck"]MyWinDeck contains only MyWin. Completed MyPrototype construction hands off through Then and launches victory. The prototype below inherits WarpDrivePrototype's costs and requirements. Result-window presentation is separate.
["MyPrototype", "Is", "WarpDrivePrototype"],
["MyWin", "Is", "Event"],
["MyWin", "Is", "Victory"],
["MyWin", "Is", "GameOver"],
["MyWin", "Name", "MyWinName"],
["MyWin", "Icon", "godtech"],
["MyWinDeck", "Is", "Events"],
["MyWinDeck", "Deck.MyWin", 1],
["MyPrototype", "Then", "MyWinDeck"]Real MyPrototype completion launches MyWin and shows victory. Inherited cost and requirements remain: Then does not make construction free or automatic. Translate MyWinName in Text/enUS.json. Then adjust presentation separately.
A definition inheriting FinalMenu in the outcome's Has can supply its own result-window text. Actions and statistics come from the shared menu, and invented button names create no game commands. This extends MyWin: MyResultScreen supplies title/description, MyExplorersMedal an award category with name and icon. Add MyResultTitle, MyResultDescription and MyExplorersMedalName to Text/enUS.json.
["MyWin", "Has", "MyResultScreen"],
["MyResultScreen", "Is", "FinalMenu"],
["MyResultScreen", "Name", "MyResultTitle"],
["MyResultScreen", "Description", "MyResultDescription"],
["MyWin", "Is", "MyExplorersMedal"],
["MyExplorersMedal", "Name", "MyExplorersMedalName"],
["MyExplorersMedal", "Icon", "award_gold"]GameOver MyWin on an award definition connects that notified award to the existing ending without creating an award-selection system. Ordinary mod endings need Event + Is GameOver and Is Victory for wins. For gold/silver by time, create two such Events with nonoverlapping Requires.Turn and put both in the Then deck. Normal card applicability selects them rather than a separate award language. This adds no official profile achievements.
GameOver on an award links the outcome, while GameOver.Evacuation names an evacuation mode. On Simulation, GameOver stores the stopping cause, true allows a stop without a cause, and false means no stop. GameOver.Continued and GameOver.Plaque are result-window state, not author rule switches. Only supported full-version victory without an evacuation deadline permits time to continue.
The outcome's Has may provide at most one applicable FinalMenu profile with Name and Description. The existing menu declares its actions and statistics through Has. The outcome's Completed notification reports it once. Closing the window repeats neither sound, award nor history. Defeat after a continued victory may replace the cause and reopen the result.
Words and relationships
These words describe objects and their relationships. For example, Owner specifies an owner, and PlacedAt a building's location. The examples use base-game definitions. Test them in a new game. Their numbers are chosen to explain the rules.
Complete example files are labeled with their paths, such as Logic/Orbit.json, and can be copied in full. A short example may show just one changed statement. The preceding text says which definition it extends. ‘Subject, predicate, and value’ shows how to add such a statement to an existing file using two complete examples.
Try large standalone scenario examples one at a time, in separate mods: they may change shared Player rules. Disable the previous mod before the next example. If you deliberately combine changes and Text/enUS.json already exists, add new keys inside its object instead of replacing the entire dictionary.
Predicate - your own word
Suppose you want to record ore quality as a number. Call the new property OreGrade. First tell the game that this name may be used as a predicate:
["OreGrade", "Is", "Predicate"]OreGrade is your invented name. Is Predicate declares your own word in the language. It does not yet give any world an ore quality.
Now give tiny Rock Worlds an ore quality of 2. The complete Logic/OreGrade.json contains both the word declaration and its value:
[
["OreGrade", "Is", "Predicate"],
["TinyRock", "OreGrade", 2]
]TinyRock is the existing definition of a tiny Rock World. The second line means ‘TinyRock's ore quality is 2.’ Replacing 2 with 5 changes the stored rating. Production does not grow automatically: relating the rating to income needs a separate game rule.
Choose an unused simple name, without dots or instance numbers. A second custom word needs its own Is Predicate: this permission is not inherited. Even if a word names a resource, Is Resource alone is insufficient. The name must not match a built-in predicate or simultaneously represent incompatible value types.
Type - an object's type label
An object may have its own name, My Station, with a type label, Survey Station, below it in the tooltip. Type selects that second line. For example, set this on MyTypeMarker:
["MyTypeMarker", "Type", "SurveyStation"]The game uses the SurveyStation key's translation for the type line. This is not the marker's new personal name: Name still supplies My Station. Changing Type changes the type label, rather than Icon or the selected category's properties.
The following complete example creates a marker on Earth with two categories: survey station and research station. Type selects which to show as its type. All My names, plus SurveyStation and ResearchStation, are invented for this example. Save the first block as Logic/Type.json and the second as Text/enUS.json, then start a new Solar System game.
[
["SurveyStation", "Is", "Building"],
["ResearchStation", "Is", "Building"],
["MyTypeMarker", "Is", "SurveyStation"],
["MyTypeMarker", "Is", "ResearchStation"],
["MyTypeMarker", "Type", "SurveyStation"],
["MyTypeMarker", "Name", "MyTypeMarkerName"],
["MyTypeMarker", "Icon", "outpost"],
["MyTypeMarker", "PlacedAt", "Earth"],
["MyTypeMarker", "Owner", "Player"]
]{
"SurveyStation": "Survey Station",
"ResearchStation": "Research Station",
"MyTypeMarkerName": "My Station"
}An object with the Outpost image appears on Earth. Its name is My Station, and its tooltip type line is Survey Station. Change only Type to ResearchStation and start a new game: the type line becomes Research Station. The name and image stay the same. This line looks up a translation of the Type value itself, here SurveyStation or ResearchStation, rather than the selected category's Name.
A body on the map does not always need an explicit type. Consider a simple rocky-world variant:
["MyRock", "Is", "TinyRock"]If MyRock is created on the map, the game can use TinyRock as its type: it is the nearest suitable class. No separate Type TinyRock statement is needed here. Automatic selection applies to bodies placed in a map cell. That cell relationship is called Cell in game state. For a building without this relationship, such as MyTypeMarker above, the tooltip reads an explicit Type.
Now give the same body a second independent category. SurveyedRock is an invented world category:
["SurveyedRock", "Is", "World"],
["MyRock", "Is", "TinyRock"],
["MyRock", "Is", "SurveyedRock"]MyRock now has two independent Is branches. Neither refines the other, so the game cannot infer an unambiguous type. Select TinyRock explicitly:
["MyRock", "Type", "TinyRock"]The type line uses TinyRock's translation. Both Is categories remain: Type does not remove SurveyedRock.
There is another approach: use SurveyedRock only as a category with a separate label. For this version, remove MyRock's explicit Type and add a category label:
["SurveyedRock", "Tag", "SurveyedRockTag"]Add SurveyedRockTag to the dictionary with the text Surveyed. A category with Tag is excluded from automatic type selection. The placed MyRock therefore infers TinyRock as its type again, while retaining both Is relationships. Surveyed is a separate category label, rather than a replacement type. See Tag for other uses.
In ‘A fixed system and the Plane boundary’, MyFixedSun inherits only the general Star category. Type MyFixedSun explicitly selects its own definition instead of Star. That example's dictionary therefore contains MyFixedSun for the type line and a separate MyFixedSunName for the star's name. This selects a label. It does not recreate the star or copy its properties.
Able - an available action
Allow Geosurvey on a tiny Rock World. Add one statement to TinyRock's definition:
["TinyRock", "Able", "GeoSurvey"]This fragment reads ‘A tiny Rock World allows Geosurvey.’ TinyRock and GeoSurvey are already defined. Rocky worlds inherit this permission from Rocky, so the addition repeats an existing rule. It shows how to write Able and will not create a second button.
Able allows an action to be offered but does not cancel its requirements. Geosurvey, for example, requires MantleDrilling (“Mantle Drilling”). That requirement belongs to GeoSurvey itself:
["GeoSurvey", "Requires", "MantleDrilling"]Without that technology, Able alone does not let the player perform a survey. A suitable explored body and resources to pay are also required. Cost and result belong to the action definition. The Action article explains how to create your own action.
Objects inherit Able through Is. An active trait can also grant permission. Has and Able do different jobs: Has includes an object in another object's contents, while Able permits an action.
Imports - another simulation's library
Imports uses definitions from another installed simulation, such as its world classes. This adds a mod dependency. The game reads data but does not install missing simulations, plugins, or executable code. Ordinary PreWarpAge mods need no imports: base-game definitions are already available.
Specify a simulation name or Simulation/File path without .json. The following fragment works only in an installation containing StarGenerator and its Worlds file. PreWarpAge's distributed files do not guarantee their presence.
["Simulation", "Imports", "StarGenerator/Worlds"]The game loads definitions from that simulation's Logic/Worlds.json and then its own imports. If the file is missing, a new game cannot be created and the loader reports an error. The imported game's main-scene settings must not replace PreWarpAge's scene.
Before using a library, check that the installed version provides the required images, translations, and game rules. Loading its definitions does not turn PreWarpAge into a different game mode.
Owner - ownership
Owner answers ‘Whose object is this?’ Suppose MyMarker already exists on Earth. Assign it to the player:
["MyMarker", "Owner", "Player"]PreWarpAge has one player, so Player unambiguously identifies the marker's recipient. This line specifies ownership. Making the marker appear on the map also needs a separate location.
This fragment creates an object on Earth with an Outpost image and assigns it to the single player. Test it in a new Solar System game, where Earth is defined. MyMarker is an invented object name. Building, Player, and outpost already exist.
["MyMarker", "Is", "Building"],
["MyMarker", "Icon", "outpost"],
["MyMarker", "PlacedAt", "Earth"],
["MyMarker", "Owner", "Player"]PlacedAt creates the object on the existing Earth, Icon supplies its picture, and Owner links it to the created player. Without PlacedAt these lines do not spawn a marker on the map. Normal construction assigns ownership through Build.
Owner can name a particular existing object or its definition. Our example names the Player definition: the game finds the player created from it. With several players, that reference no longer means ‘current’ or ‘nearest’. A random Player_0 number from someone else's save does not resolve the ambiguity.
You can check the assigned owner's stock. For example, WellFundedWorld gives a world a bonus when its owner has enough Science. Its condition is written as:
["WellFundedWorld", "Requires.Owner.Has.Science.Min", 100]Owner leads from the world to the player, Has.Science to the player's Science, and Min 100 specifies the lower bound. Without Owner the condition checks the world's own stock. ‘Condition sources and parameter adjustments’ gives the full WellFundedWorld definition and bonus activation.
Creating a separate technology for each player requires Player Has <technology>. One shared object with Owner Player does not replace that creation of individual instances.
Parent - the entity that created it
An asteroid event has a Bombard button. Clicking it should damage the asteroid itself. The Parent relationship leads from the button to its event.
Bombard is the existing asteroid bombardment choice. The player clicks the button in the asteroid event card. Parent on this choice points to the card itself, so the following fragment makes it the damage recipient.
["Bombard", "Damage.Target", "Parent"]This line already belongs to bombardment's definition. It demonstrates an existing mechanism rather than a standalone attack. To change the existing bombardment's strength, change Damage. Parent alone does not create a weapon.
Sometimes the parent's target is needed instead of the parent. The NanobotsEscaped experiment outcome writes that reference as Parent.Target:
["NanobotsEscaped", "Transforms.Target", "Parent.Target"]Parent leads from the outcome to the experiment event, and Target from the event to the chosen world. The experiment's world is therefore transformed, rather than its message. See Transforms for a full walkthrough.
If an existing chain contains another parent, Parent.Parent follows two links. The game creates these relationships when events and outcomes appear. Neither a definition part's name nor an object number from someone else's game replaces the link. Parent also means neither Is inheritance nor Owner ownership.
PlacedAt - an object's location
PlacedAt answers ‘Where is the object?’ MyMarker can specify Earth as its location:
["MyMarker", "PlacedAt", "Earth"]In a new Solar System game, the game creates the described marker on Earth. This is initial placement: the player does not click Build or pay a cost. Use Build for ordinary construction requiring player action.
Now define the whole marker. Add these lines to a mod Logic file: Is Building specifies its role, Icon selects an existing picture, and Owner assigns ownership.
["MyMarker", "Is", "Building"],
["MyMarker", "Icon", "outpost"],
["MyMarker", "PlacedAt", "Earth"],
["MyMarker", "Owner", "Player"]This fragment uses Earth from the Solar System scenario. MyMarker is the new object's name, Building its role, and outpost an existing image name. PlacedAt puts the marker on Earth, and Owner assigns it to the player. In a scenario without Earth, these lines create neither Earth nor a marker on it.
PlacedAt can cover several locations. Consider a separate version: two authored worlds, MyHostA and MyHostB, are already on the map. Both belong to our MyMarkerHost category, while MyMarkerHost itself is absent from the map. Place the worlds using Orbit as explained in that article. Then write the marker rule as:
["MyMarkerHost", "Is", "World"],
["MyHostA", "Is", "MyMarkerHost"],
["MyHostB", "Is", "MyMarkerHost"],
["MyMarker", "PlacedAt", "MyMarkerHost"]The game finds no body of MyMarkerHost itself and falls back to its descendants. Two markers appear, one on each placed world. One PlacedAt does not mean ‘choose a random world’. The marker's Owner, Name, and Icon stay as in the full example above.
Now change only the map's contents by also placing MyMarkerHost itself. For example, in a separate Solar System variant, give it an explicit center and ring:
["MyMarkerHost", "Orbit.Center", "Sun"],
["MyMarkerHost", "Orbit", 3]When an instance of MyMarkerHost itself is placed, lookup selects it. MyHostA and MyHostB are no longer included as a fallback: the marker appears on the direct location, rather than all three. The exact definition takes priority over descendants. Add ordinary Name and Icon properties to distinguish worlds. These lines show only the placement change.
The location must already be on the map. In a separate version, referencing a future world before creating it produces no marker yet:
["MyMarker", "PlacedAt", "MyLateHost"]When MyLateHost is created and receives Cell, deferred placement can create the marker. MyLateHost Is World alone, without the body appearing, is insufficient. This waits for a location during map creation. It is not a permanent marker factory on every future world: repeating placement may recreate objects. Do not use it to accumulate instances on each repetition.
Specify Owner separately when the object should belong to the player. PlacedAt also does not transfer through ordinary Is inheritance: a new definition needs its own placement. Build assigns both location and owner during construction.
Maps and body generation
Center - the scene's center
A star-system map consists of rings around a central body. Center specifies that body, usually a star. The map and star are described separately: the map stores cell placement, while the star stores its properties and ring count. ‘A fixed system and the Plane boundary’ gives a complete example connecting such a system to a new game.
First specify the center directly. MyMap is our map's name, and Sun is the existing Sun definition. Center links the map to its central body:
["MyMap", "Center", "Sun"]This does not set a ring count. Rings belong to the star itself. Add eight rings in a separate line. Together the two statements are:
["MyMap", "Center", "Sun"],
["Sun", "Orbits", 8]MyMap is an invented map name. It receives Sun as its center, and Sun receives eight rings. These lines do not add a scenario to the menu. That needs MyFixedSystem and the other definitions in the complete example.
In PreWarpAge the scenario selects the central star. For example, a new SurveySystem uses ClassG:
["SurveySystem", "Orbit.Center", "ClassG"]This scenario choice takes priority over Center.Deck. The scenario recipe shows how to include SurveySystem in the menu. Center on a separate map alone does not create a scenario card.
The generator also supports optional companion stars. For example, this range allows zero to two companions:
["MyMap", "Center.Companions.Min", 0],
["MyMap", "Center.Companions.Max", 2]Without Center.Companions.Max, no companions are created. These bounds allow zero, one, or two. To favor one, keep the bounds and add Peak:
["MyMap", "Center.Companions.Min", 0],
["MyMap", "Center.Companions.Max", 2],
["MyMap", "Center.Companions.Peak", 1]One becomes the favored value, but the limit stays two. Peak does not guarantee exactly one companion.
A companion's compact system size is a separate setting. Here it receives one to two rings:
["MyMap", "Center.Companions.Reach.Min", 1],
["MyMap", "Center.Companions.Reach.Max", 2]Without these two settings, the limit is three rings. Both examples describe generation. They do not add a button for traveling between systems in PreWarpAge.
Orbits - rings, zones, and moons
First set a star's ring count. ClassK has eight rings:
["ClassK", "Orbits", 8]These are eight star-system rings for planet placement. This line does not set each planet's moon count.
Now set a planet's satellite count. On GasGiantMedium the same Orbits refers to moons, and a range lets different giants have different counts:
["GasGiantMedium", "Orbits.Random.Min", 0],
["GasGiantMedium", "Orbits.Random.Max", 2]A new medium gas giant gets zero, one, or two moons. Orbits.Random.Peak can favor a particular number within those bounds. See Random for the random-number rule.
The kinds of moons are set separately from their count. In Orbits.Deck, the part after the last dot names a satellite class. For example, this card permits a TinyRock rocky satellite:
["GasGiantMedium", "Orbits.Deck.TinyRock", 1]The number 1 is the count of TinyRock cards in the deck. It does not replace the two-moon limit. Overall limits for all moons in a system go on the central star as Orbits.Moons.Min and Orbits.Moons.Max.
Return to the star's rings. They are divided among climate zones. For example, ClassK's habitable-zone weight is written as:
["ClassK", "Orbits.Habitable.Weight", 2]This weight is compared with the other zones' weights. With eight rings and four equal weights of 2, each zone receives two places. Each zone gets Orbits × its weight / the sum of positive weights, rounded to an integer with exact halves rounded up. The sum of independently rounded counts sometimes differs from Orbits.
A descendant's weight is an addition. Suppose ClassK's habitable weight is 2, as above. Add a star variant:
["MyStar", "Is", "ClassK"],
["MyStar", "Orbits.Habitable.Weight", 1]MyStar's habitable zone receives a weight of 2 + 1 = 3. This is its weight before ring allocation, rather than a promise of three planets. Change only the addition to zero:
["MyStar", "Is", "ClassK"],
["MyStar", "Orbits.Habitable.Weight", 0]The weight remains 2 + 0 = 2. Zero does not remove the inherited zone. Without an inherited contribution, a zero weight excludes the zone. After changing weights, check that a place for the homeworld remains.
Once the place count is determined, select the habitable zone's worlds. These two cards give it an Earth-like and an ocean world:
["ClassK", "Orbits.Habitable.Deck.StandardEarthlike", 1],
["ClassK", "Orbits.Habitable.Deck.StandardOcean", 1]With two places, the deck deals both types in random order. With one place, only one appears. Deck inheritance follows a different rule: a deck is replaced as a whole. Keep ClassK's two cards above and give MyStar one card of its own:
["MyStar", "Is", "ClassK"],
["MyStar", "Orbits.Habitable.Deck.StandardEarthlike", 1]MyStar's habitable deck now contains only StandardEarthlike. The parent's StandardOcean is not added. Unlike a zone weight, an explicit deck is not an addition to the old one. Removing its deck line makes ClassK's complete contents available again.
For the physical model, a zone can have a temperature boundary. For example, the habitable zone's lower bound is:
["ClassK", "Orbits.Habitable.Temperature.Min", 240]The number is measured in kelvin. When using temperature boundaries, set them for every zone with a positive weight. The entire system's inner limit is a separate setting:
["ClassK", "Orbits.UltraHot.Temperature.Max", 4000]This sets the whole system's inner boundary to 4000 K instead of the original 5000 K. Specifically UltraHot.Temperature.Max serves this purpose. Another zone's Max does not replace this shared inner limit.
Without temperature boundaries, zones run from inside to outside in declaration order. PreWarpAge uses UltraHot, Hot, Habitable, Snow, and Outer. A custom zone can place bodies but does not automatically gain existing climate zones' economic effects. Orbits.Seeded and deal results record completed generation. Do not write them in a mod.
Orbit - position on a ring
Add a MyMoon satellite to Earth using the existing TinyRock basis. First specify what it should orbit:
["MyMoon", "Orbit.Center", "Earth"]Earth is the Solar System scenario's existing Earth. In a scenario without Earth, this line does not create it. A new definition needs an explicit Orbit.Center: ordinary Is inheritance does not transfer it.
Now choose a ring. This line places the satellite on the first ring around Earth:
["MyMoon", "Orbit", 1]Orbit takes an integer ring number. Zero means the center itself. The first ring has six cells. Without an exact cell, the game chooses a free one.
Choose the top cell, index 0. Orbit.Index specifies the cell:
["MyMoon", "Orbit.Index", 0]Counting starts at the top and runs clockwise. Ring 2 has 12 cells, and ring 3 has 18: the count is the ring number multiplied by 6. Oversized indices wrap around. Combine the satellite role with the three settings:
["MyMoon", "Is", "TinyRock"],
["MyMoon", "Orbit.Center", "Earth"],
["MyMoon", "Orbit", 1],
["MyMoon", "Orbit.Index", 0]MyMoon appears in the top cell of Earth's first ring. If the chosen scenario has no Earth, this fragment does not create it.
Movement per turn is separate from the initial cell. For example, give bodies a one-cell step:
["Simulation", "Orbit.Step", 1]Bodies move one cell per turn. Zero or an absent Orbit.Step disables this movement. The initial Orbit.Index does not become a speed setting.
Disabling decorative placement drift uses a different setting on the map:
["MyMap", "Orbit.Static", true]MyMap is the map from Center. Orbit.Static disables its decorative drift but does not cancel Simulation's per-turn step. Orbit.Zone stores an already created body's zone. Orbit.Distance.Max and Orbit.Star.Type.Not are not supported filters in current PreWarpAge. Do not use them to prohibit locations. Use Orbit.Center, Orbit, and Orbit.Index for fixed placement. The physical Distance.Max in the Distance article is a different quantity, rather than a generator restriction.
OrbitFill - filling a belt
A belt occupies several cells on one ring. OrbitFill sets the fraction to fill, avoiding separate placement for every rock. Here MyBelt is a new belt name, and RockyAsteroid is the existing rocky-asteroid class. Test it in a new Solar System game where Sun is already defined.
The familiar Orbit.Center and Orbit set the center and ring. The new OrbitFill value, 0.6, fills 60% of ring cells. Combine these settings with the belt-rock definition:
["MyBelt", "Is", "RockyAsteroid"],
["MyBelt", "Orbit.Center", "Sun"],
["MyBelt", "Orbit", 4],
["MyBelt", "OrbitFill", 0.6]In a new Solar System game, the belt occupies available cells of the Sun's fourth ring, approximately 60% if there is enough room. With too few free cells, it uses only those available. OrbitFill is usually between 0 and 1. A value of 1 would fill the entire available ring.
To make all rocks represent one belt with shared resources and actions, add this setting to MyBelt:
["MyBelt", "OrbitFill.Lead", true]The belt now has one lead object, with the other rocks as its visual fragments. Selecting any fragment opens the shared resources. The drawn rocks have no separate stocks. The game creates the links between them itself.
Trojans and TrojansOf - Trojan swarms
Trojans are two groups of small bodies on a planet's orbit, one roughly 60° ahead and the other behind. First let giants receive such groups:
["Giant", "Trojans.Chance", 20]Each new giant has a 20% chance of receiving the Trojans trait. This decides whether Trojans exist, without describing the swarm's rocks yet.
Now describe the rocks. GiantTrojan is a new kind based on RockyAsteroid. TrojansOf Giant connects it to giants. Together the chance and swarm definition are:
["Giant", "Trojans.Chance", 20],
["GiantTrojan", "Is", "RockyAsteroid"],
["GiantTrojan", "TrojansOf", "Giant"]Some generated giants receive GiantTrojan swarms ahead and behind on the same ring. Missing giants are not created by this. For an authored system, TrojansOf can name a particular planet instead of Giant. Put TrojansOf on the new swarm kind, rather than general RockyAsteroid, or it would affect all such asteroids. TrojansOf.Seeded records completed placement. A mod needs no such internal fact.
Plane - a rectangular map
Plane describes a rectangular field of hexagonal cells. It is a general engine capability without a complete PreWarpAge game recipe covering stars and the player's homeworld yet. This article therefore explains only the format. For a playable custom scenario, use the ring system in ‘A fixed system and the Plane boundary’. Replacing Orbit.Center with Plane.Cols and Rows does not create such a scenario.
Field dimensions are the first part. These lines set nine columns and five rows:
["MySector", "Plane.Cols", 9],
["MySector", "Plane.Rows", 5]The result is a 9 × 5 field of hexagonal cells. Both numbers must be positive integers. Omit Plane.Rows to make height equal width, producing 9 × 9 here.
Next is the star deck used to fill free cells. Add an existing ClassG star card with weight 4 to the dimensions:
["MySector", "Plane.Cols", 9],
["MySector", "Plane.Rows", 5],
["MySector", "Plane.Deck.ClassG", 4]4 is the ClassG card's weight in the deck, rather than field width or a guaranteed star count. Declared home systems are placed first, then the deck fills remaining cells. This describes geometry and dealing. It does not connect a new PreWarpAge game or create travel between maps. Plane.Homed, Scattered, and ColonyMinted mark objects already created. Do not copy these internal fields into a mod.
Spawn - the player's homeworld
Spawn selects the player's homeworld. Name a particular body in advance or let the game choose among suitable worlds. Those worlds must actually appear on the map. Earthlike is the Earth-like world category, and Homeworld references the home already chosen for a particular player. StandardOcean is not Earthlike and cannot replace an Earth-like start.
For a predetermined homeworld, name it through Spawn. In the Solar System scenario, the player can start on the existing Earth:
["Player", "Spawn", "Earth"]This selects a particular definition. It works only on a map that actually creates Earth. Spawn alone does not create a missing planet.
For a random map, use a suitable category in Spawn.Random instead of a planet name:
["Player", "Spawn.Random", "Earthlike"]The player receives a random Earthlike world from those already created on the map. Homeworld then references the chosen home. StandardOcean is not Earthlike, so a lone ocean world is unsuitable for this start.
Disable random selection with false. For example, in a separate Player definition with explicit Spawn Earth, cancel inherited random selection as follows:
["Player", "Spawn.Random", false]Spawn.Random takes a category name or false, rather than true or a number. If Spawn and Spawn.Random are both present, explicit Spawn takes priority. These initial settings apply to a new game. Editing the file does not move a home in an existing game.
A guaranteed random-system start needs at least one Earthlike to be created. A high card weight does not guarantee a home with only one place if StandardOcean remains in the deck. See ‘Your own star with a guaranteed homeworld’ for a full example. Spawn.Lost and OriginKey store game history. Do not copy them from a save.
Grid and AutoSelect - map presentation
Grid selects how an already created map looks. Keep PreWarpAge's ordinary celestial-body presentation:
["Simulation", "Grid", "Decorative"]Replacing Decorative with Hex displays a hexagonal grid. This changes appearance, rather than ring count, which Orbits still sets. Rectangular geometry belongs to Plane.
Mouse selection is a separate setting. Suppose MyMarker from PlacedAt already stands on Earth. To stop clicking the planet from automatically selecting that marker, specify:
["MyMarker", "AutoSelect", false]The marker keeps its location and owner. Only automatic click selection changes. Without AutoSelect, ordinary behavior applies.
On the map, the same false has a different result. In a separate version, set it on Simulation:
["Simulation", "AutoSelect", false]A click selects the cell itself rather than the drawn body. In the previous example, the map still selected the body and only the marker stopped intercepting its click. The statement's recipient, Simulation or MyMarker, determines the difference.
For example, a planet has MyMarker from PlacedAt. This fragment keeps decorative map presentation and prevents the marker from intercepting planet clicks. Place the marker separately first. AutoSelect changes neither ownership nor construction permission.
["Simulation", "Grid", "Decorative"],
["MyMarker", "AutoSelect", false]When several objects share a location, you can prefer the one controlled by the player:
["Simulation", "AutoSelect.Controllable", true]This preference applies during automatic selection. It does not grant control over someone else's object.
Cell and OrbitSlot - a live world's position
Cell stores the cell occupied by a created body. It is an internal game-state relationship. In a mod, specify the desired center, ring, and position through Orbit. The game records the exact Cell address itself, keeping your mod independent of object numbers assigned in someone else's game.
Cell references a particular scene's cell. It appears during placement and does not define the world's class. OrbitSlot.* stores computed information about the orbital slot used to create a body. Do not copy those addresses and results from an incidental game into a mod. Use Orbit/Orbit.Center/Orbit.Index for authored positions, and Orbits or Plane for generation.
["MyMoon", "Is", "TinyRock"],
["MyMoon", "Orbit.Center", "Earth"],
["MyMoon", "Orbit", 1]In the Solar System scenario, this declares a new rocky satellite of the existing Earth. The game assigns its Cell during placement on the first ring. No cell or instance numbers from someone else's save are needed. In a scenario without Earth, the fragment does not create it.
Random selection
Seed - the game's seed
A seed is a number used to obtain random results. It lets you reproduce a game with the same game and mod files, seed, and action sequence. This is useful for mod testing: change one parameter and compare results from the same start. After a rule change, the old seed does not guarantee the old map.
Seed is an integer on Simulation from 0 to 2147483647. The menu offers values up to 99999, while a file allows the full range. If no seed is chosen, the game assigns one randomly. This fragment suggests seed 42.
["Simulation", "Seed", 42]When creating a new game, the player can choose another seed and override the mod's statement. Seed.Rng.<key> fields let developers control particular random results during tests. Ordinary balance changes do not need them.
Random - a random number
Let new MyRock worlds receive different sizes from 1 to 3. Give the new definition both Size.Random bounds:
["MyRock", "Is", "TinyRock"],
["MyRock", "Size.Random.Min", 1],
["MyRock", "Size.Random.Max", 3]Each created MyRock receives its own number within these bounds. The choice is saved: reopening a tooltip does not change it. To see the new class, place it on the map separately or add it to a world deck.
Bounds must be numbers, with Min no greater than Max. Both are required, though either or both may already exist on a parent. Replacing Size with another numeric field creates a random choice for that field if its rules support Random.
Now set exact steps: 1, 2, and 3. Add a step of 1 to this example:
["MyRock", "Size.Random.Step", 1]Without other distribution settings, all three steps are equally likely. Step must be positive. If Step is absent, integer bounds cause the random number to be rounded. This is a different selection method and does not promise equal chances for every step. Writing 1.0 instead of 1 does not change that.
To favor sizes around 2, set the distribution's peak:
["MyRock", "Size.Random.Peak", 2]Peak 2 favors the area around two. Peak true chooses the range midpoint, while Peak false keeps a uniform choice. Combining a peak with Step rounds the result to the chosen steps.
A separate power-law distribution serves large ranges. In this independent MyWeightedRock example, smaller sizes occur more often than larger ones:
["MyWeightedRock", "Is", "TinyRock"],
["MyWeightedRock", "Size.Random.Min", 1],
["MyWeightedRock", "Size.Random.Max", 100],
["MyWeightedRock", "Size.Random.PowerLaw", 1]For a positive range, positive PowerLaw favors small numbers, negative favors large numbers, and zero gives a uniform choice. Density is proportional to the number raised to minus the exponent. At exponent 1, equal ratios are equally likely. PowerLaw takes priority over Peak, so do not add a peak to this example.
Finally, you can list allowed values instead of a range. For example, a body must have only size 1 or 3:
["MyListedRock", "Is", "TinyRock"],
["MyListedRock", "Size.Random", 1],
["MyListedRock", "Size.Random", 3]Both listed values are equally likely. Do not mix such a list with explicit Min and Max for the same field.
Some fields have their own granularity: a duration in turns, for example, remains an integer. A fractional range does not override that rule. Infinity and nonnumeric values are invalid in Min and Max. Now combine the original stepped MyRock in one block:
["MyRock", "Is", "TinyRock"],
["MyRock", "Size.Random.Min", 1],
["MyRock", "Size.Random.Max", 3],
["MyRock", "Size.Random.Step", 1]Each created MyRock receives size 1, 2, or 3 with equal probability. Include MyRock in a world deck or place it through Orbit to see it. Giving a new definition a fixed Size without its own range replaces the inherited random size. Random.Prior, Drawn, and Source store choices already made. Do not set them in mod files.
Chance - trait probability and outcome chances
Chance sets a probability. First consider a world trait: a medium gas giant may have a Trojan swarm. Set a probability of 20 percent:
In this first example, Trojans is the ‘has Trojans’ trait and Chance is the probability of receiving it. The number must be between 0 and 100.
GasGiantMedium below is the existing medium gas-giant class. Only the probability of its Trojans trait changes. Trojans and TrojansOf explain swarm placement. To change an event's risk, use the EventChoice and Failure example, where Chance.Target identifies a particular event outcome.
["GasGiantMedium", "Trojans.Chance", 20]Each new giant independently receives the trait with a 20% probability. Failure stores false. This does not guarantee exactly one success in every five. A trait already set is not rolled again.
An event's probability can be a separate parameter. For example, RobotUprising's Capture part selects one of three capture chances:
["RobotUprising.Capture", "Chance.Deck.20", 1],
["RobotUprising.Capture", "Chance.Deck.30", 1],
["RobotUprising.Capture", "Chance.Deck.40", 1]This part receives 20%, 30%, or 40%. The part after Chance.Deck is the possible percentage itself. The third value, 1, is its card count. Chance.Name sets the parameter label, such as CaptureChance on this uprising part.
The player can improve another parameter of the same uprising: the chance of retaking a captured sector. The existing UprisingTroops button writes this as:
["UprisingTroops", "Chance.Add", 15],
["UprisingTroops", "Chance.Target", "Parent.Retake"]Clicking adds 15 percentage points to the parent event's Retake, for example turning 20% into 35%. Chance.Target is required: it names the chance being changed. The result is bounded by zero and Chance.Max, 100% by default. Chance.Add must be nonzero. This acts on an event parameter, rather than rerolling a world trait.
Changes - choosing one type
Changes selects one predefined variant for an object. It can change the image and properties while retaining the object itself. The selected variant becomes Type. Transforms fully replaces a body with another class, and old buildings may be destroyed during that replacement.
Define a new tiny world, MyBody, and one appearance variant, SurveyVariant. Changes connects the variant to the world class, and the variant's Icon supplies its new image:
["MyBody", "Is", "TinyRock"],
["SurveyVariant", "Changes", "MyBody"],
["SurveyVariant", "Changes.Chance", 100],
["SurveyVariant", "Icon", "earth"]This sole variant has Changes.Chance weight 100. When MyBody is created, it is therefore chosen as Type and supplies the earth image. Place MyBody through Orbit or add it to a world deck to see it on the map. Other planet classes do not change.
Now permit a skip: only some worlds should get this variant in a new game. Replace its weight with 25:
["SurveyVariant", "Changes.Chance", 25]Without other suitable variants, SurveyVariant has a 25% chance on first selection, leaving 75% without it. An unspecified weight is 100. Now replace the skip with a choice between two appearances for the same MyBody:
["SurveyVariant", "Changes", "MyBody"],
["SurveyVariant", "Changes.Chance", 100],
["SurveyVariant", "Icon", "earth"],
["OtherVariant", "Changes", "MyBody"],
["OtherVariant", "Changes.Chance", 100],
["OtherVariant", "Icon", "ice"]The weights total 200: each suitable variant gets half the chances, rather than an independent guaranteed 100%. One new MyBody gets one appearance. Conditions may exclude a variant. A chosen variant remains while its conditions hold.
To choose these appearances without replacement, give MyBody a Type.Deck instead of ordinary weighted selection:
["MyBody", "Type.Deck.SurveyVariant", 1],
["MyBody", "Type.Deck.OtherVariant", 1]This deck is used before ordinary Changes.Chance weights. It holds one card for each declared variant. A chosen card is consumed according to Deck, explained next. Type becomes the chosen variant's name, and its properties apply to the same object. Transforms fully replaces a body with another class. Neither Changes nor a Type deck replaces Is inheritance.
Deck - choosing without replacement
A deck selects without replacement. A drawn card leaves the set. Once the set is exhausted, its contents are replenished. For example, two draws from two different world cards produce both kinds. Two independent Chance rolls could produce the same kind twice. Deck describes the cards. The rule using the deck determines when to draw.
Put one Earth-like and one ocean world card in ClassK's habitable-zone deck:
["ClassK", "Orbits.Habitable.Deck.StandardEarthlike", 1],
["ClassK", "Orbits.Habitable.Deck.StandardOcean", 1]The base game's ClassK has two places in this zone. The first draw picks a kind randomly, and the second gets the remaining one. These two cards cannot produce the same kind twice in succession. Once exhausted, the deck refills if the mechanism requests another draw.
You can increase a card count. For example, this new deck contains three Earth-like cards and one ocean card:
["ClassK", "Orbits.Habitable.Deck.StandardEarthlike", 3],
["ClassK", "Orbits.Habitable.Deck.StandardOcean", 1]The first draw is three times more likely to choose Earth-like than ocean. After an Earth-like choice, two Earth-like and one ocean card remain. The zone's two places still receive only two worlds: more cards do not create more places.
A standalone deck statement starts with Deck. A deck belonging to a particular property puts that property before Deck. For example, Deck.Supplies belongs to a random-event deck, while Orbits.Habitable.Deck.StandardOcean belongs to habitable-zone world generation. The rule using the deck determines when a card is chosen.
Ordinary event and body decks allow fractional weights. Change the familiar deck as follows:
["ClassK", "Orbits.Habitable.Deck.StandardEarthlike", 0.5],
["ClassK", "Orbits.Habitable.Deck.StandardOcean", 1.5]The first selection uses a 0.5-to-1.5 ratio. If StandardOcean is chosen, its weight loses 1, leaving 0.5 and 0.5. If StandardEarthlike is chosen next, its whole remaining 0.5 is consumed, leaving only the ocean card at weight 0.5. A fractional weight does not create half a world. The deck refills after exhaustion.
Zero and negative cards do not participate. A negative value does not remove an inherited card: use a patch for removal. Orbits contrasts a parent's deck with a descendant's own deck: explicit contents replace the previous deck as a whole. This differs from adding zone weights.
A resource card describes production rather than a world type. For example, Deck.Energy.2.1 means an Energy production card of 2.1 per Worker. The third value is the number of such cards. These counts must be nonnegative integers, and production itself must be positive. Deck.Energy references a shared deck, while Deck.Resource inside it selects one of the body's allowed resources. See ‘A new mined resource and deferred exploration’ for a complete sequential example. Energy.Deck.* order is unsupported.
An event card temporarily excluded by conditions stays in the deck. The game stores remaining cards and draw counts in Deck.Pool and Deck.Drawn. Do not transfer these internal records into a mod.
World properties
Ordinary PreWarpAge uses game quantities for size, Worker slots, and production. It needs no complete physical planet model. A mod may optionally describe mass, pressure, composition, and rotation without importing another simulation. ‘Physical fields without an external library’ shows the required data. These properties do not automatically create new settlement or production rules. Do not duplicate values the game calculates with fixed numbers.
Size - territory or diameter
Size determines how large a body is on PreWarpAge's game scale and contributes to capacity. This scale is not kilometers. Destruction may reduce size to a declared threshold, after which the body disappears or becomes debris.
Give a tiny Rock World game size 3:
["TinyRock", "Size", 3]New TinyRock worlds have size three on the game scale. It does not mean three kilometers.
To distinguish a lower bound from death, take a separate MySizeBody based on CelestialBody, without the World role. Ordinary worlds already inherit death rules from World, so TinyRock would not show this distinction. Set only size and a lower bound on the test body:
["MySizeBody", "Is", "CelestialBody"],
["MySizeBody", "Size", 3],
["MySizeBody", "Size.Min", 0]After creation, decreasing size stops at zero. Min alone does not mean death: this version has no Size.Dead. Now add the actual rule for death at zero:
["MySizeBody", "Size.Dead", 0]Size.Min applies first, then Size.Dead is checked. MySizeBody now dies at size zero. The death threshold changed, rather than the way the number is bounded.
Death can leave debris through Size.Dead.Transforms. Ordinary TinyRock already gets its bound, death, and transformation from World. Below they are repeated explicitly with our size to show the whole result:
["TinyRock", "Size", 3],
["TinyRock", "Size.Min", 0],
["TinyRock", "Size.Dead", 0],
["TinyRock", "Size.Dead.Transforms", "Debris"]TinyRock is the existing tiny Rock World class, and Debris means debris. New TinyRock worlds get size 3. Reaching zero replaces a world with debris. Size.Max sets the displayed range's upper bound, without prohibiting every size increase.
For a physical description, set Size.Measure Kilometers on the body, class, or Simulation. Size then means diameter in kilometers, relative area Size.Area is calculated, and the game-scale size death threshold does not apply. Game abilities may still read the same Size for capacity. A diameter of 12742 is not automatically converted into ordinary PreWarpAge territory size. Enabling kilometers therefore needs a separate economy check and is unsuitable as a cosmetic edit.
Weight, Density, and Gravity - mass, density, and gravity
Start with Earth's mass. A physical description uses Weight in kilograms:
["Earth", "Weight", 5.972e24]5.972e24 means 5.972 × 10²⁴ kilograms. The field name is Weight. Mass is not a substitute. Optional Weight.Min and Weight.Max refer to the displayed mass range.
Calculating density and gravity from mass also needs a diameter. This physical example measures Size in kilometers. Add Earth's diameter, 12742 km, to its mass:
["Earth", "Size.Measure", "Kilometers"],
["Earth", "Size", 12742],
["Earth", "Weight", 5.972e24]The game can now calculate Density in g/cm³ and Gravity in Earth g. An Earth-like body's Gravity is about 1. This is a physical example: converting game Size to kilometers also changes the quantity read by capacity rules. An ordinary image change does not need that conversion.
Another way to specify the same physical model is to give diameter and density and calculate mass. Instead of an explicit Weight, keep Size in Kilometers and set, for example:
["Earth", "Density", 5.51]This is a density of 5.51 g/cm³. The game uses it and diameter to calculate missing mass. Likewise, mass and density can determine a missing diameter. If mass and diameter are already set, they determine density: do not give all three conflicting independent numbers. The physical model can turn an extremely massive small body into a black hole.
Distance - distances and a physical orbit
There are two different distances here. Physical Distance is separation from a star or planet, used for heating and motion. Game remoteness Distance.Home is the distance from the player's home in rings, which can change action costs. Keep them distinct.
First set Earth's physical distance from the Sun. The number defaults to kilometers, and CentralBody names the reference body:
["Earth", "Distance", 149597870.7],
["Earth", "Distance.CentralBody", "Sun"]This is about 149.6 million kilometers from Sun. It is not a game-board ring number. Distance.Min and Distance.Max can additionally show a distance range.
Now describe one revolution's duration. Add Distance.OrbitalPeriod to the distance and center:
["Earth", "Distance", 149597870.7],
["Earth", "Distance.CentralBody", "Sun"],
["Earth", "Distance.OrbitalPeriod", 8766]8766 is the period in hours. A positive Distance.OrbitalPeriod enables decorative orbital motion. Zero or an absent period keeps the image stationary. These settings do not create the body itself: this example uses the already defined Earth and Sun.
Physical orbit elongation is set separately in percent. For a clear calculation example, use distance 100000 km and eccentricity 10%:
["MyOrbitBody", "Distance", 100000],
["MyOrbitBody", "Distance.Eccentricity", 10]If Min and Max are not already set, the model obtains Distance.Min 90000 and Distance.Max 110000 km: mean distance minus and plus 10%. At eccentricity 0 the orbit is circular and this calculation adds no separate Min/Max. Explicit bounds take priority and are not recalculated from eccentricity.
A geocentric distance label can use Earth radii. This is a separate descriptive example, rather than converting the physical model from kilometers:
["MyGeocentricMoon", "Distance", 60],
["MyGeocentricMoon", "Distance.Measure", "Earths"]The description shows 60 Earth radii instead of 60 km. To express the same physical distance in the new unit, divide kilometers by Earth's radius yourself: for example, about 382260 km corresponds to 60 radii of 6371 km. However, Distance.Measure changes the label, while physical calculations still read Distance as kilometers. Do not combine this fragment with heating or mass calculations as an automatic unit conversion.
Geocentric models have separate descriptive fields. Distance.Epicycle is an additional motion circle's radius, and Distance.Epicycle.Period its period in hours. Distance.Eccentric sets the main circle center's offset from the observer, and Distance.Equant the distance to the point relative to which motion appears uniform. All three distances use Distance.Measure units. These fields are descriptive in PreWarpAge and do not form a complete geocentric-map recipe. Ordinary mods do not need them.
Game remoteness is a different calculation. PreWarpAge declares its origin and units as:
["Simulation", "Distance.From", "Homeworld"],
["Simulation", "Distance.Home.Measure", "Orbits"]The origin is the player's homeworld, and units are rings. The game derives Distance.Home itself, and a satellite uses its planet's position. Do not write the result on every class. The rule is designed for one homeworld, rather than several independent homes.
Temperature - temperature
In PreWarpAge, Temperature links a world to game heat and cold traits. In the physical model, the same word means temperature in kelvin. The rules being used determine its meaning. An ordinary PreWarpAge game number must not be read as a physical temperature.
First take ordinary PreWarpAge. StandardEarthlike starts at game value zero:
["StandardEarthlike", "Temperature", 0]This zero does not mean absolute zero. Base-game traits link the game property to the orbital zone. Heat and cold surcharges remain game rules.
For a physical description, by contrast, you can set Earth's temperature directly in kelvin:
["Earth", "Temperature", 288]288 K is about 15 °C. The game stores kelvin and displays Celsius. Without inputs for a heating calculation, the explicit value remains. ‘Physical fields without an external library’ gives a complete standalone physical-world example.
Now calculate the temperature. Give the star luminosity 1 on the solar scale, and the world a distance of 149600000 km and a link to that star:
["MyWarmStar", "Luminosity", 1],
["MyWarmWorld", "Distance", 149600000],
["MyWarmWorld", "Distance.CentralBody", "MyWarmStar"]After creating this physical world, the model records Temperature 278 K, about 4.85 °C. This is a simplified stellar-heating calculation without atmospheric adjustment, rather than an Earth climate prediction. My names denote your definitions. Orbit and the complete physical example explain placement.
Increase that calculated result by 10%. Add one line to the same three inputs:
["MyWarmWorld", "Temperature.Modifier", 1.1]The result is 278 × 1.1 = 305.8 K, about 32.65 °C. The multiplier applies to kelvin rather than Celsius. It must be positive and defaults to 1.
A moon's center is a planet, but its heat source is still the star. Add a moon to the original version without Modifier:
["MyWarmMoon", "Distance", 100000],
["MyWarmMoon", "Distance.CentralBody", "MyWarmWorld"]The chain runs from the moon to MyWarmWorld, then MyWarmStar. Moon heating uses the planet's 149600000 km distance to the star rather than the 100000 km distance to the planet. Without its own Modifier the moon gets the same 278 K. Temperature.Min and Temperature.Max describe a range and do not replace distance or luminosity.
Age - age
Age specifies a body's age in years. Use it in descriptions and trait conditions. Physical geology and tidal calculations also read stellar age when the other required properties are present.
Write the Sun's age of 4.6 billion years as:
["Sun", "Age", 4.6e9]4.6e9 is shorthand for 4,600,000,000. Age means elapsed years, rather than an event duration in turns. Age does not automatically increase when a game turn ends.
Stellar evolution times are separate information. For example, Age.LifeSpan can record the age at the end of the main sequence:
["Sun", "Age.LifeSpan", 1e10]This is ten billion years after the star's birth, rather than ten billion years from the current turn. Age.WhiteDwarfBirth likewise records the age of white-dwarf formation. Actual transitions between stages need separate rules. Geology and Rotation explain using age in physical calculations.
Luminosity and Metallicity - luminosity and metallicity
Luminosity describes a star's radiated power relative to the Sun. The solar value is 1:
["Sun", "Luminosity", 1]In the physical model, this contributes to planetary heating and temperature-zone positions. Luminosity 2 means twice the Sun's power. It is not Energy resource production.
Metallicity is different: the relative abundance of heavy elements. 1 also means the solar level, but refers to composition rather than radiation. Together the independent properties are:
["Sun", "Luminosity", 1],
["Sun", "Metallicity", 1]Sun receives solar luminosity and metallicity. These fields are optional on ordinary PreWarpAge stars. Without positive Luminosity, the generator uses a solar fallback only for zone layout, without recording it as a star property.
Atmosphere - atmosphere and clouds
Start with air quality. Write Earth's breathable atmosphere as:
["Earth", "Atmosphere", "Breathable"]Breathable is the existing breathable-atmosphere designation. Using Suffocating instead describes air that cannot be breathed without protection. This is an environmental quality rather than a resource stock.
Pressure is separate from breathability. One Earth atmosphere is written as:
["Earth", "Atmosphere.Pressure", 1]2 would mean two atmospheres of pressure. Pressure 1 alone does not imply breathable air: composition and qualities have their own facts.
Now specify composition. Atmosphere.Gas is followed by a chemical gas symbol, and the third value is its percentage:
["Earth", "Atmosphere.Gas.N2", 78],
["Earth", "Atmosphere.Gas.O2", 21]The description shows 78% nitrogen N2 and 21% oxygen O2. The game neither fills the total to 100% automatically nor normalizes percentages. Combine quality, pressure, and composition for the existing Earth:
["Earth", "Atmosphere", "Breathable"],
["Earth", "Atmosphere.Pressure", 1],
["Earth", "Atmosphere.Gas.N2", 78],
["Earth", "Atmosphere.Gas.O2", 21]All four statements concern one atmosphere but answer different questions: breathability, pressure, and gases present. Quality labels use keys such as AtmosphereBreathable.
Instead of explicit pressure, the physical model can calculate it from atmospheric mass. For example, with Earth's diameter and gravity, set:
["Earth", "Atmosphere.Mass", 1]This is the mass of one Earth atmosphere, rather than a fraction of planetary mass. Without Atmosphere.Pressure, a diameter of 12742 km and Gravity 1 give pressure 1 atmosphere. On the same planet, Atmosphere.Mass 2 gives 2 atmospheres. Explicit Pressure takes priority, so remove it to test mass-based calculation.
Cloud imagery can be set independently of physical calculations:
["Earth", "Atmosphere.Clouds", "clouds_up"]clouds_up is an image family. The game chooses and saves a particular variant for the created world. Clouds provide no income and do not themselves imply breathable air.
An unbreathable toxic atmosphere needs two qualities. For example, this set contains no Breathable:
["Earth", "Atmosphere", "Suffocating"],
["Earth", "Atmosphere", "Toxic"]Examine only the atmosphere's habitability contribution, without water or climate. On a separate test world, enable Habitability calculation with zero as in that article and set only breathable air at pressure 1:
["MyAirWorld", "Habitability", 0],
["MyAirWorld", "Atmosphere", "Breathable"],
["MyAirWorld", "Atmosphere.Pressure", 1]Without Hydrography and Temperature, other terms are zero. Habitability.Human receives 4 from this atmosphere. In a separate version, replace Breathable with two qualities, without leaving it alongside them:
["MyAirWorld", "Habitability", 0],
["MyAirWorld", "Atmosphere", "Suffocating"],
["MyAirWorld", "Atmosphere", "Toxic"]For this isolated set, Human is −1: an unbreathable toxic atmosphere incurs a penalty. MildToxic, HighlyToxic, and LethalToxic are also recognized instead of Toxic. Add another quality to this version:
["MyAirWorld", "Atmosphere", "Corrosive"]Suffocating + Toxic + Corrosive now gives Human −2 instead of −1. Corrosive increases this combination's penalty. If a separate version has only Corrosive without Breathable, Suffocating, or Toxic, the atmosphere contributes 0 rather than −2. Numeric Atmosphere.Toxic is a separate author-assigned rating, not a replacement for the string quality. These variants replace each other. Do not combine every shown atmosphere in one file.
Breathable atmospheres recognize the degrading qualities ChlorineFluorine, SulfurCompounds, NitrogenCompounds, OrganicToxins, LowOxygen, Pollutants, HighCarbonDioxide, HighOxygen, and InertGases. A new invented name receives no automatic penalty. Habitability explains these environmental ratings. They neither grant nor consume game resources.
Hydrography - surface and subsurface substances
Specify water as Earth's main surface substance. Water uses the symbol H2O:
["Earth", "Hydrography", "H2O"]This selects a substance. It sets no surface water amount yet and creates no mineable Water resource.
Now set coverage: water occupies 71% of the surface.
["Earth", "Hydrography.Surface", 71]Surface is the total coverage percentage for the chosen substance. Separating that water into liquid and solid portions needs temperature. Add 288 K in the complete Earth fragment:
["Earth", "Hydrography", "H2O"],
["Earth", "Hydrography.Surface", 71],
["Earth", "Temperature", 288]This extends Earth in the Solar System scenario. Water covers 71% and temperature is 288 K. The game computes Hydrography.SurfaceLiquid and Hydrography.SurfaceSolid from these inputs. With total Hydrography.Surface set, do not fix the computed phases separately. Subsurface portions are independent. This descriptive water does not become the mineable Water resource.
A second substance has its own fields. For example, add methane at 5% coverage to the original model:
["Earth", "Hydrography.Type2", "CH4"],
["Earth", "Hydrography.Type2.Surface", 5]Water and methane are now described independently. The second substance's results are Hydrography.Type2.SurfaceLiquid and Hydrography.Type2.SurfaceSolid. A third uses Type3 in these paths. Set subsurface portions separately with SubsurfaceLiquid and SubsurfaceSolid under the same prefix. Their imagery depends on interface capabilities.
The phase model recognizes water H2O, sulfur S, sulfur dioxide SO2, ammonia NH3, methane CH4, nitrogen N2, carbon dioxide CO2, and sulfuric acid H2SO4. It does not guess melting and boiling points for arbitrary new symbols.
Life - life indicators and probability
Life describes life and signs of an environment that could support it. ‘Complex chemistry is possible’ or ‘100 percent probability’ creates neither organisms, population, nor Workers. Life's presence and its estimated probability are different facts.
First name a life type. Life takes a dictionary key:
["Earth", "Life", "MyLifeType"]MyLifeType should show Carbon-based Life to players. The required dictionary is at the end of this article. This is a label rather than an organism count.
A descriptive probability uses a different field:
["Earth", "Life.Probability", 100]This is an informational 100% estimate, rather than a random roll or population creation. Life.Chance provides a random true/false choice. Do not substitute it for Probability if you only need a descriptive estimate.
A separate environmental indicator, such as complex chemistry, takes true or false. Combine the name, estimate, and indicator:
["Earth", "Life", "MyLifeType"],
["Earth", "Life.Probability", 100],
["Earth", "Life.ComplexChemistry", true]ComplexChemistry true means complex chemistry is present. Life.SubsurfaceOcean, Life.HydrothermalVents, Life.MethaneCycle, and Life.Organics work likewise. Each is its own indicator and is not inferred from Probability. Neither a life label nor a probability estimate creates Workers or income.
MyLifeType is an invented name key. Add this entry to Text/enUS.json to display Carbon-based Life. If the file does not exist, save the whole dictionary. This example concerns the existing Earth in the Solar System scenario.
{
"MyLifeType": "Carbon-based Life"
}Geology - geological activity
Geology describes internal and surface processes: volcanoes, crustal motion, geysers, and heating. An observation may be written as present/absent. A numeric score is a different form in an author-defined scale, rather than a percentage of volcanism.
First record only the presence of two processes on Earth, tectonics and volcanism. true is enough:
["Earth", "Geology.Tectonics", true],
["Earth", "Geology.Volcanism", true]Earth receives both indicators. Geology.Cryovolcanism and Geology.Geysers also accept true or false. For a textual description of geology as a whole, Geology takes a translation key.
Your model can rate tectonics numerically instead of answering yes/no. For example:
["Earth", "Geology.Tectonics", 40]40 is a score on your scale, rather than 40 percent. The earlier true is not score 1. Turning scores into weak or strong categories requires separate conditional traits.
Internal heat can be calculated rather than assigned a score. It needs world gravity and stellar age. This fragment provides sufficient inputs. Take world placement from Orbit or the complete physical example:
["MyHeatStar", "Age", 5e9],
["MyHeatWorld", "Gravity", 1],
["MyHeatWorld", "Distance.CentralBody", "MyHeatStar"]The world has gravity 1 on the Earth scale and its star is 5 billion years old. Without an explicit Geology.InternalHeat, the model calculates 8 points: 1 / 5 × 40. The result is rounded to an integer and capped at 100. It is Geology.InternalHeat state, rather than temperature in degrees. A numeric score alone does not add a ‘strong heating’ descriptive line. Such a label needs a trait with Requires.
Check the required input. In an alternative version, keep the stellar link but omit positive gravity:
["MyHeatStar", "Age", 5e9],
["MyHeatWorld", "Gravity", 0],
["MyHeatWorld", "Distance.CentralBody", "MyHeatStar"]InternalHeat is not calculated in this isolated version. A missing result does not mean zero heat. If other physical data calculates positive Gravity, the inputs become sufficient again. An already explicit Geology.InternalHeat is not replaced by automatic calculation.
A moon looks up age through its planet. For MyHeatMoon the path goes to MyHeatWorld, then MyHeatStar from the first example:
["MyHeatMoon", "Gravity", 1],
["MyHeatMoon", "Distance.CentralBody", "MyHeatWorld"]If the intermediate planet has no Age of its own, the calculation finds the star's age 5e9 and also gives 8 at Gravity 1. This example needs no separate moon age.
Geology.TidalHeating is a different calculation using central-body mass and the body's physical parameters. Consider an orbit with no elongation:
["MyTidalCenter", "Weight", 5.972e24],
["MyTidalMoon", "Distance.CentralBody", "MyTidalCenter"],
["MyTidalMoon", "Size.Measure", "Kilometers"],
["MyTidalMoon", "Size", 1000],
["MyTidalMoon", "Weight", 1e22],
["MyTidalMoon", "Distance", 100000],
["MyTidalMoon", "Distance.OrbitalPeriod", 24],
["MyTidalMoon", "Distance.Eccentricity", 0]The first line gives central-body mass. The other numbers concern the moon: diameter 1000 km, mass 1e22 kg, distance 100000 km, and orbital period 24 hours. Eccentricity 0 means a circular orbit. With these positive inputs, TidalHeating is 0 because the model's heating depends on orbital elongation. This calculated zero differs from a missing result due to insufficient inputs. Removing positive central-body mass, for example, prevents calculation.
Positive eccentricity is expressed in percent. It may produce nonzero heating, but the exact result depends on all the listed quantities. It is capped at 500, and results below one are recorded as zero. These scores are neither degrees nor volcanism probabilities. Automatic geological-activity labels still require separate traits.
MagneticField - magnetic field
A magnetic field here is a descriptive world property. A number can express intensity on an author-defined scale, while a text category might say ‘strong field’. PreWarpAge has no shared built-in scale for these scores. This fact alone does not automatically produce resources or protect population.
First set only a text category, Strong Magnetic Field, with a translation key in MagneticField.Type:
["Earth", "MagneticField.Type", "MagneticFieldStrong"]The existing Earth receives the MagneticFieldStrong label. Its dictionary entry should say Strong Magnetic Field. No numeric intensity is set.
If your model needs a numeric rating, write it without Type. For example:
["Earth", "MagneticField", 40]40 is a finite score on the author's chosen scale. It does not automatically receive a Strong Field label. Connecting scores to categories needs separate rules. Do not put MagneticFieldStrong in place of a number in MagneticField. Neither statement alone creates population protection or production.
Rotation - rotation
Rotation describes spinning around a body's own axis, rather than motion on a game orbit. Its period is the number of hours per revolution. A tidally locked body always faces its center with the same side, so its spin matches its orbital period.
First set the duration of one Earth axial rotation:
["Earth", "Rotation", 23.93]Rotation is measured in hours. Here a revolution takes 23.93 hours. Axial tilt is an independent property in degrees. Add it to the period:
["Earth", "Rotation", 23.93],
["Earth", "Rotation.AxialTilt", 23.44]Physical Earth's description shows period 23.93 hours and tilt 23.44°. Neither automatically changes decorative orbital speed around the star.
A separate indicator sets reverse rotation. For example, instead of the normal direction, specify:
["Earth", "Rotation.Retrograde", true]false means no retrograde indicator. Tidal locking is a separate setting. Give a body orbital period 24 hours, initial rotation 12 hours, and enable locking:
["MyLockedWorld", "Rotation", 12],
["MyLockedWorld", "Distance.OrbitalPeriod", 24],
["MyLockedWorld", "Rotation.TidallyLocked", true]On creation, Rotation becomes 24, matching the orbital period. That is what locking means: one side always faces the center. 12 does not remain as another independent spin period. Without positive Distance.OrbitalPeriod, the indicator provides no number to assign to Rotation.
A solar day is the time until the star returns to the same position in the sky. It is not always one revolution relative to fixed space. Take the same two periods without tidal locking:
["MyDayWorld", "Rotation", 12],
["MyDayWorld", "Distance.OrbitalPeriod", 24]The model records Rotation.SolarDay 24 hours: |12 × 24 / (24 − 12)| = 24. The spin period stays 12. If both periods equal 24, this calculation records no finite solar day: the denominator would be zero. The locking example above makes the periods equal.
Accumulated tidal influence is another quantity, Rotation.TidalEffect. It needs physical sizes and masses. This fragment shows which objects own the inputs:
["MySpinStar", "Age", 5e9],
["MySpinStar", "Weight", 1.989e30],
["MySpinWorld", "Rotation", 12],
["MySpinWorld", "Size.Measure", "Kilometers"],
["MySpinWorld", "Size", 12742],
["MySpinWorld", "Weight", 5.972e24],
["MySpinWorld", "Distance", 149597870.7],
["MySpinWorld", "Distance.CentralBody", "MySpinStar"]Age and the first mass belong to the star. The second mass and diameter belong to the world. These inputs give Rotation.TidalEffect about 0.000262. This is below the locking threshold of 50: Rotation.TidallyLocked does not appear and Rotation stays 12 hours. The influence score is neither hours nor a slowdown percentage. The rotation tooltip need not show it on a separate line.
Remove central-body mass, without deriving it from other physical data, and influence is not calculated. That is a missing result rather than calculated zero. For a moon, the reference first leads to its planet, then through Distance.CentralBody to the star to find age, as in Geology. At score 50 or above the model assigns tidal locking. For stellar influence this rule applies to bodies at least 2000 km in diameter. Image rotation and game-ring movement are configured separately.
Rings - a body's rings
Rings adds visible rings around a body, such as icy giant rings. They are an image and description: they do not become a separate mineable belt or increase planetary territory.
First select the existing bright-ring image for a medium gas giant:
["GasGiantMedium", "Rings", "RingsBright"]RingsBright uses ringsbright_down.png and ringsbright_up.png, the rear and front layers. Other existing options are RingsFaint, RingsModerate, and RingsProminent.
Image size is separate. Add scale 1.05 to the chosen rings:
["GasGiantMedium", "Rings", "RingsBright"],
["GasGiantMedium", "Rings.Scale", 1.05]The image is scaled by 1.05. Without Rings.Scale, scale is 1. It must be positive. Body Size and capacity stay unchanged. A custom MyRings needs a name translation and myrings_down.png/myrings_up.png. ‘Exact files for new images, backgrounds, and sounds’ explains preparation.
Habitability and Affinity - world suitability
Habitability rates physical environmental suitability for humans: breathable air, liquid water, and suitable temperature. It is an informational score, rather than a settler count or a decision about the player's starting world. Affinity is a separate attractiveness rating determined by author-defined rules.
First prepare atmosphere, water, and temperature. Each has its own article. Once they are present on Earth, enable human habitability calculation with a separate statement:
["Earth", "Habitability", 0]Zero here is an initial value enabling calculation, rather than an ‘uninhabitable world’ score. The result goes separately into Habitability.Human. Combine the inputs with that statement:
["Earth", "Atmosphere", "Breathable"],
["Earth", "Atmosphere.Pressure", 1],
["Earth", "Hydrography", "H2O"],
["Earth", "Hydrography.Surface", 71],
["Earth", "Temperature", 288],
["Earth", "Habitability", 0]This extends Earth in the Solar System scenario. Breathable air at 1 atmosphere, 71% water coverage, and temperature 288 K give Habitability.Human 8. Missing inputs receive no invented contributions. The score creates neither Workers nor Income and does not replace Earthlike for homeworld selection. Affinity also needs calculation and category rules beyond an initial zero.
Economy and Civilized - describing an inhabited world
Economy describes an inhabited world's economy using displayed income and total-volume numbers. These informational quantities neither award Credits nor start PreWarpAge production. Use Income.<resource> for actual resource receipts.
First record income as a descriptive Earth property:
["Earth", "Economy.Income", 100]100 uses your model's units. It does not mean 100 Credits per turn: currency and period are not assigned automatically. Actual Credit receipts need a game ability with Income.Credits.
The second descriptive number is total economic volume. Add Economy.Volume to income:
["Earth", "Economy.Income", 100],
["Earth", "Economy.Volume", 1000]On an inhabited Earth with positive Workers, the description shows income 100 and volume 1000. Without Workers, the same numbers remain as data but this text is not displayed. Assign Workers through ordinary gameplay: the Economy fragment does not create them. Check presentation after settlement and Worker assignment. Economy.Wealth combines author-defined qualitative wealth traits. Civilized is a descriptive indicator that creates no population itself.
Health and Damage - durability and damage
Health is an object's durability: damage reduces it and exhaustion destroys the live object. Damage is the amount inflicted. A numeric field alone does not create an attack. An existing mechanism, such as an asteroid bombardment choice, must apply it.
First take an already created object's durability. Give it six points, for example:
["MyMarker", "Health", 6]If an existing mechanism inflicts two damage, four remain. Health at or below zero destroys the object and its dependents. Health.Max preserves the initial maximum for display. This statement does not create MyMarker itself. Place it first, for example through PlacedAt.
Now change the existing asteroid Bombard mechanism. Set two damage and retain its Parent target:
["Bombard", "Damage", 2],
["Bombard", "Damage.Target", "Parent"]Bombard is the existing bombardment in an asteroid event card. Parent points to that card. Changing Damage strengthens bombardment to two points while retaining its cost and button. It does not create a weapon. The target's Health is checked first. Without it, Size is used, as for a PreWarpAge asteroid. Health.Max accompanies initial durability but does not automatically replace asteroid size.
Asteroid impact is another context. Set damage per size unit on the existing AsteroidEvent:
["AsteroidEvent", "Damage", 2],
["AsteroidEvent", "Per", "Size"]When the existing impact mechanism applies an asteroid of size 3, damage is 2 × 3 = 6. The impact location determines the recipient. Do not add Damage.Target Parent here: that path belongs to Bombard damaging its parent asteroid event. These statements neither schedule the impact nor create an asteroid. Existing event rules remain.
You can declare numeric Health, such as 6, for a custom live entity, but its own mechanism must create it first. Damage on EventChoice needs an explicit Damage.Target such as Parent or Parent.<field>. Health/Damage facts alone create neither generic ship combat nor a new Attack button in PreWarpAge.
Transforms - transforming a body
Transforms replaces one body with another, for example turning a planet into debris or an infected world after a catastrophe. It is more than a renamed object or changed icon. Body position is preserved, old buildings are destroyed, and the new class determines subsequent properties.
Consider the existing TestNanobots experiment. Its failed NanobotsEscaped outcome should create a Modified world. Transforms names the resulting class:
["NanobotsEscaped", "Transforms", "Modified"]This answers ‘Transform into what?’ but does not identify the body to replace. A separate statement sets the target:
["NanobotsEscaped", "Transforms.Target", "Parent.Target"]Parent leads from the outcome to the experiment event, whose Target leads to the selected world. That world is replaced. Connect the outcome to the experiment and preserve the old world's size:
["TestNanobots", "Has", "NanobotsEscaped"],
["NanobotsEscaped", "Transforms", "Modified"],
["NanobotsEscaped", "Transforms.Target", "Parent.Target"],
["Modified", "Size.From", "Parent"]This repeats part of the base-game definition. TestNanobots already has Event, a Rocky target, and NanobotsEscaped as an outcome. If that outcome occurs, the selected world becomes Modified. Parent.Target in Transforms.Target is read on the outcome: Parent is the event and Target its selected world. In Size.From Parent on the new Modified class, Parent instead means the replaced old body. This preserves its size. Without it, size comes from the new class. A custom transformation needs an event, its target, a connected outcome, and the new body's definition.
Position and orbital relationships remain, while buildings held by the old body are destroyed. <name>.From Parent on the new class explicitly preserves the corresponding old characteristics. Transforms.Effect, such as swarm, selects an existing transformation visual effect rather than running a new script.
Spread and Spreads - spreading a transformation
Give an infected world an ability to turn neighbors into worlds like itself. First declare MySpread separately. It needs two roles: Trait to attach to a world, and Spread for spreading itself.
["MySpread", "Is", "Trait"],
["MySpread", "Is", "Spread"]This defines the ability. No world has received it yet and nothing is infected. Putting Spread on the world itself instead of a separate trait does not create this ability.
Set a 10% chance of activation per turn:
["MySpread", "Chance", 10]Each world with this ability gets one roll per turn. This does not guarantee infection after ten turns. Chance must exceed zero and be at most 100. Ordinary Random allows Chance.Random.Min/Max or repeated Chance.Random facts listing values instead of a fixed number. For this alternative, replace the old Chance 10 line with these two lines rather than keeping both forms:
["MySpread", "Chance.Random", 5],
["MySpread", "Chance.Random", 15]Each new world independently receives a 5% or 15% chance with equal probability. This is the world's saved ability chance; it is not chosen again every turn or on load. Each turn performs a separate roll with that chance, without guaranteeing infection. All list values and range bounds must stay in (0, 100]; fractional values are allowed. The full example below still uses fixed 10%.
Now choose valid targets. Let infection affect World-category worlds:
["MySpread", "Target", "World"]A successful roll chooses the nearest suitable world, randomly among ties. The source and already infected worlds of the same class are excluded. Without a target, nothing happens. Additional Target conditions can narrow the set.
Attach the completed ability to the infected-world class:
["MySpreadWorld", "Has", "MySpread"]Each created MySpreadWorld now receives MySpread. Infection turns a neighbor into MySpreadWorld, destroys its old buildings, and grants the ability. It begins spreading next turn, while the source stays in place. This creates a chain reaction, which stops after game over. The game fills Spreads and Spreads.Turn for the chance and processed turn itself.
This complete example adds a Machine Swarm world on the Solar System's fourth ring. Each turn it has a 10 percent chance of transforming the nearest World. Earth also matches this Target, so test it in a separate new game. Save the first block as your mod's Logic/Spread.json.
[
["MySpreadWorld", "Is", "World"],
["MySpreadWorld", "Name", "MySpreadWorldName"],
["MySpreadWorld", "Icon", "nanobot"],
["MySpreadWorld", "Size", 3],
["MySpreadWorld", "Orbit.Center", "Sun"],
["MySpreadWorld", "Orbit", 4],
["MySpreadWorld", "Has", "MySpread"],
["MySpread", "Is", "Trait"],
["MySpread", "Is", "Spread"],
["MySpread", "Name", "MySpreadName"],
["MySpread", "Icon", "nanobot"],
["MySpread", "Chance", 10],
["MySpread", "Target", "World"]
]{
"MySpreadWorldName": "Machine Swarm",
"MySpreadName": "Infect Neighbors"
}Save the second block as Text/enUS.json. MySpreadWorld and MySpread are invented world-class and ability names, independent of existing Modified or NanobotSpread. World sets the category, nanobot selects an existing image, and Size 3 the size. Orbit.Center Sun and Orbit 4 place the first world in a free cell on the Sun's fourth ring. Has MySpread attaches the ability. A transformed neighboring body also becomes MySpreadWorld, gains the ability, and continues infection.
A world can have only one active Spread ability. If inheriting a class with such an ability, eliminate duplication first. Removing or disabling the sole Spread trait stops spreading and removes internal Spreads. For a one-time transformation without a chain reaction, use an event outcome with Transforms.
Visibility - apparent brightness and angular size
Visibility describes a celestial body's appearance from an observation point: brightness and angular size. A small nearby body, for example, can occupy more sky than a large distant one. On an ordinary PreWarpAge map these facts affect neither image size nor production.
First set descriptive brightness. Visibility.Brightness is apparent magnitude:
["Earth", "Visibility.Brightness", 1]Smaller numbers mean brighter objects. This changes neither corona nor image size. Use Visibility.Brightness.Min and Visibility.Brightness.Max for a range instead of one value.
Angular diameter is a different quantity: how much sky a body occupies. Add 3.13 arcminutes to the existing brightness:
["Earth", "Visibility.Brightness", 1],
["Earth", "Visibility.Angle", 3.13]Earth receives apparent magnitude 1 and angular diameter 3.13 arcminutes. Visibility.Angle.Min and Visibility.Angle.Max give an angular-size range like the brightness range. These are author-specified facts. The game does not recalculate them from camera position. IconSize changes image size, and Luminosity sets physical stellar luminosity.
StellarCorona - corona brightness
A corona is the visible glow around a star. StellarCorona sets this effect's brightness in the existing client, rather than stellar luminosity for physical calculations or Energy output.
StellarCorona is a finite nonnegative number. Absent or zero means no glow. 1 gives normal brightness, a positive fraction weaker glow, and a number above 1 stronger glow.
["ClassG", "StellarCorona", 1]Yellow stars receive corona glow. The client selects color and drawing technique according to its existing rules.
Names, descriptions, and presentation assets
These fields set names, explanations, images, and sounds. They present objects the game already knows how to display, without creating windows or buttons themselves. Text lives in Text, images in Art, and sounds in Sounds. Write game strings as plain text without HTML or color tags. If the game displays an effect's amount itself, do not repeat it manually in the description: changing the number would make that description outdated.
Name - a name or name set
Name sets an object's name. Usually its value is a Text dictionary key, used to find text in the selected language. New worlds can also use a random name set. Names do not repeat while unused ones remain.
First set a fixed name through a dictionary key. For example, MyMarker from PlacedAt gets its name:
["MyMarker", "Name", "MyMarkerName"]If MyMarkerName in Text/enUS.json says My Station, that is the marker's name. Name neither creates the marker nor changes its type.
Now a different case: many new worlds need different names. First list two names in MyWorldNames:
["MyWorldNames", "Name.Option", "MyNameOne"],
["MyWorldNames", "Name.Option", "MyNameTwo"]This is only a set of keys, not assigned to any world yet. Connect it to TinyRock with Name.Random. The full link and both options are:
["TinyRock", "Name.Random", "MyWorldNames"],
["MyWorldNames", "Name.Option", "MyNameOne"],
["MyWorldNames", "Name.Option", "MyNameTwo"]This changes new TinyRock worlds' names. MyWorldNames is an invented set name, and MyNameOne/MyNameTwo are its two name keys. Save this complete dictionary as Text/enUS.json. If the file exists, add just these two entries.
{
"MyNameOne": "First Rock",
"MyNameTwo": "Second Rock"
}In a new game, TinyRock worlds receive First Rock and Second Rock. Names do not repeat while unused ones remain. Repeats are allowed after exhaustion. Name.Option order affects seed-based reproduction, so avoid unnecessary rearrangement. A fixed Name on the definition takes priority over a random set.
A property's Name refinement sets its label without changing numeric meaning. A name entered by the player is saved as literal text. Even if it matches a dictionary key, switching language does not translate it again.
InputName - a suggested input name
InputName sets a name suggested in an input field. For example, the game can suggest a corporation name before play, and the player can replace it. The input field must already exist in the interface.
InputName takes a dictionary text key. <field>.InputName suggests a name for the corresponding property. An already entered player name takes priority. A definition's own InputName replaces the inherited one. On confirming a game, the suggestion is translated into the chosen language and saved as the resulting text.
CorpMiner is the existing Miners corporation and CorpMinerName its existing translatable name. This changes the suggestion in the existing corporation editor.
["CorpMiner", "InputName", "CorpMinerName"]Selecting Miners suggests the existing CorpMinerName translation in the corporation name field. Later language changes do not rename the saved player. Name.Input and Corporation.DefaultName are not supported InputName synonyms.
Description - explaining an entity or property
Description explains an object or property. The triplet stores a key, and the selected language's dictionary stores the text. It can explain an Outpost without changing its cost or operation.
First give an Outpost an explanation. OutpostDesc is an existing description key:
["Outpost", "Description", "OutpostDesc"]Its tooltip shows OutpostDesc's translation. Cost, duration, and income stay unchanged. A property's Description refinement explains that property, and adding a part name explains an individual property line. Text does not replace the value itself.
Exploration needs to show resource-choice options instead of ordinary text. Description.Choices references the existing WorkFocus event. The ordinary description and this special use together are:
["Outpost", "Description", "OutpostDesc"],
["Explore", "Description.Choices", "WorkFocus"]The Outpost gets its existing explanation, while exploration's description shows WorkFocus options. Conditions and amounts are read from the option definitions themselves.
On a technology, Description is the tooltip explanation. A completion report has its own Description on a reaction included in the technology's Has list, such as MyStudyResearched with Is TechResearched. See the Tech article for the full example. The two descriptions use the same ordinary text-key field on different subjects.
Repeated Description facts on the object itself appear in authored order at rank 0. For separate paragraphs, use child parts with their own Description and Order. The part name is arbitrary; Order ranks the paragraph rather than the whole entity. Add two paragraphs to Outpost's existing description:
["Outpost.Note", "Description", "MyOutpostNote"],
["Outpost.Note", "Order", 1],
["Outpost.Warning", "Description", "MyOutpostWarning"],
["Outpost.Warning", "Order", 2]Add MyOutpostNote and MyOutpostWarning to Text. Outpost's ordinary rank-0 description stays first, followed by parts ranked 1 and 2. A part's Requires conditions are checked for the entity being read; an inactive part also excludes its nested descriptions. An own direct Description defines the complete description and stops further inheritance. Part descriptions are collected through that owner; the nearest part Description replaces the parent's collection at the same relative path. Text alone on a part does not make it a paragraph.
A paragraph can insert a localized value. Put Text and optional Color on the description key rather than on the part itself:
["MyOutpostNote", "Text", "MyOutpostNoteValue"],
["MyOutpostNote", "Color", "superGreen"]For example, MyOutpostNote contains 'Feature: {0}' and MyOutpostNoteValue contains 'Enabled'. The description reads 'Feature: Enabled'; superGreen colors only the inserted value. Both translations remain plain text without markup. This formats a static label and does not create a gameplay effect. Without Text, the description is an ordinary paragraph.
Text - a text label
Text sets a short label where the game already displays one, such as on an active trait. Name names the object, Description explains it, and Text labels a particular presentation. Adding Text to an arbitrary object creates no new place to display it.
The existing attached SizeScale trait scales capacity by body size. This changes its readable label without granting a new trait to all worlds or changing numbers.
["SizeScale", "Text", "MySizeScaleText"]Save this dictionary as Text/enUS.json or add the entry to an existing file. SizeScale receives the Capacity by Size label. This changes an existing base-game trait. To create your own, first declare Is Trait and attach it through Has, or specify granting conditions through Grants.
{
"MySizeScaleText": "Capacity by Size"
}Hint - an additional hint
Hint tells the player which action a property offers. In PreWarpAge this text appears in an active trait's tooltip while its connected event choice is available. Use Description for an ordinary object explanation.
RobotHeldTrait is the existing Under Robot Control trait. It already connects RetakeStart, which begins reclaiming the world. Hint supplies this trait's prompt while that operation is available. <field>.Hint concerns the corresponding property. Neither Hint nor its translation declares a hotkey.
["RobotHeldTrait", "Hint", "RobotControlHint"]This repeats an existing statement. RobotControlHint already means “Press to launch a recovery operation.” Change that key's value in Text/enUS.json to change the phrase. Hint on an arbitrary Outpost creates neither an action nor a window.
Tag - a category label
Tag gives a general category a readable label. A world may be both rocky and cold, for example. Players see both category labels rather than one new long planet name.
Tag belongs to the category and references its name key. Objects show their Is-category labels without duplicates. You do not need to copy Tag to every planet definition: Is already identifies its applicable labels.
["Rocky", "Tag", "CatRocky"]All Is Rocky entities receive a Rocky category line through the relationship, rather than a manual Tag on each planet. A category with Tag is excluded as an independent concrete Type during inference.
Default - the default option
Default selects an initial option in one main-menu list, such as corporation or scenario. It is a suggestion until the player chooses another. Each list may have only one default.
Default takes true or false. Set true on one option per choice group, such as one corporation and one scenario. It belongs to the definition itself and is not inherited. A new CorpMiner-based corporation does not become a second default. Default does not override the player's own choice.
This complete Logic/Default.json patch clears the initial CorpMiner (Miners) choice and suggests CorpTechnocrat (Technocrats). set replaces existing field values. The file section explains patches.
{
"set": [
["CorpMiner", "Default", false],
["CorpTechnocrat", "Default", true]
]
}The new menu suggests Technocrats instead of Miners. Leaving two Default true statements would produce an ambiguity error.
Order, Tier, and Level - order, tier, and level
Order sets card order, Tier the technology-tree tier, and Level the attained level of repeatable research. Use Order and Tier to move a technology. Do not change Level for that: it concerns completed research and effect strength.
First choose Deep Extraction's tier. The first tier is written as:
["DeepExtraction", "Tier", 1]Replacing 1 with 2 moves the card to tier two. No prerequisite appears automatically: Requires sets that. Tier accepts a finite number, usually an integer for the tree.
Now choose position within the tier. Order 2.5 places the card between neighbors at Order 2 and 3:
["DeepExtraction", "Order", 2.5]Order can be fractional but must be finite and nonnegative. Neither order nor tier means the technology is already researched.
DeepExtraction is the existing Deep Extraction technology. This example only rearranges its card: Tier 1 is the first tier and Order 2.5 a position between 2 and 3. It assigns no Level.
["DeepExtraction", "Tier", 1],
["DeepExtraction", "Order", 2.5]The card remains in tier one between Order 2 and 3. Cost and payment method stay unchanged. Level answers a different question: how many levels of a repeatable technology have been researched in this game. Level 2 means two completions and contributes to bonus strength. It is not a card-position parameter. Level alone creates no level system for an arbitrary object.
Enabled - a switch's state
Enabled stores an existing switch's state. On the microphone, true means speech recognition enabled and false disabled. Technologies and construction use their own requirements for availability, rather than Enabled.
Microphone is the existing microphone switch. Its handler changes Enabled on click and the client starts or stops recognition. These data set the existing element's initial off state.
["Microphone", "Enabled", false]This sets the microphone off. Replacing false with true turns the existing switch on. Some menu elements also mark this in green. Technology/building availability needs Requires or Blocks. Enabled on a resource does not disable production. Switchable economic policies using Toggle are unsupported in current PreWarpAge. See Toggle for that boundary.
Difficulty - a difficulty label
Difficulty labels a scenario card's difficulty. It helps compare menu options but does not recalculate balance. Changing Medium to Hard alone affects no costs, stocks, or durations.
Difficulty is a card difficulty string key. The main set is DifficultyVeryEasy, DifficultyEasy, DifficultyNormal, DifficultyChallenging, DifficultyHard, DifficultyVeryHard, DifficultyMasochist. It supplies a label and conventional display color, rather than automatic price or enemy-strength multipliers. Mode rules are defined separately.
["ScenarioG", "Difficulty", "DifficultyNormal"]The scenario card shows normal difficulty. Changing this line affects neither resources, durations, nor map structure.
Preview - main-menu description contents
Preview selects abilities for a main-menu card's brief description. It affects the description before play. An ability omitted from that summary still works during the game.
Show all Miners abilities on their card by setting CorpMiner's Preview to MainMenu:
["CorpMiner", "Preview", "MainMenu"]CorpMiner's card gets a short ability description. Removing Preview shortens the card text but does not disable the ability or remove its effect in play.
In ‘ColdWorld and Icy’ we add a ColdMining part to Miners with a cold-world bonus. To show only that added part on the card, set Preview on it rather than the whole corporation:
["CorpMiner.ColdMining", "Preview", "MainMenu"]The description includes ColdMining and its nested parts. Add the actual bonus from that example first: Preview does not create it. Preview belongs to the definition itself. It is neither inherited nor copied to game objects.
Icon - entity and property images
Icon sets an object's picture or a property's icon. First provide an existing PNG file, then a fact naming it. Changing the icon changes appearance, rather than class, action, or numeric effect.
First choose the Outpost's own picture. Write the filename without .png:
["Outpost", "Icon", "outpost"]The game finds the existing outpost.png in Art. Changing Icon changes the picture. This line creates neither a class name nor an action.
A corporation's Worker icon is a separate choice. Use Icon.Workers rather than CorpMiner's own Icon:
["CorpMiner", "Icon.Workers", "cosmo_helmet_orange"]Miners Workers use the existing cosmo_helmet_orange.png. The corporation's own icon is unchanged. Combine the two independent edits:
["Outpost", "Icon", "outpost"],
["CorpMiner", "Icon.Workers", "cosmo_helmet_orange"]Outpost uses the outpost picture, while CorpMiner's Worker icon becomes cosmo_helmet_orange. Both files already exist. Use IconMap for a separate map image. Icon.Map is invalid.
For a custom image, first create Art/Icons/my_icon.png, then set Icon my_icon. Lookup uses names without paths: two my_icon.png files in different subfolders conflict. A transparent 256 × 256 square is a convenient starting point, but not mandatory.
If my_icon00.png/my_icon01.png exist as a family without exact my_icon.png, Icon my_icon chooses and saves a variant for the created object. Adding exact my_icon.png gives it priority. Ordinary property components place Icon after the field name. Do not confuse that order with special Icon.Workers.
IconMap - a separate map image
A building may use one icon on a button and another image on the map. IconMap changes only the map image and keeps Icon elsewhere. If they should match, Icon alone is enough.
First choose an image only for the map:
["Outpost", "IconMap", "outpost"]Here it matches the ordinary icon. A different IconMap name changes only the map image. Removing IconMap makes the map use Icon again. IconMap accepts an existing PNG or an image made from rear and front files.
Now enlarge only the map picture. Add positive IconMap.Scale to IconMap. The complete fragment for existing Outpost is:
["Outpost", "Icon", "outpost"],
["Outpost", "IconMap", "outpost"],
["Outpost", "IconMap.Scale", 1.1]A completed Outpost is scaled to 1.1 on the map, while its button icon stays normal. A custom two-layer image uses <name>_down and <name>_up PNGs: rear behind the body, front in front. These files also need unique base names.
IconGain and IconReady - gain and ready icons
Some situations use separate pictures: discovering an increased source and an action ready to perform. IconGain and IconReady select these icons, rather than a discovery amount or permission to act.
First set an increased Mineral-source icon:
["Minerals", "IconGain", "ore_iron_plus"]The discovery uses the existing ore_iron_plus image. This does not set its reward size.
A ready action has a different icon, IconReady. Select magnifier for Explore. Both examples together are:
["Minerals", "IconGain", "ore_iron_plus"],
["Explore", "IconReady", "magnifier"]Mineral discovery and ready exploration use their respective pictures. IconReady belongs to an Is Action action and does not cancel its requirements. Both fields need exact filenames, rather than a random-family base. Actual results or availability determine presentation.
IconSize - image scale
IconSize changes a body's on-screen image size. Game size and Worker slots stay unchanged. Without positive IconSize, the game chooses image scale from Size.
IconSize is a finite body-scale number. A positive author value takes priority. Otherwise the interface derives scale from Size. On Simulation it is the shared body scale. <field>.IconSize concerns a supported property presentation. Scale changes neither territory, cost, nor capacity.
["Debris", "IconSize", 1.5]Debris receives image scale 1.5. Change Size to alter territory and associated capacity. To enlarge only the image, IconSize is enough. Both fields need not change for the same visual result.
IconText - a short icon label
IconText is a short label on an existing icon, such as a question mark or number. Looking like a number does not make it a resource stock, cost, or duration.
IconText and <field>.IconText accept literal text or a finite number. true/false are invalid. Numbers use the game's format. A ‘3’ label, for example, means no three-resource stock. Actual quantity uses Count.
MyMarker is the placed object with outpost imagery from PlacedAt. Add this after Is Building, Icon outpost, and PlacedAt Earth. IconText itself does not create the marker.
["MyMarker", "IconText", "?"]The marker shows a question mark. It is literal text, rather than a dictionary key. For a number instead, change only the value:
["MyMarker", "IconText", 3]The label now looks like 3, but no resource stock becomes three. Actual quantities need Count. IconText accepts text or a finite number rather than true/false, and creates no action or window.
Color - color identity
Color selects an existing object color, such as orange for a corporation or red for a dangerous event. It changes presentation rather than effect strength, danger type, or event conditions.
Color and <field>.Color take an existing palette name, listed after the example. Do not put RGB codes, CSS, or HTML into game data. The interface chooses shortage and unavailable-action colors from game state itself.
["CorpMiner", "Color", "orange"]The Miners corporation gets orange presentation. Its abilities and resources stay unchanged.
Player and corporation palettes: red, orange, yellow, green, teal, blue, purple, pink. Event colors: green, superGreen, lightGreen, darkGreen, red, superRed, darkRed, gray, lightGray, darkGray, veryDarkGray, lightBlue, blue, darkBlue, darkDarkBlue, grayYellow, yellow, pink, cyan, darkCyan, orange, darkOrange, lightViolet, purple, chartreuse, navyBlue. Case matters. Semantic names positive, danger, info and difficulty colors difficultyVeryEasy, difficultyEasy, difficultyNormal, difficultyChallenging, difficultyHard, difficultyVeryHard, difficultyMasochist also exist. An arbitrary color code creates no new palette.
Hide - hiding presentation
Hide conceals existing presentation. A hidden characteristic may still be calculated and affect play. Hiding a number and canceling its effect are therefore different operations.
First hide only the displayed star size. true belongs to Size.Hide rather than Size itself:
["Star", "Size.Hide", true]The star's game size no longer appears as a separate button, but its value remains. Hide neither changes physical units nor acts as a generation condition. To cancel inherited hiding, set false on your own definition:
["ClassG", "Size.Hide", false]ClassG can now display its size even though Star hid it. Both true and false control presentation, rather than the size value.
A notification can be hidden entirely. For example, hide SuppliesWater's message, while the event adds Water to the player:
["SuppliesWater", "Hide", true]The event still adds Water, but its message is absent. On numeric effects, Hide likewise hides a descriptive line while keeping calculation. It is unsuitable for canceling an ability.
Disable an ability by changing its rule or removing the ability itself. Hide does not do this: a hidden bonus continues working and a hidden notification does not cancel the event.
Background - scene background
Background selects the map backdrop. Parallax is a small layer shift creating depth as the camera moves. It can be disabled separately from the star layer.
First select PreWarpAge's existing nebula background:
["Simulation", "Background", "nebula"]Background names a background image set. Enable an additional star layer separately:
["Simulation", "Background.Stars", true]false would remove that layer while keeping nebula. Layer movement with the camera is another separate setting. Disable it and combine all three choices:
["Simulation", "Background", "nebula"],
["Simulation", "Background.Stars", true],
["Simulation", "Background.Parallax", false]The map uses nebula and the star layer. Its background does not shift as the camera moves because parallax is off.
PreWarpAge places these map settings on Simulation. For a custom background, create Art/Backgrounds/my_space00.jpg and set Background my_space. Continue numbering variants as my_space01.jpg, my_space02.jpg. Even a single file must end in 00.jpg. Do not skip numbers: lookup stops at the first missing file. PNG cannot replace JPG here.
Sound and Music - effects, ambience, and music
Start with exploration's short sound. Explore sets it through Sound:
["Explore", "Sound", "scan"]scan is an existing OGG name without path or extension. It plays when exploration is performed, rather than becoming continuous background audio.
Music concerns the whole scene, so belongs on Simulation as Music. Add the existing interstellar_waltz track to the exploration-sound example:
["Explore", "Sound", "scan"],
["Simulation", "Music", "interstellar_waltz"]Sound scan remains the action sound, and Music interstellar_waltz the scene music. Music in an ordinary array replaces Simulation's old playlist. Use the patch add operation to append to it. Several Music statements in one file make a new playlist in written order. Sound.Music does not exist.
Short sounds can permit small pitch and timbre changes. This does not select another music track:
["Explore", "Sound.Variants", true]false disables timbre changes. Choosing among files is a different setting: Sound can name a family. Create two files without a separate my_scan.ogg:
Sounds/FX/my_scan00.ogg
Sounds/FX/my_scan01.oggNow specify their shared name without its numeric ending:
["Explore", "Sound", "my_scan"]Instead of one exact file, exploration can choose my_scan00 or my_scan01. Digits may follow the name directly or after an underscore. Sound.Variants remains separate permission to vary the chosen sound's pitch and timbre.
Sound.Ambience is registered as a map ambience field, but this guide has no separately supported playback recipe for it in current PreWarpAge. Do not treat it as a promised way to enable continuous background audio. The working contexts shown are action Sound and scene Music. The interface controls volume and playback order. Arbitrary Sound suffixes create no new settings.
For your own audio, create Sounds/FX/my_scan.ogg and Sounds/Music/my_theme.ogg and use my_scan and my_theme. Use OGG Vorbis: short effects may be mono, music stereo. Names must be unique even across subfolders. Action sounds play when actions execute, rather than continuously. Set sample rate inside the audio file itself.
FunFact, Myth, and Machinery - additional narrative
Add an interesting fact, a myth, or an explanation of a world's motion. Players read these in the description. They do not trigger the events or physical processes they describe.
Add an interesting Earth fact. FunFact references a translation key:
["Earth", "FunFact", "MyEarthFact"]In Text/enUS.json, give MyEarthFact the phrase Liquid water exists on Earth's surface. It appears in the description without creating Water. It is an explanation for the player.
Now add a separate motion explanation. Machinery.Description needs no bare Machinery field:
["Earth", "Machinery.Description", "MyMotionText"]MyMotionText's translation describes motion without changing the orbit. Both statements together are:
["Earth", "FunFact", "MyEarthFact"],
["Earth", "Machinery.Description", "MyMotionText"]After adding MyEarthFact and MyMotionText translations, the authored Earth receives the explanations. They start no new physics.
The Text/enUS.json dictionary for the fragment is:
{
"MyEarthFact": "Liquid water exists on Earth's surface.",
"MyMotionText": "Earth orbits the Sun."
}This concerns Earth in the Solar System scenario. A myth uses a different pair of labels:
["Earth", "Myth", "MyEarthMyth"],
["Earth", "Myth.Name", "MyEarthMythName"]For example, translate MyEarthMyth as Earth was considered the mother of living things, and MyEarthMythName as Mother Earth. Myth holds the narrative, and Myth.Name its character's name. Deity profiles are defined separately: myth text alone creates none.
Deity, Nature, Metal, and Weekday - a deity profile
Deity links a celestial body to a mythological character. The character can have a name, explanation, symbolic metal, and weekday. This adds world narrative without changing economic rules.
First create MyDeity and link the existing Earth. Deity after Is is the profile role, while Deity on Earth references it:
["MyDeity", "Is", "Deity"],
["Earth", "Deity", "MyDeity"]Earth now has a linked profile. Give it ordinary Name, Description, and Icon like any definition. A MyDeity reference without Is Deity would be an error.
Add the character's nature. Nature holds a phrase key rather than a behavior rule:
["MyDeity", "Nature", "MyDeityNature"]MyDeityNature, such as Calm and Fertile, appears in the profile description without increasing world fertility.
Symbolic metal is separate. Here Iron is a label key rather than a player resource:
["MyDeity", "Metal", "Iron"]The profile receives a metal label. Mineral stocks and production stay unchanged. A related weekday is likewise separate:
["MyDeity", "Weekday", "Tuesday"]Tuesday's translation labels the day. It is neither a calendar nor an event schedule. Combine the profile with ordinary name, description, and existing ares image:
["MyDeity", "Is", "Deity"],
["MyDeity", "Name", "MyDeityName"],
["MyDeity", "Description", "MyDeityDesc"],
["MyDeity", "Icon", "ares"],
["MyDeity", "Nature", "MyDeityNature"],
["MyDeity", "Metal", "Iron"],
["MyDeity", "Weekday", "Tuesday"],
["Earth", "Deity", "MyDeity"]The first block links Earth to the completed profile. The second is its Text/enUS.json dictionary. One profile can link to several bodies and inherit through ordinary Is. Deity.Nature reads the linked profile's Nature, letting a body access an existing characteristic.
{
"MyDeityName": "Earth's Patron",
"MyDeityDesc": "A mythological figure associated with this world.",
"MyDeityNature": "Calm and Fertile",
"Iron": "Iron",
"Tuesday": "Tuesday"
}Url - an external address
Url stores an external internet address. PreWarpAge's existing demo uses such a link on StorePage to open the store. This is a reference example explaining the relationship: user mods are disabled in the demo, and Url adds no arbitrary button to the full game.
Put the address on a separate Store or Site definition. Use a complete http:// or https:// address including hostname. Query parameters are preserved. Simulation's Demo.Store tells StorePage which store definition to read.
["MyStore", "Is", "Store"],
["MyStore", "Url", "https://example.com/game?utm_source=demo"],
["Simulation", "Demo.Store", "MyStore"]MyStore is an invented store definition. The example uses placeholder example.com with a utm_source parameter. Game strings support no HTML links. Description or event text containing the same address does not automatically become a link.
Event compatibility
Conflicts - mutually exclusive events
Two events can describe incompatible states, such as Water shortage and abundance. Conflicts prevents them from being active simultaneously for one player. Active here means a live game event that has not ended or been removed.
WaterShortage and WaterAbundance are existing shortage and abundance events. Both already have Event and their own trigger conditions. This shows their existing restriction:
["WaterShortage", "Conflicts", "WaterAbundance"]While WaterShortage is alive for the player, WaterAbundance cannot start, and vice versa. The relationship is symmetric, so no reverse statement is needed. This line alone triggers neither event, creates no shortage, and adds no schedule.
For custom events, first declare Is Event and connect their triggers, such as an Events group with Deck. Then put Conflicts on one event referencing the other. Both sides must be events. Mod-package incompatibility uses conflicts in modinfo.json. Conflicts on a technology or corporation does not replace that field.
Complete map and resource-dealing examples
ColdWorld and Icy - climate and composition
Cold and icy are different properties. ColdWorld describes climate: a generated body receives this category in Snow or Outer. UltraHot and Hot grant HotWorld, while Habitable grants neither. A satellite uses its planet's zone. These categories depend on position rather than a shared kelvin threshold. In an authored fixed system, set climate explicitly through Is.
Icy is a composition category. Existing Is Icy worlds are TinyIce, SmallIce, StandardIce, LargeIce, TinyCryogenic, SmallCryogenic, StandardCryogenic, StandardAmmonia, and LargeAmmonia. Ammonia and cryogenic worlds are Icy too. IceGiantSmall and IceGiantMedium do not become World.Icy merely because their names contain Ice: they belong to Giant. Class names do not determine categories.
["CorpMiner.ColdMining", "Target", "World.ColdWorld"],
["CorpMiner.ColdMining", "Adds.Production.Minerals", 0.3]This adds a ColdMining ability part to CorpMiner. The dot in CorpMiner.ColdMining denotes part of the corporation definition, so no separate Has is needed. Each Worker on the Miners player's cold worlds produces 0.3 more Minerals per turn. The bonus applies where a Mineral source already exists.
Change only the bonus recipient: apply it to icy worlds regardless of orbit. Keep the effect statement unchanged:
["CorpMiner.ColdMining", "Target", "World.Icy"],
["CorpMiner.ColdMining", "Adds.Production.Minerals", 0.3]Icy composition now matters rather than zone. A cold rocky world loses the bonus, and an icy world outside a cold zone gains it. Production still needs an existing Mineral source.
Another version removes the World restriction and covers cold bodies in other categories:
["CorpMiner.ColdMining", "Target", "ColdWorld"],
["CorpMiner.ColdMining", "Adds.Production.Minerals", 0.3]The cold-zone condition remains, but the World role check disappears. These are three alternatives for one Target. Do not add them together when testing only one recipient set.
Your own star with a guaranteed homeworld
The base game chooses home through Spawn.Random Earthlike. At least one Earth-like world must appear for the game to start. StandardOcean is World but not Earthlike, so cannot serve as that home. With one habitable place, a large Earth-like card weight only increases the chance of a suitable start. It guarantees nothing while another outcome remains possible.
This example uses ClassK with two habitable-zone places. Its deck contains exactly StandardEarthlike and StandardOcean. Two draws produce both worlds and guarantee a home. Save the first block as Logic/ColdSystem.json and the second as Text/enUS.json. Do not change ring count or zone weights when following the example: they determine place counts. For your own distribution, recheck that enough places remain for the required Earth-like card.
[
["MyColdStar", "Is", "ClassK"],
["MyColdStar", "Name", "MyColdStarName"],
["MyColdStar", "Orbits.Habitable.Deck.StandardEarthlike", 1],
["MyColdStar", "Orbits.Habitable.Deck.StandardOcean", 1],
["MyColdStar", "Orbits.Snow.Deck.TinyIce", 1],
["MyColdSystem", "Is", "ScenarioK"],
["MyColdSystem", "Name", "MyColdSystemName"],
["MyColdSystem", "Description", "MyColdSystemDesc"],
["MyColdSystem", "Orbit.Center", "MyColdStar"],
["MyColdSystem", "Order", 12]
]{
"MyColdStarName": "Icy Cradle",
"MyColdSystemName": "Icy Neighbors",
"MyColdSystemDesc": "An Earth-like home, an ocean neighbor, and icy worlds in the snow zone."
}Enable the mod and choose Icy Neighbors for a new game. MyColdStar inherits ClassK's image and generation. Its own decks replace the corresponding parent decks entirely: Habitable deals Earth-like and ocean worlds, and Snow only TinyIce. Other zones and ScenarioK's starting stocks remain. Check the Earth-like home, ocean neighbor, and icy snow-zone bodies. Mineable resources and per-Worker production are drawn separately: icy composition does not guarantee Water.
A fixed system and the Plane boundary
Now place bodies manually, without random zone decks. Use a separate mod: while enabled, Player Spawn changes home selection for every scenario. Use only My System with it. The scenario gets its own star, Earth-like home, and icy Water source. Save the first block as Logic/FixedSystem.json and the second as Text/enUS.json. The scenario's Orbit.Center links its authored star, and Player Spawn chooses a particular home instead of a random one.
[
["MyFixedSystem", "Is", "ScenarioG"],
["MyFixedSystem", "Name", "MyFixedSystemName"],
["MyFixedSystem", "Description", "MyFixedSystemDesc"],
["MyFixedSystem", "Orbit.Center", "MyFixedSun"],
["MyFixedSystem", "Order", 13],
["MyFixedSun", "Is", "Star"],
["MyFixedSun", "Type", "MyFixedSun"],
["MyFixedSun", "Name", "MyFixedSunName"],
["MyFixedSun", "Icon", "star_yellow00"],
["MyFixedSun", "Orbits", 3],
["MyFixedSun", "Production.Energy", 1],
["MyFixedHome", "Is", "StandardEarthlike"],
["MyFixedHome", "Name", "MyFixedHomeName"],
["MyFixedHome", "Orbit.Center", "MyFixedSun"],
["MyFixedHome", "Orbit", 1],
["MyFixedHome", "Explored", true],
["MyFixedIce", "Is", "TinyIce"],
["MyFixedIce", "Is", "ColdWorld"],
["MyFixedIce", "Name", "MyFixedIceName"],
["MyFixedIce", "Orbit.Center", "MyFixedSun"],
["MyFixedIce", "Orbit", 2],
["MyFixedIce", "Production.Water", 2],
["Player", "Spawn", "MyFixedHome"]
]{
"MyFixedSystemName": "My System",
"MyFixedSystemDesc": "An authored home and an icy Water source.",
"MyFixedSunName": "My Star",
"MyFixedSun": "Authored Star",
"MyFixedHomeName": "Our Home",
"MyFixedIceName": "Icy Neighbor"
}Enable the mod and choose My System for a new game. Our Home is on ring one and Icy Neighbor on ring two. Their Orbit.Center is explicit because this relationship is not inherited. Starting stocks come from ScenarioG. Production.Water 2 means two Water per Worker per turn, rather than two in player stock. This map demonstrates placement and is not designed for a complete playthrough: that needs other sources and balance checks.
Selecting another scenario that does not create MyFixedHome leaves the specified home unavailable. Disable this mod before returning to normal scenarios.
Replacing this scenario's Orbit.Center with Plane.Cols and Plane.Rows does not create a rectangular version of the same game. The star and home may end up in separate grids outside the current map. PreWarpAge has no complete recipe for that combination yet. The explicit-center system shown works as a standalone authored scenario. Plane remains a reference to different geometry here.
A new mined resource and deferred exploration
Add Cryo Ore and two kinds of icy worlds where it can be mined. CryoOre and all My names are invented for this example. First examine three dealing settings, then assemble a complete scenario. Resource declaration and player stock use the already covered Is Resource, Is Stat, and Player Has.
First allow resource selection in the shared deal. Create MyOreDeck with one Resource card:
["MyOreDeck", "Deck.Resource", 1]Resource means ‘choose one of the body's allowed resources’. The card does not assign Cryo Ore or set production yet. 1 is the number of such cards in the deck.
Second include MyOreIceA in the deal and allow Cryo Ore on it:
["MyOreIceA", "Deck.CryoOre", "MyOreDeck"]MyOreIceA links to the shared deck through Cryo Ore. This only allows a resource kind. Per-Worker production is not set yet. CryoOre needs no Is Predicate because the name is used inside Deck rather than as a new standalone field.
Third give the resource one possible output, 2.1 per Worker per turn:
["MyOreIceA", "Deck.CryoOre.2.1", 1]Inside Deck.CryoOre.2.1, 2.1 is one decimal output rather than a path of 2 then 1. The final 1 counts cards with that output. Output must be positive and card count a nonnegative integer. This card awards no 2.1 stock. It sets possible production after exploration and Worker assignment.
Add a second possible output for the same resource:
["MyOreIceA", "Deck.CryoOre.2.1", 1],
["MyOreIceA", "Deck.CryoOre.3.1", 1]Cryo Ore now has two equally weighted cards: a Worker will produce either 2.1 or 3.1. They are not added together. Another resource needs a separate link and its own numeric deck:
["MyOreIceB", "Deck.Minerals", "MyOreDeck"],
["MyOreIceB", "Deck.Minerals.0.9", 1],
["MyOreIceB", "Deck.Minerals.1.5", 1]MyOreIceB allows Minerals at output 0.9 or 1.5. The complete example also allows Cryo Ore there, so exploration shows both possibilities. To let the player choose the new resource, add a response to the existing Work Focus window. First declare the choice and name its resource:
["FocusCryoOre", "Is", "EventChoice"],
["FocusCryoOre", "Resource", "CryoOre"]Resource on the response means ‘choose Cryo Ore for production’. It is not a one-time stock grant. Without a world recipient, the response has nowhere to record the result.
Set the recipient. Parent is the window containing the selected response. That window's Target is the explored world:
["FocusCryoOre", "Resource.Target", "Parent.Target"]Read the path as FocusCryoOre response → parent WorkFocus window → explored world in its Target. CryoOre production with the previously drawn output is fixed on that world. Neither the response nor window becomes a source. Parent without .Target would lead to the window, so do not use it here.
Finally include the response in the window's contents:
["WorkFocus", "Has", "FocusCryoOre"]WorkFocus can now offer this response when exploring a world that allows Cryo Ore. On MyOreIceB, choosing Cryo Ore fixes Production.CryoOre, while choosing Minerals fixes Production.Minerals. One resource is chosen rather than both combined. Replacing Resource CryoOre with Minerals would make this response choose Minerals using the same world path. Do not mechanically copy Parent.Target to a custom window: it must actually hold the explored world in Target.
All parts are now explained. Save this full block as Logic/CryoOre.json and its dictionary as Text/enUS.json. It connects the resource, stock, icy worlds and decks, window response, and new scenario.
[
["CryoOre", "Is", "Resource"],
["CryoOre", "Is", "Stat"],
["CryoOre", "Name", "CryoOreName"],
["CryoOre", "Icon", "ore_iron"],
["CryoOre", "Count", 0],
["CryoOre", "Price", 2],
["Player", "Has", "CryoOre"],
["MyOreDeck", "Deck.Resource", 1],
["MyOreIceA", "Is", "World"],
["MyOreIceA", "Is", "Icy"],
["MyOreIceA", "Name", "MyOreIceAName"],
["MyOreIceA", "Size", 3],
["MyOreIceA", "Icon", "ice"],
["MyOreIceA", "Deck.CryoOre", "MyOreDeck"],
["MyOreIceA", "Deck.CryoOre.2.1", 1],
["MyOreIceA", "Deck.CryoOre.3.1", 1],
["MyOreIceB", "Is", "World"],
["MyOreIceB", "Is", "Icy"],
["MyOreIceB", "Name", "MyOreIceBName"],
["MyOreIceB", "Size", 4],
["MyOreIceB", "Icon", "ice"],
["MyOreIceB", "Deck.CryoOre", "MyOreDeck"],
["MyOreIceB", "Deck.CryoOre.1.2", 1],
["MyOreIceB", "Deck.CryoOre.2.4", 1],
["MyOreIceB", "Deck.Minerals", "MyOreDeck"],
["MyOreIceB", "Deck.Minerals.0.9", 1],
["MyOreIceB", "Deck.Minerals.1.5", 1],
["FocusCryoOre", "Is", "EventChoice"],
["FocusCryoOre", "Name", "CryoOreName"],
["FocusCryoOre", "Icon", "ore_iron"],
["FocusCryoOre", "Resource", "CryoOre"],
["FocusCryoOre", "Resource.Target", "Parent.Target"],
["WorkFocus", "Has", "FocusCryoOre"],
["MyOreStar", "Is", "ClassK"],
["MyOreStar", "Orbits.Snow.Deck.MyOreIceA", 1],
["MyOreStar", "Orbits.Snow.Deck.MyOreIceB", 1],
["MyOreSystem", "Is", "ScenarioK"],
["MyOreSystem", "Name", "MyOreSystemName"],
["MyOreSystem", "Description", "MyOreSystemDesc"],
["MyOreSystem", "Orbit.Center", "MyOreStar"],
["MyOreSystem", "Order", 14]
]{
"CryoOreName": "Cryo Ore",
"MyOreIceAName": "Cryo Ore World",
"MyOreIceBName": "Production Choice World",
"MyOreSystemName": "Cryo Ore System",
"MyOreSystemDesc": "Two icy world types with Cryo Ore deposits."
}Enable the mod and start Cryo Ore System. The snow zone contains Cryo Ore World (MyOreIceA) and Production Choice World (MyOreIceB). The first allows only Cryo Ore, the second Cryo Ore or Minerals. They inherit World and Icy directly to avoid TinyIce's resource decks. Deck.CryoOre and Deck.Minerals links to MyOreDeck include the bodies in a shared deal. ClassK inheritance preserves a suitable homeworld.
The game first makes a preliminary deal plan for unrevealed bodies. Here the plan assigns Resource, the opportunity to select an allowed resource, without final Production.CryoOre or Production.Minerals yet. The game fills Explored.Plan and Explored.Remainder for the plan and remaining deal.
Explore Production Choice World. Work Focus (WorkFocus) opens with Minerals and the new Cryo Ore response. Each allowed resource's numeric output is already drawn and saved before display. The body has no final mined resource until you answer. The choice records only one Production for the chosen resource, using the displayed output. Reopening the body does not change it. Cryo Ore World has only one option, so its result is recorded immediately without a window.
Automatic starting exploration chooses the highest drawn output without waiting for an answer. After exploring, assign Workers with the slider. Is Resource, Is Stat, and Player Has create player Cryo Ore stock and its displayed stat. Price enables trading it.
Exploration keeps the normal Explore cost and snow-zone remoteness. Starting Minerals may cover only one body. Explore the second after saving enough. This example neither makes distant exploration free nor awards hidden test stock. Assign Workers after revealing the bodies to check production: at outputs 2.1 and 2.4, one Worker on each produces 4.5 Cryo Ore per turn in total. The exact pair depends on the deal.
World transformation, damage, and supporting capabilities
A new spreading world
For chain infection, use the complete example in ‘Spread and Spreads - spreading a transformation’. For a one-time replacement, see ‘Transforms - transforming a body’.
Where Damage actually inflicts damage
To change asteroid bombardment, see ‘Health and Damage - durability and damage’. It explains Bombard, Damage.Target, and how bombardment differs from impact.
When Enabled and Url work
For microphone state, see ‘Enabled - a switch's state’. For a store link's structure, see ‘Url - an external address’, including the demo limitation.
Player state and available-content boundaries
A game has a player, their connection, and current selection. Do not create these manually in a mod. These roles and internal fields are listed for reference when reading state. They are not a new multiplayer-mode recipe.
Player means player, Human a human, and AI an artificial player. Simulation's Players is a nonnegative integer count of players to create. The shared palette supports at most eight generated variants. However, PreWarpAge itself is designed for one human. Is AI adds neither a strategic opponent nor multiplayer. Ordinary mods do not need to change player count.
Seat.<identifier> links a connection to a player. Selected.<identifier> stores that connection's selection. Started says the game has begun. The game writes these fields. Do not copy them from a save: Started does not create a world, Selected does not determine button availability, and Seat does not replace action authorization.
World means world, Rocky rocky composition, Icy icy composition, Giant giant, Star star, and Satellite satellite. SurfaceBuilding means a surface building and Orbital an orbital one. Unique is a uniqueness property, while Store and Site are descriptive link categories. Not every word after Is has a same-named predicate. A new category classifies data. An arbitrary role gains no ready-made behavior from its name alone.
11. Feedback and suggestions
Found an inaccuracy, an unclear explanation, or an improvement to suggest? Write to support@clarusvictoria.com. Include the game version and the relevant guide section. If an example behaves differently, attach the mod file and describe what happened.
