Skip to content

Commit 7dacb68

Browse files
Add docs
1 parent 2ccae9c commit 7dacb68

15 files changed

Lines changed: 879 additions & 0 deletions

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_site/
2+
api/

docs/MinorDatas.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Minor Data Structures
2+
3+
This page documents the smaller data structures found in the game's data file, including terrain, resources, tasks, skins, and diplomacy settings.
4+
5+
---
6+
7+
## Terrain Data (`terrainData`)
8+
9+
Defines all possible terrain types in the game. Each terrain is an object within the `terrainData` section, keyed by its name. To add a new terrain, simply add a new entry with a unique name and `idx`.
10+
11+
### Syntax
12+
13+
```json
14+
"terrainData": {
15+
"water": {
16+
"idx": 1
17+
},
18+
"field": {
19+
"idx": 3
20+
}
21+
}
22+
```
23+
24+
### Properties
25+
26+
| Property | Type | Description | Example Value |
27+
| :------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
28+
| `idx` | Integer | A unique integer index for the terrain type. When adding a new entry, it is recommended to set this value to **-1** to ensure uniqueness and prevent conflicts with game updates. | `"idx": 1` |
29+
30+
---
31+
32+
## Resource Data (`resourceData`)
33+
34+
Defines all possible resource types that can spawn on the map.
35+
36+
### Syntax
37+
38+
```json
39+
"resourceData": {
40+
"game": {
41+
"resourceTerrainRequirements": [
42+
"forest"
43+
],
44+
"idx": 1
45+
}
46+
}
47+
```
48+
49+
### Properties
50+
51+
| Property | Type | Description | Example Value |
52+
| :------------------------------ | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------- |
53+
| `resourceTerrainRequirements` | Array of Strings | An array of terrain IDs where this resource can naturally spawn. | `["forest"]` |
54+
| `idx` | Integer | A unique integer index for the resource type. When adding a new entry, it is recommended to set this value to **-1** to ensure uniqueness and prevent conflicts with game updates. | `"idx": 1` |
55+
56+
---
57+
58+
## Task Data (`taskData`)
59+
60+
Defines special in-game achievements or "tasks" that unlock unique monuments upon completion.
61+
62+
### Syntax
63+
64+
```json
65+
"taskData": {
66+
"pacifist": {
67+
"improvementUnlocks": [
68+
"monument1"
69+
],
70+
"idx": 1
71+
}
72+
}
73+
```
74+
75+
### Properties
76+
77+
| Property | Type | Description | Example Value |
78+
| :--------------------- | :--------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
79+
| `improvementUnlocks` | Array of Strings | An array of improvement IDs (usually a monument) unlocked when this task is completed. | `["monument1"]` |
80+
| `idx` | Integer | A unique integer index for the task. When adding a new entry, it is recommended to set this value to **-1** to ensure uniqueness and prevent conflicts with game updates. | `"idx": 1` |
81+
82+
---
83+
84+
## Skin Data (`skinData`)
85+
86+
Defines alternate appearances (skins) for tribes. A tribe must list the skin's key in its `skins` array to use it.
87+
88+
### Syntax
89+
90+
```json
91+
"skinData": {
92+
"swamp" : {
93+
"color" : 6786096,
94+
"language": "bub,ly,sq,ee,to,ad"
95+
}
96+
}
97+
```
98+
99+
### Properties
100+
101+
| Property | Type | Description | Example Value |
102+
| :--------- | :------ | :---------------------------------------------------------------------------------- | :----------------------------------- |
103+
| `color` | Integer | An integer representing the skin's primary color, overriding the tribe's default. | `"color": 6786096` |
104+
| `language` | String | A comma-separated string of syllables, overriding the tribe's default language. | `"language": "bub,ly,sq,ee,to,ad"` |
105+
106+
---
107+
108+
## Diplomacy Data (`diplomacyData`)
109+
110+
Contains key-value pairs that define the global game mechanics for diplomacy, such as embassies.
111+
112+
### Syntax
113+
114+
```json
115+
"diplomacyData": {
116+
"embassyCost" : 5,
117+
"embassyIncome" : 2,
118+
"embassyMaxLevel" : 3,
119+
"embassyUpgradeCost" : 20
120+
}
121+
```
122+
123+
### Properties
124+
125+
| Property | Type | Description | Example Value |
126+
| :--------------------- | :------ | :--------------------------------------------------------

docs/articles/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Getting Started

docs/articles/introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Introduction

docs/articles/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: Introduction
2+
href: introduction.md
3+
- name: Getting Started
4+
href: getting-started.md

docs/docfx.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
3+
"metadata": [{
4+
"src": [
5+
{
6+
"src": "../",
7+
"files": [
8+
"**/*.csproj"
9+
],
10+
}
11+
],
12+
"dest": "api"
13+
}],
14+
"build": {
15+
"content": [
16+
{
17+
"files": [
18+
"**/*.{md,yml}"
19+
],
20+
"exclude": [
21+
"_site/**"
22+
]
23+
}
24+
],
25+
"resource": [
26+
{
27+
"files": [
28+
"images/**"
29+
]
30+
}
31+
],
32+
"output": "_site",
33+
"template": [
34+
"default",
35+
"modern"
36+
],
37+
"globalMetadata": {
38+
"_appName": "polyDocs",
39+
"_appTitle": "polyDocs",
40+
"_enableSearch": true,
41+
"pdf": false
42+
}
43+
}
44+
}

docs/gld/Improvement.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
### YamlMime:ManagedReference
2+
items:
3+
- uid: GameData.ImprovementData
4+
id: ImprovementData
5+
name: Improvement Data
6+
fullName: Improvement Data
7+
type: Class
8+
summary: |
9+
Defines the properties for a tile improvement. Each improvement is an object within the `improvementData` section, keyed by its unique name.
10+
syntax:
11+
content: '"improvementData": { "your_improvement_name": { ... } }'
12+
children:
13+
- GameData.ImprovementData.cost
14+
- GameData.ImprovementData.rewards
15+
- GameData.ImprovementData.terrainRequirements
16+
- GameData.ImprovementData.adjacencyRequirements
17+
- GameData.ImprovementData.improvementAbilities
18+
- GameData.ImprovementData.creates
19+
- GameData.ImprovementData.maxLevel
20+
- GameData.ImprovementData.growthRewards
21+
- GameData.ImprovementData.idx
22+
23+
- uid: GameData.ImprovementData.cost
24+
id: cost
25+
parent: GameData.ImprovementData
26+
name: cost
27+
fullName: cost
28+
type: Property
29+
summary: An integer for the star cost to build the improvement.
30+
syntax:
31+
content: '"cost": 5'
32+
- uid: GameData.ImprovementData.rewards
33+
id: rewards
34+
parent: GameData.ImprovementData
35+
name: rewards
36+
fullName: rewards
37+
type: Property
38+
summary: An array of objects defining the immediate rewards for building the improvement (e.g., population or currency).
39+
syntax:
40+
content: '"rewards": [{ "population": 2 }]'
41+
- uid: GameData.ImprovementData.terrainRequirements
42+
id: terrainRequirements
43+
parent: GameData.ImprovementData
44+
name: terrainRequirements
45+
fullName: terrainRequirements
46+
type: Property
47+
summary: An array of objects specifying where the improvement can be built. Can require a specific `terrain` or `resource`.
48+
syntax:
49+
content: '"terrainRequirements": [{ "resource": "crop" }]'
50+
- uid: GameData.ImprovementData.adjacencyRequirements
51+
id: adjacencyRequirements
52+
parent: GameData.ImprovementData
53+
name: adjacencyRequirements
54+
fullName: adjacencyRequirements
55+
type: Property
56+
summary: An array of objects specifying what must be adjacent for this improvement to be built (e.g., a Forge requires a Mine).
57+
syntax:
58+
content: '"adjacencyRequirements": [{ "improvement": "mine" }]'
59+
- uid: GameData.ImprovementData.improvementAbilities
60+
id: improvementAbilities
61+
parent: GameData.ImprovementData
62+
name: improvementAbilities
63+
fullName: improvementAbilities
64+
type: Property
65+
summary: |
66+
An array of strings for special properties. Possible values include:
67+
- `consumed` - The improvement action can only be done once and removes the resource (e.g., `harvestfruit`).
68+
- `limited` - Only one can be built per city.
69+
- `unique` - Only one can be built per player.
70+
- `patina` - The improvement levels up over time.
71+
- `network` - Connects to other network improvements.
72+
syntax:
73+
content: '"improvementAbilities": ["consumed"]'
74+
- uid: GameData.ImprovementData.creates
75+
id: creates
76+
parent: GameData.ImprovementData
77+
name: creates
78+
fullName: creates
79+
type: Property
80+
summary: An array of objects defining what is created after the action is complete. Can create a `terrain`, `resource`, or `unit`.
81+
syntax:
82+
content: '"creates": [{ "terrain": "field" }]'
83+
- uid: GameData.ImprovementData.maxLevel
84+
id: maxLevel
85+
parent: GameData.ImprovementData
86+
name: maxLevel
87+
fullName: maxLevel
88+
type: Property
89+
summary: An integer for the maximum level the improvement can reach. 0 means it does not level up.
90+
syntax:
91+
content: '"maxLevel": 4'
92+
- uid: GameData.ImprovementData.growthRewards
93+
id: growthRewards
94+
parent: GameData.ImprovementData
95+
name: growthRewards
96+
fullName: growthRewards
97+
type: Property
98+
summary: An array of objects defining the rewards gained each time the improvement levels up (e.g., population or score).
99+
syntax:
100+
content: '"growthRewards": [{ "score": 50, "population": 0 }]'
101+
- uid: GameData.ImprovementData.idx
102+
id: idx
103+
parent: GameData.ImprovementData
104+
name: idx
105+
fullName: idx
106+
type: Property
107+
summary: A unique integer index for the improvement. Must be unique across all improvements. When adding a new entry, it is recommended to set this value to -1 to ensure uniqueness and prevent conflicts with game updates.
108+
syntax:
109+
content: '"idx": 5'

0 commit comments

Comments
 (0)