Correct the rulesets civ1 and civ2

Do you want to help out with Freeciv development? Then check out this forum.
nef
Veteran
Posts: 76
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Nov 26, 2018 2:19 pm

In relation to 22d [elsewhere] The city wall defence bonus should be corrected as follows:

Code: Select all

[effect_city_walls]
type    = "Defend_Bonus"
value   = 200
reqs   =
    { "type", "name", "range", "present"
      "Building", "City Walls", "City", TRUE
      "UnitClass", "Land", "Local", TRUE
      "Building", "Great Wall", "Player", FALSE
      "UnitType", "Artillery", "Local", FALSE
    }

[effect_city_walls_1]
type    = "Defend_Bonus"
value   = 200
reqs   =
    { "type", "name", "range", "present"
      "Building", "City Walls", "City", TRUE
      "UnitClass", "Sea", "Local", TRUE
      "Building", "Great Wall", "Player", FALSE
    }


should be replaced by:

Code: Select all

[effect_city_walls]
type    = "Defend_Bonus"
value   = 200
reqs   =
    { "type", "name", "range", "present"
      "Building", "City Walls", "City", TRUE
      "Building", "Great Wall", "Player", FALSE
      "UnitType", "Artillery", "Local", FALSE
      "UnitType", "Bomber", "Local", FALSE
    }


A similarly for the great wall if left uncorrected:

Code: Select all

[effect_great_wall]
type    = "Defend_Bonus"
value   = 200
reqs   =
    { "type", "name", "range", "present"
      "Building", "Great Wall", "Player", TRUE
      "CityTile", "Center", "Local", TRUE
      "UnitType", "Artillery", "Local", FALSE
      "UnitType", "Bomber", "Local", FALSE

    }



The changes load but I have not tested the actual effects mostly because I have not yet been able to get far enough into (any) fc2.6 game.

The Effect "Unit_No_Lose_Pop" is not invoked for the GW so the supplied ruleset is inconsistent.


Concerning the GW - the fc2.5 ruleset has the (almost correct) comment:

; NOTE:
; In Civ1 enemies are forced to offer cease-fire or peace.

There appears to be no current facility to implement this but:
a) caz is obviously thinking about it; and
b) maybe something in LUA may help (any ideas?).

Perhaps something a little more relevant may be the effects "Have_Embassies" and/or "Gain_AI_Love"

nef
Veteran
Posts: 76
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Dec 03, 2018 12:52 pm

Railroad auto on center. In Civ I you could not even use a settler to build a railroad on a city center tile but that was probably a mistake since you could build one first (and then found the city on it).

Delete the following line

Code: Select all

flags          = "AutoOnCityCenter"
in the rule "[extra_railroad]" (Civ1 terrain.ruleset).

The help text:

Code: Select all

"), _("\
City center tiles with roads are automatically upgraded to railroads\
 when you learn the Railroad technology.\
should be deleted at the same time.

Ignatus
Veteran
Posts: 62
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Correct the rulesets civ1 and civ2

Postby Ignatus » Mon Dec 03, 2018 8:48 pm

Oh, and AI could not use railroads as more than just roads (as well as GOTOed units). This is so sick that I doubt if it woth putting in. (But well, how long ago one have played Civ1 not just out of nostalgie?)

nef
Veteran
Posts: 76
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Dec 10, 2018 12:53 pm

Ignatus wrote:Oh, and AI could not use railroads as more than just roads (as well as GOTOed units). This is so sick that I doubt if it woth putting in. (But well, how long ago one have played Civ1 not just out of nostalgie?)


It's not just about movement. Railroad in Civ I also affects ALL tile produce. Many features in the civ1 ruleset are about nostalgia. Change to unit names from Civ II back to Civ I for example. Zero effect on gameplay, but nice for the memories.

When it comes to being sick I think fc has 'some room for improvement'. I am currently playing some civ1 games with FoW off and reveal map on (to see what's going on). Easy to clean up entire game by t50 if you can get quick access (same continent or short trireme trip). Worst case is if you need Sail(=caravel) but even then you can reduce the last one or two to just a couple of cities. Stay in despotism. Miscalculation of corruption means the cities you capture produce no trade but you keep up tech by capturing their cities. For some reason they make no attempt to defend (until late in the game) so you can take out 1 or 2 AI's with just a single militia. This doesn't seem to be quite such a problem in other rulesets and I have not yet figured out the difference. But one thing is clear: Civ I was an austere game. You had to work hard to develop your cities. You had to work hard to research techs. Compare that to fc classic where your cities grow fast and the tech tree is over before your coffee is cool enough to drink. This is one reason why I bother. The more I play all the other variants that fc has to offer the more I suffer from nostalgia.

Then of course there is the elephant in the room: small pox. With each cavalry (=horsemen) unit you can take out three (or more!) cities in a row in just one turn. Never happened in Civ I. Cities were almost always nicely spaced. But it's a vexed question. What is optimal AI play? And should they use it, or should they be taught 'to be nice'?

nef
Veteran
Posts: 76
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Dec 10, 2018 1:14 pm

Road always on city center.

Place (or replace) the following into script.lua in the civ1 ruleset:

Code: Select all

--  nef 2018/12/5

--  This lua script provides the feature in Civilization (Civ I) whereby
--  a city when razed pillages all improvements on the city center tile.
--  This defeats the exploit of getting a free bridge before knowing
--  the bridge building technology.

--  based on city ruins (anon.)
 
function city_destroyed_callback(city, loser, destroyer)
  city.tile:remove_extra("Railroad")
  city.tile:remove_extra("Road")
  city.tile:remove_extra("Irrigation")
  city.tile:remove_extra("Mine")
--  city.tile:create_extra("Ruins", NIL)
  -- continue processing
  return false
end

signal.connect("city_destroyed", "city_destroyed_callback")



I am certain about railroad/ road; confident about irrigation, guessing about mines. Easily defeated if not so. Can someone check to see what happens in Civ II - it may be the same, but in any case I would recommend this for ALL other fc supplied rulesets. At the end of the day many cities (such as London) were built on river CROSSINGS so ALL rulesets should have road ALWAYS on city center.

"if"'s are apparently not needed but if this is (or will not be) the case can someone please advise?

Note for many fc rulesets this part of the script should be 'replace'. An alternative would be to add another call back (with different function name) but it would be easier to just select what you want with comment/uncomment.

Reinstate ruins as you please, but only if the extra is defined in the ruleset.