This repository contains the moddable part of Astropolis including content data, GUI and game AI.
Astropolis is a simulation game that explores human expansion and evolution in our own solar system. It is an early stage, open development project created by Charlie Whitfield built in the I, Voyager solar system simulation using the Godot Engine.
Astropolis will be highly moddable. Although it is an open development project, it is not open source. Please see About for details.
About | Dev Blog | Forum | Modding | Download
In the future, our modding "software development kit" will be the Godot Editor with an Astropolis SDK add-on. You will be able to make changes, run the modified game directly from the editor, and then export the mod as a .pck file. This won't happen until we are much further in development.
Content data is defined in simple text data tables in this repository (data/tables/) and in I, Voyager (ivoyager/data/solar_system/). Exactly which tables are loaded is defined in IVGlobal as modified in astropolis_public/astropolis_public.gd (search "table").
Table row entities are never hard-coded in core Astropolis, although some tables (particularly those named "_classes") contain categories that are "soft"-coded in GUI files that can be modded. Cell values may be modified based on column header values for Default, Unit and Prefix. Row names are always globally unique (after prefixing). Tables include enumerations that may refer to a data table row entity or an internal enum (look for text in Type INT columns).
The I, Voyager table README explains general table structure. This repository's table README contains very rough work-in-progress notes on Astropolis content.
Astropolis has essentially a client-server architecture. AI and GUI are clients and communicate with the servers (the game internals) exclusively via "interface" classes like PlayerInterface, FacilityInterface, BodyInterface, and so on (find in interfaces/). Game AIs are subclasses of these interfaces; e.g., PlayerBaseAI and PlayerCustomAI extend PlayerInterface. GUIs hook up to interface classes to get data or make changes (with care for multithreading since interface changes happen on the AI thread while GUI runs on the SceneTree main thread).
The interface/AI classes are composed with (optional) objects Inventory, Operations, Financials, Composition, Population, Biome and Metaverse (find in net_refs/). These "NetRef" objects are optimized for network data sync.
It's very likely that the NetRef and Interface classes will be ported to C++, becoming GDExtension classes. In true Godot-fashion, individual AI subclasses then can be coded in GDScript, C#, C++, or any other language supported by the Godot community. Regardless of language chosen, it will be possible to interface with Python's AI libraries.