Removed legacy tileset code (#7658)

* Removed legacy tileset code

which was only used for the "Default" tileset

* Updated "Default" tileset to support new rendering

* Updated docs

* Fixed fogOfWar coloring bug

* Removed cityImage variable completely

* Renamed variable out to baseHexagon

* Moved color lerp out of for loop

* Renamed "Default" tileset to "Minimal"

* Made "HexaRealm" the games fallback tileset

* Implemented requested changes

* Readded accidentally removed variable

* Reverted updateTileImage back to foreach loop

Since indices are not needed anymore

* Regenerated game.atlas and game.png
This commit is contained in:
Leonard Günther
2022-08-22 13:02:52 +02:00
committed by GitHub
parent 86834de82a
commit 18ef8fc20e
67 changed files with 315 additions and 342 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

View File

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

View File

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 843 B

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

View File

Before

Width:  |  Height:  |  Size: 841 B

After

Width:  |  Height:  |  Size: 841 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 756 B

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 392 B

View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

View File

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 389 B

View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

View File

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 387 B

View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

View File

@ -104,7 +104,7 @@ ImprovementIcons/City center
index: -1 index: -1
ImprovementIcons/City ruins ImprovementIcons/City ruins
rotate: false rotate: false
xy: 4, 182 xy: 1470, 1944
size: 100, 100 size: 100, 100
orig: 100, 100 orig: 100, 100
offset: 0, 0 offset: 0, 0
@ -228,7 +228,7 @@ ImprovementIcons/Railroad
orig: 100, 100 orig: 100, 100
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Railroad TileSets/Minimal/Railroad
rotate: false rotate: false
xy: 1149, 1404 xy: 1149, 1404
size: 100, 100 size: 100, 100
@ -396,14 +396,14 @@ OtherIcons/Hexagon
orig: 277, 240 orig: 277, 240
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Hexagon TileSets/FantasyHex/Hexagon
rotate: false rotate: false
xy: 4, 1584 xy: 4, 1584
size: 277, 240 size: 277, 240
orig: 277, 240 orig: 277, 240
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Hexagon TileSets/Minimal/Hexagon
rotate: false rotate: false
xy: 4, 1584 xy: 4, 1584
size: 277, 240 size: 277, 240
@ -986,7 +986,7 @@ StatIcons/Acquire
index: -1 index: -1
StatIcons/CityConnection StatIcons/CityConnection
rotate: false rotate: false
xy: 1470, 1944 xy: 4, 74
size: 100, 100 size: 100, 100
orig: 100, 100 orig: 100, 100
offset: 0, 0 offset: 0, 0
@ -1103,34 +1103,6 @@ StatIcons/Strength
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Arrows/CityHasAttacked
rotate: false
xy: 482, 1876
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/Default/Arrows/UnitHasAttacked
rotate: false
xy: 482, 1876
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/FantasyHex/Arrows/UnitHasAttacked
rotate: false
xy: 482, 1876
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/Default/Arrows/Generic
rotate: false
xy: 4, 6
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/FantasyHex/Arrows/Generic TileSets/FantasyHex/Arrows/Generic
rotate: false rotate: false
xy: 4, 6 xy: 4, 6
@ -1138,9 +1110,9 @@ TileSets/FantasyHex/Arrows/Generic
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Arrows/UnitAttacked TileSets/Minimal/Arrows/Generic
rotate: false rotate: false
xy: 190, 1164 xy: 4, 6
size: 100, 60 size: 100, 60
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
@ -1152,9 +1124,9 @@ TileSets/FantasyHex/Arrows/UnitAttacked
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Arrows/UnitMoved TileSets/Minimal/Arrows/UnitAttacked
rotate: false rotate: false
xy: 298, 1150 xy: 190, 1164
size: 100, 60 size: 100, 60
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
@ -1166,9 +1138,9 @@ TileSets/FantasyHex/Arrows/UnitMoved
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Arrows/UnitMoving TileSets/Minimal/Arrows/UnitMoved
rotate: false rotate: false
xy: 112, 6 xy: 298, 1150
size: 100, 60 size: 100, 60
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
@ -1180,9 +1152,9 @@ TileSets/FantasyHex/Arrows/UnitMoving
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Arrows/UnitTeleported TileSets/Minimal/Arrows/UnitMoving
rotate: false rotate: false
xy: 1270, 1228 xy: 112, 6
size: 100, 60 size: 100, 60
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
@ -1194,9 +1166,9 @@ TileSets/FantasyHex/Arrows/UnitTeleported
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Arrows/UnitWithdrew TileSets/Minimal/Arrows/UnitTeleported
rotate: false rotate: false
xy: 1378, 1228 xy: 1270, 1228
size: 100, 60 size: 100, 60
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
@ -1208,18 +1180,11 @@ TileSets/FantasyHex/Arrows/UnitWithdrew
orig: 100, 60 orig: 100, 60
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/AtollOverlay TileSets/Minimal/Arrows/UnitWithdrew
rotate: false rotate: false
xy: 822, 1944 xy: 1378, 1228
size: 100, 100 size: 100, 60
orig: 100, 100 orig: 100, 60
offset: 0, 0
index: -1
TileSets/Default/Borders/ConcaveConvexInner
rotate: false
xy: 406, 1411
size: 81, 15
orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Borders/ConcaveConvexInner TileSets/FantasyHex/Borders/ConcaveConvexInner
@ -1229,9 +1194,9 @@ TileSets/FantasyHex/Borders/ConcaveConvexInner
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConcaveConvexOuter TileSets/Minimal/Borders/ConcaveConvexInner
rotate: false rotate: false
xy: 406, 1165 xy: 406, 1411
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1243,9 +1208,9 @@ TileSets/FantasyHex/Borders/ConcaveConvexOuter
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConcaveInner TileSets/Minimal/Borders/ConcaveConvexOuter
rotate: false rotate: false
xy: 1378, 1205 xy: 406, 1165
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1257,9 +1222,9 @@ TileSets/FantasyHex/Borders/ConcaveInner
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConcaveOuter TileSets/Minimal/Borders/ConcaveInner
rotate: false rotate: false
xy: 495, 1165 xy: 1378, 1205
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1271,9 +1236,9 @@ TileSets/FantasyHex/Borders/ConcaveOuter
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConvexConcaveInner TileSets/Minimal/Borders/ConcaveOuter
rotate: false rotate: false
xy: 1378, 1182 xy: 495, 1165
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1285,9 +1250,9 @@ TileSets/FantasyHex/Borders/ConvexConcaveInner
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConvexConcaveOuter TileSets/Minimal/Borders/ConvexConcaveInner
rotate: false rotate: false
xy: 584, 1165 xy: 1378, 1182
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1299,9 +1264,9 @@ TileSets/FantasyHex/Borders/ConvexConcaveOuter
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConvexInner TileSets/Minimal/Borders/ConvexConcaveOuter
rotate: false rotate: false
xy: 1378, 1159 xy: 584, 1165
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1313,9 +1278,9 @@ TileSets/FantasyHex/Borders/ConvexInner
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/Borders/ConvexOuter TileSets/Minimal/Borders/ConvexInner
rotate: false rotate: false
xy: 673, 1165 xy: 1378, 1159
size: 81, 15 size: 81, 15
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
@ -1327,18 +1292,11 @@ TileSets/FantasyHex/Borders/ConvexOuter
orig: 81, 15 orig: 81, 15
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/CityOverlay TileSets/Minimal/Borders/ConvexOuter
rotate: false rotate: false
xy: 4, 74 xy: 673, 1165
size: 100, 100 size: 81, 15
orig: 100, 100 orig: 81, 15
offset: 0, 0
index: -1
TileSets/Default/Crosshair
rotate: false
xy: 482, 1944
size: 116, 100
orig: 116, 100
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Crosshair TileSets/FantasyHex/Crosshair
@ -1348,11 +1306,11 @@ TileSets/FantasyHex/Crosshair
orig: 116, 100 orig: 116, 100
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/CrosshatchHexagon TileSets/Minimal/Crosshair
rotate: false rotate: false
xy: 4, 1340 xy: 482, 1944
size: 273, 236 size: 116, 100
orig: 273, 236 orig: 116, 100
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/CrosshatchHexagon TileSets/FantasyHex/CrosshatchHexagon
@ -1362,32 +1320,11 @@ TileSets/FantasyHex/CrosshatchHexagon
orig: 273, 236 orig: 273, 236
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/FalloutOverlay TileSets/Minimal/CrosshatchHexagon
rotate: false rotate: false
xy: 698, 1836 xy: 4, 1340
size: 100, 100 size: 273, 236
orig: 100, 100 orig: 273, 236
offset: 0, 0
index: -1
TileSets/Default/Flood plainsOverlay
rotate: false
xy: 1238, 1836
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/ForestOverlay
rotate: false
xy: 1454, 1836
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/Highlight
rotate: false
xy: 4, 1832
size: 284, 212
orig: 284, 212
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Highlight TileSets/FantasyHex/Highlight
@ -1397,88 +1334,11 @@ TileSets/FantasyHex/Highlight
orig: 284, 212 orig: 284, 212
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Default/HillOverlay TileSets/Minimal/Highlight
rotate: false rotate: false
xy: 698, 1728 xy: 4, 1832
size: 100, 100 size: 284, 212
orig: 100, 100 orig: 284, 212
offset: 0, 0
index: -1
TileSets/Default/IceOverlay
rotate: false
xy: 1022, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/JungleOverlay
rotate: false
xy: 1562, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/LakesOverlay
rotate: false
xy: 1670, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/MarshOverlay
rotate: false
xy: 613, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/MountainOverlay
rotate: false
xy: 1369, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/NaturalWonderOverlay
rotate: false
xy: 1585, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/OasisOverlay
rotate: false
xy: 1909, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/Road
rotate: false
xy: 404, 1775
size: 61, 11
orig: 61, 11
offset: 0, 0
index: -1
TileSets/Default/Tiles/River-Bottom
rotate: false
xy: 1550, 1008
size: 32, 28
orig: 32, 28
offset: 0, 0
index: -1
TileSets/Default/Tiles/River-BottomLeft
rotate: false
xy: 1550, 972
size: 32, 28
orig: 32, 28
offset: 0, 0
index: -1
TileSets/Default/Tiles/River-BottomRight
rotate: false
xy: 1590, 972
size: 32, 28
orig: 32, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Railroad TileSets/FantasyHex/Railroad
@ -2358,21 +2218,21 @@ TileSets/FantasyHex/Tiles/Quarry+Stone
index: -1 index: -1
TileSets/FantasyHex/Tiles/River-Bottom TileSets/FantasyHex/Tiles/River-Bottom
rotate: false rotate: false
xy: 1590, 1008 xy: 1550, 1008
size: 32, 28 size: 32, 28
orig: 32, 28 orig: 32, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Tiles/River-BottomLeft TileSets/FantasyHex/Tiles/River-BottomLeft
rotate: false rotate: false
xy: 1550, 936 xy: 1550, 972
size: 32, 28 size: 32, 28
orig: 32, 28 orig: 32, 28
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/FantasyHex/Tiles/River-BottomRight TileSets/FantasyHex/Tiles/River-BottomRight
rotate: false rotate: false
xy: 1550, 900 xy: 1590, 972
size: 32, 28 size: 32, 28
orig: 32, 28 orig: 32, 28
offset: 0, 0 offset: 0, 0
@ -5513,3 +5373,143 @@ TileSets/HexaRealm/Tiles/Wine+Plantation
orig: 64, 56 orig: 64, 56
offset: 0, 0 offset: 0, 0
index: -1 index: -1
TileSets/Minimal/Arrows/CityHasAttacked
rotate: false
xy: 482, 1876
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/FantasyHex/Arrows/UnitHasAttacked
rotate: false
xy: 482, 1876
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/Minimal/Arrows/UnitHasAttacked
rotate: false
xy: 482, 1876
size: 100, 60
orig: 100, 60
offset: 0, 0
index: -1
TileSets/Minimal/Road
rotate: false
xy: 404, 1775
size: 61, 11
orig: 61, 11
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Atoll
rotate: false
xy: 822, 1944
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/City center
rotate: false
xy: 4, 182
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Fallout
rotate: false
xy: 698, 1836
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Flood plains
rotate: false
xy: 1238, 1836
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Forest
rotate: false
xy: 1454, 1836
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Hill
rotate: false
xy: 698, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Ice
rotate: false
xy: 1022, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Jungle
rotate: false
xy: 1562, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Lakes
rotate: false
xy: 1670, 1728
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Marsh
rotate: false
xy: 613, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Mountain
rotate: false
xy: 1369, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/NaturalWonder
rotate: false
xy: 1585, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/Oasis
rotate: false
xy: 1909, 1620
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/River-Bottom
rotate: false
xy: 1590, 1008
size: 32, 28
orig: 32, 28
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/River-BottomLeft
rotate: false
xy: 1550, 936
size: 32, 28
orig: 32, 28
offset: 0, 0
index: -1
TileSets/Minimal/Tiles/River-BottomRight
rotate: false
xy: 1550, 900
size: 32, 28
orig: 32, 28
offset: 0, 0
index: -1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -1,3 +0,0 @@
{
"fallbackTileSet": null,
}

View File

@ -0,0 +1,20 @@
{
"useColorAsBaseTerrain": "true",
"useSummaryImages": "true",
"fallbackTileSet": null,
"tileScales": {
"Atoll":0.35,
"City center":0.7,
"Faulout":0.35,
"Flood plains":0.35,
"Forest":0.35,
"Hill":0.35,
"Ice":0.35,
"Jungle":0.35,
"Lakes":0.35,
"Marsh":0.35,
"Mountain":0.5,
"NaturalWonder":0.5,
"Oasis":0.35
}
}

View File

@ -79,6 +79,8 @@ object Constants {
const val dropboxMultiplayerServer = "Dropbox" const val dropboxMultiplayerServer = "Dropbox"
const val defaultTileset = "HexaRealm"
/** /**
* Use this to determine whether a [MapUnit][com.unciv.logic.map.MapUnit]'s movement is exhausted * Use this to determine whether a [MapUnit][com.unciv.logic.map.MapUnit]'s movement is exhausted
* (currentMovement <= this) if and only if a fuzzy comparison is needed to account for Float rounding errors. * (currentMovement <= this) if and only if a fuzzy comparison is needed to account for Float rounding errors.

View File

@ -126,7 +126,7 @@ class UncivGame(parameters: UncivGameParameters) : Game() {
ImageGetter.resetAtlases() ImageGetter.resetAtlases()
ImageGetter.setNewRuleset(ImageGetter.ruleset) // This needs to come after the settings, since we may have default visual mods ImageGetter.setNewRuleset(ImageGetter.ruleset) // This needs to come after the settings, since we may have default visual mods
if (settings.tileSet !in ImageGetter.getAvailableTilesets()) { // If one of the tilesets is no longer available, default back if (settings.tileSet !in ImageGetter.getAvailableTilesets()) { // If one of the tilesets is no longer available, default back
settings.tileSet = "FantasyHex" settings.tileSet = Constants.defaultTileset
} }
BaseScreen.setSkin() // needs to come AFTER the Texture reset, since the buttons depend on it BaseScreen.setSkin() // needs to come AFTER the Texture reset, since the buttons depend on it

View File

@ -37,7 +37,7 @@ class GameSettings {
var pauseBetweenTracks = 10 var pauseBetweenTracks = 10
var turnsBetweenAutosaves = 1 var turnsBetweenAutosaves = 1
var tileSet: String = "HexaRealm" var tileSet: String = Constants.defaultTileset
var showTutorials: Boolean = true var showTutorials: Boolean = true
var autoAssignCityProduction: Boolean = true var autoAssignCityProduction: Boolean = true
var autoBuildingRoads: Boolean = true var autoBuildingRoads: Boolean = true

View File

@ -3,31 +3,39 @@ package com.unciv.models.tilesets
import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Color
class TileSetConfig { class TileSetConfig {
var useColorAsBaseTerrain = true var useColorAsBaseTerrain = false
var useSummaryImages = false
var unexploredTileColor: Color = Color.DARK_GRAY var unexploredTileColor: Color = Color.DARK_GRAY
var fogOfWarColor: Color = Color.BLACK var fogOfWarColor: Color = Color.BLACK
/** Name of the tileset to use when this one is missing images. Null to disable. */ /** Name of the tileset to use when this one is missing images. Null to disable. */
var fallbackTileSet: String? = "FantasyHex" var fallbackTileSet: String? = "FantasyHex"
/** Scale factor for hex images, with hex center as origin. */ /** Scale factor for hex images, with hex center as origin. */
var tileScale: Float = 1f var tileScale: Float = 1f
var tileScales: HashMap<String, Float> = HashMap()
var ruleVariants: HashMap<String, Array<String>> = HashMap() var ruleVariants: HashMap<String, Array<String>> = HashMap()
fun clone(): TileSetConfig { fun clone(): TileSetConfig {
val toReturn = TileSetConfig() val toReturn = TileSetConfig()
toReturn.useColorAsBaseTerrain = useColorAsBaseTerrain toReturn.useColorAsBaseTerrain = useColorAsBaseTerrain
toReturn.useSummaryImages = useSummaryImages
toReturn.unexploredTileColor = unexploredTileColor toReturn.unexploredTileColor = unexploredTileColor
toReturn.fogOfWarColor = fogOfWarColor toReturn.fogOfWarColor = fogOfWarColor
toReturn.fallbackTileSet = fallbackTileSet toReturn.fallbackTileSet = fallbackTileSet
toReturn.tileScale = tileScale toReturn.tileScale = tileScale
toReturn.tileScales = tileScales
toReturn.ruleVariants.putAll(ruleVariants.map { Pair(it.key, it.value.clone()) }) toReturn.ruleVariants.putAll(ruleVariants.map { Pair(it.key, it.value.clone()) })
return toReturn return toReturn
} }
fun updateConfig(other: TileSetConfig) { fun updateConfig(other: TileSetConfig) {
useColorAsBaseTerrain = other.useColorAsBaseTerrain useColorAsBaseTerrain = other.useColorAsBaseTerrain
useSummaryImages = other.useSummaryImages
unexploredTileColor = other.unexploredTileColor unexploredTileColor = other.unexploredTileColor
fogOfWarColor = other.fogOfWarColor fogOfWarColor = other.fogOfWarColor
fallbackTileSet = other.fallbackTileSet fallbackTileSet = other.fallbackTileSet
for ((tileString, scale) in other.tileScales){
tileScales[tileString] = scale
}
for ((tileSetString, renderOrder) in other.ruleVariants){ for ((tileSetString, renderOrder) in other.ruleVariants){
ruleVariants[tileSetString] = renderOrder ruleVariants[tileSetString] = renderOrder
} }

View File

@ -73,7 +73,6 @@ class CityTileGroup(private val city: CityInfo, tileInfo: TileInfo, tileSetStrin
terrainFeatureLayerGroup.color.a = 0.5f terrainFeatureLayerGroup.color.a = 0.5f
icons.improvementIcon?.setColor(1f, 1f, 1f, 0.5f) icons.improvementIcon?.setColor(1f, 1f, 1f, 0.5f)
resourceImage?.setColor(1f, 1f, 1f, 0.5f) resourceImage?.setColor(1f, 1f, 1f, 0.5f)
cityImage?.setColor(1f, 1f, 1f, 0.5f)
icons.civilianUnitIcon?.setColor(1f, 1f, 1f, 0.5f) icons.civilianUnitIcon?.setColor(1f, 1f, 1f, 0.5f)
icons.militaryUnitIcon?.setColor(1f, 1f, 1f, 0.5f) icons.militaryUnitIcon?.setColor(1f, 1f, 1f, 0.5f)
updatePopulationIcon() updatePopulationIcon()

View File

@ -19,7 +19,6 @@ import com.unciv.models.helpers.TintedMapArrow
import com.unciv.models.helpers.UnitMovementMemoryType import com.unciv.models.helpers.UnitMovementMemoryType
import com.unciv.ui.cityscreen.YieldGroup import com.unciv.ui.cityscreen.YieldGroup
import com.unciv.ui.images.ImageGetter import com.unciv.ui.images.ImageGetter
import com.unciv.ui.utils.extensions.center
import kotlin.math.PI import kotlin.math.PI
import kotlin.math.atan import kotlin.math.atan
import kotlin.math.atan2 import kotlin.math.atan2
@ -62,19 +61,9 @@ open class TileGroup(
/** List of image locations comprising the layers so we don't need to change images all the time */ /** List of image locations comprising the layers so we don't need to change images all the time */
private var tileImageIdentifiers = listOf<String>() private var tileImageIdentifiers = listOf<String>()
// This is for OLD tiles - the "mountain" symbol on mountains for instance
private var baseTerrainOverlayImage: Image? = null
private var baseTerrain: String = ""
class TerrainFeatureLayerGroupClass(groupSize: Float) : ActionlessGroup(groupSize) class TerrainFeatureLayerGroupClass(groupSize: Float) : ActionlessGroup(groupSize)
val terrainFeatureLayerGroup = TerrainFeatureLayerGroupClass(groupSize) val terrainFeatureLayerGroup = TerrainFeatureLayerGroupClass(groupSize)
// These are for OLD tiles - for instance the "forest" symbol on the forest
private var terrainFeatureOverlayImage: Image? = null
private val terrainFeatures: ArrayList<String> = ArrayList()
protected var cityImage: Image? = null
private var naturalWonderImage: Image? = null
private var pixelMilitaryUnitImageLocation = "" private var pixelMilitaryUnitImageLocation = ""
var pixelMilitaryUnitGroup = ActionlessGroup(groupSize) var pixelMilitaryUnitGroup = ActionlessGroup(groupSize)
private var pixelCivilianUnitImageLocation = "" private var pixelCivilianUnitImageLocation = ""
@ -241,7 +230,14 @@ open class TileGroup(
private fun getTileBaseImageLocations(viewingCiv: CivilizationInfo?): List<String> { private fun getTileBaseImageLocations(viewingCiv: CivilizationInfo?): List<String> {
if (viewingCiv == null && !showEntireMap) return tileSetStrings.hexagonList if (viewingCiv == null && !showEntireMap) return tileSetStrings.hexagonList
if (tileInfo.naturalWonder != null) return listOf(tileSetStrings.orFallback { getTile(tileInfo.naturalWonder!!) })
val baseHexagon = if (tileSetStrings.tileSetConfig.useColorAsBaseTerrain)
listOf(tileSetStrings.hexagon)
else listOf()
if (tileInfo.naturalWonder != null)
return if (tileSetStrings.tileSetConfig.useSummaryImages) baseHexagon + tileSetStrings.naturalWonder
else baseHexagon + tileSetStrings.orFallback{ getTile(tileInfo.naturalWonder!!) }
val shownImprovement = tileInfo.getShownImprovement(viewingCiv) val shownImprovement = tileInfo.getShownImprovement(viewingCiv)
val shouldShowImprovement = shownImprovement != null && UncivGame.Current.settings.showPixelImprovements val shouldShowImprovement = shownImprovement != null && UncivGame.Current.settings.showPixelImprovements
@ -259,9 +255,9 @@ open class TileGroup(
val allTogetherLocation = tileSetStrings.getTile(allTogether) val allTogetherLocation = tileSetStrings.getTile(allTogether)
return when { return when {
tileSetStrings.tileSetConfig.ruleVariants[allTogether] != null -> tileSetStrings.tileSetConfig.ruleVariants[allTogether]!!.map { tileSetStrings.getTile(it) } tileSetStrings.tileSetConfig.ruleVariants[allTogether] != null -> baseHexagon + tileSetStrings.tileSetConfig.ruleVariants[allTogether]!!.map { tileSetStrings.getTile(it) }
ImageGetter.imageExists(allTogetherLocation) -> listOf(allTogetherLocation) ImageGetter.imageExists(allTogetherLocation) -> baseHexagon + allTogetherLocation
else -> getTerrainImageLocations(terrainImages) + getImprovementAndResourceImages(resourceAndImprovementSequence) else -> baseHexagon + getTerrainImageLocations(terrainImages) + getImprovementAndResourceImages(resourceAndImprovementSequence)
} }
} }
@ -280,14 +276,18 @@ open class TileGroup(
else resourceAndImprovementSequence.map { tileSetStrings.orFallback { getTile(it) } }.toList() else resourceAndImprovementSequence.map { tileSetStrings.orFallback { getTile(it) } }.toList()
} }
/** Used for: Underlying tile, unit overlays, border images, perhaps for other things in the future. /**
Parent should already be set when calling. */ * Used for: Underlying tile, unit overlays, border images, perhaps for other things in the future.
private fun setHexagonImageSize(hexagonImage: Image) { * Parent should already be set when calling.
*
* Uses tileSetStrings.tileSetConfig.tileScale as default if scale is null
*/
private fun setHexagonImageSize(hexagonImage: Image, scale: Float? = null) {
hexagonImage.setSize(hexagonImageWidth, hexagonImage.height * hexagonImageWidth / hexagonImage.width) hexagonImage.setSize(hexagonImageWidth, hexagonImage.height * hexagonImageWidth / hexagonImage.width)
hexagonImage.setOrigin(hexagonImageOrigin.first, hexagonImageOrigin.second) hexagonImage.setOrigin(hexagonImageOrigin.first, hexagonImageOrigin.second)
hexagonImage.x = hexagonImagePosition.first hexagonImage.x = hexagonImagePosition.first
hexagonImage.y = hexagonImagePosition.second hexagonImage.y = hexagonImagePosition.second
hexagonImage.setScale(tileSetStrings.tileSetConfig.tileScale) hexagonImage.setScale(scale ?: tileSetStrings.tileSetConfig.tileScale)
} }
private fun updateTileImage(viewingCiv: CivilizationInfo?) { private fun updateTileImage(viewingCiv: CivilizationInfo?) {
@ -299,9 +299,9 @@ open class TileGroup(
} }
tileImageIdentifiers = tileBaseImageLocations tileImageIdentifiers = tileBaseImageLocations
for (image in tileBaseImages.asReversed()) image.remove() for (image in tileBaseImages) image.remove()
tileBaseImages.clear() tileBaseImages.clear()
for (baseLocation in tileBaseImageLocations.asReversed()) { // reversed because we send each one to back for (baseLocation in tileBaseImageLocations) {
// Here we check what actual tiles exist, and pick one - not at random, but based on the tile location, // Here we check what actual tiles exist, and pick one - not at random, but based on the tile location,
// so it stays consistent throughout the game // so it stays consistent throughout the game
if (!ImageGetter.imageExists(baseLocation)) continue if (!ImageGetter.imageExists(baseLocation)) continue
@ -321,18 +321,17 @@ open class TileGroup(
i += 1 i += 1
} }
val finalLocation = existingImages.random(Random(tileInfo.position.hashCode() + locationToCheck.hashCode())) val finalLocation = existingImages.random(Random(tileInfo.position.hashCode() + locationToCheck.hashCode()))
val image = ImageGetter.getImage(finalLocation) val image = ImageGetter.getImage(finalLocation)
tileBaseImages.add(image)
baseLayerGroup.addActorAt(0,image)
setHexagonImageSize(image)
}
if (tileBaseImages.isEmpty()) { // Absolutely nothing! This is for the 'default' tileset
val image = ImageGetter.getImage(tileSetStrings.hexagon)
tileBaseImages.add(image) tileBaseImages.add(image)
baseLayerGroup.addActor(image) baseLayerGroup.addActor(image)
setHexagonImageSize(image)
if (tileSetStrings.tileSetConfig.tileScales.isNotEmpty()) {
val scale = tileSetStrings.tileSetConfig.tileScales[baseLocation.takeLastWhile { it != '/' }]
setHexagonImageSize(image, scale)
} else {
setHexagonImageSize(image)
}
} }
} }
@ -379,16 +378,12 @@ open class TileGroup(
updateTileImage(viewingCiv) updateTileImage(viewingCiv)
updateRivers(tileInfo.hasBottomRightRiver, tileInfo.hasBottomRiver, tileInfo.hasBottomLeftRiver) updateRivers(tileInfo.hasBottomRightRiver, tileInfo.hasBottomRiver, tileInfo.hasBottomLeftRiver)
updateTerrainBaseImage()
updateTerrainFeatureImage()
updatePixelMilitaryUnit(tileIsViewable && showMilitaryUnit) updatePixelMilitaryUnit(tileIsViewable && showMilitaryUnit)
updatePixelCivilianUnit(tileIsViewable) updatePixelCivilianUnit(tileIsViewable)
icons.update(showResourcesAndImprovements,showTileYields, tileIsViewable, showMilitaryUnit,viewingCiv) icons.update(showResourcesAndImprovements,showTileYields, tileIsViewable, showMilitaryUnit,viewingCiv)
updateCityImage()
updateNaturalWonderImage()
updateTileColor(tileIsViewable) updateTileColor(tileIsViewable)
updateRoadImages() updateRoadImages()
@ -404,72 +399,6 @@ open class TileGroup(
if (!tileInfo.ruleset.nations.containsKey(unit.owner)) unit.removeFromTile() if (!tileInfo.ruleset.nations.containsKey(unit.owner)) unit.removeFromTile()
} }
private fun updateTerrainBaseImage() {
if (tileInfo.baseTerrain == baseTerrain) return
baseTerrain = tileInfo.baseTerrain
if (baseTerrainOverlayImage != null) {
baseTerrainOverlayImage!!.remove()
baseTerrainOverlayImage = null
}
val imagePath = tileSetStrings.orFallback { getBaseTerrainOverlay(baseTerrain) }
if (!ImageGetter.imageExists(imagePath)) return
baseTerrainOverlayImage = ImageGetter.getImage(imagePath)
baseTerrainOverlayImage!!.run {
color.a = 0.25f
setSize(40f, 40f)
center(this@TileGroup)
}
baseLayerGroup.addActor(baseTerrainOverlayImage)
}
private fun updateCityImage() {
if (cityImage == null && tileInfo.isCityCenter()) {
val cityOverlayLocation = tileSetStrings.cityOverlay
if (!ImageGetter.imageExists(cityOverlayLocation)) // have a city tile, don't need an overlay
return
cityImage = ImageGetter.getImage(cityOverlayLocation)
terrainFeatureLayerGroup.addActor(cityImage)
cityImage!!.run {
setSize(60f, 60f)
center(this@TileGroup)
}
}
if (cityImage != null && !tileInfo.isCityCenter()) {
cityImage!!.remove()
cityImage = null
}
}
private fun updateNaturalWonderImage() {
if (naturalWonderImage == null && tileInfo.isNaturalWonder()) {
val naturalWonderOverlay = tileSetStrings.naturalWonderOverlay
if (!ImageGetter.imageExists(naturalWonderOverlay)) // Assume no natural wonder overlay = dedicated tile image
return
if (baseTerrainOverlayImage != null) {
baseTerrainOverlayImage!!.remove()
baseTerrainOverlayImage = null
}
naturalWonderImage = ImageGetter.getImage(naturalWonderOverlay)
terrainFeatureLayerGroup.addActor(naturalWonderImage)
naturalWonderImage!!.run {
color.a = 0.25f
setSize(40f, 40f)
center(this@TileGroup)
}
}
// Is this possible?
if (naturalWonderImage != null && !tileInfo.isNaturalWonder()) {
naturalWonderImage!!.remove()
naturalWonderImage = null
}
}
private fun clearBorders() { private fun clearBorders() {
for (borderSegment in borderSegments.values) for (borderSegment in borderSegments.values)
for (image in borderSegment.images) for (image in borderSegment.images)
@ -649,35 +578,20 @@ open class TileGroup(
} }
private fun updateTileColor(isViewable: Boolean) { private fun updateTileColor(isViewable: Boolean) {
var color = val baseTerrainColor = when {
if (tileSetStrings.tileSetConfig.useColorAsBaseTerrain) tileSetStrings.tileSetConfig.useColorAsBaseTerrain && !isViewable -> tileInfo.getBaseTerrain().getColor().lerp(tileSetStrings.tileSetConfig.fogOfWarColor, 0.6f)
tileInfo.getBaseTerrain().getColor() tileSetStrings.tileSetConfig.useColorAsBaseTerrain -> tileInfo.getBaseTerrain().getColor()
else Color.WHITE.cpy() // no need to color it, it's already colored !isViewable -> Color.WHITE.cpy().lerp(tileSetStrings.tileSetConfig.fogOfWarColor, 0.6f)
else -> Color.WHITE.cpy()
if (!isViewable) color = color.lerp(tileSetStrings.tileSetConfig.fogOfWarColor, 0.6f)
for(image in tileBaseImages) image.color = color
}
private fun updateTerrainFeatureImage() {
if (tileInfo.terrainFeatures != terrainFeatures) {
terrainFeatures.clear()
terrainFeatures.addAll(tileInfo.terrainFeatures)
if (terrainFeatureOverlayImage != null) terrainFeatureOverlayImage!!.remove()
terrainFeatureOverlayImage = null
for (terrainFeature in terrainFeatures) {
val terrainFeatureOverlayLocation = tileSetStrings.orFallback { getTerrainFeatureOverlay(terrainFeature) }
if (!ImageGetter.imageExists(terrainFeatureOverlayLocation)) return
terrainFeatureOverlayImage = ImageGetter.getImage(terrainFeatureOverlayLocation)
terrainFeatureLayerGroup.addActor(terrainFeatureOverlayImage)
terrainFeatureOverlayImage!!.run {
setSize(30f, 30f)
setColor(1f, 1f, 1f, 0.5f)
center(this@TileGroup)
}
}
} }
val color = if (!isViewable) Color.WHITE.cpy().lerp(tileSetStrings.tileSetConfig.fogOfWarColor, 0.6f)
else Color.WHITE.cpy()
for((index, image) in tileBaseImages.withIndex())
image.color = if (index == 0) baseTerrainColor else color
} }
private fun updatePixelMilitaryUnit(showMilitaryUnit: Boolean) { private fun updatePixelMilitaryUnit(showMilitaryUnit: Boolean) {
var newImageLocation = "" var newImageLocation = ""

View File

@ -26,11 +26,10 @@ class TileSetStrings(tileSet: String = UncivGame.Current.settings.tileSet, fallb
val crosshatchHexagon by lazy { orFallback { tileSetLocation + "CrosshatchHexagon" } } val crosshatchHexagon by lazy { orFallback { tileSetLocation + "CrosshatchHexagon" } }
val crosshair by lazy { orFallback { getString(tileSetLocation, "Crosshair") } } val crosshair by lazy { orFallback { getString(tileSetLocation, "Crosshair") } }
val highlight by lazy { orFallback { getString(tileSetLocation, "Highlight") } } val highlight by lazy { orFallback { getString(tileSetLocation, "Highlight") } }
val cityOverlay = tileSetLocation + "CityOverlay"
val roadsMap = RoadStatus.values() val roadsMap = RoadStatus.values()
.filterNot { it == RoadStatus.None } .filterNot { it == RoadStatus.None }
.associateWith { tileSetLocation + it.name } .associateWith { tileSetLocation + it.name }
val naturalWonderOverlay = tileSetLocation + "NaturalWonderOverlay" val naturalWonder = tileSetLocation + "Tiles/NaturalWonder"
val tilesLocation = tileSetLocation + "Tiles/" val tilesLocation = tileSetLocation + "Tiles/"
val bottomRightRiver by lazy { orFallback { tilesLocation + "River-BottomRight"} } val bottomRightRiver by lazy { orFallback { tilesLocation + "River-BottomRight"} }
@ -64,13 +63,8 @@ class TileSetStrings(tileSet: String = UncivGame.Current.settings.tileSet, fallb
return currentString return currentString
} }
val overlay = "Overlay"
val city = "City"
val tag = "-" val tag = "-"
fun getTile(baseTerrain: String) = getString(tilesLocation, baseTerrain) fun getTile(baseTerrain: String) = getString(tilesLocation, baseTerrain)
fun getBaseTerrainOverlay(baseTerrain: String) = getString(tileSetLocation, baseTerrain, overlay)
fun getTerrainFeatureOverlay(terrainFeature: String) = getString(tileSetLocation, terrainFeature, overlay)
fun getBorder(borderShapeString: String, innerOrOuter:String) = getString(bordersLocation, borderShapeString, innerOrOuter) fun getBorder(borderShapeString: String, innerOrOuter:String) = getString(bordersLocation, borderShapeString, innerOrOuter)

View File

@ -27,12 +27,19 @@ This is where tileset configs shine. You can use these to alter the way Unicv re
To create a config for your tileset you just need to create a new .json file under Jsons/Tilesets/. Just create a .txt file and rename it to MyCoolTilesetExample.json. You only have to add things if you want to change them. Else the default values will be used. To create a config for your tileset you just need to create a new .json file under Jsons/Tilesets/. Just create a .txt file and rename it to MyCoolTilesetExample.json. You only have to add things if you want to change them. Else the default values will be used.
This is an example of such a config file that I will explain below: This is an example of such a config file that will be explain below:
``` ```json
"useColorAsBaseTerrain": "false", "useColorAsBaseTerrain": "false",
"useSummaryImages": "true",
"unexploredTileColor": {"r":1,"g":1,"b":1,"a":1}, "unexploredTileColor": {"r":1,"g":1,"b":1,"a":1},
"fogOfWarColor": {"r":1,"g":0,"b":0,"a":1}, "fogOfWarColor": {"r":1,"g":0,"b":0,"a":1},
"fallbackTileSet": null,
"tileScale":0.9,
"tileScales": {
"City center":1.2,
"Citadel":1.5
}
"ruleVariants": { "ruleVariants": {
"Grassland+Forest": ["Grassland","ForestForGrassland"], "Grassland+Forest": ["Grassland","ForestForGrassland"],
"Grassland+Jungle+Dyes+Trading post": ["Grassland","JungleForGrasslandBack","Dyes+Trading post","JungleForGrasslandFront"] "Grassland+Jungle+Dyes+Trading post": ["Grassland","JungleForGrasslandBack","Dyes+Trading post","JungleForGrasslandFront"]
@ -41,9 +48,19 @@ This is an example of such a config file that I will explain below:
### useColorAsBaseTerrain ### useColorAsBaseTerrain
A boolean value ("true" or "false"). Default value: "true" A boolean value ("true" or "false"). Default value: "false"
If true all tiles will be colored in their corresponding base terrain color. This is how the "Default" tileset works. If true, an additional "Hexagon" image is placed below each tile and colored in the corresponding BaseTerrain color. This removes the necessity to add individual BaseTerrain images. This is how the "Minimal" tileset works.
### useSummaryImages
A boolean value ("true" or "false"). Default value: "false"
If true, summary images are used for specific groups of images instead of using individual tile images. The summary images must be placed in the same folder as every other tile image. Summary images used:
| Image group | Summary image |
| ----------- | ------------- |
| Natural wonders | "NaturalWonder" |
### unexploredTileColor ### unexploredTileColor
@ -57,9 +74,27 @@ A color defined with normalized RGBA values. Default value: "{"r":0, "g":0, "b":
Defines the color of the fog of war. The color gets approximated by 60% to allow the colors of the images below to shine through. Defines the color of the fog of war. The color gets approximated by 60% to allow the colors of the images below to shine through.
### fallbackTileSet
A string value. Default value: "FantasyHex"
The name of another tileset whose images should be used if this tileset is missing images. Can be set to null to disable the the fallback tileset
### tileScale
A float value. Default value: 1.0
The scale of all tiles. Can be used to increase or decrease the size of every tile. Is being used by the tileset mod [5Hex (made by ravignir)](https://github.com/ravignir/5Hex-Tileset) to fake shadows.
### tileScales
A dictionary mapping string to a float value. Default value: empty
Used by the "Minimal" tileset to scale all its tiles except the base terrain down. Each entry overrides the tileScale value for the specified tile.
### ruleVariants ### ruleVariants
A dictionary mapping string to string[]. Default value: empty A dictionary mapping string to a list of strings. Default value: empty
The ruleVariants are the most powerful part of the tileset config. With this, you can define, for a specific tile, which images and in which order these images should be used. The ruleVariants are the most powerful part of the tileset config. With this, you can define, for a specific tile, which images and in which order these images should be used.

View File

@ -119,12 +119,16 @@ A few uniques can be added to ancient ruin effects to modify when they can be ea
A mod can define new Tilesets or add to existing ones, namely FantasyHex. There is one json file per Tileset, named same as the Tileset, and placed in a subfolder named "TileSets" relative to the other json files. This is called TileSetConfig and has the following structure: A mod can define new Tilesets or add to existing ones, namely FantasyHex. There is one json file per Tileset, named same as the Tileset, and placed in a subfolder named "TileSets" relative to the other json files. This is called TileSetConfig and has the following structure:
| Attribute | Type | Optional | Notes | | Attribute | Type | Default value | Notes |
| --------- | ---- | -------- | ----- | | --------- | ---- | -------- | ----- |
| useColorAsBaseTerrain | Boolean | Default true | ? *WIP* | | [useColorAsBaseTerrain](../Modders/Creating-a-custom-tileset.md#useColorAsBaseTerrain) | Boolean | false | |
| unexploredTileColor | Color | Default Dark Gray | `{"r":0.25,"g":0.25,"b":0.25,"a":1}` | | [useSummaryImages](../Modders/Creating-a-custom-tileset.md#useSummaryImages) | Boolean | false | |
| fogOfWarColor | Color | Default Black | `{"r":0,"g":0,"b":0,"a":1}` | | [unexploredTileColor](../Modders/Creating-a-custom-tileset.md#unexploredTileColor) | Color | Dark Gray | `{"r":0.25,"g":0.25,"b":0.25,"a":1}` |
| ruleVariants | List | Default empty | see below | | [fogOfWarColor](../Modders/Creating-a-custom-tileset.md#fogOfWarColor) | Color | Black | `{"r":0,"g":0,"b":0,"a":1}` |
| [fallbackTileSet](../Modders/Creating-a-custom-tileset.md#fallbackTileSet) | String | "FantasyHex" | null to disable |
| [tileScale](../Modders/Creating-a-custom-tileset.md#tileScale) | Float | 1.0 | |
| [tileScales](../Modders/Creating-a-custom-tileset.md#tileScales) | Dictionary | empty | |
| [ruleVariants](../Modders/Creating-a-custom-tileset.md#ruleVariants) | Dictionary | empty | see below |
ruleVariants control substitutions when layering images for a tile, they are list looking like: ruleVariants control substitutions when layering images for a tile, they are list looking like: