My first attempt at a Cities: Skylines II mod. It displays precise decimal values for road building tooltips, replacing the default rounded integer values where it can or adding new tooltips for ones I could not patch/replace.
This is not how I would have preferred to have done this (simply modifying the UI) but instead takes the distance/angle calculations and converts them to strings before the game UI itself has a chance to round-down the calculations.
Should be compatible with ExtendedTooltips.
- Distance/Length: Shows more precise measurements with configurable decimal places (e.g., "12.34m" instead of "12m")
- Slope/Grade: Displays slope percentages (e.g., "4.23%" instead of "4%")
- Angles: Shows more accurate angles when placing curved roads and connecting to existing roads (e.g., "89.73°" instead of "90°")
- Displays precise angles when connecting new roads to existing roads
- Shows both supplementary angles at each connection point
- Works with both edge connections and node/intersection connections
- Should handle multiple connected roads at corners
- All precise tooltips are prefixed with
[P]to distinguish them from vanilla tooltips - [P] Angle tooltips appear below the vanilla toolip; the [P] Length tooltips, to the side.
Access mod settings from the game's Options menu:
- Distance Decimal Places (0-4): Number of decimal places for distance measurements
- Angle Decimal Places (0-4): Number of decimal places for angle measurements
- Enable Float Distance: Toggle precise distance display on/off
- Enable Float Angle: Toggle precise angle display on/off
Setting decimal places to 0 is equivalent to disabling the feature.
- Subscribe to the mod on Paradox Mods or manually install
- Enable the mod in the game's mod manager
- Restart the game
- Configure settings in Options > Mod Settings > Road Precision
I got this to work by:
- Registering custom
PrecisionNetCourseTooltipSystemandPrecisionGuideLineTooltipSystemthat run alongside vanilla tooltips - Displaying precise [P] tooltips near the vanilla tooltips.
- Accessing
NetToolSystemcontrol points to calculate angles directly from road geometry - Using the Entity Component System (ECS) to query road edge and node data for connection angles
Precise angles are calculated using vector dot products and acos() from control point tangent directions. The mod calculates angles for consecutive control points, edge connections, and node/intersection connections. These calculated precise angles are then matched to vanilla tooltips by comparing rounded integer values, allowing the mod to replace vanilla's rounded angle (e.g., 90°) with the actual calculated value (e.g., 89.73°).
MIT License - See LICENSE file for details
Bug reports and feature requests are welcome, just be courteous! Please include:
- Game version
- Mod version
- Steps to reproduce the issue
- Screenshots if applicable
Developed using:
- Cities: Skylines II Modding Tools
- HarmonyX for runtime patching
- dnSpy for game code analysis
- The continuous curve tool may not always show precise tooltips.
- [P] angle tooltips are not displayed when "snap to existing geometry" is disabled. When drawing roads without snapping enabled, the mod cannot calculate precise angles because control points don't reference existing road entities. In this case, only vanilla angle tooltips and [P] length tooltips will be shown. Enable snap-to-geometry for precise angle measurements.