Page 4 of 6

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Sun Nov 21, 2021 12:40 am
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.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Sun Nov 21, 2021 1:32 pm
by Corbeau
Dino the Dinosore wrote:
Thanks!

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Mon Nov 22, 2021 2:31 pm
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 1155 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.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Mon Nov 22, 2021 2:43 pm
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?

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Mon Nov 22, 2021 2:50 pm
by nef
Entire continent.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Mon Nov 22, 2021 3:16 pm
by Corbeau
Is there a way to limit this only to shore tiles?

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Mon Nov 22, 2021 3:54 pm
by cazfi
Corbeau wrote:Is there a way to limit this only to shore tiles?
See variant2 ruleset for the example of this.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Mon Nov 22, 2021 5:43 pm
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?)

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Sun Dec 05, 2021 4:35 am
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.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Thu Dec 09, 2021 2:34 am
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?