Page 2 of 3

Re: new rulesets offerred

Posted: Fri Feb 05, 2021 10:16 am
by Ignatus
Dino the Dinosore wrote:I tried and failed with an approach similar to the extra "Inland canal" idea - problem is that it only gets you one more tile. To make the canal go further inland then you need another extra "Inland canal2" requiring "ExtraFlag", "Inland canal", "CAdjacent", which again only gets you one more tile, so then you need another extra "Inland canal3" requiring "ExtraFlag", "Inland canal2", "CAdjacent", etc. The ideal solution would be to have multiple reqs that allow Canal next to Oceanic, River or Canal. The issue of requirement vectors has been discussed in a couple other threads - http://forum.freeciv.org/f/viewtopic.php?f=11&t=91457 and http://forum.freeciv.org/f/viewtopic.php?f=13&t=551
My idea was to make one extra flag for both "coast" canal and inland canal (and probably rivers), so you can start inland canal from any suitable extra and continue infinitely, and "coast" canal will start from an oceanic terrain in absense of such an extra. (Also, if any bonuses
other than movement are provided by a canal, you probably should put river and other canal type into negated local requirements).
Huh, trade bonuses would be natural for canals, they are often built just to carry cargo ships, and so Freeciv concept of "trade" works that you increase it just from roads to nowhere. We can use civ2civ3 hack that most trade goes from routes and caravans to establish them move only by roads, but we probably don't want. Also, maybe if we have invented channels here, we should disable irrigating from irrigation and enable irrigating from a canal.

Re: new rulesets offerred

Posted: Mon Feb 08, 2021 3:17 am
by Dino the Dinosore
Gave it another try and failed again. Problem is that custom flags defined for terrain can't be used by extras. Extras can only have flags from the list of pre-defined extra flags.

Re: new rulesets offerred

Posted: Mon Feb 08, 2021 1:31 pm
by nef
Dino the Dinosore wrote: An argument could be made that a Canal should give a trade bonus like a River does, but I did not do that because then you could add a Canal to tiles worked by a city just to get that trade bonus, which seems wrong.
In Civ I, you only get the trade bonus once for road and/or river. You could add canals to that list.

Re: new rulesets offerred

Posted: Tue Feb 09, 2021 7:59 pm
by Ignatus
Dino the Dinosore wrote:Gave it another try and failed again. Problem is that custom flags defined for terrain can't be used by extras. Extras can only have flags from the list of pre-defined extra flags.
Well, yes... but, as a kludge, some of the flags will not do much harm (e.g. "ConnectLand" or, if no defense value given, "NaturalDefense"), maybe some of them will do the thing :idea: :mrgreen:
edit: HRM feature request added
edit: oops, custom extra flags are already done in v.3.0

Re: new rulesets offerred

Posted: Fri Feb 12, 2021 3:56 am
by Dino the Dinosore
Thanx, Ignatus - it's a kludge for sure but it works! The "ConnectLand" extra flag is not used by any ruleset AFAIK (wonder why it's there), so I tried it and it does the job. I have edited my first post in this thread to have an updated zip file which now has an "Inland Canal" in addition to "Canal" so canals can be longer.

Re: new rulesets offerred

Posted: Fri Feb 12, 2021 11:38 am
by Ignatus
Ow, they explained me how it should be done: you put
* into extra_canal.reqs: "TerrainClass", "Land", "Local",
* into road_canal.first_reqs: "TerrainClass", "Oceanic", "Adjacent"
* into road_canal.integrates: "River"
If you have specified any first_reqs for the 'road', it won't be built unless either similar/integrated road is near (cardinally adjacent if move mode on the road in question is cardinal or relaxed, adjacent if the road is always fast), or the first_reqs are fulfilled alongside with extra reqs.

Re: new rulesets offerred

Posted: Fri Feb 12, 2021 7:38 pm
by Lachu
I don't know much about rulesets.
Maybe adding rules like this:
A.
1.Connect: A->B
2.Connect: B->A
OR:
B.
1.Connect:A->B
2.Connect:B->C
3.Connect:C->A

Re: new rulesets offerred

Posted: Tue Feb 16, 2021 5:43 am
by Dino the Dinosore
Now that "Inland Canal" is working, I have found some consequences to deal with.
1 Having e.g. Battleship or AEGIS Cruiser in a canal warps land combat. Fixed with change in effects.ruleset to give 50% defense penalty to Sea class units in a canal, which is realistic.
2 Having a canal should enable irrigation in adjacent tiles. Added fix in effects.ruleset.
3 Found that a canal next to a non-coastal city enables the city to produce naval units - not a problem. Added to help text.
4 Found that a canal next to a non-coastal city does not enable the city to build any improvements - again, not a problem. Added to help text.
5 Canals and bases (Fort, Airbase, etc) should not be allowed on the same tile. Made changes to reqs in terrain.ruleset.

Updated the zip file in my first post in this thread.

Re: new rulesets offerred

Posted: Mon Jun 07, 2021 1:07 am
by Dino the Dinosore
I've just discovered that the game.ruleset file can have a section e.g.

Code: Select all

[tileset]
prefered="dino2"
This means I don't have to use a modified amplio2.tilespec file, so I've reorganized my stuff to make it easier to install. Just download a zip file, un-zip it, and put the 3 files contained in the resulting folder into your share/freeciv folder or ~/.freeciv/2.6 folder.

I have also figured out to make them into modpacks - can anyone help me get them onto the "modpack.freeciv.org" server?

Re: new rulesets offerred

Posted: Tue Jun 15, 2021 4:53 am
by cazfi
Do you have .mpdl files for these? What is the difference between dino and dino2?