Correct the rulesets civ1 and civ2

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

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Oct 14, 2019 12:55 pm

Lighthouse can be built in inland city???

EDIT: meynaf has put paid to this one - forget it. His answer - YES.


If not then change the reqs vector in [building_lighthouse] to read:

Code: Select all

reqs   =
    { "type",         "name",       "range"
      "Tech",         "Navigation", "Player"
      "TerrainClass", "Oceanic",    "Adjacent"
    }


Exactly the same for [building_magellans_expedition]

Code: Select all

.
reqs   =
    { "type",         "name",       "range"
      "Tech",         "Map Making", "Player"
      "TerrainClass", "Oceanic",    "Adjacent"
    }

Unfortunately the wiki is rather silent about conditions for building wonders (as distinct from improvements). 'Rome' doesn't help either.

No changes are needed to the help text since AGH does the job quite nicely.

The changes above would make the civ1 ruleset consistent with classic (but not civ2 which also does not have the "oceanic" predicates.)

(meynaf - would you be able to find a savefile that has inland and coastal cities together with the other criteria? [N.b. lighthouse is made obsolete by Magnetism.])
Last edited by nef on Mon Oct 14, 2019 2:40 pm, edited 1 time in total.

User avatar
meynaf
Veteran
Posts: 93
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: Correct the rulesets civ1 and civ2

Postby meynaf » Mon Oct 14, 2019 2:05 pm

nef wrote:Lighthouse can be built in inland city???

As surprising as can be, yes. I confirm that in civ1 you can build Lighthouse everywhere.


nef wrote:(meynaf - would you be able to find a savefile that has inland and coastal cities together with the other criteria? [N.b. lighthouse is made obsolete by Magnetism.])

A savefile maybe not (they're too advanced), but it's easy to get to this situation in a new game.

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

Civ2 trade route system

Postby Ignatus » Wed Oct 16, 2019 11:07 pm

Civilization II had a sophisticated trade route system that is only partially makeable within FC3.0 rulesets. I have no copy of the game so could missed or misinterpreted something but generally:
1. Trade routes can be established by civs that have discovered Trade (for cities of size>=3 that have Marketplace built?). Maximum 3 per city (outcoming amd incoming both?). Cities with bigger basic trade tend to beat ones with smaller trade even if the profit is for some reason lower.
2. Trade routes are unidirectional (food ones influent both ends but with different signs) and make profit to the city that has sent the Caravan/Freight. Min.dist is 10, no cancel from rival trading (Civilopedia thinks there is even a bonus but actually just foreign cities have twice more).
3. Each city of a civ that has developed Trade provides 3 commodities that can be loaded on caravans and demands 3 another commodities. The commodities seem random but their probability depends on quite a lot of factors (mainly, surrounding terrain, latitude and continent number, corresponding resource on city tile may add only several times more probability weight than its terain itself). Fulfilling a demand gets much greater bonus but then the demand/supply may change... Sometimes they just don't change... (Likely, you need a diplomate to know well the foreign demands?)
4. One time bonus has sophisticated system of calculation and depends on distance, basic trade and even connectivity. Some factors regard only one side, some either, and some both. The overall bonus is limited (usually with 2/3 of current research cost). The bonus in CivII changes when you rearrange workers within turn!
5. Then the trade route adds one or few trade points ("arrows") to its origin city. The income is not distance dependent.
6. You can load your caravan with any commodity your city produces, or with food. Only one caravan of one produced commodity may be supported by a city at time (they can be rehomed, what's the effect?) if it is not Hides (demand for them is also always unlimited). Food caravan fulfils 50% of destinstion granary (not taking the origin's?) and establishes a food trade route that transfers 1 food per turn from origin to the target (cancelled by starving origin condition?).
Last edited by Ignatus on Sun Oct 20, 2019 6:41 pm, edited 1 time in total.

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

Re: Correct the rulesets civ1 and civ2

Postby Ignatus » Thu Oct 17, 2019 4:42 am

Civ2 Scrolls of Ancient Wisdom. Airbase = irrigation + railroad! And many other quirks.

nef
Hardened
Posts: 180
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Oct 21, 2019 12:30 pm

The popular fc paradigm for gardening times is that the 'work' required for railroad, forts, and pollution cleanup is 3.

According to table 3-2 in 'Rome' the first two of these are dependant on the terrain, and the last is actually 4.

In short, these values can be expressed in terms of the basic move cost of the terrain. So, for example, build time for road is 0 + 2 x M.C. (unchanged).

According to the table in 'Rome' the build cost for railroad is 0 + 4 x M.C., i.e. twice the road cost. For forts the cost is 4 + 1 x M.C., and for pollution 4 + 0 x M.C..

RAILROAD:

Since 'road_time' is set to 2, 4, or 6, the simple fix for railroad is to replace
in section [extra_railroad] the line that reads

Code: Select all

build_time     = 3

by

Code: Select all

build_time_factor = 2


(A better fix would be to follow the algebra expressed above for both road and railroad.)

FORTRESS:

In [extra_fortress] change the line that reads

Code: Select all

build_time     = 3

by

Code: Select all

build_time_factor = 1
AND, for the following sections, replace the line that reads

Code: Select all

base_time            = 1
by the following:

For sections [terrain_desert], [terrain_grassland], [terrain_plains], [terrain_tundra]

Code: Select all

base_time            = 5


For sections [terrain_arctic], [terrain_forest], [terrain_hills], [terrain_jungle], [terrain_swamp]

Code: Select all

base_time            = 6


For section [terrain_mountains]

Code: Select all

base_time            = 7


An algebraic approach can't be used for fortress because in this more complex case the arithmetic in the server is not algebraic (for no apparent reason).


POLLUTION:

For all 'land' terrain i.e. sections [terrain_*] that contain the field 'class = "Land"', (that is, all those listed for FORTRESS above,) ADD the following field

Code: Select all

clean_pollution_time = 4
Just after "pillage_time" would be a suitable place. Note that this is 'add' not 'change' so it appears to be that 3 is the (undocumented) default for pillage (no doubt previously hardcoded for civ2).


These changes are to be made to the civ1 terrain.ruleset (only).

'Tundra' is actually missing from the table but the inference is obvious. Although pillage is discussed I could find no mention of work cost so I presume that it was always 1.

Finally, the table (and text) is actually misleading, and may have been the cause of a great deal of confusion in the fora (civfanatics, apolyton). The 'work' cost of gardening activities in Civ I was actually stochastic (random), so I presume these table values were averages.

meynaf, perhaps if you can spare the time firing up one of your 'advanced' saves, see if pillage time is deterministic (or stochastic) and what the work cost (or average work cost) is.

Also, the table is not clear as to whether the work time for rail includes, or does not include, the time for roads. I have assumed that it is in addition to the road time. So a second request if I may ask: try to get some statistics on rail build times to estimate the average. You could use the "wakeup" exploit to speed things up (just keep waking up the settler and trying 'road' again and again until it happens. The count of 'road' commands would be the same as the number of turns if the settler is left to complete in its own sweet time.)

User avatar
meynaf
Veteran
Posts: 93
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: Correct the rulesets civ1 and civ2

Postby meynaf » Mon Oct 21, 2019 1:16 pm

nef wrote:meynaf, perhaps if you can spare the time firing up one of your 'advanced' saves, see if pillage time is deterministic (or stochastic) and what the work cost (or average work cost) is.

Pillage just takes 1 turn...


nef wrote:Also, the table is not clear as to whether the work time for rail includes, or does not include, the time for roads. I have assumed that it is in addition to the road time. So a second request if I may ask: try to get some statistics on rail build times to estimate the average. You could use the "wakeup" exploit to speed things up (just keep waking up the settler and trying 'road' again and again until it happens. The count of 'road' commands would be the same as the number of turns if the settler is left to complete in its own sweet time.)

Railroad time appears to be 4*MC. Nothing random.
This is taking the time to build the railroad when a road is already present.

nef
Hardened
Posts: 180
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Oct 21, 2019 4:40 pm

Pillage just takes 1 turn...
Good to set that one in concrete,

Railroad time appears to be 4*MC. Nothing random.
This is beginning to look like a version issue. I have to admit to being unsure about railroad but it doesn't fit with my understanding of how Civ I did gardening. Also I recall there was discussion in one of the fora about the second exploit for settlers - you could move them indefinitely along a road by alternating 2 moves with (rail)road/wakeup, except that it was not indefinite - from time to time you would actually build rail and have to wait the turn out to start again.

Although this is moot since fc is fully deterministic, it might be of interest to see if in your version which of the other forms of gardening are random.

So for now, it appears that my suggested changes are accurate (for at least one version of Civ I).

User avatar
meynaf
Veteran
Posts: 93
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: Correct the rulesets civ1 and civ2

Postby meynaf » Mon Oct 21, 2019 5:57 pm

nef wrote:This is beginning to look like a version issue. I have to admit to being unsure about railroad but it doesn't fit with my understanding of how Civ I did gardening.

Are you sure it's not something about Civ II resurfacing from old memories ?


nef wrote:Also I recall there was discussion in one of the fora about the second exploit for settlers - you could move them indefinitely along a road by alternating 2 moves with (rail)road/wakeup, except that it was not indefinite - from time to time you would actually build rail and have to wait the turn out to start again.

Of course from time to time you actually build the rail - after 4 times pressing "r" because it normally takes 4 turns. No mystery.


nef wrote:Although this is moot since fc is fully deterministic, it might be of interest to see if in your version which of the other forms of gardening are random.

I do not see any settler action as random...

nef
Hardened
Posts: 180
Joined: Mon Jun 25, 2018 5:01 pm

Re: Correct the rulesets civ1 and civ2

Postby nef » Mon Oct 28, 2019 12:56 pm

Definitely not Civ II. Never played it (and was in fact the prime reason why I downloaded fc in the first place). The Early Lander Guide had a detailed description of the exploit that allowed you to use an indefinite number of units when you were supposed to be limited to two max. Civ II was definitely deterministic.

As for Civ I I think it must be a version issue. I remember using the exploit. Pressing 'r' 4 times (in the one turn) is not necessarily significant but there were a variety of exploits due to poor design so maybe. In any event all rather academic - in fc you don't get any choice in the matter. And having different rulesets for different versions is probably getting a bit carried away.

Also, fc is free from all these settler exploits.

User avatar
meynaf
Veteran
Posts: 93
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: Correct the rulesets civ1 and civ2

Postby meynaf » Mon Oct 28, 2019 1:42 pm

I don't think this is version issue. There aren't many versions out there anyway ; i've only seen 855.04 and 855e.01.
Civ I can be strange sometimes, but i believe it is deterministic - at least for terrain enhancements by settlers.
That an exploit seems random does not imply it actually is, and anyway, it's an exploit so it does not need to make its way into fciv and this ends up being purely academic.

Beware, as our memory can be betraying us sometimes. This is why it is always better to make some tests to be sure. Perhaps you still have that civ I version you used before, available somewhere ? That would definitely rule out the version issue.

This kind of process is rather blind as we don't have access to original code, or at least, i don't have the time and motivation to disassemble it and find out. I fear fciv will never be able to "emulate" other civ fully...