---
# System prepended metadata

title: Objects

---

# Objects
## Base Objects
### Project
- IP cost
- Result (Tech, building, military unit etc)
- Optional City location
- Optional Technology requirements
- Optional Building requirement

### City
- Grid location
- List Buildings contained within

### Building
- Produced by a project
- Provides Bonus

### Technology
- Produced by a project
- Category
- Optional Bonus

### Bonus
- Pop growth, income, industrial capacity, resource etc

### Hex
- Terrain Type
- Optional Owner

### Military Division
- List of Military Units
- Location

### Military Unit
- Stats

## Core Objects
### Nation
- Owner (discord account)
- Set of owned Hexes
- Population
- List Cities
- List Buildings
- Set Technologies
- Priority list of In-progress Projects
- List of Military Division
- List of orders to be executed next military tick

Everything else (like income, industrial capacity, upkeep, pop growth) is derived from building and technology bonuses.

### Map
- Map of hexes

### Tech Tree
- Graph of technologies, generated from requirements

## Serialization/Deserialization
Project, Technology, Building and potentially more should be read from files and not defined in code. JSON or YAML etc.

The only thing that needs persistance in this model are the Nation objects

# Systems
Systems manipulate data and run at some frequency

### Projects
- Frequency: Hourly
- For each nation, for each active project, if there is enough MK, decrease IP left by one.

### Military
- Frequency: Daily
- For each nation, execute military orders

### Technology
- Frequency: Weekly
- For each nation, shuffle Research options

### Growth and Income
- Frequency: Weekly
- For eacn nation, calculate growth from bonuses, grow population
- For each nation, sum incomes and costs
