"Simulation" ruleset - WORK IN PROGRESS

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

Here's stuff to implement canals, zipped up. In terrain.ruleset there's 2 extras - Waterways and Canals. Waterways are for early, require Engineering and can accommodate smaller sea vessels, Canals are for later, require Industrialization and can accommodate all sea vessels. My unit classes are different, so there's some fudging needed to adapt to the SIM30 unit classes. There's 2 .png files and 2 .spec files - the "canal.*" are used for Waterways, the "big_canal.*" for Canals. The snippet in effects.ruleset is to help with gameplay and realism - e.g. a Battleship in a Canal shouldn't defend at 12.

I am indebted to forum user Ignatus, who informed me about "first_reqs" and "integrates" and how they interact - something that isn't really documented anywhere. I was able to figure it out and get it to work to allow Waterways to be built adjacent to Waterways and extend further inland. This only works in 3.0, not in 2.6. There is a display bug, the comments in terrain.ruleset about integrates say "graphics are drawn accordingly", but that only works for road/rails/maglev, not for rivers/Waterways/Canals. There is an osdn ticket.
Attachments
canals.zip
(26.68 KiB) Downloaded 995 times
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

Dino the Dinosore wrote:
Thanks!
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by nef »

Dino the Dinosore wrote: I am indebted to forum user Ignatus, who informed me about "first_reqs" and "integrates" and how they interact - something that isn't really documented anywhere. I was able to figure it out and get it to work to allow Waterways to be built adjacent to Waterways and extend further inland. This only works in 3.0, not in 2.6.
Here is a demo I worked up but Ignatus beat me to it.
canals.txt
(2.71 KiB) Downloaded 1041 times
It was either 2.6.0 or 2.6.5. If you can spare the time can you say why it is not good enough for what you need (if indeed its not)? I am assuming the graphics is a separate problem.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

If I got it right, this allows building a canal only 1 tile into land, not crossing the whole continent with canals, correct?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by nef »

Entire continent.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

Is there a way to limit this only to shore tiles?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by cazfi »

Corbeau wrote:Is there a way to limit this only to shore tiles?
See variant2 ruleset for the example of this.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by nef »

Corbeau wrote:Is there a way to limit this only to shore tiles?
If you mean that canals only start from shores but not rivers the file has options.

If you mean only one tile (i.e. no extension) then that was what Dino originally had but wanted more. A few years back there was a discussion about this and how to do the connecting graphics. You could try a search on my posts and/or dino`s. (cazfi also but how long have you got to go through the list?)
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

That discussion was in this thread http://forum.freeciv.org/f/viewtopic.php?f=11&t=91837

I have just noticed one problem with the canals.zip attachment I posted earlier - the effect I added in effects.ruleset won't do what I intended. What I wanted was to give naval units in a canal a defense penalty, but the Defend_Bonus effect only supports attacking unit type. So the best I can do is -

Code: Select all

type="Defend_Bonus"
value=-50
reqs={"type","name","range"
"Extra","Canal","Local"
}
which affects all units on a canal tile, and is maybe realistic. There doesn't seem to be any way to make an effect which affects defending units.
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

Turning this thread back to the original topic of Simulation ruleset -
I've been looking into the details of the stack defense penalty implementation in effects.ruleset, and have a question about the "MaxUnitsOnTile" req. I assume that air units with the "DoesntOccupyTile" unit class flag don't get counted (is this documented anywhere?). But what about units transported on a ship? If I have a Transport with 8 units on it, stacked with a Battleship, will "MaxUnitsOnTile" think there's 10 units or 2 units? Also, is this documented anywhere?
Post Reply