Skip to content

Miscellaneous JSON files

Difficulties.json

Link to original

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

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 the ones from the Vanilla ruleset.

Each difficulty level has the following structure:

AttributeTypeDefaultNotes
nameStringRequired
baseHappinessInteger0
extraHappinessPerLuxuryFloat0
researchCostModifierFloat1
unitCostModifierFloat1
unitSupplyBaseInteger5
unitSupplyPerCityInteger2
buildingCostModifierFloat1
policyCostModifierFloat1
unhappinessModifierFloat1
barbarianBonusFloat0
barbarianSpawnDelayInteger0
playerBonusStartingUnitsList of StringsemptyCan also be 'Era Starting Unit', maps to startingMilitaryUnit of the Eras file. All other units must be in Units.json. Applies only to human player civs
aiDifficultyLevelStringemptyApplies some modifiers to the AI from the chosen difficulty. Modifiers such as unhappinessModifier and aiUnhappinessModifier stack multiplicatively. If empty: defaults to "Chieftain", or the first available difficulty.
aiCityGrowthModifierFloat1
aiUnitCostModifierFloat1
aiBuildingCostModifierFloat1
aiWonderCostModifierFloat1
aiBuildingMaintenanceModifierFloat1
aiUnitMaintenanceModifierFloat1
aiUnitSupplyModifierInteger5
aiFreeTechsList of StringsemptyMust be in Techs.json
aiMajorCivBonusStartingUnitsList of StringsemptySame rules as playerBonusStartingUnits, See above. Applies only to AI major civs
aiCityStateBonusStartingUnitsList of StringsemptySame rules as playerBonusStartingUnits, See above. Applies only to city-state civs
aiUnhappinessModifierFloat1
turnBarbariansCanEnterPlayerTilesInteger0
clearBarbarianCampRewardInteger25
uniquesList of StringsemptyWill be treated as part of GlobalUniques when this difficulty is chosen

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:

AttributeTypeDefaultNotes
nameStringRequired
researchAgreementCostInteger (≥0)300Cost of research agreements when the most technologically advanced civ is in this era
iconRGBList of 3× IntegerwhiteRGB color that icons for technologies of this era should have in the Tech screen
startingSettlerCountInteger (≥0)1Amount of settler units that should be spawned when starting a game in this era (setting this to zero is discouraged [^1])
startingSettlerUnitString"Settler"Name of the unit that should be used for the previous field. Must be in Units.json, or a unit with the "Founds a new city" unique must exist
startingWorkerCountInteger (≥0)0Amount of worker units that should be spawned when starting a game in this era
startingWorkerUnitString"Worker"Name of the unit that should be used for the previous field. If startingWorkerCount>0, then it must exist in Units.json, or a unit with the "Can build [filter] improvements on tiles" unique must exist
startingMilitaryUnitCountInteger (≥0)1Amount of military units that should be spawned when starting a game in this era
startingMilitaryUnitString"Warrior"Name of the unit that should be used for the previous field. Must be in Units.json
startingGoldInteger (≥0)0Amount of gold each civ should receive when starting a game in this era
startingCultureInteger (≥0)0Amount of culture each civ should receive when starting a game in this era
settlerPopulationInteger (>0)1Amount of population each city should have when settled when starting a game in this era
settlerBuildingsList of StringsemptyBuildings that should automatically be built whenever a city is settled when starting a game in this era
startingObsoleteWondersList of StringsemptyWonders (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
baseUnitBuyCostInteger200Default value used for the unique Can be purchased with [stat] [cityFilter]
embarkDefenseInteger3Default defense for embarked unit in this era
startPercentInteger0When starting, percentage ([0]%-[100]%) of turns skipped in total turns specified in Speed.json
citySoundString"cityClassical"Sound used when city is founded in this era
uniquesList of StringsemptyWill be treated as part of GlobalUniques when starting in this era

[^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.

Speeds.json

Link to original

This optional file should contain all the speeds you want to use in your mod.

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 the ones from the Vanilla ruleset.

Each speed can have the following attributes:

AttributeTypeDefaultNotes
nameStringRequiredName of the speed
modifierFloat (≥0)1.0Overall game speed modifier
productionCostModifierFloat (≥0)modifier valueScales production cost of units and buildings
goldCostModifierFloat (≥0)modifier valueScales gold costs
scienceCostModifierFloat (≥0)modifier valueScales science costs
cultureCostModifierFloat (≥0)modifier valueScales culture costs
faithCostModifierFloat (≥0)modifier valueScales faith costs
improvementBuildLengthModifierFloat (≥0)modifier valueScales the time it takes for a worker to build tile improvements
barbarianModifierFloat (≥0)modifier valueScales the time between barbarian spawns
goldGiftModifierFloat (≥0)modifier valueScales the influence gained from gifting gold to city-states
cityStateTributeScalingIntervalFloat (≥0)6.5The number of turns it takes for the amount of gold a player demands from city-states to increase by 5 gold
goldenAgeLengthModifierFloat (≥0)modifier valueScales the length of golden ages
religiousPressureAdjacentCityInteger (≥0)6Defines how much religious pressure a city exerts on nearby cities
peaceDealDurationInteger (≥0)10The number of turns a peace deal lasts
dealDurationInteger (≥0)30The number of turns a non-peace deal (research agreement, open borders, etc.) lasts
startYearFloat-4000The start year of the game (negative is BC/BCE)
turnsListRequiredList of time interval per turn, see below
uniquesList of StringsemptyWill be treated as part of GlobalUniques when this speed is chosen

Time interval per turn

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)

AttributeTypeDefaultNotes
yearsPerTurnIntegerRequiredNumber of years passing between turns
untilTurnIntegerRequiredEnd of this interval (if it is the last object, see below)

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

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.

json
"turns": [
    {"yearsPerTurn": 60, "untilTurn":  50},
    {"yearsPerTurn": 40, "untilTurn":  80}
]

Events.json

Events allow users to choose between options of triggers to activate.

AttributeTypeDefaultNotes
nameStringRequiredUsed for triggering via "Triggers a [event] event" unique
textStringNoneFlavor text displayed to user
presentationOne of: "None", "Alert", "Floating"Alert"Alert" indicates a regular popup, "None" means the choice is made randomly, "Floating" is for tutorial-style indicators
civilopediaTextListOptionalSee civilopediaText chapter
choicesList of EventChoicesUser can choose to trigger one of the viable choices

You can use text and/or civilopediaText, if both are present both are shown (but why would you?)

Event choices are comprised of:

AttributeTypeDefaultNotes
textStringRequiredDisplayed to user as button. Should be an action name - "Do X"
uniquesList of uniques to trigger or limit conditionsRequiredThe triggers that this choice activates upon being chosen, and "Unavailable" / "Only available" uniques
keyShortcutkey to select (name)noneKey names see Gdx.Input.Keys
civilopediaTextListOptionalSee civilopediaText chapter

Here, civilopediaText is shown outside the active Button, before the triggeredUniques.

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

Note that this file controls declarative mod compatibility (Work in progress) - e.g. there's uniques 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!

The file can have the following attributes, not including the values Unciv sets automatically:

AttributeTypedefaultNotes
isBaseRulesetBooleanfalseReplaces vanilla ruleset if true
uniquesListemptyMod-wide specials, see here
techsToRemoveListemptyList of Technologies or technologyFilter to remove (isBaseRuleset=false only)
buildingsToRemoveListemptyList of Buildings or Wonders or buildingFilter to remove (isBaseRuleset=false only)
unitsToRemoveListemptyList of Units or unitFilter to remove (isBaseRuleset=false only)
nationsToRemoveListemptyList of Nations or nationFilter to remove (isBaseRuleset=false only)
policyBranchesToRemoveListemptyList of Policy Branches to remove (isBaseRuleset=false only)
policiesToRemoveListemptyList of Policies to remove (isBaseRuleset=false only)
beliefsToRemoveListemptyList of Beliefs to remove (isBaseRuleset=false only)
religionsToRemoveListemptyList of Religions to remove (isBaseRuleset=false only)
constantsObjectemptySee ModConstants
tilesetStringemptyOnly applicable for base rulesets
unitsetStringemptyOnly applicable for base rulesets

The values normally set automatically from github metadata are:

AttributeTypeNotes
modUrlStringThe github page the mod was downloaded from, or empty if a freely hosted zip was used
defaultBranchStringmasterThe repo's default branch
authorStringRepo owner
lastUpdatedStringISO date
modSizeInteger0Size in kB
topicsListemptyA list of "unciv-mod-*" github topics

To clarify: When your Mod is distributed via github, including these in the Mod repo has no effect. However, when a Mod is distributed without a github repository, these values can and should be set by the author in the distributed ModOptions.json.

Version requirements (UncivCN)

Mods can declare a version and compatibility requirements, which are checked with warnings (never blocking) when the mod is used:

AttributeTypeDefaultNotes
modVersionString0.0.1Mod version in n.n.n format; shown in the mod manager and used for dependency version checks
recommendedGameVersionStringemptyThe game version this mod version was made for, exact match (n.n.n, n.n.n.n or -patchN suffix); empty = not declared
modDependenciesListemptyDependency mods, each an object { "name": ..., "recommendedVersion": ... }; recommendedVersion is the exact version the dependency should have (exact match), empty = any version

Example:

json
{
  "modVersion": "0.1.0",
  "recommendedGameVersion": "4.21.7.1",
  "modDependencies": [
    { "name": "UCCC", "recommendedVersion": "1.5.0" },
    { "name": "MyOtherMod", "recommendedVersion": "3.0.0" }
  ]
}

When are warnings shown?

  • Game version: when the current game version does not exactly match recommendedGameVersion, e.g. the mod declares recommendedGameVersion: "4.21.7.1" and the player runs 4.21.7.2 — the mod manager shows the version and the recommended game version right in the installed mod list, a warning mark next to the mod and a yellow warning line in the info pane, the new-game mod selection shows a toast, and the mod checker (Options → Locate mod errors) lists the warning.
  • Dependencies: when a dependency mod is not loaded at all, or its modVersion does not exactly match the declared recommendedVersion.
  • Invalid declarations: typos in the version or range format are also reported, so authors notice and fix them.

In all cases the mod stays usable - warnings never block anything.

recommendedGameVersion says "this mod version was made for game version X" - it shows up directly in the mod manager (e.g. Version 0.1.0 · game 4.21.7.1) and the warning text reads as a recommendation rather than a requirement. Leave it empty when the mod works on all game versions.

Version format details

  • Any number of dot-separated numeric segments is accepted (1, 1.2, 1.2.3, 4.21.5.3), though n.n.n is recommended for modVersion.
  • An optional -patchN suffix is supported and compares as an extra segment: 4.21.5.3 < 4.21.5.3-patch1 < 4.21.5.3-patch2 < 4.21.6.
  • Shorter versions compare as if padded with zeros: 1.2 == 1.2.0.
  • A dependency without a recommendedVersion accepts any version of that mod.

Relation to the ModRequires / ModIncompatibleWith uniques

Unciv already has declarative mod compatibility uniques (ModRequires, ModIncompatibleWith): when they are not satisfied, the mod is not selectable in the mod selection. The version requirements above are a softer, UncivCN-specific layer: unsatisfied requirements only produce warnings. Use ModRequires to say "this mod needs another mod to function", and modDependencies to also recommend a specific version of the dependency.

Good practice

  • Bump modVersion on every release, so dependency version checks stay meaningful.
  • Use recommendedGameVersion to pin the game version a mod version was made for (exact match); leave it empty when the mod works on all game versions.

As an alternative to the *ToRemove lists, you can use Merge Actions with "action": "REMOVE" directly in the corresponding JSON file (e.g. { "name": "Scout", "_mergeAction": { "action": "REMOVE" } } in Units.json). This keeps the removal declaration alongside the data it relates to, and also supports conditions ("if"). Both methods are supported and can be used together.

ModConstants

Stored in ModOptions.constants, this is a collection of constants used internally in Unciv. This is the only structure that is merged 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 default values are ignored.

AttributeTypeDefaultNotes
maxXPfromBarbariansInt30[^A]
cityStrengthBaseFloat8.0[^B]
cityStrengthPerPopFloat0.4[^B]
cityStrengthFromTechsMultiplierFloat5.5[^B]
cityStrengthFromTechsExponentFloat2.8[^B]
cityStrengthFromTechsFullMultiplierFloat1.0[^B]
cityStrengthFromGarrisonFloat0.2[^B]
baseCityBombardRangeInt2[^S]
cityWorkRangeInt3[^T]
cityExpandRangeInt5[^U]
cityAirUnitCapacityInt6[^W]
unitSupplyPerPopulationFloat0.5[^C]
minimalCityDistanceInt3[^D]
minimalCityDistanceOnDifferentContinentsInt2[^D]
unitUpgradeCostObjectSee below[^J]
naturalWonderCountMultiplierFloat0.124[^E]
naturalWonderCountAddedConstantFloat0.1[^E]
ancientRuinCountMultiplierFloat0.02[^F]
spawnIceBelowTemperatureFloat-0.8[^G]
maxLakeSizeInt10[^H]
riverCountMultiplierFloat0.01[^I]
minRiverLengthInt5[^I]
maxRiverLengthInt666[^I]
religionLimitBaseInt1[^K]
religionLimitMultiplierFloat0.5[^K]
pantheonBaseInt10[^L]
pantheonGrowthInt5[^L]
workboatAutomationSearchMaxTilesInt20[^M]
maxSpyRankInt3[^N]
spyRankSkillPercentBonusFloat30[^O]
minimumWarDurationInt10[^P]
baseTurnsUntilRevoltInt4[^Q]
cityStateElectionTurnsInt15[^R]
maxImprovementTechErasForwardIntNone[^S]
goldGiftMultiplierFloat1[^T]
goldGiftTradeMultiplierFloat0.8[^U]
goldGiftDegradationMultiplierFloat1.0[^V]

Legend:

  • [^A]: Max amount of experience that can be gained from combat with barbarians
  • [^B]: Formula for city Strength: Strength = baseStrength + strengthPerPop + strengthFromTiles + ((%techs * multiplier) ^ exponent) * fullMultiplier + (garrisonBonus * garrisonUnitStrength * garrisonUnitHealth/garrisonUnitMaxHealth) + defensiveBuildingStrength where %techs is the percentage of techs in the tech tree that are complete garrisonUnitHealth is the garrisoned unit's current HP and garrisonUnitMaxHealth its max HP (moddable, default 100) - the ratio is its HP percentage If no techs exist in this ruleset, %techs = 0.5 (=50%)
  • [^S]: The distance that cities can attack. Minimum 0.
  • [^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. Minimum 1, maximum 100.
  • [^U]: The distance that cities can expand their borders to. Note: Higher values may lead to performace issues and may cause bugs. Minimum 1, maximum 100.
  • [^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
  • [^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. Minimum 0.
  • [^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 >=109 - all G&K wonders.
  • [^F]: MapGenerator.spreadAncientRuins: number of ruins = suitable tile count * this
  • [^G]: MapGenerator.spawnIce: spawn Ice where T < this, with T calculated from temperatureExtremeness, latitude and perlin noise.
  • [^H]: MapGenerator.spawnLakesAndCoasts: Water bodies up to this tile count become Lakes
  • [^I]: RiverGenerator: river frequency and length bounds
  • [^J]: A UnitUpgradeCost sub-structure.
  • [^K]: Maximum foundable Religions = religionLimitBase + floor(MajorCivCount * religionLimitMultiplier)
  • [^L]: Cost of pantheon = pantheonBase + CivsWithReligion * pantheonGrowth
  • [^M]: When the AI decides whether to build a work boat, how many tiles to search from the city center for an improvable tile
  • [^N]: The maximum rank any spy can reach
  • [^O]: How much skill bonus each rank gives
  • [^P]: The number of turns a civ has to wait before negotiating for peace
  • [^Q]: The number of turns before a revolt is spawned
  • [^R]: The number of turns between city-state elections
  • [^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.
  • [^T]: The multiplier of the gold value of a one-sided trade to be stored as gifts.
  • [^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.
  • [^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.
  • [^W]: Number of air units that can be stationed in a city, not including carried/transported air units.

UnitUpgradeCost

These values are not merged individually, only the entire sub-structure is.

AttributeTypeNotes
baseFloat10
perProductionFloat2
eraMultiplierFloat0
exponentFloat1
roundToInt5

The formula for the gold cost of a unit upgrade is (rounded down to a multiple of roundTo): ( max((base + perProduction * (new_unit_cost - old_unit_cost)), 0) * (1 + eraNumber * eraMultiplier) * civModifier ) ^ exponent With civModifier being the multiplicative aggregate of "[relativeAmount]% Gold cost of upgrading" uniques that apply.

GlobalUniques.json

link to original

GlobalUniques defines uniques that apply globally. e.g. Vanilla rulesets define the effects of Unhappiness here.

Base ruleset Mods can omit the file, in which case they inherit the ones from the Vanilla ruleset. Alternatively, they can supply a file with an empty object ({}), meaning that no global Uniques exist for that Mod.

It has the following structure:

AttributeTypeDefaultNotes
nameString"GlobalUniques"The name field is not used, but still must be set (the Ruleset validator might display it).
uniquesList of StringsemptyList of unique abilities that apply globally
unitUniquesList of StringsemptyList of unique abilities that applies to each unit

When extension rulesets define GlobalUniques, all uniques are merged. To change or remove uniques (or any other fields) set by another mod or base ruleset, use Merge Actions — e.g., TRY_INJECT for field-level modifications or REMOVE_FIELD to delete specific uniques.

Tutorials.json

link to original

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! As an exception to the general rule, this file in a Base Ruleset mod will not replace the default, but add to it like extension mods do. Also, place it under <mod>/jsons/ normally even if the original is found one level above the vanilla jsons.

Each tutorial has the following structure:

AttributeTypeDefaultNotes
nameStringRequiredEntry name
categoryStringOptionalThe category where this tutorial will be displayed. "Tutorials" is the default.
civilopediaTextListOptionalSee civilopediaText chapter
stepsList of StringsOptionalPlain text

If an entry contains both steps and civilopediaText attributes, the civilopediaText 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.

VictoryTypes.json

link to original

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.

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 the ones from the Vanilla ruleset.

Each victory have the following structure:

AttributeTypeDefaultNotes
nameStringRequiredName of the victory
victoryScreenHeaderStringnoneShown in the footer of the victory in the our status in the victory screen
victoryStringStringnoneShown in the footer of the victory screen when you won the game with this victory
defeatStringStringnoneShown in the footer of the victory screen when someone else won the game with this victory
hiddenInVictoryScreenBooleanfalseWhether progress of this victory is hidden in the victory screen
requiredSpaceshipPartsList of StringsemptyWhat spaceship parts must be added to the capital for the corresponding milestone
MilestonesList of StringsRequiredList of milestones that must be accomplished to win, see below
civilopediaTextListOptionalSee civilopediaText chapter

Milestones

Currently the following milestones are supported:

MilestoneRequirement
Build [building]Build the building [building] in any city
Anyone should build [building]Anyone must build the building [building] for all players to have this milestone
Add all [comment] in capitalAdd all units in the requiredSpaceshipParts field of this victory to the capital
Destroy all playersYou must be the only major civilization with any cities left
Capture all capitalsCapture all the original capitals of major civilizations in the game
Complete [amount] Policy branchesFully complete at least [amount] policy branches
Win diplomatic voteAt any point in the game win a diplomatic vote (UN). You may lose afterwards and still retain this milestone
Become the world religionHave your religion be the majority religion in a majority of cities of all major civs
Have highest score after max turnsBasically time victory. Enables the 'max turn' slider and calculates score when that amount is reached
Have more [countable] than each player's [countable]Have your given countable be more than every other Civilization's countable to achieve this victory. This is useful to simulate a victory similar to the Cultural Victory in Brave New World.

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:

json
"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:

AttributeTypeDescription
textStringText to display
linkStringCreate link and icon, format: Category/Name or external link ('http://','https://','mailto:')
iconStringShow icon without linking, format: Category/Name
extraImageStringDisplay 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
imageSizeFloatSize in world units of the [extraImage], the smaller coordinate is calculated preserving aspect ratio. available width
headerIntegerHeader level. 1 means double text size and decreases from there
sizeIntegerText size, is 18. Use size or header but not both
indentIntegerIndent level. 0 means text will follow icons, 1 aligns to the right of all icons, each further step is 30 units
paddingFloatVertical padding between rows, 5 units
colorStringSets text color, accepts names or 6/3-digit web colors (e.g. #FFA040)
separatorBooleanRenders a separator line instead of text. Can be combined only with color and size (line width, default 2)
starredBooleanDecorates text with a star icon - if set, it receives the color instead of the text
centeredBooleanCenters the line (and turns off automatic wrap). For an extraImage, turns on crop-to-content to equalize transparent borders
iconCrossedBooleanPaint a red X over the icon or link image

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.

Note: text now also supports inline color markup. Insert «color» to start coloring text, «» to stop. color can be a name or 6/8-digit hex notation like #ffa040 (different from the color attribute notation only by not allowing 3-digit codes, but allowing the alpha channel). Effectively, the «» markers are replaced with [] after translation and then passed to gdx markup language.

Note: Using an ExtraImages folder in a mod was not working until version 4.11.5

RGB colors list

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

Note: The default of some objects are gdx color classes. The values of the constants are as follows:

namevalue
gold[225, 215, 0]
white[255, 255, 255]
black[0, 0, 0]