Project

General

Profile

Feature #659517

Lua script to place more labels on the map

Added by David Fernandez (bard) 7 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rulesets
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

It generates randomly one label for each different terrain (rivers included), taking a bit into account the surrounding terrain (mainly if coastal, isolated, or surrounded by same terrain).
The labels represent natural wonders, but I'm not sure if all english names are properly chosen. I'll attach in next post the spanish traduction for all strings, that I think do sound good enough.
I plan to make a patch to include it in civ2civ3, but I wanted to hear more opinions first, since it is my first lua script.

The main flaws I see so far:
- Great Barrier Reef or Atolls may appear near the glacier poles.
- It might appear a fish resource in the Dead Sea.
- Waterfalls may appear in river with no effect over units native to rivers.


Related issues

Blocks Freeciv - Task #694704: civ2civ3: introduce new features for 2.6Closed

History

#1 Updated by David Fernandez (bard) 6 months ago

Full list of labels (with spanish traduction):

"River"
("Grand Canyon") "Gran Cañón"
("Deep Gorge") "Desfiladero Profundo"
("Fjords") "Fiordos"
("Waterfalls") "Cataratas"
("Travertine Terraces") "Terrazas de Travertino"
"Deep Ocean"
("Deep Trench") "Fosa Profunda"
("Thermal Vent") "Fuente Hidrotermal"
"Ocean"
("Atoll Chain") "Cadena de Atolones"
("Great Barrier Reef") "Gran Barrera de Coral"
("Great Blue Hole") "Gran Agujero Azul"
"Lake"
("Great Lakes") "Grandes Lagos"
("Dead Sea") "Mar Muerto"
("Rift Lake") "Lago Profundo"
"Swamp"
("Grand Prismatic Spring") "Gran Fuente Prismática"
("Mangrove Forest") "Bosque de Manglares"
("Cenotes") "Cenotes"
"Glacier"
("Ice Sheet") "Casquete Glaciar"
("Frozen Lake") "Lago Congelado"
("Glacier Bay") "Bahía de Glaciares"
("Advancing Glacier") "Glaciar Creciente"
"Tundra"
("Geothermal Area") "Área Geotérmica"
"Desert"
("Sand Sea") "Mar de Arena"
("Salt Flat") "Salar"
("Singing Dunes") "Dunas Cantoras"
("White Desert") "Desierto Blanco"
"Plains"
("Long Beach") "Playa Larga"
("Mud Volcanoes") "Volcanes de Lodo"
("Rock Pillars") "Pilares de Roca"
"Grassland"
("White Cliffs") "Acantilados Blancos"
("Giant Cave") "Cueva Gigante"
("Rock Formation") "Formación Rocosa"
"Jungle"
("Rainforest") "Selva"
("Subterranean River") "Río Subterráneo"
("Sinkholes") "Dolinas"
"Forest"
("Stone Forest") "Bosque de Piedra"
("Sequoia Forest") "Bosque de Sequoias"
("Millenary Trees") "Árboles Milenarios"
"Hills"
("Table Mountain") "Montaña Tabular"
("Inselberg") "Peñón"
("Karst Landscape") "Paisaje Kárstico"
("Valley of Geysers") "Valle de Geisers"
"Mountains"
("Highest Peak") "Pico Más Alto"
("Sacred Mount") "Monte Sagrado"
("Cliff Coast") "Costa de Acantilados"
("Active Volcano") "Volcán Activo"
("High Summit") "Alta Cumbre"

#2 Updated by Jacob Nevins 5 months ago

This looks great, thanks! I've been meaning to somehow make labels like "Highest Peak" not appear on isolated mountains, and this seems like a good solution that won't increase runtime too much.

The labels represent natural wonders, but I'm not sure if all english names are properly chosen.

Some of them aren't names that I or en.wikipedia instantly recognise, but I haven't thought of any better ones; they seem fine to me.

- It might appear a fish resource in the Dead Sea.

I think the map_generated signal fires after resources are placed? So you should be able to detect the presence of life.

- Waterfalls may appear in river with no effect over units native to rivers.

Hm, don't have an answer to that one. (I wonder if we ought to prevent triremes traveling on rivers on hills/mountains in general, not that I think we can currently.)

- Great Barrier Reef or Atolls may appear near the glacier poles.

Don't have an answer for this one.

#3 Updated by David Fernandez (bard) 5 months ago

Jacob Nevins wrote:

This looks great, thanks! I've been meaning to somehow make labels like "Highest Peak" not appear on isolated mountains, and this seems like a good solution that won't increase runtime too much.

I'm glad you like, I have been testing it with v2.6 beta and I think it works good enough to be included there (for civ2civ3) if you want.

I think the map_generated signal fires after resources are placed? So you should be able to detect the presence of life.

What you say looks possible in v3.0 by using has_extra(), where resources are also extras. But I have been unable to find an equivalent function for v2.6, where resources are not extras.

Hm, don't have an answer to that one. (I wonder if we ought to prevent triremes traveling on rivers on hills/mountains in general, not that I think we can currently.)

I think it is not that bad, after all, vikings were able to carry their river boats in land to bypass waterfalls or even reach other rivers.

#4 Updated by Jacob Nevins 5 months ago

I think the map_generated signal fires after resources are placed?

What you say looks possible in v3.0 by using has_extra(), where resources are also extras. But I have been unable to find an equivalent function for v2.6, where resources are not extras.

Oh. Sigh. Yes. The incompleteness of the Lua API strikes again.

#5 Updated by Jacob Nevins 3 months ago

  • Blocks Task #694704: civ2civ3: introduce new features for 2.6 added

#6 Updated by Marko Lindqvist 3 months ago

  • Status changed from New to In Progress
  • Target version set to 2.6.0

This change does not affect continuing games started before the change after the change, or vice versa, so I don't think this should block 2.6.0-beta1.

There's no patch file yet.

#8 Updated by Jacob Nevins 2 months ago

  • Status changed from In Progress to Resolved
  • Assignee set to Jacob Nevins

#9 Updated by Jacob Nevins 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF