Earth scenario and civ2civ3 ruleset

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
bard
Veteran
Posts: 121
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: 3077
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 300 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.
Post Reply