• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(148395)

Recruit
1 Badges
Aug 5, 2009
9
0
  • Crusader Kings II
Can anyone explain to me how a ship's speed is calculated? I've been doing tests in game, but have come up with some very surprising results.

In misc.txt there are 3 global values that influence a ship's speed.

speed_base_normal: this determines a ship's minimum speed, where a value of 1.0 is 53.333 knots. This is comedic (try it!) but surprisingly high. This value is an absolute minimum, and a ship even with its sails down will still sail straight ahead at its minimum speed. I would set this at 0 for realism (it's not), as ships can still turn slowly if they get caught in irons. Here are some other sane values: 0.01875 = 1 knot, 0.0375 = 2 knots, 0.05625 = 3 knots. I don't know if or how rounding influences this. No other numbers appear to affect this value.

wind_push_normal: still testing. If a ship's tactical speed is 0, wind has no effect on it no matter what.

headwind_normal: still testing precise numerical effect. High enough values (tested at 100.0!) can overcome a ship regardless of its facing and push it in the direction of the wind, which can force it to run aground.

wind_push_normal and headwind_normal are not absolute like speed_base_normal is, and their influence on a ship's speed is related to that ship's individual data.

In shiptypes.txt there is an additional value for each ship that influences its individual speed in tactical battles.

maximum_speed: this has no apparent effect on a ship's speed at all. I believe it's the displayed speed in game, because at 0, 16, and 160 it had no influence on my cutter's performance.

speed_strategic: I did not test this at all, since I assume it only deals with strategic map speed.

speed_tactical: I'm confused. This design choice has boggled me more than anything else I've found in the game. Tactical speed is not linear.

Here are my test results. Wind speed is 8 knots ("calm" setting in quick battle), sails are set to half / battle. wind_push_normal and headwind_normal are both set to 0, so wind direction does not matter and speed is constant. (I was surprised the ship would still move with those values, but the given wind speed on the mini-map/compass still matters.) Full sail increases speed by about 140%.

speed_tactical => actual speed
1.0 => 3 knots
2.0 => 10 knots
3.0 => 22 knots
5.0 => 60 knots
8.0 => 151 knots
10.0 => 236 knots

(For additional reference, speed_tactical 10.0 in a 14 knot wind produces a speed of 422 knots.)

When graphed this increase is obviously exponential. Why the developers used something so complicated makes no sense to me, but until I understand the math behind this I can't make a good analysis of how wind affects a ship's final calculated tactical speed.

I hope these numbers are of help to modders, but if someone could shed some light on speed_tactical I would very much appreciate it.
 
Those values are meant to make it easier for the design guys to make some fine tuning to ship behaviors and adjust the distinction between different ship types. They're not supposed to be a complete solution to how the ships move. Some of the variables are not configurable at the moment and some you see at shiptypes.txt are not in use anymore.

Those base speeds and wind variables are used in realism modes; more arcadish sailing has higher base speed and wind affects less for example.

Maybe in the future we'll write a modding tutorial about the subject or explain better at the forums or something.