new rulesets offerred

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Ignatus
Elite
Posts: 493
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: new rulesets offerred

Postby Ignatus » Fri Feb 05, 2021 10:16 am

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.

User avatar
Dino the Dinosore
Veteran
Posts: 91
Joined: Sun Dec 31, 2017 3:41 am

Re: new rulesets offerred

Postby Dino the Dinosore » Mon Feb 08, 2021 3:17 am

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.

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

Re: new rulesets offerred

Postby nef » Mon Feb 08, 2021 1:31 pm

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.

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

Re: new rulesets offerred

Postby Ignatus » Tue Feb 09, 2021 7:59 pm

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

User avatar
Dino the Dinosore
Veteran
Posts: 91
Joined: Sun Dec 31, 2017 3:41 am

Re: new rulesets offerred

Postby Dino the Dinosore » Fri Feb 12, 2021 3:56 am

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.

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

Re: new rulesets offerred

Postby Ignatus » Fri Feb 12, 2021 11:38 am

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.

Lachu
Elite
Posts: 430
Joined: Sat May 04, 2013 2:19 pm

Re: new rulesets offerred

Postby Lachu » Fri Feb 12, 2021 7:38 pm

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

User avatar
Dino the Dinosore
Veteran
Posts: 91
Joined: Sun Dec 31, 2017 3:41 am

Re: new rulesets offerred

Postby Dino the Dinosore » Tue Feb 16, 2021 5:43 am

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.

User avatar
Dino the Dinosore
Veteran
Posts: 91
Joined: Sun Dec 31, 2017 3:41 am

Re: new rulesets offerred

Postby Dino the Dinosore » Mon Jun 07, 2021 1:07 am

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.

I have also figured out to make them into modpacks - can anyone help me get them onto the "modpack.freeciv.org" server?
Attachments
dino2-ruleset.zip
(610.38 KiB) Downloaded 27 times
dino-ruleset.zip
(542.68 KiB) Downloaded 30 times
Last edited by Dino the Dinosore on Mon Aug 23, 2021 2:48 am, edited 3 times in total.

cazfi
Elite
Posts: 2026
Joined: Tue Jan 29, 2013 6:54 pm

Re: new rulesets offerred

Postby cazfi » Tue Jun 15, 2021 4:53 am

Do you have .mpdl files for these? What is the difference between dino and dino2?