[Tutorial] The Lava Redemption – Active Volcanic Systems Script

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
leo.priori
Posts: 32
Joined: Mon Jan 01, 2024 3:22 am

[Tutorial] The Lava Redemption – Active Volcanic Systems Script

Post by leo.priori »

The Lava Redemption – Active Volcanic Systems Script

Hello everyone! I'm sharing a new script that makes volcanoes dynamic. They can now transition between active and dormant states during the game.
Be careful: if a volcano becomes active within a city’s radius, it can trigger serious disasters!

ISO - maps
volcano_iso.png
volcano_iso.png (661.2 KiB) Viewed 821 times
A) Installation Guide

Using the files provided in the The Lava Redemption.tar.gz (available for download below), follow these steps:

Script Setup: Copy luadata.txt and script.lua into your ruleset folder. (Remember to back up your original files before overwriting them).

Ruleset Integration: Open the provided .ruleset documentation files, then copy and paste their contents into your own ruleset files with the corresponding names.

B) Playing on Hex Maps

If you prefer playing on Hexagonal maps, please use the dedicated tileset: volcanoes_tileset.tar.gz (also available for download below).
volcano_hex.png
volcano_hex.png (843.59 KiB) Viewed 821 times
Tileset to play in Hex Maps
volcanoes_tileset.tar.gz
(113.37 KiB) Downloaded 19 times


C) Gameplay Tuning

Volcano Density: To control how many volcanoes appear, adjust the property_mountainous value within each terrain entry in combination with the game's global steepness option.

Disaster Frequency: You can scale the intensity of events by modifying the [disaster_*] entries and the global disasters setting.

Script Logic: For deeper customization, you can edit the constants at the beginning of the script.lua file, specifically the following keys:

activity_rarity

eruption_chance

dormancy_chance
Attachments
The Lava Redemption.tar.gz
(10.96 KiB) Downloaded 13 times
leo.priori
Posts: 32
Joined: Mon Jan 01, 2024 3:22 am

Re: [Tutorial] The Lava Redemption – Active Volcanic Systems Script

Post by leo.priori »

Rulesets with The Lava Redemption
Attachments
civ1_volcanoes.tar.gz
(80.81 KiB) Downloaded 16 times
civ2_volcanoes.tar.gz
(95.61 KiB) Downloaded 13 times
civ2civ3_volcanoes.tar.gz
(114.16 KiB) Downloaded 13 times
classic_volcanoes.tar.gz
(82.32 KiB) Downloaded 16 times
Dino the Dinosore
Hardened
Posts: 238
Joined: Sun Dec 31, 2017 3:41 am

Re: [Tutorial] The Lava Redemption – Active Volcanic Systems Script

Post by Dino the Dinosore »

This is awesome, thanks. I also did an implementation of volcanoes and eruptions in my dino3 ruleset

viewtopic.php?t=91837&start=30

Mine is much simpler - I do a similar thing in the script.lua to place the volcanoes after the map_generated signal, but I don't have names or tweekable settings. Instead of having the eruptions controlled by the script, in terrain.ruleset I have an extra

Code: Select all

name=_("Eruption")
category="Nuisance"
causes="Appear"
rmcauses="Disappear"
graphic="tx.erupting_volcano"
appearance_reqs={"type","name","range"
"Terrain","Volcano","Tile"
}
appearance_chance=200
disappearance_chance=5000
I also do the disaster in game.ruleset similar to yours, but add this to the reqs to spare the AI players (who aren't programmed to handle them)

Code: Select all

reqs={"type","name","range","present"
"Extra","Eruption","Adjacent",TRUE
"AI","Restricted","Player",FALSE
"AI","Novice","Player",FALSE
"AI","Easy","Player",FALSE
"AI","Normal","Player",FALSE
"AI","Hard","Player",FALSE
"AI","Cheating","Player",FALSE
"AI","Experimental","Player",FALSE
}
What I'm missing is anything in the help text explaining all the volcano/eruptions stuff.

Question - where did you get the AmplioHexBig volcanoes.png? All I could find is Amplio2 volcano.png and I had to make my own hex version.
leo.priori
Posts: 32
Joined: Mon Jan 01, 2024 3:22 am

Re: [Tutorial] The Lava Redemption – Active Volcanic Systems Script

Post by leo.priori »

Hi Dino. Thanks!
I've had these images for a long time, and since I'm terrible at drawing, I'm sure I downloaded them all from this very forum. But you're right—I couldn't find them again. Maybe they were deleted.
Your script is amazing, and I remember playing it; it served as inspiration for me.
I didn't include any help text in the ruleset explaining the volcanoes—sorry about that.
You're right about the AI, too. The AI ​​really can't handle volcanoes, and your ruleset solves that issue more simply and precisely. Still, it's pretty fun watching them get wrecked by the disasters, too.
Dino the Dinosore
Hardened
Posts: 238
Joined: Sun Dec 31, 2017 3:41 am

Re: [Tutorial] The Lava Redemption – Active Volcanic Systems Script

Post by Dino the Dinosore »

Played some more with this and could not get the hex volcanoes_tileset to work. It never shows up in the options dialog, not sure why.

More minor differences:
- I have the road_time=6 for volcanoes same as for mountains.
- I only allow roads to be built on volcanoes, no rails or maglevs.
- I have the movement_cost=3 for volcanoes same as for mountains, but I think it makes sense to increase it to 4 like you do.
- since I do eruptions as extra instead of terrain, in actions.ruleset I disallow action="Unit Move" to a tile with an eruption.
- similarly, in effects.ruleset I have "Unit_Recover" value=-4 to units near an eruption, so units get damaged.

I like that you also implement storms as extras instead of units - I think that's a better way to go.
Post Reply