Possible bug, no movecost at sea?
Possible bug, no movecost at sea?
I make new terrain types. Right now, sea and lakes with ice floating on top. After some problems, I was adviced to implement this as new terrain types so the move cost would work.
So I made a new terrain type, "icy lake". Ice is a navigation hazard, so food & trade is lower than for a normal lake. This works, the frozen lake was less productive.
The ice should also increase the move cost, so I set "movement_cost=3" instead of the normal "1". Comments in terrain.ruleset indicates that this is the way to make a tile slower.
Started a game, used edit mode to place a trireme. I expected it to spend its 3 move points on a single tile move in the ice, but it moved 3 steps as usual. The same with other ships - they move through icy lakes just as fast as they move through other lakes or sea.
Am I misunderstanding something, doesn't movement_cost do what I expect? Is there something else I must do? Or some sort of bug?
So I made a new terrain type, "icy lake". Ice is a navigation hazard, so food & trade is lower than for a normal lake. This works, the frozen lake was less productive.
The ice should also increase the move cost, so I set "movement_cost=3" instead of the normal "1". Comments in terrain.ruleset indicates that this is the way to make a tile slower.
Started a game, used edit mode to place a trireme. I expected it to spend its 3 move points on a single tile move in the ice, but it moved 3 steps as usual. The same with other ships - they move through icy lakes just as fast as they move through other lakes or sea.
Am I misunderstanding something, doesn't movement_cost do what I expect? Is there something else I must do? Or some sort of bug?
Re: Possible bug, no movecost at sea?
Likely sea units class does not have "TerrainSpeed" flag, and thus those units always move like the movement cost would be 1 (like air units flying over the terrain).
Re: Possible bug, no movecost at sea?
Thanks. Adding "TerrainSpeed" to the sea unit classes fixed this, I can now make sea terrains that are slower to navigate. (Ice or reefs). Unfortunately, another problem came up. Rivers offer lower move cost for land units. But triremes go there too, and with TerrainSpeed they too get triple speed and go 9 tiles in one turn. (And other ships navigating my big rivers also became very fast.)
There seem to be no way to give different speed bonus to sea and land units, except when one of them doesn't use TerrainSpeed?
There seem to be one way I can have TerrainSpeed for sea units and maintain backward compatibility:
1. Triple the move cost on all land terrain and rivers/roads, so triremes on rivers (and ships on big rivers) does not get a crazy high speed while there.
2. Triple the move points for all the land units, so they get their normal speed on land with such tripled cost.
If there is a better way, it'd be nice to know. My approach will break, if land units gets some sort of bridge extra that lets them move across sea.
There seem to be no way to give different speed bonus to sea and land units, except when one of them doesn't use TerrainSpeed?
There seem to be one way I can have TerrainSpeed for sea units and maintain backward compatibility:
1. Triple the move cost on all land terrain and rivers/roads, so triremes on rivers (and ships on big rivers) does not get a crazy high speed while there.
2. Triple the move points for all the land units, so they get their normal speed on land with such tripled cost.
If there is a better way, it'd be nice to know. My approach will break, if land units gets some sort of bridge extra that lets them move across sea.
Re: Possible bug, no movecost at sea?
Tripling the land move cost, as well as the land unit move points seems to work. (The display of a land units remaining move points are a bit awkward though.) Land units move as they always did, ships move at normal speed on sea and on the rivers supporting them.
There were one strange effect: A ship/trireme moving from sea into a river, now looses all its move points doing so. Moving on the river, or from river to sea, works as expected. Looks like river mouths are difficult for the navigators...
There were one strange effect: A ship/trireme moving from sea into a river, now looses all its move points doing so. Moving on the river, or from river to sea, works as expected. Looks like river mouths are difficult for the navigators...
Re: Possible bug, no movecost at sea?
I think it doesn't lose "all" movement, but the move cost is that of the underlying terrain. That's because the move is not along the river (road type). Just like a land unit moving from a non-road tile to a road tile.
Re: Possible bug, no movecost at sea?
I don't think there's a way to get all this completely right with current ruleset formats, but I'm trying to figure out what future versions of freeciv engine (ruleset format) could do to better support such rulesets. Any ideas?
Re: Possible bug, no movecost at sea?
It looses "all" move points. A destroyer has 6 move points, and is on a sea tile next to a big river mouth. The big river is on grassland, which has move cost 3 in this setup. And with a river on the tile, the move cost is 1. So, I expect the destroyer to have 5 moves left when moving into that river mouth, (which it indeed gets, if it moves from another river tile instead of from a sea tile.) Now, if it mistakenly looses 3 move points from terrain, then it ought to have 2 move points left. But it has none, so it lost all its move points entering that big river. The only difference between big rivers and normal rivers, is that the big rivers are native to all sea units, not only triremes. And of course, the graphics.
The destroyer did not move along the river, but onto it. That is correct. But it moved away from a sea tile with move cost 1, not something with move cost 6. If the terrain move cost without river is used, then that cost was 3, not 6.
When there is a coastal city next to the river, then the destroyer move with the expected cost of 1 from sea to city, and a cost of 1 from city to big river. (And the same for triremes on small rivers.)
Re: Possible bug, no movecost at sea?
For my use, it is sufficient if an "extra", such as a river or canal, can specify different move costs for land units and sea units. I could then specify the usual 1/3 move point for land units using the river/canal, and 1 move point for a sea unit (ship) using the river/canal. With that, it won't be necessary to triple the move cost for land units. And a "bridge extra" connecting islands, could do the same. Cheap moves for land units because the bridge has a road on it, and normal move cost for ships passing under.
Currently, a river extra has 2 sections in terrain.ruleset specifying who may use it, and what the move cost is:
Code: Select all
[extra_river]
name = _("River")
causes = "Road"
native_to = "Land", "Small Land", "Merchant", "Trireme"
flags = "NativeTile"
...
[road_river]
extra = "River"
move_cost = 2
;move cost in sixths of a move point
A more flexible way, would be to specify the move_cost in the "native_to" part. That would allow different cost for different classes. Something like:
Code: Select all
native_to = "Land":2, "Small Land":2, "Merchant":2, "Trireme":6, "Big Land":4
-
- Posts: 9
- Joined: Wed Jan 18, 2023 6:57 pm
Re: Possible bug, no movecost at sea?
I've been considering just removing the River-road effect from my ruleset entirely. Or removing the speed multiplier and taking ground units (except Hovercraft) out of the native list, anyway. The justification for it existing in the first place seems to be using notional boats that don't actually exist as units to transport real units on the river, but if we've got actual riverboats that can really carry units... (And I have several besides just Triremes in my ruleset, including Longships that are both River- and Deep Ocean-capable.)
I'd actually like to make it so crossing rivers without a bridge or ferry costs MP, but it doesn't really work with the way the game mechanically handles Rivers.
I'm four turns from starship arrival in my current game; I think I'm going to try removing ground movement on rivers for the next one and see how it goes.
I'd really like to be able to set different terrain costs for different classes or even different units, though. Among other things, I don't like the Always Road for Alpine Troops, that gives them fast movement across Grassland, Plains, Swamp...
Tangentially, is there a setting for the old Civ effect (I don't even remember whether it was in Civ2 or just Civ1) where attempting a move that you didn't actually have the MP for could sometimes fail? (I think in proportion to the MP you were short, so if you were to attempt to move into Mountains with only 1 MP left, it'd only work 1/3 of the time.)
I'd actually like to make it so crossing rivers without a bridge or ferry costs MP, but it doesn't really work with the way the game mechanically handles Rivers.
I'm four turns from starship arrival in my current game; I think I'm going to try removing ground movement on rivers for the next one and see how it goes.
I'd really like to be able to set different terrain costs for different classes or even different units, though. Among other things, I don't like the Always Road for Alpine Troops, that gives them fast movement across Grassland, Plains, Swamp...
Tangentially, is there a setting for the old Civ effect (I don't even remember whether it was in Civ2 or just Civ1) where attempting a move that you didn't actually have the MP for could sometimes fail? (I think in proportion to the MP you were short, so if you were to attempt to move into Mountains with only 1 MP left, it'd only work 1/3 of the time.)
-
- Posts: 9
- Joined: Wed Jan 18, 2023 6:57 pm
Re: Possible bug, no movecost at sea?
Also, if it's supposed to represent using virtual boats as river transport, it seems weird that the speed depends on the ground unit's speed.