Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f4b90d0
Add Config
joukepouke Aug 18, 2025
7c15e04
Actually load the mod
joukepouke Aug 18, 2025
6ebddb1
Slight refactor and fix of warning
joukepouke Aug 18, 2025
bba1251
Use System.Text.json instead of newtonsoft
joukepouke Aug 18, 2025
035d8bc
add missing using statement
joukepouke Aug 18, 2025
16210f4
Fix 2 warnings
joukepouke Aug 18, 2025
82fad3d
Fix bug of game crashing on assembly load...
joukepouke Aug 18, 2025
2345ca8
other languages in localization
joukepouke Aug 18, 2025
c5154ec
rename polyscriptmod to polymod
joukepouke Aug 18, 2025
d499bc2
Add gld config
joukepouke Aug 18, 2025
267e584
Actually load config
joukepouke Aug 18, 2025
9bf5007
Revert "rename polyscriptmod to polymod"
joukepouke Aug 18, 2025
fea14c1
Fix bug related to game crashing on launch
joukepouke Aug 19, 2025
cdc467b
On error, set mod to errrror instead of crashing
joukepouke Aug 19, 2025
fe55cb6
Change naming for @jkdev
joukepouke Aug 19, 2025
2ccae9c
add doc comments and change file locations
joukepouke Aug 19, 2025
7dacb68
Add docs
joukepouke Aug 19, 2025
ced36ef
add gh actions workflow to publish to pages
joukepouke Aug 19, 2025
b58638b
Create pages.yml
joukepouke Aug 19, 2025
c710b84
add docs-tm
joukepouke Aug 20, 2025
3eeb148
Add some more comments
joukepouke Aug 20, 2025
7566a17
Fix error
joukepouke Aug 20, 2025
524310f
Merge branch 'documentation-tm' of https://github.com/PolyModdingTeam…
joukepouke Aug 20, 2025
9959f15
PolyMod.csproj is spelt wrong
joukepouke Aug 20, 2025
5906d58
fix warning
joukepouke Aug 20, 2025
9ec94e5
Update pages.yml
joukepouke Aug 20, 2025
a131e75
Update pages.yml
joukepouke Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
branches:
- main
- documentation-tm # for testing
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
actions: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dotnet Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x

- run: dotnet tool update -g docfx
- run: docfx docs/docfx.json

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'docs/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 8 additions & 0 deletions FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura>
<IncludeAssemblies>
Scriban
</IncludeAssemblies>
</Costura>
</Weavers>
10 changes: 7 additions & 3 deletions PolyMod.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -20,6 +20,10 @@

<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.738" />
<PackageReference Include="Costura.Fody" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Scriban" Version="6.2.1" />
<PackageReference Include="TheBattleOfPolytopia" Version="$(PolytopiaVersion)-738" />
<EmbeddedResource Include="resources\*.*" />
</ItemGroup>
Expand All @@ -29,9 +33,9 @@
<GeneratedText><![CDATA[
namespace PolyMod
{
public partial class Plugin
public partial class Constants
{
internal const string VERSION = "$(Version)"%3B
internal const string POLYMOD_VERSION = "$(Version)"%3B
internal static readonly Version POLYTOPIA_VERSION = new("$(PolytopiaVersion)")%3B
}
}
Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_site/
api/
126 changes: 126 additions & 0 deletions docs/MinorDatas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Minor Data Structures

This page documents the smaller data structures found in the game's data file, including terrain, resources, tasks, skins, and diplomacy settings.

---

## Terrain Data (`terrainData`)

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`.

### Syntax

```json
"terrainData": {
"water": {
"idx": 1
},
"field": {
"idx": 3
}
}
```

### Properties

| Property | Type | Description | Example Value |
| :------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `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` |

---

## Resource Data (`resourceData`)

Defines all possible resource types that can spawn on the map.

### Syntax

```json
"resourceData": {
"game": {
"resourceTerrainRequirements": [
"forest"
],
"idx": 1
}
}
```

### Properties

| Property | Type | Description | Example Value |
| :------------------------------ | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------- |
| `resourceTerrainRequirements` | Array of Strings | An array of terrain IDs where this resource can naturally spawn. | `["forest"]` |
| `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` |

---

## Task Data (`taskData`)

Defines special in-game achievements or "tasks" that unlock unique monuments upon completion.

### Syntax

```json
"taskData": {
"pacifist": {
"improvementUnlocks": [
"monument1"
],
"idx": 1
}
}
```

### Properties

| Property | Type | Description | Example Value |
| :--------------------- | :--------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
| `improvementUnlocks` | Array of Strings | An array of improvement IDs (usually a monument) unlocked when this task is completed. | `["monument1"]` |
| `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` |

---

## Skin Data (`skinData`)

Defines alternate appearances (skins) for tribes. A tribe must list the skin's key in its `skins` array to use it.

### Syntax

```json
"skinData": {
"swamp" : {
"color" : 6786096,
"language": "bub,ly,sq,ee,to,ad"
}
}
```

### Properties

| Property | Type | Description | Example Value |
| :--------- | :------ | :---------------------------------------------------------------------------------- | :----------------------------------- |
| `color` | Integer | An integer representing the skin's primary color, overriding the tribe's default. | `"color": 6786096` |
| `language` | String | A comma-separated string of syllables, overriding the tribe's default language. | `"language": "bub,ly,sq,ee,to,ad"` |

---

## Diplomacy Data (`diplomacyData`)

Contains key-value pairs that define the global game mechanics for diplomacy, such as embassies.

### Syntax

```json
"diplomacyData": {
"embassyCost" : 5,
"embassyIncome" : 2,
"embassyMaxLevel" : 3,
"embassyUpgradeCost" : 20
}
```

### Properties

| Property | Type | Description | Example Value |
| :--------------------- | :------ | :--------------------------------------------------------
7 changes: 7 additions & 0 deletions docs/articles/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Introduction

Polymod is the modding framework for The Battle Of Polytopia.

If you would like information about how to **develop** mods, go to [modding](modding/your-first-mod.md).

If you would like information about how to use and configure PolyMod and its mods, go to [using](using/installing.md)
Loading
Loading