Mangrove forest and volcanos tiles

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
XYZ
Elite
Posts: 432
Joined: Fri Jan 31, 2014 12:00 pm

Mangrove forest and volcanos tiles

Post by XYZ »

Most of freeciv games are being played on rather small islands. Subtropic coast lines have a lot of mangroves (see map). Hence it would be nice to have an unproductive vegetation tile like mangroves for freeciv.

Also I would like to see another unproductive rock or volcano tile that form some islands in real life but that are not mountains.
Attachments
1920px-World_map_mangrove_distribution.jpg
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Mangrove forest and volcanos tiles

Post by GriffonSpade »

AmplioHexBig has rock and mangrove tiles. Really, it has a /LOT/ of custom tiles. Mind that they are not used by any terrain by default rulesets. Sadly, not volcano tiles, I lack art skills, and have been unable to make them.
pak
Posts: 10
Joined: Mon Apr 24, 2017 9:41 pm

Re: Mangroves and Volcanoes

Post by pak »

But what are specialist mangrove tiles going to do in the game that doesn't already happen to some degree? Isn't a swamp on the coast more or less the same idea? If not, what's the difference going to be? Or do you just want the visuals with no substantive effect on the gameplay?

(I guess I might ask the same questions about volcano tiles as well, but I suppose if there were a way of setting location dependent disasters, they could be fun).
XYZ
Elite
Posts: 432
Joined: Fri Jan 31, 2014 12:00 pm

Re: Mangrove forest and volcanos tiles

Post by XYZ »

Or do you just want the visuals with no substantive effect on the gameplay?
As someone who creates scenarios visuals play a big role specially when you are trying to get close to reality. But mangroves dont have to be necessarily like swamps, they could for example not give defense bonus unlike swamps.
Mountains instead of rocks just look stupid in the middle of water. (it all depends on the zoom level you imagine you are playing)

Forgot to mention the vulcano feature. Yeah, the volcano could randomly erupt converting surrounding lands into (temporary) unfertile land, water tiles into land tiles etc.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Mangroves and Volcanoes

Post by cazfi »

pak wrote:if there were a way of setting location dependent disasters, they could be fun).
You could probably do it via lua scripting. (probably: I've not though of details, if scripting API provides everything necessary)
pak
Posts: 10
Joined: Mon Apr 24, 2017 9:41 pm

Re: Mangroves and Volcanoes

Post by pak »

> location dependent disasters, they could be fun / You could probably do it via lua scripting.

Having a look at the disaster section(s) in game.ruleset suggests that you could add all kinds
of criteria (since e.g. earthquake requires local hills), but I assume that only cities are checked
not miscellaneous terrain squares. Also, although you can add Pollution as an effect quite easily,
you can't (in my civ2civ3 variant) add multiple pollutions - notably, adding lots of "Pollution"s to the
effects line only ever produces one square with pollution.
XYZ
Elite
Posts: 432
Joined: Fri Jan 31, 2014 12:00 pm

Re: Mangrove forest and volcanos tiles

Post by XYZ »

Sadly, not volcano tiles, I lack art skills, and have been unable to make them.
Took me 5 min. Could this work?

Maybe replace the grass around with water, making it a volacano island?
Attachments
Volcanotile-3.png
Volcanotile-3.png (7.61 KiB) Viewed 6670 times
XYZ
Elite
Posts: 432
Joined: Fri Jan 31, 2014 12:00 pm

Re: Mangrove forest and volcanos tiles

Post by XYZ »

volcano erupting
Attachments
volcano erupting.png2.png
volcano erupting.png2.png (7.67 KiB) Viewed 5681 times
volcano erupting.png
volcano erupting.png (7.68 KiB) Viewed 5681 times
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

Re: Mangrove forest and volcanos tiles

Post by Wahazar »

I tried to implement volcano into my modpack (with NotGenerated flag, thus only lua script or global warming can make these),
but I failed with improving lua script, this piece of code:

Code: Select all

    local til = place.Tile
    ...
          place:set_label(_("Valley of Geysers"))
          til:change_terrain("Volcano")
place label as usual, but doesn't change tile.
Probably something wrong with reference, but I have no clue how to fix it, documentation is very cryptic.
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: Mangrove forest and volcanos tiles

Post by nef »

Two problems:

A. If set_label works then "place" is a tile (fc userdata acting like a Lua table, describing a tile on the map).

local til = place.Tile doesn't make any sense to me. "Tile" is not a field for this table (AFAIK) so I would expect til to have the value nil, AND there would have been an error message in the chat log complaining about attempting to use the method change_terrain on a nil value. This message would reference the line number in the Lua script for 'til:change_terrain("Volcano")'

B. change_terrain () is a method belonging to this same type of userdata table so the code I would try is

Code: Select all

          place:set_label(_("Valley of Geysers"))
          place:change_terrain("Volcano")
Post Reply