Unciv/docs/wiki/Miscellaneous-JSON-files.md
will-ca fbd6d36ad3
Move wiki pages into repository, fix dozens of broken links. (#5854)
* Updated Mods (markdown)

* Updated Scenarios (markdown)

* Updated Mods (markdown)

* Added itch.io release

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Project structure and major classes (markdown)

* Updated Mods (markdown)

* Created Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Added link to Uniques

* Updated Uniques (markdown)

* Added 'triggers victory' unique

* Updated Making a new Civilization (markdown)

* Created Building locally without Android Studio (markdown)

* Updated Translating (markdown)

* Updated Uniques (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Uniques (markdown)

* Added improvement uniques

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Mods (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* I thought a tutorial on how to create a custom tileset in the first place could not hurt

* Moved the sentence to the "Creating a custom tileset" page

* Updated Making a new Civilization (markdown)

* Updated Mods Making a new Civilization (markdown)

* Updated Mods Making a new Civilization (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Destroyed Scenarios (markdown)

* Updated Uniques (markdown)

* Changed Travis documentation to Github actions documentation

* Updated Translating (markdown)

* Updated Translating (markdown)

* Updated From code to deployment (markdown)

* Removed "working on templated rule variants" because we currently don't

* Updated Uniques (markdown)

* Updated uniques based on everything done during the policy update

* Misplaced a unique

* Updated Making a new Civilization (markdown)

* Updated Making a new Civilization (markdown)

* Updated Translating (markdown)

* Updated Uniques (markdown)

* Removed [pending] messages for PR's that were no longer pending

* Added uniques from telecommuncations/advanced balistics

* Added all the uniques from my PR's (telecommunicatoins -- shrines); added uniques I deprecated at some point

* Updated Uniques (markdown)

* Added missing deprecated unique

* Added uniques changed in #4292

* Updated Uniques (markdown)

* Added uniques from #4311 and #4301

* Added uniques from #4331

* Added Discord webhook message

* Created page with basic information

* Typo

* Made information not incorrect

* Added units.json

* Manual new lines was a terrible idea

* Updated JSON files for mods (markdown)

* Added link to JSON files for mods explanation

* Added eras.json

* capitalization

* Added a header

* Improved example

* Added Buildings.json

* hmmm

* Doesn't work, sad

* Added information on Specialists.json

* Updated JSON files for mods (markdown)

* Added uniques from #4372

* Updated Uniques (markdown)

* Updated uniques after #4393

* Updated uniques after #4423

* Add new and deprecated uniques of #4487, #4459

* add wonder images

* Fixed mod directory

* Updated Uniques (markdown)

* Updated uniques after #4530, #4505, #4419

* Reworked the passages on tileFilter, terrainFilter and improvementFilter from code inspection

* Added a more indept guide on how to install UnCiv on macOS

* Updated Uniques (markdown)

* Created Credits.md (markdown)

* Destroyed Credits.md (markdown)

* Added installing from source method

* Improve Sound chapter, added Civilopedia text chapter

* Added after #4619

* Added unitTypes.json

* Added beliefs.json

* Updated Translating (markdown)

* Added eras:unitBaseBuyCost

* Added after #4568

* Added ruins.json

* Added after #4771

* Added rudimentary Difficulties.json doc

* Added ruin-specfic uniques explanation

* Added TOC and Nations

* Detailed Techs chapter

* Fix 1 line - tech uniques

* Added Quests.json

* Added ModOptions

* Added ModOptions

* Added UnitPromotions, structured TOC

* Added Policies

* Added crosslinks

* Fixed broken links

* Added TileResources

* Added more crosslinks

* Small fix resource tile graphix aren't toggle-able

* Added TileImprovements

* Added Terrains

* Updated JSON files for mods (markdown)

* Updated Getting Started (markdown)

* Updated Getting Started (markdown)

* Updated Getting Started (markdown)

* Updated JSON files for mods (markdown)

* Updated Translating (markdown)

* Created Civilization-related JSON files (markdown)

* Created Map-related JSON files (markdown)

* Double title

* Double title

* Created Unit-related JSON files (markdown)

* Moved sounds

* Updated Unit related JSON files (markdown)

* Moved Stats

* Created Miscellaneous JSON files (markdown)

* Removed content that has been moved to separate pages, update TOC

* Created _Sidebar (markdown)

* Updated Uniques (markdown)

* test

* Fixed broken links. Apparently the way 'preview' links to pages differs from how it links when you view them on a saved page for some reason

* Updated Uniques (markdown)

* Fix relative `..` link suddenly leaving the wiki

* Updated Miscellaneous JSON files (markdown)

* Fix relative links

* Fix era links to Units.json

* Updated Uniques (markdown)

* Updated From code to deployment (markdown)

* Added uniques & cityFilters up to #4995

* Mass deprecation as per 422607

* Fixed broken link to redirect to Unit Uniques in Wiki

* Fixed broken link to redirect to Unit Uniques in Wiki table

* Updated Uniques (markdown)

* Updated Getting Started (markdown)

* Updated Uniques (markdown)

* Added uniques & filters up to #5094

* Removed a deprecated unique

* Moved some uniques to better sections, removed an outdated unique

* fixed a typo

* Updated Uniques (markdown)

* eras.json is now required

* Removed outdated religion section

* Added missing terrain uniques

* Added resource uniques

* Fixed resource unique link

* Added missing unique for tile improvements

* Fixed broken link

* "Disappearing" translations explained

* Updated Home (markdown)

* Some atlas info, leader portraits

* Created Force rating calculation (markdown)

* "Not yet" for Image atlas distribution in mods

* Updated uniques after #5259

* Added information on conditionals

* Updated growth unique

* Added conditional support up to #5270

* Typo

* Escape html tags

* Add conditionals to table of contents

* Updated _Sidebar (markdown)

* Created Audiovisual Mods (markdown)

* Audiovisual Mods, move Graphics-only info

* Updated Audiovisual Mods (markdown)

* Audiovisual Mods - Draft done.

* Documented translation method

* Updated Translations, mods, and modding freedom in Open Source (markdown)

* Fix Typos and Links

* New Terrain uniques / 2 sections

* Atlas control via multiple Images.x folders is now live

* Link to atlas paragraph

* startBias clarification

* Missing bracket

* Added uniques & conditionals up to #5345 (my PR's only)

* Updated Force rating calculation (markdown)

* Updated Getting Started (markdown => asciidoc)

* Undid renaming

* Updated Getting Started (asciidoc => markdown)

* Added fix for Gradle sync fail

* Updated Project structure and major classes (markdown)

* Bump Java version from JDK 8 to JDK 11 due to gradle upgrade

* Updated uniques & conditionals up to #5618 from my PR's

* Created Regions (markdown)

* Updated Uniques (markdown)

* Updated Uniques (markdown)

* Mention docs/uniques.md, emphasized Stat capitalization

* Move wiki files into `/docs/wiki`.

* Migrate inter-Markdown links.

* Fix pre-existing broken links and anchors.

* Standardize repository links for AS linting.

* Add wiki footer.

* Updated Uniques (markdown)

* Updated Mods Making a new Civilization (markdown)

* Updated Making a new Civilization (markdown)

* Add GH Action for updating wiki.

* Play it safer, and don't `push -f`. (Should be the same either way though.)

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: GGGuenni <leonard@eynck.de>
Co-authored-by: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
Co-authored-by: Martin Pechstein <77325495+Mape6@users.noreply.github.com>
Co-authored-by: Arthur van der Staaij <32672293+avdstaaij@users.noreply.github.com>
Co-authored-by: SimonCeder <63475501+SimonCeder@users.noreply.github.com>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Alex25820 <50142558+Alex25820@users.noreply.github.com>
Co-authored-by: jvy1001 <76390095+jvy1001@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: NxOne14 <81563289+NxOne14@users.noreply.github.com>
Co-authored-by: MenaKing2020 <92416577+MenaKing2020@users.noreply.github.com>
Co-authored-by: asda488 <39116917+asda488@users.noreply.github.com>
2022-01-23 21:49:43 +02:00

8.3 KiB

Difficulties.json

Link to original

This file defines the difficulty levels a player can choose when starting a new game.

Each difficulty level can have the following attributes:

Attribute Type Mandatory Notes
name String Required Name of the difficulty level
baseHappiness Integer Default 0
extraHappinessPerLuxury Float Default 0
researchCostModifier Float Default 1
unitCostModifier Float Default 1
buildingCostModifier Float Default 1
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]
aiCityGrowthModifier Float Default 1
aiUnitCostModifier Float Default 1
aiBuildingCostModifier Float Default 1
aiWonderCostModifier Float Default 1
aiBuildingMaintenanceModifier Float Default 1
aiUnitMaintenanceModifier Float Default 1
aiFreeTechs List of Techs Default empty
aiMajorCivBonusStartingUnits List of Units Default empty See above
aiCityStateBonusStartingUnits List of Units Default empty See above
aiUnhappinessModifier Float Default 1
aisExchangeTechs Boolean Unimplemented
turnBarbariansCanEnterPlayerTiles Integer Default 0
clearBarbarianCampReward Integer Default 25

Eras.json

Link to original

This file should contain all the era's you want to use in your mod.

Each era can have the following attributes:

attribute Type optional or not notes
name String required Name of the era
researchAgreementCost Integer (≥0) defaults to 300 Cost of research agreements were the most technologically advanced civ is in this era
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
startingWokerCount 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
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
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
settlerBuildings List of Strings defaults to none Buildings that should automatically be built whenever a city is settled when starting a game in this era
startingObsoleteWonders List of Strings defaults to none Wonders (and technically buildings) that should be impossible to built when starting a game in this era. Used in the base game to remove all wonders older than 2 era's

ModOptions.json

This file is a little different:

  • Does not exist in Vanilla ruleset
  • Is entirely optional but will be created after downloading a mod

The file can have the following attributes, including the values Unciv sets (no point in a mod author setting those):

Attribute Type Defaults Notes
isBaseRuleset Boolean false Differentiates mods that change the vanilla ruleset or replace it
maxXPfromBarbarians Integer 30 ...as the name says...
uniques List empty Mod-wide specials, see here
techsToRemove List empty List of Technologies to remove (isBaseRuleset=false only)
buildingsToRemove List empty List of Buildings or Wonders to remove (isBaseRuleset=false only)
unitsToRemove List empty List of Units to remove (isBaseRuleset=false only)
nationsToRemove List empty List of Nations 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
modSize Integer empty Set automatically after download - kB in entire repository, not sum of default branch files

Civilopedia text

Any 'thing' defined in json and listed in the Civilopedia can supply extra text, specifically for the Civilopedia. This can be used to explain special considerations better when the automatically generated display is insufficient, or for 'flavour', background stories and the like. Such text can be formatted and linked to other Civilopedia entries, within limits.

An example of the format is:

        "civilopediaText": [
			{"text":"Ancient ruins provide a one-time random bonus when explored"},
			{"separator":true},
			{"text":"This line is red and links to the Scout including icons", "link":"Unit/Scout", "color":"red"},
			{"text":"A big fat header sporting a golden star", "header":1, "starred":true, "color":"#ffeb7f"},
		],

List of attributes - note not all combinations are valid:

attribute type description
text String Text to display.
link String Create link and icon, format: Category/Name or external link ('http://','https://','mailto:').
icon String Show icon without linking, format: Category/Name.
extraImage String Display an Image instead of text. Can be a path found in a texture atlas or or the name of a png or jpg in the ExtraImages folder.
imageSize Float Width in world units of the [extraImage], height is calculated preserving aspect ratio. Defaults to available width.
header Integer Header level. 1 means double text size and decreases from there.
size Integer Text size, default is 18. Use size or header but not both.
indent Integer Indent level. 0 means text will follow icons, 1 aligns to the right of all icons, each further step is 30 units.
padding Float Vertical padding between rows, defaults to 5 units.
color String Sets text color, accepts names or 6/3-digit web colors (e.g. #FFA040).
separator Boolean Renders a separator line instead of text. Can be combined only with color and size (line width, default 2).
starred Boolean Decorates text with a star icon - if set, it receives the color instead of the text.
centered Boolean Centers the line (and turns off automatic wrap).

The lines from json will 'surround' the automatically generated lines such that the latter are inserted just above the first json line carrying a link, if any. If no json lines have links, they will be inserted between the automatic title and the automatic info. This method may, however, change in the future.