Updated for Fc3: Raiders Pass 43x43=2k, 99% land, Classic, Flat, Lua, v1.1.sav
... is attached to this post.
Doh! Make that v1.2... Changed barbTribe to _G.barbTribe for all uses. I assumed that I couldn't just add barbTribe=find.player(1) to the global vars section (vars=$$) since it can't find player1 before player1 exists? Although maybe just declaring barbTribe in global vars would work, then barbTribe=find.player(1) would work later in the process.
Collection of Scenarios
-
- Hardened
- Posts: 177
- Joined: Fri Jul 02, 2021 4:00 pm
Re: Collection of Scenarios
- Attachments
-
- Raiders Pass 43x43=2k, 99% land, Classic, Flat, Lua, v1.2.sav.zip
- (10.62 KiB) Downloaded 274 times
Re: Collection of Scenarios
What's the licensing of these scenarios? I would put them (at least others than Raiders Pass that has those problems) to default modpack list, but need license declaration (e.g. "GPLv2+" to match freeciv's own license).
-
- Hardened
- Posts: 177
- Joined: Fri Jul 02, 2021 4:00 pm
Re: Collection of Scenarios
Updated version (1.2) of Raiders Pass is posted / attached in prior post.
License "GPLv2+" is fine, or "public domain" is my usual position on anything I create.
License "GPLv2+" is fine, or "public domain" is my usual position on anything I create.
Re: Collection of Scenarios
Those six scenarios are now available via Modpack Installer on freeciv-3.0, and later.
Re: Collection of Scenarios
Just a note that for compatibility considerations you would want two parts of the version. a.b and a.c are incompatible, while a.b.c and a.b.d are compatible (same version, just a different bug fix release)Molo_Parko wrote: ↑Sat Oct 14, 2023 5:33 pm Thank you for the feedback! Does Lua in Fc3 -know- that the error is generated? Could I add something like "if error then use the v3 command instead"? That wouldn't stop the error though, but would make the script better prepared for the death of the old usage in some future version of Freeciv. Or if Lua can detect the Fc major version #... then use the newer form.
Ah, use fc_version to detect 2 vs 3.
-
- Hardened
- Posts: 177
- Joined: Fri Jul 02, 2021 4:00 pm
Re: Collection of Scenarios
Lua scripts in the scenario:Scenario: The Shadow Vales 61x61=4k, 87% land, Classic, Flat, Lua, v1
Featuring Surrender Lua script
Created and tested with Freeciv version 2.6.4 ( and GTK2 client ) with Lua 5.3
Various tribes searching for a peaceful spot to live become caught in a trap near the center of The Shadow Mountains.
The pace of the game is accelerated via various Lua scripts in the scenario file.
^ Three difficulty levels; easy, normal, and hard can be chosen via the chat pane in some Freeciv clients, such as the GTK2 client.
Designed for the default / Classic ruleset, and Amplio2 (square) tile graphics.
Late Arrival Startunits accelerates gameplay by increasing the number of startunits to 16 Settlers and 16 Warriors per player, in addition to a startcity.function _G.comparable_version()
function _G.game.current_turn()
function _G.game.current_year()
function _G.name_version()
function chat( message )
function s_ai_tribes_city_defender( unit, src_tile, dst_tile )
function s_ai_tribes_city_defender_check( turn, year )
function s_barbarian_rain( unit, type, quantity )
function s_extended_vision( unit, src_tile, dst_tile )
function s_fox_hunt( turn, year )
function s_late_arrival_startunits( turn, year )
function s_refugees( city, loser, winner, string )
function s_reporter( turn, year )
function s_roving_rivers( turn, year )
function s_suburban_sprawl( turn, year )
function s_surrender( city, loser, winner, string, loserName, winnerName, gold )
function s_surrender_deliberation( city, loser, winner, string )
function s_weatherizer()
function s_weatherizer_drought()
function s_weatherizer_rains()
function s_weatherizer_winds( unit, src_tile, dst_tile )
The s_ at the start of function names is intended to indicate that the Lua script is in the Scenario / saved game ".sav" file. The first 4 must use the same name as in Freeciv 3 so the s_ isn't used. "Chat" also doesn't have it for the sake of brevity.
Several routines are updated from their original versions: AI Tribes City Defender, Extended Vision, Late Arrival Startunits.
Extended Vision accelerates scouting the map.
Fox Hunt accelerates Gold income.
Surrender allows tribes to surrender under some circumstances which accelerates conquest.
Refugees brings Settlers units out of hiding once a contested valley is occupied by only one tribe's cities, which accelerates settlement of conquered lands.
Roving Rivers provides irrigation along the changing courses of some rivers, which accelerates city growth, but it also destroys roads on flat land ( but not on Forest, Hills, or Mountains, and not the sturdier Rail.) May also accelerate unit travel.
Suburban Sprawl gradually produces roads emanating outward from cities (though never on River tiles), which accelerates unit travel.
Weatherizer provides Rains for "natural irrigation" which accelerate city growth, as well as Drought which destroys irrigation, and Winds which are fierce enough to blow units away -- even over obstacles.
^ Reporter Lua script provides additional information during the game via the Chat pane available in some Freeciv clients. Note that it is turn 5. The additional information has the effect of accelerating some decision making by the human player.
^ Surrender Deliberation and Surrender allow a tribe to surrender to a victorious conquerer, though no civilized tribe surrenders to Barbarians.
^ "Weatherizer Winds will blow you away!" -- Unit #7033
A little strategy may be required for full enjoyment ... !
Signs posted in towns on the way to the center of the Shadow Mountains:
"WANTED: Barbarian Leaders to lead assault groups against defenseless tribes. Apply at Dedbreth's lair."
^ Dedbreth was careless to not have included a date.
Released under GPL-2.0-or-later.
Edit November 4th, 2024 -- Added version 1.1 to fix a minor bug which occurred occasionally when reloading a game, the "comma value" routine wasn't handling nil values well. Fixed!
- Attachments
-
- The Shadow Vales 61x61=4k, 87% land, Classic, Flat, Lua, v1.1.sav.zip
- (24.17 KiB) Downloaded 2 times
-
- The Shadow Vales 61x61=4k, 87% land, Classic, Flat, Lua, v1.sav.zip
- (24.08 KiB) Downloaded 8 times
Last edited by Molo_Parko on Tue Nov 05, 2024 4:20 am, edited 3 times in total.
-
- Hardened
- Posts: 177
- Joined: Fri Jul 02, 2021 4:00 pm
Re: Collection of Scenarios
Pieland 48x48=2k, 66% land, Classic, Flat, Lua, v1
A Lua script runs on the first turn to give each tribe 11 cities along with their two Settlers as startunits. It is a far more lively game with the 11 startcities per tribe than without. The Lua script can be disabled to compare the gameplay experience without the extra startcities.
^ To disable the Lua script which provides extra cities at gamestart.
^ Beginning of the game with the fast_start Lua script enabled.
Released under GPL-2.0-or-later.
A Lua script runs on the first turn to give each tribe 11 cities along with their two Settlers as startunits. It is a far more lively game with the 11 startcities per tribe than without. The Lua script can be disabled to compare the gameplay experience without the extra startcities.
^ To disable the Lua script which provides extra cities at gamestart.
^ Beginning of the game with the fast_start Lua script enabled.
Released under GPL-2.0-or-later.
- Attachments
-
- Pieland 48x48=2k, 66% land, Classic, Flat, Lua, v1.sav.zip
- (9.4 KiB) Downloaded 6 times
-
- Hardened
- Posts: 177
- Joined: Fri Jul 02, 2021 4:00 pm
Re: Collection of Scenarios
MiniMap Islands 16x16=256 tiles, 57% land, Classic, Flat, Lua, v1
For one human player and three computer-controlled players which are added via the included Lua script and limited to island nations.
The list of island nations was gathered from the ./share/freeciv/nations files via grep --files-with-matches -i island, then non-island nations were removed from the list, and the resulting names were fixed for this usage ( the filenames weren't capitalized, and some were partial names, or missing spaces.)
For one human player and three computer-controlled players which are added via the included Lua script and limited to island nations.
The list of island nations was gathered from the ./share/freeciv/nations files via grep --files-with-matches -i island, then non-island nations were removed from the list, and the resulting names were fixed for this usage ( the filenames weren't capitalized, and some were partial names, or missing spaces.)
Released under GPL-2.0-or-later.island_nations = { "Acehnese", "Ainu", "Alander", "Aleut", "Antiguan and Barbudan", "Antillean", "Bahamian", "Bahraini", "Barbadian", "Cape Verdean", "Chinese", "Chumash", "Comorian", "Cretan", "Cuban", "Cypriot", "Dominican", "Dominicano", "Ecuadorian", "Equatoguinean", "Faroese", "Fijian", "Formosan", "Greenlander", "Grenadian", "Guanche", "Icelandic", "Illyrian", "Indonesian", "Jamaican", "Kiribati", "Malagasy", "Maldivian", "Maltese", "Manx", "Maori", "Marshallese", "Mauritian", "Moluccan", "Nauruan", "Nestorian", "Newfoundland", "New Zealand", "Nuu-chah-nulth", "Papuan", "Papua New Guinean", "Polynesian", "Puerto Rican", "Rapa Nui", "Saint Lucian", "Samoan", "Santomean", "Sardinian", "Seychellois", "Sicilian", "Sinhalese", "Solomon Islander", "Tahitian", "Taino", "Taiwanese", "Tongan", "Trinidadian and Tobagonian", "Turkish Cypriot", "Vanuatuan", "Venetian", "Vincentian", "West Indian" }
- Attachments
-
- MiniMap Islands 16x16=256 tiles, 57% land, Classic, Flat, Lua, v1.sav.zip
- (7.89 KiB) Not downloaded yet
-
- Hardened
- Posts: 177
- Joined: Fri Jul 02, 2021 4:00 pm
Re: Collection of Scenarios
MiniMap Terrain Defense Trainer 16x16=256 tiles, 76% land, Classic, Flat, Lua, v1
^ Close-up showing River Forest tile provides + 1.5 defense and then x 1.5 defense. A Phalanx with defense 2 on that tile would have a total defense value of 5.25.
Lua script features:
Tile labels display terrain defense bonuses when they are greater than zero.
Four fortresses are provided at gamestart, to demonstrate their defensive effect.
Updated version 1.1 attached too -- fixed City Walls in city on tile as multiplier 3, but if not then multiplier 1.5: either/or not both.
^ Close-up showing River Forest tile provides + 1.5 defense and then x 1.5 defense. A Phalanx with defense 2 on that tile would have a total defense value of 5.25.
Lua script features:
Tile labels display terrain defense bonuses when they are greater than zero.
Four fortresses are provided at gamestart, to demonstrate their defensive effect.
Updated version 1.1 attached too -- fixed City Walls in city on tile as multiplier 3, but if not then multiplier 1.5: either/or not both.
- Attachments
-
- MiniMap Terrain Defense Trainer 16x16=256 tiles, 76% land, Classic, Flat, Lua, v1.1.sav.zip
- (8.6 KiB) Not downloaded yet
-
- MiniMap Terrain Defense Trainer 16x16=256 tiles, 76% land, Classic, Flat, Lua, v1.sav.zip
- (8.41 KiB) Downloaded 1 time