3131 lines
76 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://yairm210.github.io/Unciv/Modders/Mod-file-structure/5-Miscellaneous-JSON-files/">
<link rel="prev" href="../4-Unit-related-JSON-files/">
<link rel="next" href="../../Creating-a-custom-tileset/">
<link rel="icon" href="../../../assets/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.20">
<title>Miscellaneous JSON files - Unciv</title>
<link rel="stylesheet" href="../../../assets/stylesheets/main.e53b48f4.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.06af60db.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="teal" data-md-color-accent="amber">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#miscellaneous-json-files" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="Unciv" class="md-header__button md-logo" aria-label="Unciv" data-md-component="logo">
<img src="../../../assets/Icon.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Unciv
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Miscellaneous JSON files
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="teal" data-md-color-accent="amber" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9z"/></svg>
</label>
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="teal" data-md-color-accent="amber" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/yairm210/unciv" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
</div>
<div class="md-source__repository">
yairm210/unciv
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="Unciv" class="md-nav__button md-logo" aria-label="Unciv" data-md-component="logo">
<img src="../../../assets/Icon.png" alt="logo">
</a>
Unciv
</label>
<div class="md-nav__source">
<a href="https://github.com/yairm210/unciv" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
</div>
<div class="md-source__repository">
yairm210/unciv
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<span class="md-ellipsis">
Welcome to Unciv!
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Credits/" class="md-nav__link">
<span class="md-ellipsis">
Credits
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Guiding-Principles/" class="md-nav__link">
<span class="md-ellipsis">
Guiding Principles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Privacy-Policy/" class="md-nav__link">
<span class="md-ellipsis">
Privacy Policy
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Developers
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Developers
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../Developers/Building-Locally/" class="md-nav__link">
<span class="md-ellipsis">
Building Locally
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Coding-standards/" class="md-nav__link">
<span class="md-ellipsis">
Coding standards
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/From-code-to-deployment/" class="md-nav__link">
<span class="md-ellipsis">
From code to deployment
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Game-Making-Tips/" class="md-nav__link">
<span class="md-ellipsis">
Game Making Tips
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Map-rendering/" class="md-nav__link">
<span class="md-ellipsis">
Map rendering
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Project-structure-and-major-classes/" class="md-nav__link">
<span class="md-ellipsis">
Project structure
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Saved-games-and-transients/" class="md-nav__link">
<span class="md-ellipsis">
Saved games and transients
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Testing-Android-Builds/" class="md-nav__link">
<span class="md-ellipsis">
Building for and testing on Android
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Translations%2C-mods%2C-and-modding-freedom-in-Open-Source/" class="md-nav__link">
<span class="md-ellipsis">
Translations, mods, and modding freedom in Open Source
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/UI-development/" class="md-nav__link">
<span class="md-ellipsis">
UI Development
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Unique-replacement-process/" class="md-nav__link">
<span class="md-ellipsis">
Unique replacement process
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Developers/Uniques/" class="md-nav__link">
<span class="md-ellipsis">
Uniques
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" checked>
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
<span class="md-ellipsis">
Modders
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_6">
<span class="md-nav__icon md-icon"></span>
Modders
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../Mods/" class="md-nav__link">
<span class="md-ellipsis">
Introduction to Mods
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../Making-a-new-Civilization/" class="md-nav__link">
<span class="md-ellipsis">
'My first mod' - Making a new Civilization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../Images-and-Audio/" class="md-nav__link">
<span class="md-ellipsis">
Images and Audio
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_4" checked>
<label class="md-nav__link" for="__nav_6_4" id="__nav_6_4_label" tabindex="0">
<span class="md-ellipsis">
Mod file structure
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_6_4">
<span class="md-nav__icon md-icon"></span>
Mod file structure
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../1-Overview/" class="md-nav__link">
<span class="md-ellipsis">
Mod file structure Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../2-Civilization-related-JSON-files/" class="md-nav__link">
<span class="md-ellipsis">
Civilization-related JSON files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../3-Map-related-JSON-files/" class="md-nav__link">
<span class="md-ellipsis">
Map-related JSON files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../4-Unit-related-JSON-files/" class="md-nav__link">
<span class="md-ellipsis">
Unit-related JSON files
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
Miscellaneous JSON files
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Miscellaneous JSON files
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#difficultiesjson" class="md-nav__link">
<span class="md-ellipsis">
Difficulties.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#erasjson" class="md-nav__link">
<span class="md-ellipsis">
Eras.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#speedsjson" class="md-nav__link">
<span class="md-ellipsis">
Speeds.json
</span>
</a>
<nav class="md-nav" aria-label="Speeds.json">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#time-interval-per-turn" class="md-nav__link">
<span class="md-ellipsis">
Time interval per turn
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#eventsjson" class="md-nav__link">
<span class="md-ellipsis">
Events.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#modoptionsjson" class="md-nav__link">
<span class="md-ellipsis">
ModOptions.json
</span>
</a>
<nav class="md-nav" aria-label="ModOptions.json">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#modconstants" class="md-nav__link">
<span class="md-ellipsis">
ModConstants
</span>
</a>
<nav class="md-nav" aria-label="ModConstants">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#unitupgradecost" class="md-nav__link">
<span class="md-ellipsis">
UnitUpgradeCost
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#globaluniquesjson" class="md-nav__link">
<span class="md-ellipsis">
GlobalUniques.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tutorialsjson" class="md-nav__link">
<span class="md-ellipsis">
Tutorials.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#victorytypesjson" class="md-nav__link">
<span class="md-ellipsis">
VictoryTypes.json
</span>
</a>
<nav class="md-nav" aria-label="VictoryTypes.json">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#milestones" class="md-nav__link">
<span class="md-ellipsis">
Milestones
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#civilopedia-text" class="md-nav__link">
<span class="md-ellipsis">
Civilopedia text
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#rgb-colors-list" class="md-nav__link">
<span class="md-ellipsis">
RGB colors list
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_5" >
<label class="md-nav__link" for="__nav_6_5" id="__nav_6_5_label" tabindex="0">
<span class="md-ellipsis">
Special Mods
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6_5">
<span class="md-nav__icon md-icon"></span>
Special Mods
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../Creating-a-custom-tileset/" class="md-nav__link">
<span class="md-ellipsis">
Creating a custom tileset
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../Creating-a-UI-skin/" class="md-nav__link">
<span class="md-ellipsis">
Creating a UI skin
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../Unique-parameters/" class="md-nav__link">
<span class="md-ellipsis">
Unique parameters
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../uniques/" class="md-nav__link">
<span class="md-ellipsis">
Uniques
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../Type-checking/" class="md-nav__link">
<span class="md-ellipsis">
Type checking
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../Scenarios/" class="md-nav__link">
<span class="md-ellipsis">
Scenarios
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../Autoupdates/" class="md-nav__link">
<span class="md-ellipsis">
Autoupdates
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
<span class="md-ellipsis">
Other
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_7">
<span class="md-nav__icon md-icon"></span>
Other
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../Other/Force-rating-calculation/" class="md-nav__link">
<span class="md-ellipsis">
Force rating calculation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Other/Installing-on-macOS/" class="md-nav__link">
<span class="md-ellipsis">
Installing on MacOS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Other/Intentional-departures-from-Civ-V/" class="md-nav__link">
<span class="md-ellipsis">
Intentional departures from Civ V
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Other/Multiplayer/" class="md-nav__link">
<span class="md-ellipsis">
Multiplayer
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Other/Regions/" class="md-nav__link">
<span class="md-ellipsis">
Regions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Other/Simulations/" class="md-nav__link">
<span class="md-ellipsis">
Simulations
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../Other/Translating/" class="md-nav__link">
<span class="md-ellipsis">
Translating
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#difficultiesjson" class="md-nav__link">
<span class="md-ellipsis">
Difficulties.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#erasjson" class="md-nav__link">
<span class="md-ellipsis">
Eras.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#speedsjson" class="md-nav__link">
<span class="md-ellipsis">
Speeds.json
</span>
</a>
<nav class="md-nav" aria-label="Speeds.json">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#time-interval-per-turn" class="md-nav__link">
<span class="md-ellipsis">
Time interval per turn
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#eventsjson" class="md-nav__link">
<span class="md-ellipsis">
Events.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#modoptionsjson" class="md-nav__link">
<span class="md-ellipsis">
ModOptions.json
</span>
</a>
<nav class="md-nav" aria-label="ModOptions.json">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#modconstants" class="md-nav__link">
<span class="md-ellipsis">
ModConstants
</span>
</a>
<nav class="md-nav" aria-label="ModConstants">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#unitupgradecost" class="md-nav__link">
<span class="md-ellipsis">
UnitUpgradeCost
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#globaluniquesjson" class="md-nav__link">
<span class="md-ellipsis">
GlobalUniques.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tutorialsjson" class="md-nav__link">
<span class="md-ellipsis">
Tutorials.json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#victorytypesjson" class="md-nav__link">
<span class="md-ellipsis">
VictoryTypes.json
</span>
</a>
<nav class="md-nav" aria-label="VictoryTypes.json">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#milestones" class="md-nav__link">
<span class="md-ellipsis">
Milestones
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#civilopedia-text" class="md-nav__link">
<span class="md-ellipsis">
Civilopedia text
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#rgb-colors-list" class="md-nav__link">
<span class="md-ellipsis">
RGB colors list
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="miscellaneous-json-files">Miscellaneous JSON files</h1>
<h2 id="difficultiesjson">Difficulties.json</h2>
<p><a href="https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&amp;%20Kings/Difficulties.json">Link to original</a></p>
<p>This optional file defines the difficulty levels a player can choose when starting a new game.</p>
<p>Base ruleset Mods can omit the file or supply an empty list, even though at least one difficulty is mandatory, in which case they inherit <a href="https://github.com/yairm210/Unciv/blob/master/android/assets/jsons/Civ%20V%20-%20Vanilla/Difficulties.json">the ones from the Vanilla ruleset</a>.</p>
<p>Each difficulty level has the following structure:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Required</td>
<td></td>
</tr>
<tr>
<td>baseHappiness</td>
<td>Integer</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>extraHappinessPerLuxury</td>
<td>Float</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>researchCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>unitCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>unitSupplyBase</td>
<td>Integer</td>
<td>5</td>
<td></td>
</tr>
<tr>
<td>unitSupplyPerCity</td>
<td>Integer</td>
<td>2</td>
<td></td>
</tr>
<tr>
<td>buildingCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>policyCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>unhappinessModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>barbarianBonus</td>
<td>Float</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>barbarianSpawnDelay</td>
<td>Integer</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>playerBonusStartingUnits</td>
<td>List of Strings</td>
<td>empty</td>
<td>Can also be 'Era Starting Unit', maps to <code>startingMilitaryUnit</code> of the Eras file. All other units must be in <a href="../4-Unit-related-JSON-files/#Units.json">Units.json</a>. Applies only to human player civs</td>
</tr>
<tr>
<td>aiCityGrowthModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>aiUnitCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>aiBuildingCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>aiWonderCostModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>aiBuildingMaintenanceModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>aiUnitMaintenanceModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>aiUnitSupplyModifier</td>
<td>Integer</td>
<td>5</td>
<td></td>
</tr>
<tr>
<td>aiFreeTechs</td>
<td>List of Strings</td>
<td>empty</td>
<td>Must be in <a href="../2-Civilization-related-JSON-files/#techsjson">Techs.json</a></td>
</tr>
<tr>
<td>aiMajorCivBonusStartingUnits</td>
<td>List of Strings</td>
<td>empty</td>
<td>Same rules as playerBonusStartingUnits, See above. Applies only to AI major civs</td>
</tr>
<tr>
<td>aiCityStateBonusStartingUnits</td>
<td>List of Strings</td>
<td>empty</td>
<td>Same rules as playerBonusStartingUnits, See above. Applies only to city-state civs</td>
</tr>
<tr>
<td>aiUnhappinessModifier</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>turnBarbariansCanEnterPlayerTiles</td>
<td>Integer</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>clearBarbarianCampReward</td>
<td>Integer</td>
<td>25</td>
<td></td>
</tr>
<tr>
<td>uniques</td>
<td>List of Strings</td>
<td>empty</td>
<td>Will be treated as part of GlobalUniques when this difficulty is chosen</td>
</tr>
</tbody>
</table>
<h2 id="erasjson">Eras.json</h2>
<p><a href="https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&amp;%20Kings/Eras.json">Link to original</a></p>
<p>This file should contain all the era's you want to use in your mod.</p>
<p>Each era can have the following attributes:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Required</td>
<td></td>
</tr>
<tr>
<td>researchAgreementCost</td>
<td>Integer (≥0)</td>
<td>300</td>
<td>Cost of research agreements when the most technologically advanced civ is in this era</td>
</tr>
<tr>
<td>iconRGB</td>
<td><a href="#rgb-colors-list">List of 3× Integer</a></td>
<td>white</td>
<td>RGB color that icons for technologies of this era should have in the Tech screen</td>
</tr>
<tr>
<td>startingSettlerCount</td>
<td>Integer (≥0)</td>
<td>1</td>
<td>Amount of settler units that should be spawned when starting a game in this era (setting this to zero is discouraged [^1])</td>
</tr>
<tr>
<td>startingSettlerUnit</td>
<td>String</td>
<td>"Settler"</td>
<td>Name of the unit that should be used for the previous field. Must be in <a href="../4-Unit-related-JSON-files/#unitsjson">Units.json</a>, or a unit with the "Founds a new city" unique must exist</td>
</tr>
<tr>
<td>startingWorkerCount</td>
<td>Integer (≥0)</td>
<td>0</td>
<td>Amount of worker units that should be spawned when starting a game in this era</td>
</tr>
<tr>
<td>startingWorkerUnit</td>
<td>String</td>
<td>"Worker"</td>
<td>Name of the unit that should be used for the previous field. If startingWorkerCount&gt;0, then it must exist in <a href="../4-Unit-related-JSON-files/#unitsjson">Units.json</a>, or a unit with the "Can build [filter] improvements on tiles" unique must exist</td>
</tr>
<tr>
<td>startingMilitaryUnitCount</td>
<td>Integer (≥0)</td>
<td>1</td>
<td>Amount of military units that should be spawned when starting a game in this era</td>
</tr>
<tr>
<td>startingMilitaryUnit</td>
<td>String</td>
<td>"Warrior"</td>
<td>Name of the unit that should be used for the previous field. Must be in <a href="../4-Unit-related-JSON-files/#unitsjson">Units.json</a></td>
</tr>
<tr>
<td>startingGold</td>
<td>Integer (≥0)</td>
<td>0</td>
<td>Amount of gold each civ should receive when starting a game in this era</td>
</tr>
<tr>
<td>startingCulture</td>
<td>Integer (≥0)</td>
<td>0</td>
<td>Amount of culture each civ should receive when starting a game in this era</td>
</tr>
<tr>
<td>settlerPopulation</td>
<td>Integer (&gt;0)</td>
<td>1</td>
<td>Amount of population each city should have when settled when starting a game in this era</td>
</tr>
<tr>
<td>settlerBuildings</td>
<td>List of Strings</td>
<td>empty</td>
<td>Buildings that should automatically be built whenever a city is settled when starting a game in this era</td>
</tr>
<tr>
<td>startingObsoleteWonders</td>
<td>List of Strings</td>
<td>empty</td>
<td>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</td>
</tr>
<tr>
<td>baseUnitBuyCost</td>
<td>Integer</td>
<td>200</td>
<td>Default value used for the unique <code>Can be purchased with [stat] [cityFilter]</code></td>
</tr>
<tr>
<td>embarkDefense</td>
<td>Integer</td>
<td>3</td>
<td>Default defense for embarked unit in this era</td>
</tr>
<tr>
<td>startPercent</td>
<td>Integer</td>
<td>0</td>
<td>When starting, percentage ([0]%-[100]%) of turns skipped in total turns specified in <a href="#speedsjson">Speed.json</a></td>
</tr>
<tr>
<td>citySound</td>
<td>String</td>
<td>"cityClassical"</td>
<td>Sound used when city is founded in this era</td>
</tr>
</tbody>
</table>
<p>[^1]: Successfully setting startingSettlerCount to zero in a mod (idea: conquer or die) is not easy. Some player-controlled settings require at least one Settler, through any source (see difficulties for other possible settler sources), or you won't be able to start a game: Once City Challenge requires one for all players, and allowing any city-states requires one for those. Would also affect defeat rules.</p>
<h2 id="speedsjson">Speeds.json</h2>
<p><a href="https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&amp;%20Kings/Speeds.json">Link to original</a></p>
<p>This optional file should contain all the speeds you want to use in your mod.</p>
<p>Base ruleset Mods can omit the file or supply an empty list, even though at least one game speed is mandatory, in which case they inherit <a href="https://github.com/yairm210/Unciv/blob/master/android/assets/jsons/Civ%20V%20-%20Vanilla/Speeds.json">the ones from the Vanilla ruleset</a>.</p>
<p>Each speed can have the following attributes:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Required</td>
<td>Name of the speed</td>
</tr>
<tr>
<td>modifier</td>
<td>Float (≥0)</td>
<td>1.0</td>
<td>Overall game speed modifier</td>
</tr>
<tr>
<td>productionCostModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales production cost of units and buildings</td>
</tr>
<tr>
<td>goldCostModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales gold costs</td>
</tr>
<tr>
<td>scienceCostModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales science costs</td>
</tr>
<tr>
<td>cultureCostModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales culture costs</td>
</tr>
<tr>
<td>faithCostModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales faith costs</td>
</tr>
<tr>
<td>improvementBuildLengthModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales the time it takes for a worker to build tile improvements</td>
</tr>
<tr>
<td>barbarianModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales the time between barbarian spawns</td>
</tr>
<tr>
<td>goldGiftModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales the influence gained from gifting gold to city-states</td>
</tr>
<tr>
<td>cityStateTributeScalingInterval</td>
<td>Float (≥0)</td>
<td>6.5</td>
<td>The number of turns it takes for the amount of gold a player demands from city-states to increase by 5 gold</td>
</tr>
<tr>
<td>goldenAgeLengthModifier</td>
<td>Float (≥0)</td>
<td><code>modifier</code> value</td>
<td>Scales the length of golden ages</td>
</tr>
<tr>
<td>religiousPressureAdjacentCity</td>
<td>Integer (≥0)</td>
<td>6</td>
<td>Defines how much religious pressure a city exerts on nearby cities</td>
</tr>
<tr>
<td>peaceDealDuration</td>
<td>Integer (≥0)</td>
<td>10</td>
<td>The number of turns a peace deal lasts</td>
</tr>
<tr>
<td>dealDuration</td>
<td>Integer (≥0)</td>
<td>30</td>
<td>The number of turns a non-peace deal (research agreement, open borders, etc.) lasts</td>
</tr>
<tr>
<td>startYear</td>
<td>Float</td>
<td>-4000</td>
<td>The start year of the game (negative is BC/BCE)</td>
</tr>
<tr>
<td>turns</td>
<td>List</td>
<td>Required</td>
<td>List of time interval per turn, <a href="#time-interval-per-turn">see below</a></td>
</tr>
<tr>
<td>uniques</td>
<td>List of Strings</td>
<td>empty</td>
<td>Will be treated as part of GlobalUniques when this speed is chosen</td>
</tr>
</tbody>
</table>
<h3 id="time-interval-per-turn">Time interval per turn</h3>
<p>The "turns" attribute defines the number of years passing between turns. The attribute consists of a list of objects, each having 2 required attributes: "yearsPerTurn" (Float) and "untilTurn" (Integer)</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>yearsPerTurn</td>
<td>Integer</td>
<td>Required</td>
<td>Number of years passing between turns</td>
</tr>
<tr>
<td>untilTurn</td>
<td>Integer</td>
<td>Required</td>
<td>End of this interval (if it is the last object, see below)</td>
</tr>
</tbody>
</table>
<p>For each row, "yearsPerTurn" is applied up to the "untilTurn"-1 to "untilTurn" step.
The last "untilTurn" in the list is ignored for year calculation, that is, if a game passes that turn number, years continue to increment by the "yearsPerTurn" of the last entry.
However, this is used when starting a game in a later Era: Era.startPercent is relative to the last "untilTurn".</p>
<p>The code below is an example of a valid "turns" definition and it specifies that the first 50 turns of a game last for 60 years each, then the next 30 turns (and any played after the 80th) last for 40 years each.</p>
<div class="highlight"><pre><span></span><code><span class="nt">&quot;turns&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span><span class="nt">&quot;yearsPerTurn&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">60</span><span class="p">,</span><span class="w"> </span><span class="nt">&quot;untilTurn&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">50</span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span><span class="nt">&quot;yearsPerTurn&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">40</span><span class="p">,</span><span class="w"> </span><span class="nt">&quot;untilTurn&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">80</span><span class="p">}</span>
<span class="p">]</span>
</code></pre></div>
<h2 id="eventsjson">Events.json</h2>
<p>Events allow users to choose between options of triggers to activate.</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Required</td>
<td>Used for triggering via "Triggers a [event] event" unique</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td>None</td>
<td>Flavor text displayed to user</td>
</tr>
<tr>
<td>presentation</td>
<td>One of: "None", "Alert", "Floating"</td>
<td>Alert</td>
<td>"Alert" indicates a regular popup, "None" means the choice is made randomly, "Floating" is for tutorial-style indicators</td>
</tr>
<tr>
<td>civilopediaText</td>
<td>List</td>
<td>Optional</td>
<td>See <a href="./#civilopedia-text">civilopediaText chapter</a></td>
</tr>
<tr>
<td>choices</td>
<td>List of EventChoices</td>
<td></td>
<td>User can choose to trigger one of the viable choices</td>
</tr>
</tbody>
</table>
<p>You can use text and/or civilopediaText, if both are present both are shown (but why would you?)</p>
<p>Event choices are comprised of:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>String</td>
<td>Required</td>
<td>Displayed to user as button. Should be an action name - "Do X"</td>
</tr>
<tr>
<td>uniques</td>
<td>List of uniques to trigger or limit conditions</td>
<td>Required</td>
<td>The triggers that this choice activates upon being chosen, and "Unavailable" / "Only available" uniques</td>
</tr>
<tr>
<td>keyShortcut</td>
<td>key to select (name)</td>
<td>none</td>
<td>Key names see <a href="https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/Input.java#L69">Gdx.Input.Keys</a></td>
</tr>
<tr>
<td>civilopediaText</td>
<td>List</td>
<td>Optional</td>
<td>See <a href="./#civilopedia-text">civilopediaText chapter</a></td>
</tr>
</tbody>
</table>
<p>Here, civilopediaText is shown outside the active Button, before the triggeredUniques.</p>
<h2 id="modoptionsjson">ModOptions.json</h2>
<!-- [Link to original](https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&%20Kings/ModOptions.json) -->
<p>This file is a little different:</p>
<ul>
<li>Does not exist in Vanilla ruleset</li>
<li>Is entirely optional but will be created after downloading a mod</li>
</ul>
<p>Note that this file controls <em>declarative mod compatibility</em> (Work in progress) - e.g. there's <a href="../../uniques/#modoptions-uniques">uniques</a> to say your Mod should only or never be used as 'Permanent audiovisual mod'.
Incompatibility filtering works so far between extension and base mods, but feel free to document known extension-to-extension incompatibilities using the same Unique now. Stay tuned!</p>
<p>The file can have the following attributes, not including the values Unciv sets automatically:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>isBaseRuleset</td>
<td>Boolean</td>
<td>false</td>
<td>Replaces vanilla ruleset if true</td>
</tr>
<tr>
<td>uniques</td>
<td>List</td>
<td>empty</td>
<td>Mod-wide specials, <a href="../../uniques/#modoptions-uniques">see here</a></td>
</tr>
<tr>
<td>techsToRemove</td>
<td>List</td>
<td>empty</td>
<td>List of <a href="../2-Civilization-related-JSON-files/#techsjson">Technologies</a> or <a href="../../Unique-parameters#technologyfilter">technologyFilter</a> to remove (isBaseRuleset=false only)</td>
</tr>
<tr>
<td>buildingsToRemove</td>
<td>List</td>
<td>empty</td>
<td>List of <a href="../2-Civilization-related-JSON-files/#buildingsjson">Buildings or Wonders</a> or <a href="../../Unique-parameters#buildingfilter">buildingFilter</a> to remove (isBaseRuleset=false only)</td>
</tr>
<tr>
<td>unitsToRemove</td>
<td>List</td>
<td>empty</td>
<td>List of <a href="../4-Unit-related-JSON-files/#unitsjson">Units</a> or <a href="../../Unique-parameters#baseunitfilter">unitFilter</a> to remove (isBaseRuleset=false only)</td>
</tr>
<tr>
<td>nationsToRemove</td>
<td>List</td>
<td>empty</td>
<td>List of <a href="../2-Civilization-related-JSON-files/#nationsjson">Nations</a> or <a href="../../Unique-parameters#nationfilter">nationFilter</a> to remove (isBaseRuleset=false only)</td>
</tr>
<tr>
<td>policyBranchesToRemove</td>
<td>List</td>
<td>empty</td>
<td>List of <a href="../2-Civilization-related-JSON-files/#policyjson">Policy Branches</a> to remove (isBaseRuleset=false only)</td>
</tr>
<tr>
<td>policiesToRemove</td>
<td>List</td>
<td>empty</td>
<td>List of <a href="../2-Civilization-related-JSON-files/#policiesjson">Policies</a> to remove (isBaseRuleset=false only)</td>
</tr>
<tr>
<td>constants</td>
<td>Object</td>
<td>empty</td>
<td>See <a href="#modconstants">ModConstants</a></td>
</tr>
<tr>
<td>tileset</td>
<td>String</td>
<td>empty</td>
<td>Only applicable for base rulesets</td>
</tr>
<tr>
<td>unitset</td>
<td>String</td>
<td>empty</td>
<td>Only applicable for base rulesets</td>
</tr>
</tbody>
</table>
<p>The values normally set automatically from github metadata are:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th></th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>modUrl</td>
<td>String</td>
<td></td>
<td>The github page the mod was downloaded from, or empty if a freely hosted zip was used</td>
</tr>
<tr>
<td>defaultBranch</td>
<td>String</td>
<td>master</td>
<td>The repo's default branch</td>
</tr>
<tr>
<td>author</td>
<td>String</td>
<td></td>
<td>Repo owner</td>
</tr>
<tr>
<td>lastUpdated</td>
<td>String</td>
<td></td>
<td>ISO date</td>
</tr>
<tr>
<td>modSize</td>
<td>Integer</td>
<td>0</td>
<td>Size in kB</td>
</tr>
<tr>
<td>topics</td>
<td>List</td>
<td>empty</td>
<td>A list of "unciv-mod-*" github topics</td>
</tr>
</tbody>
</table>
<p>To clarify: When your Mod is distributed via github, including these in the Mod repo has no effect.
However, when a Mod is distributed <em>without</em> a github repository, these values can and <em>should</em> be set by the author in the distributed <code>ModOptions.json</code>.</p>
<h3 id="modconstants">ModConstants</h3>
<p>Stored in ModOptions.constants, this is a collection of constants used internally in Unciv.
This is the only structure that is <em>merged</em> field by field from mods, not overwritten, so you can change XP from Barbarians in one mod
and city distance in another. In case of conflicts, there is no guarantee which mod wins, only that <em>default</em> values are ignored.</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>maxXPfromBarbarians</td>
<td>Int</td>
<td>30</td>
<td>[^A]</td>
</tr>
<tr>
<td>cityStrengthBase</td>
<td>Float</td>
<td>8.0</td>
<td>[^B]</td>
</tr>
<tr>
<td>cityStrengthPerPop</td>
<td>Float</td>
<td>0.4</td>
<td>[^B]</td>
</tr>
<tr>
<td>cityStrengthFromTechsMultiplier</td>
<td>Float</td>
<td>5.5</td>
<td>[^B]</td>
</tr>
<tr>
<td>cityStrengthFromTechsExponent</td>
<td>Float</td>
<td>2.8</td>
<td>[^B]</td>
</tr>
<tr>
<td>cityStrengthFromTechsFullMultiplier</td>
<td>Float</td>
<td>1.0</td>
<td>[^B]</td>
</tr>
<tr>
<td>cityStrengthFromGarrison</td>
<td>Float</td>
<td>0.2</td>
<td>[^B]</td>
</tr>
<tr>
<td>baseCityBombardRange</td>
<td>Int</td>
<td>2</td>
<td>[^S]</td>
</tr>
<tr>
<td>cityWorkRange</td>
<td>Int</td>
<td>3</td>
<td>[^T]</td>
</tr>
<tr>
<td>cityExpandRange</td>
<td>Int</td>
<td>5</td>
<td>[^U]</td>
</tr>
<tr>
<td>cityAirUnitCapacity</td>
<td>Int</td>
<td>6</td>
<td>[^W]</td>
</tr>
<tr>
<td>unitSupplyPerPopulation</td>
<td>Float</td>
<td>0.5</td>
<td>[^C]</td>
</tr>
<tr>
<td>minimalCityDistance</td>
<td>Int</td>
<td>3</td>
<td>[^D]</td>
</tr>
<tr>
<td>minimalCityDistanceOnDifferentContinents</td>
<td>Int</td>
<td>2</td>
<td>[^D]</td>
</tr>
<tr>
<td>unitUpgradeCost</td>
<td>Object</td>
<td><a href="#unitupgradecost">See below</a></td>
<td>[^J]</td>
</tr>
<tr>
<td>naturalWonderCountMultiplier</td>
<td>Float</td>
<td>0.124</td>
<td>[^E]</td>
</tr>
<tr>
<td>naturalWonderCountAddedConstant</td>
<td>Float</td>
<td>0.1</td>
<td>[^E]</td>
</tr>
<tr>
<td>ancientRuinCountMultiplier</td>
<td>Float</td>
<td>0.02</td>
<td>[^F]</td>
</tr>
<tr>
<td>spawnIceBelowTemperature</td>
<td>Float</td>
<td>-0.8</td>
<td>[^G]</td>
</tr>
<tr>
<td>maxLakeSize</td>
<td>Int</td>
<td>10</td>
<td>[^H]</td>
</tr>
<tr>
<td>riverCountMultiplier</td>
<td>Float</td>
<td>0.01</td>
<td>[^I]</td>
</tr>
<tr>
<td>minRiverLength</td>
<td>Int</td>
<td>5</td>
<td>[^I]</td>
</tr>
<tr>
<td>maxRiverLength</td>
<td>Int</td>
<td>666</td>
<td>[^I]</td>
</tr>
<tr>
<td>religionLimitBase</td>
<td>Int</td>
<td>1</td>
<td>[^K]</td>
</tr>
<tr>
<td>religionLimitMultiplier</td>
<td>Float</td>
<td>0.5</td>
<td>[^K]</td>
</tr>
<tr>
<td>pantheonBase</td>
<td>Int</td>
<td>10</td>
<td>[^L]</td>
</tr>
<tr>
<td>pantheonGrowth</td>
<td>Int</td>
<td>5</td>
<td>[^L]</td>
</tr>
<tr>
<td>workboatAutomationSearchMaxTiles</td>
<td>Int</td>
<td>20</td>
<td>[^M]</td>
</tr>
<tr>
<td>maxSpyRank</td>
<td>Int</td>
<td>3</td>
<td>[^N]</td>
</tr>
<tr>
<td>spyRankSkillPercentBonus</td>
<td>Float</td>
<td>30</td>
<td>[^O]</td>
</tr>
<tr>
<td>minimumWarDuration</td>
<td>Int</td>
<td>10</td>
<td>[^P]</td>
</tr>
<tr>
<td>baseTurnsUntilRevolt</td>
<td>Int</td>
<td>4</td>
<td>[^Q]</td>
</tr>
<tr>
<td>cityStateElectionTurns</td>
<td>Int</td>
<td>15</td>
<td>[^R]</td>
</tr>
<tr>
<td>maxImprovementTechErasForward</td>
<td>Int</td>
<td>None</td>
<td>[^S]</td>
</tr>
<tr>
<td>goldGiftMultiplier</td>
<td>Float</td>
<td>1</td>
<td>[^T]</td>
</tr>
<tr>
<td>goldGiftTradeMultiplier</td>
<td>Float</td>
<td>0.8</td>
<td>[^U]</td>
</tr>
<tr>
<td>goldGiftDegradationMultiplier</td>
<td>Float</td>
<td>1.0</td>
<td>[^V]</td>
</tr>
</tbody>
</table>
<p>Legend:</p>
<ul>
<li>[^A]: Max amount of experience that can be gained from combat with barbarians</li>
<li>[^B]: Formula for city Strength:
Strength = baseStrength + strengthPerPop + strengthFromTiles +
((%techs * multiplier) ^ exponent) * fullMultiplier +
(garrisonBonus * garrisonUnitStrength * garrisonUnitHealth/100) +
defensiveBuildingStrength
where %techs is the percentage of techs in the tech tree that are complete
If no techs exist in this ruleset, %techs = 0.5 (=50%)</li>
<li>[^S]: The distance that cities can attack</li>
<li>[^T]: The tiles in distance that population in cities can work on. Note: Higher values may lead to performace issues and may cause bugs. cityWorkRange may be greater than cityExpandRange.</li>
<li>[^U]: The distance that cities can expand their borders to. Note: Higher values may lead to performace issues and may cause bugs.</li>
<li>[^C]: Formula for Unit Supply:
Supply = unitSupplyBase (difficulties.json)
unitSupplyPerCity * amountOfCities + (difficulties.json)
unitSupplyPerPopulation * amountOfPopulationInAllCities
unitSupplyBase and unitSupplyPerCity can be found in difficulties.json
unitSupplyBase, unitSupplyPerCity and unitSupplyPerPopulation can also be increased through uniques</li>
<li>[^D]: The minimal distance that must be between any two cities, not counting the tiles cities are on
The number is the amount of tiles between two cities, not counting the tiles the cities are on.
e.g. "C__C", where "C" is a tile with a city and "_" is a tile without a city, has a distance of 2.
First constant is for cities on the same landmass, the second is for cities on different continents.</li>
<li>[^E]: NaturalWonderGenerator uses these to determine the number of Natural Wonders to spawn for a given map size. The number scales linearly with map radius: #wonders = radius * naturalWonderCountMultiplier + naturalWonderCountAddedConstant. The defaults effectively mean Tiny - 1, Small - 2, Medium - 3, Large - 4, Huge - 5, Custom radius &gt;=109 - all G&amp;K wonders.</li>
<li>[^F]: MapGenerator.spreadAncientRuins: number of ruins = suitable tile count * this</li>
<li>[^G]: MapGenerator.spawnIce: spawn Ice where T &lt; this, with T calculated from temperatureExtremeness, latitude and perlin noise.</li>
<li>[^H]: MapGenerator.spawnLakesAndCoasts: Water bodies up to this tile count become Lakes</li>
<li>[^I]: RiverGenerator: river frequency and length bounds</li>
<li>[^J]: A <a href="#unitupgradecost">UnitUpgradeCost</a> sub-structure.</li>
<li>[^K]: Maximum foundable Religions = religionLimitBase + floor(MajorCivCount * religionLimitMultiplier)</li>
<li>[^L]: Cost of pantheon = pantheonBase + CivsWithReligion * pantheonGrowth</li>
<li>[^M]: When the AI decides whether to build a work boat, how many tiles to search from the city center for an improvable tile</li>
<li>[^N]: The maximum rank any spy can reach</li>
<li>[^O]: How much skill bonus each rank gives</li>
<li>[^P]: The number of turns a civ has to wait before negotiating for peace</li>
<li>[^Q]: The number of turns before a revolt is spawned</li>
<li>[^R]: The number of turns between city-state elections</li>
<li>[^S]: If set, the Improvement picker will silently skip improvements whose tech requirement is more advanced than your current Era + this value. Example: With a 0, Trade posts will not show until the Medieval Era, with a 1 they will already show in the CLassical Era.</li>
<li>[^T]: The multiplier of the gold value of a one-sided trade to be stored as gifts.</li>
<li>[^U]: The multiplier of the gold value of a regular trade to be stored as gifts. Set to 0 to disable gold gifting in two-sided trades.</li>
<li>[^U]: Modifies how quickly the GaveUsGifts dimplomacy modifier runs out. A higher value makes it run out quicker. Normally the gifts reduced by ~2.5% per turn depending on the diplomatic relations with the default value.</li>
<li>[^W]: Number of air units that can be stationed in a city, not including carried/transported air units.</li>
</ul>
<h4 id="unitupgradecost">UnitUpgradeCost</h4>
<p>These values are not merged individually, only the entire sub-structure is.</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th></th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>base</td>
<td>Float</td>
<td>10</td>
<td></td>
</tr>
<tr>
<td>perProduction</td>
<td>Float</td>
<td>2</td>
<td></td>
</tr>
<tr>
<td>eraMultiplier</td>
<td>Float</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>exponent</td>
<td>Float</td>
<td>1</td>
<td></td>
</tr>
<tr>
<td>roundTo</td>
<td>Int</td>
<td>5</td>
<td></td>
</tr>
</tbody>
</table>
<p>The formula for the gold cost of a unit upgrade is (rounded down to a multiple of <code>roundTo</code>):
(
max((<code>base</code> + <code>perProduction</code> * (new_unit_cost - old_unit_cost)), 0)
* (1 + eraNumber * <code>eraMultiplier</code>) * <code>civModifier</code>
) ^ <code>exponent</code>
With <code>civModifier</code> being the multiplicative aggregate of <a href="../../uniques/#global-uniques">"[relativeAmount]% Gold cost of upgrading"</a> uniques that apply.</p>
<h2 id="globaluniquesjson">GlobalUniques.json</h2>
<p><a href="https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/GlobalUniques.json">link to original</a></p>
<p>GlobalUniques defines uniques that apply globally. e.g. Vanilla rulesets define the effects of Unhappiness here.</p>
<p>Base ruleset Mods can omit the file, in which case they inherit <a href="https://github.com/yairm210/Unciv/blob/master/android/assets/jsons/Civ%20V%20-%20Vanilla/GlobalUniques.json">the ones from the Vanilla ruleset</a>.
Alternatively, they can supply a file with an empty object (<code>{}</code>), meaning that no global Uniques exist for that Mod.</p>
<p>It has the following structure:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>"GlobalUniques"</td>
<td>The name field is not used, but still must be set (the Ruleset validator might display it).</td>
</tr>
<tr>
<td>uniques</td>
<td>List of Strings</td>
<td>empty</td>
<td>List of <a href="../../uniques/">unique abilities</a> that apply globally</td>
</tr>
<tr>
<td>unitUniques</td>
<td>List of Strings</td>
<td>empty</td>
<td>List of <a href="../../uniques/">unique abilities</a> that applies to each unit</td>
</tr>
</tbody>
</table>
<p>When extension rulesets define GlobalUniques, all uniques are merged. At the moment there is no way to change/remove uniques set by a base mod.</p>
<h2 id="tutorialsjson">Tutorials.json</h2>
<p><a href="https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Tutorials.json">link to original</a></p>
<p><strong>Note a Base Ruleset mod can define a "welcome page" here by adding a "Tutorial" with a name equal to the name of the mod!</strong>
As an exception to the general rule, this file in a Base Ruleset mod will not <em>replace</em> the default, but add to it like extension mods do.
Also, place it under <code>&lt;mod&gt;/jsons/</code> normally even if the original is found one level above the vanilla jsons.</p>
<p>Each tutorial has the following structure:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Required</td>
<td>Entry name</td>
</tr>
<tr>
<td>civilopediaText</td>
<td>List</td>
<td>Optional</td>
<td>See <a href="#civilopedia-text">civilopediaText chapter</a></td>
</tr>
<tr>
<td>steps</td>
<td>List of Strings</td>
<td>Optional</td>
<td>Plain text</td>
</tr>
</tbody>
</table>
<p>If an entry contains both <code>steps</code> and <code>civilopediaText</code> attributes, the <code>civilopediaText</code> is shown first.
Tutorials shown as Popup can show an show an external image (not part of the texture atlases) if there is an image unter ExtraImages (directly under assets or the Mod folder) having the same name.
This is searched for, meaning the mod defining the Tutorial is irrelevant, mods can override builtin ExtraImages, and case sensitivity depends on the OS.</p>
<h2 id="victorytypesjson">VictoryTypes.json</h2>
<p><a href="https://github.com/yairm210/Unciv/tree/master/android/assets/jsons/Civ%20V%20-%20Gods%20&amp;%20Kings/VictoryTypes.json">link to original</a></p>
<p>These files contain which victories this mod provides, and what milestones must be reached for someone to win a victory.
Most of the file contains of strings that are shown to the user in the victory screen, with the rest being the requirements for winning.</p>
<p>Base ruleset Mods can omit the file or supply an empty list, even though at least one victory type is mandatory, in which case they inherit <a href="https://github.com/yairm210/Unciv/blob/master/android/assets/jsons/Civ%20V%20-%20Vanilla/VictoryTypes.json">the ones from the Vanilla ruleset</a>.</p>
<p>Each victory have the following structure:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Required</td>
<td>Name of the victory</td>
</tr>
<tr>
<td>victoryScreenHeader</td>
<td>String</td>
<td>none</td>
<td>Shown in the footer of the victory in the <code>our status</code> in the victory screen</td>
</tr>
<tr>
<td>victoryString</td>
<td>String</td>
<td>none</td>
<td>Shown in the footer of the victory screen when you won the game with this victory</td>
</tr>
<tr>
<td>defeatString</td>
<td>String</td>
<td>none</td>
<td>Shown in the footer of the victory screen when someone else won the game with this victory</td>
</tr>
<tr>
<td>hiddenInVictoryScreen</td>
<td>Boolean</td>
<td>false</td>
<td>Whether progress of this victory is hidden in the victory screen</td>
</tr>
<tr>
<td>requiredSpaceshipParts</td>
<td>List of Strings</td>
<td>empty</td>
<td>What spaceship parts must be added to the capital for the corresponding milestone</td>
</tr>
<tr>
<td>Milestones</td>
<td>List of Strings</td>
<td>Required</td>
<td>List of milestones that must be accomplished to win, <a href="#milestones">see below</a></td>
</tr>
<tr>
<td>civilopediaText</td>
<td>List</td>
<td>Optional</td>
<td>See <a href="./#civilopedia-text">civilopediaText chapter</a></td>
</tr>
</tbody>
</table>
<h3 id="milestones">Milestones</h3>
<p>Currently the following milestones are supported:</p>
<table>
<thead>
<tr>
<th>Milestone</th>
<th>Requirement</th>
</tr>
</thead>
<tbody>
<tr>
<td>Build [building]</td>
<td>Build the building [building] in any city</td>
</tr>
<tr>
<td>Anyone should build [building]</td>
<td>Anyone must build the building [building] for all players to have this milestone</td>
</tr>
<tr>
<td>Add all [comment] in capital</td>
<td>Add all units in the <code>requiredSpaceshipParts</code> field of this victory to the capital</td>
</tr>
<tr>
<td>Destroy all players</td>
<td>You must be the only major civilization with any cities left</td>
</tr>
<tr>
<td>Capture all capitals</td>
<td>Capture all the original capitals of major civilizations in the game</td>
</tr>
<tr>
<td>Complete [amount] Policy branches</td>
<td>Fully complete at least [amount] policy branches</td>
</tr>
<tr>
<td>Win diplomatic vote</td>
<td>At any point in the game win a diplomatic vote (UN). You may lose afterwards and still retain this milestone</td>
</tr>
<tr>
<td>Become the world religion</td>
<td>Have your religion be the majority religion in a majority of cities of all major civs</td>
</tr>
<tr>
<td>Have highest score after max turns</td>
<td>Basically time victory. Enables the 'max turn' slider and calculates score when that amount is reached</td>
</tr>
<tr>
<td>Have more [countable] than each player's [countable]</td>
<td>Have your given <code>countable</code> be more than every other Civilization's <code>countable</code> to achieve this victory. This is useful to simulate a victory similar to the Cultural Victory in Brave New World.</td>
</tr>
</tbody>
</table>
<h2 id="civilopedia-text">Civilopedia text</h2>
<p>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.</p>
<p>An example of the format is:</p>
<div class="highlight"><pre><span></span><code><span class="nt">&quot;civilopediaText&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">&quot;text&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Ancient ruins provide a one-time random bonus when explored&quot;</span><span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nt">&quot;separator&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;text&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;This line is red and links to the Scout including icons&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;link&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Unit/Scout&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;color&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;red&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;text&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;A big fat header sporting a golden star&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;header&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;starred&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;color&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;#ffeb7f&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="p">],</span>
</code></pre></div>
<p>List of attributes - note not all combinations are valid:</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>text</code></td>
<td>String</td>
<td>Text to display</td>
</tr>
<tr>
<td><code>link</code></td>
<td>String</td>
<td>Create link and icon, format: Category/Name or <em>external</em> link ('http://','https://','mailto:')</td>
</tr>
<tr>
<td><code>icon</code></td>
<td>String</td>
<td>Show icon without linking, format: Category/Name</td>
</tr>
<tr>
<td><code>extraImage</code></td>
<td>String</td>
<td>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</td>
</tr>
<tr>
<td><code>imageSize</code></td>
<td>Float</td>
<td>Size in world units of the [extraImage], the smaller coordinate is calculated preserving aspect ratio. available width</td>
</tr>
<tr>
<td><code>header</code></td>
<td>Integer</td>
<td>Header level. 1 means double text size and decreases from there</td>
</tr>
<tr>
<td><code>size</code></td>
<td>Integer</td>
<td>Text size, is 18. Use <code>size</code> or <code>header</code> but not both</td>
</tr>
<tr>
<td><code>indent</code></td>
<td>Integer</td>
<td>Indent level. 0 means text will follow icons, 1 aligns to the right of all icons, each further step is 30 units</td>
</tr>
<tr>
<td><code>padding</code></td>
<td>Float</td>
<td>Vertical padding between rows, 5 units</td>
</tr>
<tr>
<td><code>color</code></td>
<td>String</td>
<td>Sets text color, accepts names or 6/3-digit web colors (e.g. #FFA040)</td>
</tr>
<tr>
<td><code>separator</code></td>
<td>Boolean</td>
<td>Renders a separator line instead of text. Can be combined only with <code>color</code> and <code>size</code> (line width, default 2)</td>
</tr>
<tr>
<td><code>starred</code></td>
<td>Boolean</td>
<td>Decorates text with a star icon - if set, it receives the <code>color</code> instead of the text</td>
</tr>
<tr>
<td><code>centered</code></td>
<td>Boolean</td>
<td>Centers the line (and turns off automatic wrap). For an <code>extraImage</code>, turns on crop-to-content to equalize transparent borders</td>
</tr>
</tbody>
</table>
<p>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.</p>
<p>Note: <code>text</code> now also supports inline color markup. Insert <code>«color»</code> to start coloring text, <code>«»</code> to stop. <code>color</code> can be a name or 6/8-digit hex notation like <code>#ffa040</code> (different from the <code>color</code> attribute notation only by not allowing 3-digit codes, but allowing the alpha channel).
Effectively, the <code>«»</code> markers are replaced with <code>[]</code> <em>after</em> translation and then passed to <a href="https://libgdx.com/wiki/graphics/2d/fonts/color-markup-language">gdx markup language</a>.</p>
<p>Note: Using an ExtraImages folder in a mod was not working until version 4.11.5</p>
<h2 id="rgb-colors-list">RGB colors list</h2>
<p>Certain objects can be specified to have its own unique color. The colors are defined by a list of 3× Integer in this order: red, green, blue. The range of color is from [0, 0, 0] (black) to [255, 255, 255] (white).</p>
<p>Note: The default of some objects are <a href="https://javadoc.io/doc/com.badlogicgames.gdx/gdx/latest/com/badlogic/gdx/graphics/Color.html">gdx color classes</a>. The values of the constants are as follows:</p>
<table>
<thead>
<tr>
<th>name</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td>gold</td>
<td>[225, 215, 0]</td>
</tr>
<tr>
<td>white</td>
<td>[255, 255, 255]</td>
</tr>
<tr>
<td>black</td>
<td>[0, 0, 0]</td>
</tr>
</tbody>
</table>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": [], "search": "../../../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../../../assets/javascripts/bundle.f55a23d4.min.js"></script>
</body>
</html>