Add a map import tool able to read "Battle for Wesnoth" maps (#10541)

* Add a map import tool able to read "Battle for Wesnoth" maps

* Fix and explain vertical distortion
This commit is contained in:
SomeTroglodyte
2023-11-22 22:59:22 +01:00
committed by GitHub
parent 30c4b323ec
commit 3604d82fa9
6 changed files with 216 additions and 9 deletions

View File

@ -0,0 +1,42 @@
// Definitions how to map Wesnoth map terrain codes to Unciv Terrains and/or TileImprovements.
// The parts before and after "^" are matched individually, and a search is done for the most
// specific partial string from the start, e.g. "Wwf" will look for "Wwf", then "Ww", then "W"
// See https://wiki.wesnoth.org/TerrainCodesWML
{
"Aa":["Snow"],
"Ai":["Coast","Ice"],
"Br":["Railroad"],
"D":["Desert"],
// "Dc" to listOf(Constants.mountain, "Barringer Crater"), // "Crater" - Nope can have many
"Do":["Desert","Oasis"],
"F":["Forest"],
"Fda":["Tundra","Forest"], // Snowy Deciduous Forest
"Feta":["Tundra","Forest"], // Snowy Great Tree
"Fma":["Tundra","Forest"], // Snowy Mixed Forest
"Fpa":["Tundra","Forest"], // Snowy Pine Forest
"Ft":["Jungle"], // Tropical Forest, Rainforest
"G":["Grassland"],
"Gd":["Plains"], // Dry Grass
"Gll":["Plains"], // Leaf Litter
"Gvs":["Grassland","Farm"],
"H":["Hill"],
"Hhd":["Plains","Hill"], // Dry Hills
"Hd":["Desert","Hill"], // Dunes
"Ha":["Snow","Hill"], // Snow Hills
"M":["Mountain"],
"R":["Plains"], // All their "R" actually means roads - but they mean full-tile low-movement and brownish so..
"Rd":["Desert"], // Dry Dirt Road
"Rra":["Tundra"], // Icy Cobbles
"S":["Grassland","Marsh"],
"T":["Plains"], // Fungus
"U":["Plains"], // Underground
"V":["Ancient ruins"], // let's convert all other villages into ancient ruins too
"Vdr":["Ancient ruins"], // Ruined Adobe Village
"Vhr":["Ancient ruins"], // Ruined Cottage
"Vhcr":["City ruins"], // Ruined Human City
"Vhhr":["Ancient ruins"], // Ruined Hill Stone Village
"Vo":["Barbarian encampment"], // Orcish Village
"Wo":["Ocean"],
"Ww":["Coast"],
"Wwrt":["Coast","Atoll"] // Tropical Coastal Reef, may be too many
}

View File

@ -503,11 +503,12 @@ Except improvements =
Base and terrain features =
Base terrain only =
Land or water only =
Import a Wesnoth map =
## Labels/messages
Brush ([size]): =
# The single letter shown in the [size] parameter above for setting "Floodfill".
# Please do not make this longer, the associated slider will not handle well.
# Please do not make this longer than one character, the associated slider will not handle well.
Floodfill_Abbreviation =
Error loading map! =
Map saved successfully! =
@ -534,6 +535,9 @@ Overlay opacity: =
Invalid overlay image =
World wrap is incompatible with an overlay and was deactivated. =
An overlay image is incompatible with world wrap and was deactivated. =
Choose a Wesnoth map file =
That map is invalid! =
("[code]" does not conform to TerrainCodesWML) =
## Map/Tool names
My new map =