Reorganize modders documentation files

This commit is contained in:
Yair Morgenstern
2023-07-02 16:20:37 +03:00
parent f17d5a8d59
commit df87f203b2
11 changed files with 92 additions and 90 deletions

View File

@ -1,8 +1,10 @@
# How to create a UI skin for Unciv
# 5 - Creating a UI skin mod
**You should read the [Mods](Mods.md) page first before proceeding**
In order to add a UI skin mod (yes, UI skins are just another type of mod), all you need to do is add your images under `Images/Skins/MyCoolSkinExample` and enable the mod as a permanent visual mod - the game will recognize the skin, and allow you to pick it in the options menu.
In order to add a UI skin mod (yes, UI skins are just another type of mod), all you need to do is add your images under `Images/Skins/MyCoolSkinExample` and enable the mod as a permanent visual mod.
The game will then recognize the skin, and allow you to pick it in the options menu.
Just like [tilesets](Creating-a-custom-tileset.md), UI skins can be used to alter the appearance of Unciv. Please note that UI skins do not support custom icons and fonts and not every UI element can be customized yet too.
@ -199,4 +201,4 @@ The color this UI element should have.
A float value. Default value: null
The alpha this UI element should have. Overwrites the alpha value of tint if specified.
The alpha this UI element should have. Overwrites the alpha value of tint if specified.

View File

@ -1,4 +1,4 @@
# How to make Unciv use your custom tileset
# 4 - Making a custom tileset
**You should read the [Mods](Mods.md) page first before proceeding**

View File

@ -1,4 +1,4 @@
# Images and Audio
# 3 - Images and Audio
## Permanent audiovisual mods
@ -59,12 +59,12 @@ For example, [here](https://github.com/vegeta1k95/Civ-5-Icons) is mod showing ho
### Adding icons for Unit Types
The Unit Types as defined in [UnitTypes.json](../Other/Unit-related-JSON-files#unittypesjson) have no icons in the base game, but Civilopedia can decorate their entries if you supply images named 'Images/UnitTypeIcons/<UnitType>.png'.
The Unit Types as defined in [UnitTypes.json](Mod file structure/4-Unit-related-JSON-files.md#unittypesjson) have no icons in the base game, but Civilopedia can decorate their entries if you supply images named 'Images/UnitTypeIcons/<UnitType>.png'.
(while you're at it, you may override the default icon for the Unit Type _category header_ - it's 'UnitTypes.png' in the same folder, or the icons used for the movement domains - 'DomainLand', 'DomainWater', 'DomainAir')
### Adding icons for Beliefs
The individual Beliefs - as opposed to Belief types, as defined in [Beliefs.json](../Other/Civilization-related-JSON-files#beliefsjson) have no icons in the base game, but Civilopedia can decorate their entries if you supply images named 'Images/ReligionIcons/<Belief>.png'.
The individual Beliefs - as opposed to Belief types, as defined in [Beliefs.json](Mod file structure/2-Civilization-related-JSON-files.md#beliefsjson) have no icons in the base game, but Civilopedia can decorate their entries if you supply images named 'Images/ReligionIcons/<Belief>.png'.
Civilopedia falls back to the icon for the Belief type - as you can see in the base game, but individual icons have precedence if they exist.
## Sounds

View File

@ -1,4 +1,4 @@
# Making a new Civilization
# 2 - 'My first mod' - Making a new Civilization
So you want to add your favorite civilization?

View File

@ -1,4 +1,4 @@
# JSON files for mods
# 1 - Mod file structure Overview
These pages are a work in progress. Information they contain may be incomplete.
@ -7,33 +7,33 @@ The JSON files that make up mods can have many different fields, and as not all
## Table of Contents
- [General Overview of JSON files](#general-overview-of-json-files)
- [Civilization-related JSON files](../Other/Civilization-related-JSON-files.md)
- [Beliefs.json](../Other/Civilization-related-JSON-files.md#beliefsjson)
- [Buildings.json](../Other/Civilization-related-JSON-files.md#buildingsjson)
- [Nations.json](../Other/Civilization-related-JSON-files.md#nationsjson)
- [Policies.json](../Other/Civilization-related-JSON-files.md#policiesjson)
- [Quests.json](../Other/Civilization-related-JSON-files.md#questsjson)
- [Religions.json](../Other/Civilization-related-JSON-files.md#religionsjson)
- [Specialists.json](../Other/Civilization-related-JSON-files.md#specialistsjson)
- [Techs.json](../Other/Civilization-related-JSON-files.md#techsjson)
- [Map-related JSON files](../Other/Map-related-JSON-files.md)
- [Terrains.json](../Other/Map-related-JSON-files.md#terrainsjson)
- [TileResources.json](../Other/Map-related-JSON-files.md#tileresourcesjson)
- [TileImprovements.json](../Other/Map-related-JSON-files.md#tileimprovementsjson)
- [Ruins.json](../Other/Map-related-JSON-files.md#ruinsjson)
- [Tileset-specific json](../Other/Map-related-JSON-files.md#tileset-specific-json)
- [Unit-related JSON files](../Other/Unit-related-JSON-files.md)
- [Units.json](../Other/Unit-related-JSON-files.md#unitsjson)
- [UnitPromotions.json](../Other/Unit-related-JSON-files.md#unitpromotionsjson)
- [UnitTypes.json](../Other/Unit-related-JSON-files.md#unittypesjson)
- [Miscellaneous JSON files](../Other/Miscellaneous-JSON-files.md)
- [Difficulties.json](../Other/Miscellaneous-JSON-files.md#difficultiesjson)
- [Eras.json](../Other/Miscellaneous-JSON-files.md#erasjson)
- [ModOptions.json](../Other/Miscellaneous-JSON-files.md#modoptionsjson)
- [Tutorials.json](../Other/Miscellaneous-JSON-files.md#tutorialsjson)
- [Stats](../Other/Map-related-JSON-files.md#stats)
- [Sounds](Images-and-Audio.md#sounds)
- [Civilopedia text](../Other/Miscellaneous-JSON-files.md#civilopedia-text)
- [Civilization-related JSON files](2-Civilization-related-JSON-files.md)
- [Beliefs.json](2-Civilization-related-JSON-files.md#beliefsjson)
- [Buildings.json](2-Civilization-related-JSON-files.md#buildingsjson)
- [Nations.json](2-Civilization-related-JSON-files.md#nationsjson)
- [Policies.json](2-Civilization-related-JSON-files.md#policiesjson)
- [Quests.json](2-Civilization-related-JSON-files.md#questsjson)
- [Religions.json](2-Civilization-related-JSON-files.md#religionsjson)
- [Specialists.json](2-Civilization-related-JSON-files.md#specialistsjson)
- [Techs.json](2-Civilization-related-JSON-files.md#techsjson)
- [Map-related JSON files](3-Map-related-JSON-files.md)
- [Terrains.json](3-Map-related-JSON-files.md#terrainsjson)
- [TileResources.json](3-Map-related-JSON-files.md#tileresourcesjson)
- [TileImprovements.json](3-Map-related-JSON-files.md#tileimprovementsjson)
- [Ruins.json](3-Map-related-JSON-files.md#ruinsjson)
- [Tileset-specific json](3-Map-related-JSON-files.md#tileset-specific-json)
- [Unit-related JSON files](4-Unit-related-JSON-files.md)
- [Units.json](4-Unit-related-JSON-files.md#unitsjson)
- [UnitPromotions.json](4-Unit-related-JSON-files.md#unitpromotionsjson)
- [UnitTypes.json](4-Unit-related-JSON-files.md#unittypesjson)
- [Miscellaneous JSON files](5-Miscellaneous-JSON-files.md)
- [Difficulties.json](5-Miscellaneous-JSON-files.md#difficultiesjson)
- [Eras.json](5-Miscellaneous-JSON-files.md#erasjson)
- [ModOptions.json](5-Miscellaneous-JSON-files.md#modoptionsjson)
- [Tutorials.json](5-Miscellaneous-JSON-files.md#tutorialsjson)
- [Stats](3-Map-related-JSON-files.md#stats)
- [Sounds](../Images-and-Audio.md#sounds)
- [Civilopedia text](5-Miscellaneous-JSON-files.md#civilopedia-text)
## General Overview of JSON files

View File

@ -1,4 +1,4 @@
# Civilization-related JSON files
# 2 - Civilization-related JSON files
## Beliefs.json
@ -12,8 +12,8 @@ Each belief can have the following attributes:
| --------- | ---- | -------- | ----- |
| name | String | Required | Name of the belief |
| type | String | Required | The type of the belief. Valid values are: "Pantheon", "Follower", "Founder" and "Enhancer". |
| uniques | List of Strings | defaults to none | The unique abilities this belief adds to cities following it. May be chosen from the list of building uniques [here](../Modders/Unique-parameters.md#buildings-only), as well as the general uniques on that page |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| uniques | List of Strings | defaults to none | The unique abilities this belief adds to cities following it. May be chosen from the list of building uniques [here](../Unique-parameters.md#buildings-only), as well as the general uniques on that page |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
## Buildings.json
@ -41,8 +41,8 @@ Each building can have the following attributes:
| cannotBeBuiltWith | String | defaults to none | The building [cannotBeBuiltWith] and this building cannot exist in the same city together. Should be in [Buildings.json](https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&%20Kings/Buildings.json) |
| providesFreeBuilding | String | defaults to none | When the building is built, [providesFreeBuilding] is also automatically added to the city |
| requiredTech | String | defaults to none | The tech that should be researched before this building may be built. Must be in [Techs.json](#techsjson) |
| requiredResource | String | defaults to none | The resource that is consumed when building this building. Must be in [TileResources.json](Map-related-JSON-files.md#tileresourcesjson) |
| requiredNearbyImprovedResources | List of Strings | defaults to none | The building can only be built if any of the resources in this list are within the borders of this city and have been improved. Each resource must be in [TileResources.json](Map-related-JSON-files.md#tileresourcesjson) |
| requiredResource | String | defaults to none | The resource that is consumed when building this building. Must be in [TileResources.json](3-Map-related-JSON-files.md#tileresourcesjson) |
| requiredNearbyImprovedResources | List of Strings | defaults to none | The building can only be built if any of the resources in this list are within the borders of this city and have been improved. Each resource must be in [TileResources.json](3-Map-related-JSON-files.md#tileresourcesjson) |
| replaces | String | defaults to none | The name of a building that should be replaced by this building. Must be in [Buildings.json](#buildingsjson) |
| uniqueTo | String | defaults to none | If supplied, only the nation with this name can build this building. Must be in [Nations.json](#nationsjson) |
| xpForNewUnits | Integer | defaults to 0 | XP granted automatically to units built in this city |
@ -55,7 +55,7 @@ Each building can have the following attributes:
| percentStatBonus | Object | defaults to none | Percentual bonus for stats provided by the building. Valid keys are the names of stats (production, gold, science, etc.), valid values are Integers (≥0) |
| greatPersonPoints | Object | defaults to none | How many great person points for each type will be generated per turn. Valid keys are the names of great people (Great Scientist, Great Engineer, etc. .), valid values are Integers (≥0) |
| specialistSlots | Object | defaults to none | Specialist slots provided by this building. Valid keys are the names of specialists (as defined in [Specialists.json](https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&%20Kings/Specialists.json)), valid values are Integers, the amount of slots provided for this specialist |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
## Nations.json
@ -85,9 +85,9 @@ This file contains all the nations and city states, including Barbarians and Spe
| outerColor | 3x Integer | Required | R, G, B for inner circle of nation icon |
| uniqueName | String | Default empty | Decorative name for the special characteristic of this Nation |
| uniqueText | String | Default empty | Replacement text for "uniques". If empty, uniques are listed individually. |
| uniques | List | Default empty | Properties of the civilization - see [here](../Modders/Unique-parameters.md#general-uniques) |
| uniques | List | Default empty | Properties of the civilization - see [here](../Unique-parameters.md#general-uniques) |
| cities | List | Default empty | City names used sequentially for newly founded cities. |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
[^S]: A "Coast" preference (_unless_ combined with "Avoid") is translated to a complex test for coastal land tiles, tiles next to Lakes, river tiles or near-river tiles, and such civs are processed first. Other startBias entries are ignored in that case.
Other positive (no "Avoid") startBias are processed next. Multiple positive preferences are treated equally, but get no "fallback".
@ -109,9 +109,9 @@ Each policy branch can have the following properties:
| Attribute | Type | Optional | Notes |
| --------- | ---- | -------- | ----- |
| name | String | Required | |
| era | String | Required | Unlocking era as defined in [Eras.json](Miscellaneous-JSON-files.md#Eras.json) |
| era | String | Required | Unlocking era as defined in [Eras.json](5-Miscellaneous-JSON-files.md#Eras.json) |
| priorities | Object | Default empty | Priorities for each victory type, [see here](#branch-priorities)
| uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameters.md#general-uniques) |
| uniques | List | Default empty | List of effects, [see here](../Unique-parameters.md#general-uniques) |
| policies | List | Default empty | List of member policies |
Each member policy can have the following properties:
@ -122,7 +122,7 @@ Each member policy can have the following properties:
| row | Integer | Required | Placement in UI, each unit approximately half the icon size |
| column | Integer | Required | Placement in UI, each unit approximately half the icon size |
| requires | List | Default empty | List of prerequisite policy names |
| uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameters.md#general-uniques) |
| uniques | List | Default empty | List of effects, [see here](../Unique-parameters.md#general-uniques) |
#### Branch priorities
@ -189,7 +189,7 @@ This file contains all the technologies. It is organized into an outer list of '
| Attribute | Type | Optional | Notes |
| --------- | ---- | -------- | ----- |
| columnNumber | Integer | Required | Horizontal placement in the Tech Tree. |
| era | String | Required | References [Eras.json](Miscellaneous-JSON-files.md#Eras.json). |
| era | String | Required | References [Eras.json](5-Miscellaneous-JSON-files.md#Eras.json). |
| techCost | Integer | Required | Default cost of the techs in this column. |
| buildingCost | Integer | Required | Default cost of buildings requiring this tech. |
| wonderCost | Integer | Required | Default cost of wonders requiring this tech. |
@ -204,5 +204,5 @@ This file contains all the technologies. It is organized into an outer list of '
| cost | Integer | Defaults to column techCost | The amount of science required to research this tech. |
| prerequisites | List | Default empty | A list of the names of techs that are prerequisites of this tech. Only direct prerequisites are necessary. |
| quote | String | Default empty | A nice story presented to the player when they research this tech. |
| uniques | List | Default empty | Properties granted by the tech - see [here](../Modders/uniques.md). |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#Civilopedia-text). |
| uniques | List | Default empty | Properties granted by the tech - see [here](../uniques.md). |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#Civilopedia-text). |

View File

@ -1,4 +1,4 @@
# Map-related JSON files
# 3 - Map-related JSON files
## Terrains.json
@ -20,8 +20,8 @@ Each terrain entry can have the following properties:
| movementCost | Integer | Default 1 | base movement cost |
| defenceBonus | Float | Default 0 | combat bonus for units being attacked here |
| RGB | List Integer * 3 | Default 'Gold' | RGB color for 'Default' tileset display |
| uniques | List | Default empty | List of effects, [see here](../Modders/uniques.md#terrain-uniques) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| uniques | List | Default empty | List of effects, [see here](../uniques.md#terrain-uniques) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
## TileImprovements.json
@ -40,9 +40,9 @@ Each improvement can have the following properties:
| uniqueTo | String | Default none | The name of the nation this improvement is unique for |
| `<stats>` | Float | Optional | Per-turn bonus yield for the tile, see [Stats](#stats) |
| turnsToBuild | Integer | | Number of turns a worker spends building this (ignored for 'create' actions) |
| uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameters.md#improvement-uniques) |
| uniques | List | Default empty | List of effects, [see here](../Unique-parameters.md#improvement-uniques) |
| shortcutKey | String | Default none | Keyboard binding. At the moment a single character (no function keys or Ctrl combinations) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
- Tiles with no terrains, but positive turns to build, can be built only when the tile has a resource that names this improvement or special uniques are used. (TODO: missing something?)
- Tiles with no terrains, and no turns to build, are like great improvements - they're placeable. That means a unit could exist with a 'Can create [this]' unique, and that the improvement will not show in a worker's improvement picker dialog.
@ -68,8 +68,8 @@ Each resource can have the following properties:
| improvement | String | Default empty | The improvement ([TileImprovements.json](#tileimprovementsjson)) for this resource |
| improvementStats | Object | Default empty | The additional yield when improved as sub-object with one or more [Stats](#stats) |
| revealedBy | String | Default empty | The technology name required to see, work and improve this resource |
| unique | String | Default empty | Effects, [see here](../Modders/Unique-parameters.md#resource-uniques) - at the moment only one unique may be added |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| unique | String | Default empty | Effects, [see here](../Unique-parameters.md#resource-uniques) - at the moment only one unique may be added |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
## Ruins.json
@ -85,7 +85,7 @@ Each of the objects in the file represents a single reward you can get from ruin
| name | String | required | Name of the ruins. Never shown to the user, but they have to be distinct |
| notification | String | required | Notification added to the user when this reward is chosen. If omitted, an empty notification is shown. Some notifications may have parameters, refer to the table below. |
| weight | Integer (≥0) | defaults to 1 | Weight this reward should have. Higher weights result in a higher chance of it being chosen* |
| uniques | List of Strings | defaults to none | [uniques]Uniques#one-time-effect) or [uniques](../Modders/Unique-parameters.md#one-time-effect-units) that will trigger when entering the ruins. If more than 1 unique is added, the notification will be shown multiple times due to a bug. |
| uniques | List of Strings | defaults to none | [uniques]Uniques#one-time-effect) or [uniques](../Unique-parameters.md#one-time-effect-units) that will trigger when entering the ruins. If more than 1 unique is added, the notification will be shown multiple times due to a bug. |
| excludedDifficulties | List of Strings | defaults to None | A list of all difficulties on which this reward may _not_ be awarded |
The exact algorithm for choosing a reward is the following:
@ -121,14 +121,14 @@ A mod can define new Tilesets or add to existing ones, namely FantasyHex. There
| Attribute | Type | Default value | Notes |
| --------- | ---- | -------- | ----- |
| [useColorAsBaseTerrain](../Modders/Creating-a-custom-tileset.md#useColorAsBaseTerrain) | Boolean | false | |
| [useSummaryImages](../Modders/Creating-a-custom-tileset.md#useSummaryImages) | Boolean | false | |
| [unexploredTileColor](../Modders/Creating-a-custom-tileset.md#unexploredTileColor) | Color | Dark Gray | `{"r":0.25,"g":0.25,"b":0.25,"a":1}` |
| [fogOfWarColor](../Modders/Creating-a-custom-tileset.md#fogOfWarColor) | Color | Black | `{"r":0,"g":0,"b":0,"a":1}` |
| [fallbackTileSet](../Modders/Creating-a-custom-tileset.md#fallbackTileSet) | String | "FantasyHex" | null to disable |
| [tileScale](../Modders/Creating-a-custom-tileset.md#tileScale) | Float | 1.0 | |
| [tileScales](../Modders/Creating-a-custom-tileset.md#tileScales) | Dictionary | empty | |
| [ruleVariants](../Modders/Creating-a-custom-tileset.md#ruleVariants) | Dictionary | empty | see below |
| [useColorAsBaseTerrain](../Creating-a-custom-tileset.md#useColorAsBaseTerrain) | Boolean | false | |
| [useSummaryImages](../Creating-a-custom-tileset.md#useSummaryImages) | Boolean | false | |
| [unexploredTileColor](../Creating-a-custom-tileset.md#unexploredTileColor) | Color | Dark Gray | `{"r":0.25,"g":0.25,"b":0.25,"a":1}` |
| [fogOfWarColor](../Creating-a-custom-tileset.md#fogOfWarColor) | Color | Black | `{"r":0,"g":0,"b":0,"a":1}` |
| [fallbackTileSet](../Creating-a-custom-tileset.md#fallbackTileSet) | String | "FantasyHex" | null to disable |
| [tileScale](../Creating-a-custom-tileset.md#tileScale) | Float | 1.0 | |
| [tileScales](../Creating-a-custom-tileset.md#tileScales) | Dictionary | empty | |
| [ruleVariants](../Creating-a-custom-tileset.md#ruleVariants) | Dictionary | empty | see below |
ruleVariants control substitutions when layering images for a tile, they are list looking like:

View File

@ -1,4 +1,4 @@
# Unit-related JSON files
# 3 - Unit-related JSON files
## Units.json
@ -18,18 +18,18 @@ Each unit can have the following attributes:
| rangedStrength | Integer (≥0) | defaults to 0 | The ranged attack strength of the unit. If omitted, the unit cannot ranged attack |
| range | Integer (≥0) | defaults to 2 | The default range from which ranged attacks can be preformed |
| interceptRange | Integer (≥0) | defaults to 0 | Air units attacking within in this range will be intercepted |
| requiredTech | String | defaults to none | The tech required to build this unit. Must be in [Techs.json](Civilization-related-JSON-files.md#techsjson) |
| obsoleteTech | String | defaults to none | After researching this tech, the unit can no longer be build. Must be in [Techs.json](Civilization-related-JSON-files.md#techsjson) |
| requiredResource | String | defaults to none | Resource that is consumed by building this unit. Must be in [TileResources.json](Map-related-JSON-files.md#tileresourcesjson) |
| requiredTech | String | defaults to none | The tech required to build this unit. Must be in [Techs.json](2-Civilization-related-JSON-files.md#techsjson) |
| obsoleteTech | String | defaults to none | After researching this tech, the unit can no longer be build. Must be in [Techs.json](2-Civilization-related-JSON-files.md#techsjson) |
| requiredResource | String | defaults to none | Resource that is consumed by building this unit. Must be in [TileResources.json](3-Map-related-JSON-files.md#tileresourcesjson) |
| upgradesTo | String | defaults to none | Unit that this unit can upgrade to when it is available. Must be in [Units.json](#unitsjson) |
| replaces | String | defaults to none | If this unit is unique to a nation, this is the unit it replaces. Must be in [Units.json](#unitsjson) |
| uniqueTo | String | defaults to none | The nation that this unit is unique to. Must be in [Nations.json](Civilization-related-JSON-files.md#nationsjson) |
| uniqueTo | String | defaults to none | The nation that this unit is unique to. Must be in [Nations.json](2-Civilization-related-JSON-files.md#nationsjson) |
| hurryCostModifier | Integer | defaults to 0 | If this unit is bought for gold/faith, it's price is increased by so much percent |
| promotions | List of Strings | defaults to none | A list of all the promotions the unit automatically receives upon being built. Each promotion must be in [UnitPromotions.json](#unitpromotionsjson) |
| uniques | List of Strings | defaults to none | A list of the unique abilities this unit has. A list of almost all uniques can be found [here](../Modders/Unique-parameters.md#unit-uniques) |
| uniques | List of Strings | defaults to none | A list of the unique abilities this unit has. A list of almost all uniques can be found [here](../Unique-parameters.md#unit-uniques) |
| replacementTextForUniques | String | defaults to none | If provided, this will be displayed instead of the list of uniques. Can be used for better formatting. |
| attackSound | String | defaults to none | The sound that is to be played when this unit attacks. For possible values, see [Sounds](#../Modders/Images-and-Audio.md#sounds)
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
## UnitPromotions.json
@ -52,8 +52,8 @@ Each promotion can have the following properties:
| column | Int | Yes | Determines placement order on the promotion picker screen. Name is historical, these coordinates no longer control placement directly. Promotions without coordinates are ensured to be placed last. (…) |
| row | Int | Yes | … In base mods without any coordinates, promotions without prerequisites are sorted alphabetically and placed top down, the rest of the screen will structure the dependencies logically. If your mod has a "Heal instantly", it is suggested to use row=0 to place it on top. |
| unitTypes | List | Default empty | The unit types for which this promotion applies as specified in [UnitTypes.json](#unittypesjson) |
| uniques | List | Default empty | List of effects, [see here](../Modders/uniques.md#unit-uniques) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](Miscellaneous-JSON-files.md#civilopedia-text) |
| uniques | List | Default empty | List of effects, [see here](../uniques.md#unit-uniques) |
| civilopediaText | List | Default empty | see [civilopediaText chapter](5-Miscellaneous-JSON-files.md#civilopedia-text) |
## UnitTypes.json
@ -66,4 +66,4 @@ Civilian, Melee, Ranged, Scout, Mounted, Armor, Siege, WaterCivilian, WaterMelee
| --------- | ---- | -------- | ----- |
| name | String | required | The name of the unit type |
| movementType | String | required | The domain through which the unit moves. Allowed values: "Water", "Land", "Air" |
| uniques | List of String | defaults to none | A list of the unique abilities every unit of this type has. A list of almost all uniques can be found [here](../Modders/Unique-parameters.md#unit-uniques) |
| uniques | List of String | defaults to none | A list of the unique abilities every unit of this type has. A list of almost all uniques can be found [here](../Unique-parameters.md#unit-uniques) |

View File

@ -19,7 +19,7 @@ Each difficulty level can have the following attributes:
| policyCostModifier | Float | Default 1 |
| unhappinessModifier | Float | Default 1 |
| barbarianBonus | Float | Default 0 |
| playerBonusStartingUnits | List of Units | Default empty | Can also be 'Era Starting Unit', maps to `startingMilitaryUnit` of the Eras file. All other units must be in [Units.json](Unit-related-JSON-files.md#Units.json)] |
| playerBonusStartingUnits | List of Units | Default empty | Can also be 'Era Starting Unit', maps to `startingMilitaryUnit` of the Eras file. All other units must be in [Units.json](4-Unit-related-JSON-files.md#Units.json)] |
| aiCityGrowthModifier | Float | Default 1 |
| aiUnitCostModifier | Float | Default 1 |
| aiBuildingCostModifier | Float | Default 1 |
@ -49,11 +49,11 @@ Each era can have the following attributes:
| iconRGB | List of 3 Integers | defaults to [255, 255, 255] | RGB color that icons for technologies of this era should have in the Tech screen |
| unitBaseBuyCost | Integer (≥0) | defaults to 200 | Base cost of buying units with Faith, Food, Science or Culture when no other cost is provided |
| startingSettlerCount | Integer (≥0) | defaults to 1 | Amount of settler units that should be spawned when starting a game in this era |
| startingSettlerUnit | String | defaults to "Settler" | Name of the unit that should be used for the previous field. Must be in [Units.json](Unit-related-JSON-files.md#unitsjson) |
| startingSettlerUnit | String | defaults to "Settler" | Name of the unit that should be used for the previous field. Must be in [Units.json](4-Unit-related-JSON-files.md#unitsjson) |
| startingWorkerCount | Integer (≥0) | defaults to 0 | Amount of worker units that should be spawned when starting a game in this era |
| startingWorkerUnit | String | defaults to "Worker" | Name of the unit that should be used for the previous field. Must be in [Units.json](Unit-related-JSON-files.md#unitsjson) |
| startingWorkerUnit | String | defaults to "Worker" | Name of the unit that should be used for the previous field. Must be in [Units.json](4-Unit-related-JSON-files.md#unitsjson) |
| startingMilitaryUnitCount | Integer (≥0) | defaults to 1 | Amount of military units that should be spawned when starting a game in this era |
| startingMilitaryUnit | String | defaults to "Warrior" | Name of the unit that should be used for the previous field. Must be in [Units.json](Unit-related-JSON-files.md#unitsjson)|
| startingMilitaryUnit | String | defaults to "Warrior" | Name of the unit that should be used for the previous field. Must be in [Units.json](4-Unit-related-JSON-files.md#unitsjson)|
| startingGold | Integer (≥0) | defaults to 0 | Amount of gold each civ should receive when starting a game in this era |
| startingCulture | Integer (≥0) | defaults to 0 | Amount of culture each civ should receive when starting a game in this era |
| settlerPopulation | Integer (>0) | defaults to 1 | Default amount of population each city should have when settled when starting a game in this era |
@ -112,11 +112,11 @@ The file can have the following attributes, including the values Unciv sets (no
|---------------------|---------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| isBaseRuleset | Boolean | false | Differentiates mods that change the vanilla ruleset or replace it |
| maxXPfromBarbarians | Integer | 30 | *Deprecated*, see [constants](#ModConstants) |
| uniques | List | empty | Mod-wide specials, [see here](../Modders/uniques.md#modoptions-uniques) |
| techsToRemove | List | empty | List of [Technologies](Civilization-related-JSON-files.md#techsjson) or [-filters](../Modders/Unique-parameters.md#technologyfilter) to remove (isBaseRuleset=false only) |
| buildingsToRemove | List | empty | List of [Buildings or Wonders](Civilization-related-JSON-files.md#buildingsjson) or [-filters](../Modders/Unique-parameters.md#buildingfilter) to remove (isBaseRuleset=false only) |
| unitsToRemove | List | empty | List of [Units](Unit-related-JSON-files.md#unitsjson) or [-filters](../Modders/Unique-parameters.md#baseunitfilter) to remove (isBaseRuleset=false only) |
| nationsToRemove | List | empty | List of [Nations](Civilization-related-JSON-files.md#nationsjson) or [-filters](../Modders/Unique-parameters.md#nationfilter) to remove (isBaseRuleset=false only) |
| uniques | List | empty | Mod-wide specials, [see here](../uniques.md#modoptions-uniques) |
| techsToRemove | List | empty | List of [Technologies](2-Civilization-related-JSON-files.md#techsjson) or [-filters](../Unique-parameters.md#technologyfilter) to remove (isBaseRuleset=false only) |
| buildingsToRemove | List | empty | List of [Buildings or Wonders](2-Civilization-related-JSON-files.md#buildingsjson) or [-filters](../Unique-parameters.md#buildingfilter) to remove (isBaseRuleset=false only) |
| unitsToRemove | List | empty | List of [Units](4-Unit-related-JSON-files.md#unitsjson) or [-filters](../Unique-parameters.md#baseunitfilter) to remove (isBaseRuleset=false only) |
| nationsToRemove | List | empty | List of [Nations](2-Civilization-related-JSON-files.md#nationsjson) or [-filters](../Unique-parameters.md#nationfilter) to remove (isBaseRuleset=false only) |
| lastUpdated | String | empty | Set automatically after download - Last repository update, not necessarily last content change |
| modUrl | String | empty | Set automatically after download - URL of repository |
| author | String | empty | Set automatically after download - Owner of repository |
@ -199,7 +199,7 @@ The formula for the gold cost of a unit upgrade is (rounded down to a multiple o
( max((`base` + `perProduction` * (new_unit_cost - old_unit_cost)), 0)
* (1 + eraNumber * `eraMultiplier`) * `civModifier`
) ^ `exponent`
With `civModifier` being the multiplicative aggregate of ["\[relativeAmount\]% Gold cost of upgrading"](../Modders/uniques.md#global-uniques) uniques that apply.
With `civModifier` being the multiplicative aggregate of ["\[relativeAmount\]% Gold cost of upgrading"](../uniques.md#global-uniques) uniques that apply.
## Tutorials.json
@ -212,7 +212,7 @@ Also, place it under `<mod>/jsons/` normally even if the original is found one l
| Attribute | Type | Optional | Notes |
|-----------------|--------------| -------- |----------------------------------------------------------|
| name | String | Required | Entry name |
| civilopediaText | List | Optional | [see here](Miscellaneous-JSON-files.md#civilopedia-text) |
| civilopediaText | List | Optional | [see here](5-Miscellaneous-JSON-files.md#civilopedia-text) |
| steps | List(String) | Optional | Plain text |
If an entry contains both `steps`and `civilopediaText` attributes, the `civilopediaText` is shown first.

View File

@ -1,4 +1,4 @@
# Mods
# 1 - Introduction to Mods
## What's this about?
@ -35,7 +35,7 @@ Mods are located in a `/mods` directory, on Desktop that should be next to your
Mods typically have 2 subfolders:
- `jsons` - here you should put files that alter the data of game objects, the order of the files is as in [the base json files](https://github.com/yairm210/Unciv/tree/master/android/assets/jsons). More information on these can be found [here](JSON-files-for-mods.md)
- `jsons` - here you should put files that alter the data of game objects, the order of the files is as in [the base json files](https://github.com/yairm210/Unciv/tree/master/android/assets/jsons). More information on these can be found [here](Mod file structure/1-Overview.md)
- `Images` - here you should put game images, as in [the base image files](/https://github.com/yairm210/Unciv/tree/master/android/Images). Please read [about atlases](#more-on-images-and-the-texture-atlas) for important details.
In order to remove objects from the game, you'll need to create a ModOptions file in the `/jsons` subfolder - there's an example [here](https://github.com/yairm210/Unciv-mod-example/blob/master/Removing%20Things/jsons/ModOptions.json)

View File

@ -150,7 +150,7 @@ These can be strung together with ", " between them, for example: `+2 Production
## technologyFilter
At the moment only implemented for [ModOptions.techsToRemove](../Other/Miscellaneous-JSON-files.md#modoptionsjson).
At the moment only implemented for [ModOptions.techsToRemove](Mod file structure/5-Miscellaneous-JSON-files.md#modoptionsjson).
Allowed values are: