Civ2civ3_earth ruleset (and earth map scenario)

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
bard
Veteran
Posts: 122
Joined: Fri Jun 14, 2013 2:00 pm

Re: Earth scenario and civ2civ3 ruleset

Post by bard »

It started as an attempt to make freeciv (based on civ2) more similar to civ3, but there are several features from civ3 that can not be implemented in freeciv, and many others that can not be exactly equal, so it ended as something in between.
Since then, I just try to use in the mod the new features introduced by the new versions of freeciv, no matter if the come from civ4 or later versions.
cazfi
Elite
Posts: 3335
Joined: Tue Jan 29, 2013 6:54 pm

Re: Earth scenario and civ2civ3 ruleset

Post by cazfi »

Anyway, only_killing_makes_veteran is being implemented as a ruleset option, and not as a hard rule, just because some people want it one way and others the other way. Ignatus wanted it enabled, you may want it disabled.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: Earth scenario and civ2civ3 ruleset

Post by nef »

I noticed in HRM a discussion about 'hermits' that could be included in fc3.1 due to an enhancement to the hut enter callback. I also gather that the feature is intended for civ2civ3 hence the choice of thread, but if I'm wrong I apologise for being 'off topic'.

To demonstrate the features of the new version of default hut enter, I have coded the following Lua to implement a 'demonstration' version of hermit huts that can be used right now in fc2.6. I have no clear idea of what is actually intended but I believe the key feature is that the huts are created during gameplay and not at the beginning. So a brief description:
  • 'Hermit' huts will appear on mountains. All others are normal fc type huts except that they will not give techs.
    If you are lucky a hermit hut will provide a tech.
    As the game progresses they will be created but will become increasingly harder to find.
    There is a year curfew (currently 1000AD) after which no new huts will be created.
There are a few extra features which I will not describe. I will leave that as a journey of discovery. You could read the code but that would be cheating.

To illustrate the use of inline coding for the _deflua_hut_ruleset_context function this version is as follows:

Code: Select all

function _deflua_hut_ruleset_context (self, unit)
  local  context        = self:reset (unit)
  local  MPF, tail      = context._MPF, context._tail
  if     unit.tile.terrain == mtn_terrain
  then  
         context.city_radius_sq = 5 -- actual city radius
         context.use_number     = thief
         if     context:_near_city ()
         or     works_nearby (unit.tile)
         then   context:_set_point (nobody_home, 1)
         else
                context:_set_point (hermit, 3)
                context:_set_point
                ( math.floor (random (0, math.min (5,unit.owner:gold()))),  1)
         end 
  else        
         context:_set_point ( 25, 1)
         context:_set_point ( 50, 3)
         context:_set_point (100, 1)
--         context:_set_point (MPF.technology, 3)
         context:_set_point (MPF.mercenary,  2)
         context:_set_point (MPF.barbarians, 1)
         context:_set_point (MPF.city,       1)
  end
  return context
end
Here is the INSERT into civ2civ3 script.lua :
civ2_3_huts.txt
(4.57 KiB) Downloaded 2582 times
No other changes to the ruleset are necessary.

If someone can tell me the details of what is actually intended for hermit huts I can have a go at it.
bard
Veteran
Posts: 122
Joined: Fri Jun 14, 2013 2:00 pm

Re: Earth scenario and civ2civ3 ruleset

Post by bard »

Released a version of civ2civ3_earth modpack for 3.1 (v2024_05). It is already available to install with the "modpack installer" tool shipped with freeciv.
First post updated with the links to download manually from github.

Future plans:
* This might be the last version of the ruleset. Thanks to the impressive modding capabilities of Freeciv 3.1, I have finally been able to get the game balance that I like.
* I will try to keep porting and fixing the ruleset for 3.2 and beyond, but if I don't, anyone can easily upgrade the ruleset to a new version thanks to the ruleup tool included in Freeciv releases.
* The main pending tasks are to improve the helptexts, and to revise the balance of spy actions, air-to-air combat, and auto-attacking units.

I see people is downloading this modpack, but I'm not sure if someone is actually playing it. If you find any bug playing it, or some balance issue, please let me know here.
Post Reply