Reorg modding pages

PAge order is determined by file name - but link text is determined by title
This commit is contained in:
Yair Morgenstern
2023-07-02 16:49:39 +03:00
parent 76ad2d8e7a
commit 7b0aac007a
12 changed files with 36 additions and 36 deletions

View File

@ -66,7 +66,7 @@ However, it also imposes a couple of conventions about how links should best be
| Link type | Format | Example |
| --------- | ------ | ------- |
| Inter-wiki | Should begin with "./", and include ".md". | [`./Mods.md#other`](../Modders/Mods.md#other) |
| Inter-wiki | Should begin with "./", and include ".md". | [`./Mods.md#other`](../Modders/1-Mods.md#other) |
| Code or asset file | Should begin with "https://github.com/yairm210/Unciv/blob/master/", and be relative to the project root. | [`https://github.com/yairm210/Unciv/blob/master/android/assets/game.png`](https://github.com/yairm210/Unciv/blob/master/android/assets/game.png) |
These formats will allow IDEs like Android studio to resolve these links and check for broken links, while also working on the [Github code browser](https://github.com/yairm210/Unciv/tree/master/docs).

View File

@ -1,4 +1,4 @@
# 1 - Introduction to Mods
# Introduction to Mods
## What's this about?
@ -19,9 +19,9 @@ Creating and editing mods from your phone is NOT RECOMMENDED - it's *much easier
## Audiovisual Mods
In addition to changing the rules - or even without doing so, mods can override existing graphics or sounds, or add music tracks. The game also has the ability to display graphics that are not included in the base game at all, such as leader portrait or wonder splash images, that must be provided by mods. For details, see [Audiovisual Mods](Images-and-Audio.md).
In addition to changing the rules - or even without doing so, mods can override existing graphics or sounds, or add music tracks. The game also has the ability to display graphics that are not included in the base game at all, such as leader portrait or wonder splash images, that must be provided by mods. For details, see [Audiovisual Mods](3-Images-and-Audio.md).
Custom tilesets are closely related, see [Creating a custom tileset](Creating-a-custom-tileset.md).
Custom tilesets are closely related, see [Creating a custom tileset](4-Creating-a-custom-tileset.md).
Such mods are candidates for the "Permanent audiovisual mod" switch available on the Mod Management Screen. Note that this feature includes graphics or sounds from the selected mod in _all_ games, even those started before installing the mod. In case of a mod bringing both changed rules and audiovisuals, the 'permanent' feature will include only the media on all games, to use the rules you will still need to select the mod for a new game.
@ -44,7 +44,7 @@ In a base ruleset mod, ALL the original objects are removed - this is done by ad
For an example, you can refer to [the example mod](https://github.com/yairm210/Unciv-mod-example) - just download the Example-Aliens-Mod and put it in a `/mods` folder next to the jar, run Unciv, start a new game, and you'll be able to enable the mod, which will allow to you pick Aliens as a playable civilization!
If you want to add a new civilization as a mod, you should check out [the Civ making instructions](Making-a-new-Civilization.md) to see what's required, or see the example Aliens mod =)
If you want to add a new civilization as a mod, you should check out [the Civ making instructions](2-Making-a-new-Civilization.md) to see what's required, or see the example Aliens mod =)
### More on Images and the texture atlas
@ -121,7 +121,7 @@ If you feel there should be additional topics supported in-game, then the course
The primary use of mods is to add them when starting a new game, or configuring a map. This will mean that both the ruleset of the mod, and the images, will be in use for that specific game/map.
For mods which are primarily visual or audio, there is a second use - through the mod manager, you can enable them as **permanent audiovisual mods**. This means that the images and/or sounds from the mod will replace the original media everywhere in the game, and contained music will be available - [see here](Images-and-Audio.md#supply-additional-music).
For mods which are primarily visual or audio, there is a second use - through the mod manager, you can enable them as **permanent audiovisual mods**. This means that the images and/or sounds from the mod will replace the original media everywhere in the game, and contained music will be available - [see here](3-Images-and-Audio.md#supply-additional-music).
## Mod location for manual loading of mods
@ -142,4 +142,4 @@ Existing mods can be found [here](https://github.com/topics/unciv-mod)!
A list of uniques and how to use them can be found [here](Unique-parameters.md)!
Some images don't exist at all in the base game, but can be added in mods. For more info, see [Audiovisual Mods](Images-and-Audio.md).
Some images don't exist at all in the base game, but can be added in mods. For more info, see [Audiovisual Mods](3-Images-and-Audio.md).

View File

@ -1,4 +1,4 @@
# 2 - 'My first mod' - Making a new Civilization
# 'My first mod' - Making a new Civilization
So you want to add your favorite civilization?
@ -50,4 +50,4 @@ Icons directly from the base game belong to Firaxis, so I'm not sure we're legal
One source I use constantly is [The Noun Project](https://thenounproject.com) - everything there is Creative Commons or open, so they can all be used!
Credits for icons should go in the [Credits](./Credits.md) page.
Credits for icons should go in a `Credits.md` page.

View File

@ -1,4 +1,4 @@
# 3 - Images and Audio
# Images and Audio
## Permanent audiovisual mods
@ -6,7 +6,7 @@ The following chapters describe possibilities that will work while a mod is ***a
## Override built-in graphics
If a mod supplies an image with the same name and path as one included in the base game (and its [atlas](Mods.md#more-on-images-and-the-texture-atlas) is up to date), and the mod is active, the mod's graphics will be used instead of the built-in one.
If a mod supplies an image with the same name and path as one included in the base game (and its [atlas](1-Mods.md#more-on-images-and-the-texture-atlas) is up to date), and the mod is active, the mod's graphics will be used instead of the built-in one.
For example, if you include a file named "Images/OtherIcons/Link.png" in your mod, you will be overriding the little chain links icon denoting linked lines in Civilopedia. The first part of the path is not relevant for overriding, it controls which of a set of atlas files will carry the image, but for selection in the game only the rest of the path is relevant. So, to override "Images.Tech/TechIcons/Archery.png" you could place your image as "Images/TechIcons/Archery.png" and it would work because the "TechIcons/Archery" part is the key.
@ -18,7 +18,7 @@ You will need to supply the graphics for new elements - a new unit needs its ico
- The path and name of the image file need to conform to the rule: `Image[.AtlasName]/Type-specific/Objectname.png` (Type-specific means "TechIcons" for a Technology, "NationIcons" for a Nation and so on. See vanilla game folders. Objectname is the exact name as defined in json, before translation.)
- All path parts are case sensitive.
- Unit Pixel sprites and [Tilesets](Creating-a-custom-tileset.md) follow special rules.
- Unit Pixel sprites and [Tilesets](4-Creating-a-custom-tileset.md) follow special rules.
- Promotions can be named "`[Unitname] ability`". In such a case, if `UnitIcons/Unitname.png` exists it will fall back to that unit icon when `UnitPromotionIcons/Unitname ability.png` is missing.
- Promotions can be named "Something I" (or " II" or " III"). The suffix will be removed and painted as little stars, only the base `UnitPromotionIcons/Something.png` will be loaded.
- The special rules for promotions can be combined, e.g. "`[Warrior] ability III`" will fall back to the Warrior unit icon and paint 3 Stars on it.

View File

@ -1,6 +1,6 @@
# 4 - Making a custom tileset
# Creating a custom2 tileset
**You should read the [Mods](Mods.md) page first before proceeding**
**You should read the [Mods](1-Mods.md) page first before proceeding**
In order to add a tileset mod (yes, tilesets are just another type of mod), all you need to do is add your images under Images/Tilesets/MyCoolTilesetExample and enable the mod as a permanent visual mod - the game will recognize the tileset, and allow you to pick it in the options menu.

View File

@ -1,16 +1,16 @@
# 5 - Creating a UI skin mod
# Creating a UI skin
**You should read the [Mods](Mods.md) page first before proceeding**
**You should read the [Mods](1-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 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.
Just like [tilesets](4-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.
We use so called 9.png (or Ninepatch) files for every skin image because UI elements need a way to be resized based on game window size and resolution. Ninepatch files can be created manually by adding black pixels around your custom images in a specific manner or by using [Android Studio's Draw 9-patch tool](https://developer.android.com/studio/write/draw9patch) or [this tool by romannurik](https://romannurik.github.io/AndroidAssetStudio/nine-patches.html) for example. You may also check if your favorite image creation tool supports nine patches itself to generate them more easily.
A skin image can either be gray scale and later be colored in game by modifying the `tint` in the [skinConfig](Creating-a-UI-skin.md#tint) or be colored directly in the image. When coloring the image directly it is important to set the tint of the UI element to white. Please note that tileable ninepatches and ninepatches with multiple stretch areas are not supported because of technical restrictions by libgdx.
A skin image can either be gray scale and later be colored in game by modifying the `tint` in the [skinConfig](5-Creating-a-UI-skin.md#tint) or be colored directly in the image. When coloring the image directly it is important to set the tint of the UI element to white. Please note that tileable ninepatches and ninepatches with multiple stretch areas are not supported because of technical restrictions by libgdx.
There are 6 basic shapes which can be placed inside the `Images/Skins/MyCoolSkinExample` folder:
- checkbox
@ -20,7 +20,7 @@ There are 6 basic shapes which can be placed inside the `Images/Skins/MyCoolSkin
- select-box
- select-box-pressed
These shapes are used all over Unciv and can be replaced to make a lot of UI elements change appearance at once. To change just one specific element use the [table](Creating-a-UI-skin.md#Available-UI-elements) below to create an image at the specified directory using the specified name inside `Images/Skins/MyCoolSkinExample`. See the image below for an example file structure. ![skinExample](https://user-images.githubusercontent.com/24532072/198904598-0d298035-5b02-431b-bfb4-7da4b9c821c9.png)
These shapes are used all over Unciv and can be replaced to make a lot of UI elements change appearance at once. To change just one specific element use the [table](5-Creating-a-UI-skin.md#Available-UI-elements) below to create an image at the specified directory using the specified name inside `Images/Skins/MyCoolSkinExample`. See the image below for an example file structure. ![skinExample](https://user-images.githubusercontent.com/24532072/198904598-0d298035-5b02-431b-bfb4-7da4b9c821c9.png)
## Limitations
@ -137,7 +137,7 @@ These shapes are used all over Unciv and can be replaced to make a lot of UI ele
## SkinConfig
The skinConfig is similar to the [tilesetConfig](Creating-a-custom-tileset.md#tileset-config) and can be used to define different colors and shapes for unciv to use.
The skinConfig is similar to the [tilesetConfig](4-Creating-a-custom-tileset.md#tileset-config) and can be used to define different colors and shapes for unciv to use.
To create a config for your skin you just need to create a new .json file under `jsons/Skins/`. Just create a .txt file and rename it to MyCoolSkinExample.json. You only have to add things if you want to change them. Else the default values will be used.
@ -179,7 +179,7 @@ Defines the color unciv uses in most ui elements as default
A dictionary mapping string to a SkinElement. Default value: empty
These variants can be used to define a different image, tint and/or alpha for a specified UI element. The string used to identify the UI element can be taken from the [table](Creating-a-UI-skin.md#Available-UI-elements) above by appending the name to the directory.
These variants can be used to define a different image, tint and/or alpha for a specified UI element. The string used to identify the UI element can be taken from the [table](5-Creating-a-UI-skin.md#Available-UI-elements) above by appending the name to the directory.
```
| Directory | Name |
|-----------------------|---------------|

View File

@ -1,4 +1,4 @@
# 1 - Mod file structure Overview
# Mod file structure Overview
These pages are a work in progress. Information they contain may be incomplete.
@ -32,7 +32,7 @@ The JSON files that make up mods can have many different fields, and as not all
- [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)
- [Sounds](../3-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 @@
# 2 - Civilization-related JSON files
# Civilization-related JSON files
## Beliefs.json

View File

@ -1,4 +1,4 @@
# 3 - Map-related JSON files
# Map-related JSON files
## Terrains.json
@ -121,14 +121,14 @@ A mod can define new Tilesets or add to existing ones, namely FantasyHex. There
| Attribute | Type | Default value | Notes |
| --------- | ---- | -------- | ----- |
| [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 |
| [useColorAsBaseTerrain](../4-Creating-a-custom-tileset.md#useColorAsBaseTerrain) | Boolean | false | |
| [useSummaryImages](../4-Creating-a-custom-tileset.md#useSummaryImages) | Boolean | false | |
| [unexploredTileColor](../4-Creating-a-custom-tileset.md#unexploredTileColor) | Color | Dark Gray | `{"r":0.25,"g":0.25,"b":0.25,"a":1}` |
| [fogOfWarColor](../4-Creating-a-custom-tileset.md#fogOfWarColor) | Color | Black | `{"r":0,"g":0,"b":0,"a":1}` |
| [fallbackTileSet](../4-Creating-a-custom-tileset.md#fallbackTileSet) | String | "FantasyHex" | null to disable |
| [tileScale](../4-Creating-a-custom-tileset.md#tileScale) | Float | 1.0 | |
| [tileScales](../4-Creating-a-custom-tileset.md#tileScales) | Dictionary | empty | |
| [ruleVariants](../4-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 @@
# 4 - Unit-related JSON files
# Unit-related JSON files
## Units.json

View File

@ -1,4 +1,4 @@
# 5 - Miscellaneous JSON files
# Miscellaneous JSON files
## Difficulties.json

View File

@ -13,6 +13,6 @@ If you're a developer, you'll probably want to start at the [Getting Started](De
If you're a translator, head over to [Translating!](Other/Translating.md)
If you're a modder, [start here](Modders/Mods.md).
If you're a modder, [start here](Modders/1-Mods.md).
If not, you can still help by spreading the word - vote for Unciv where you can, mention it on Reddit or Twitter etc, and help us with new ideas of how to get the word out!