Skip to content

Game.Version

Assembly: Assembly-CSharp (game runtime)
Namespace: Game

Type: public static class

Base: System.Object

Summary:
A centralized container of Colossal.Version constants used by the game to mark save-game / data/schema changes and feature flags across different engine/game versions. Each field is annotated with a VersionConstant attribute that records a human-readable version identifier (build/version string). These Colossal.Version instances are used by the engine and serializers to detect compatibility, enable/disable features and perform migrations when loading older saves or handling data introduced in newer builds. {{ This class is purely a static collection of version constants — there are no instance members, properties or methods. Modders can use these constants to check against the running/current game version or to detect whether certain features/serialization fields exist in a save. }}


Fields

  • public static readonly Colossal.Version MS9_0
    {{ VersionConstant attribute: "0.9.0a1 [3651.20586]". Constructed as new Colossal.Version(1, 40533500692222058L, 0). Represents an early feature/serialization marker (named MS9_0) introduced in the 0.9.0a1 build. }}

  • public static readonly Colossal.Version newPrefabID
    {{ VersionConstant attribute: "0.9.0a1 [3658.9790]". Constructed as new Colossal.Version(1, 40533500692670014L, 0). Marks the introduction of a new prefab ID scheme/behavior in that build. }}

  • public static readonly Colossal.Version waterElectricityID
    {{ VersionConstant attribute: "0.9.0a1 [3661.16680]". Constructed as new Colossal.Version(1, 40533500692873512L, 0). Used to identify when water/electricity ID handling changed. }}

  • public static readonly Colossal.Version tramNavigationImprovement
    {{ VersionConstant attribute: "0.9.0a1 [3665.18175]". Introduced improvements to tram navigation. }}

  • public static readonly Colossal.Version cityStatistics
    {{ VersionConstant attribute: "0.9.0a1 [3667.21222]". Marks a change to city statistics handling/serialization. }}

  • public static readonly Colossal.Version shipLanes
    {{ VersionConstant attribute: "0.9.0a1 [3673.25516]". Introduces ship lane data versioning. }}

  • public static readonly Colossal.Version lanePosition
    {{ VersionConstant attribute: "0.9.0a1 [3679.20148]". Version marker for lane positional data. }}

  • public static readonly Colossal.Version waterPollution
    {{ VersionConstant attribute: "0.9.0a1 [3713.22183]". Marks water pollution data changes. }}

  • public static readonly Colossal.Version parkingLaneImprovement
    {{ VersionConstant attribute: "0.9.0a1 [3717.23995]". }}

  • public static readonly Colossal.Version parkingLaneImprovement2
    {{ VersionConstant attribute: "0.10.0a1 [3736.25705]". }}

  • public static readonly Colossal.Version buildingOptions
    {{ VersionConstant attribute: "0.10.0a1 [3737.22548]". }}

  • public static readonly Colossal.Version damageTypes
    {{ VersionConstant attribute: "0.10.0a1 [3741.25793]". }}

  • public static readonly Colossal.Version notificationData
    {{ VersionConstant attribute: "0.10.0a1 [3758.11619]". }}

  • public static readonly Colossal.Version ...
    {{ The file contains a long list of similar static readonly Colossal.Version fields (hundreds), each annotated by VersionConstant with a build string and created by calling new Colossal.Version(major, identifier, revision). Each field corresponds to a particular feature, bugfix, serialization change or refactor across the game's development (for example: electricityTrading, seekerReferences, staticObjectPrefab, snow, savedStatistics, healthcareImprovement, roadFlags, averageTaxRate, disasterResponse, taxiDispatchCenter, waterTrade, parkingRotation, batteryRework, pathfindImprovements, trainPrefabFlags, waterPipeFlowSim, meshGroups, and many more). }}

  • public static readonly Colossal.Version current
    {{ VersionConstant attribute: (no explicit string) — this is the "current" version constant for the running build. Constructed as new Colossal.Version(1, 301832439184710203L, 46370482). The third constructor parameter (46370482) encodes the int build/revision in this case. This field is commonly used to represent the current serialization/schema version for saves and runtime checks. }}

{{ Note: Each field name is intended to be descriptive — reflecting the subsystem or change introduced in the engine at that point. Modders who need to match specific serialization quirks or add compatibility checks can compare saved-data version info to these constants. If you need a specific constant that isn't listed above, consult the source file to find its exact name and VersionConstant attribute. }}

Properties

  • (none)
    {{ This class defines no properties. All members are static readonly fields. }}

Constructors

  • (none — static class)
    {{ As a static class, Version has no constructors accessible or required. All fields are initialized inline. }}

Methods

  • (none)
    {{ There are no methods defined in this class; it only exposes version constants. }}

Usage Example

// Example: check if the running/current game version is at least the build that added a feature
// (pseudo-code — exact comparison API depends on Colossal.Version implementation)

using Colossal;
using Game;

void CheckFeature()
{
    // Suppose Colossal.Version implements comparison operators or methods:
    if (Version.current >= Version.parkingLaneImprovement2)
    {
        // safe to use the newer parking-lane-improvement2 features/serialization
        Debug.Log("parkingLaneImprovement2 is available in this build.");
    }
    else
    {
        Debug.Log("Feature not available; fallback to legacy behavior.");
    }
}

// Example: log attribute string from a constant (requires reflection to access VersionConstant attribute)
using System;
using System.Reflection;

void LogVersionConstantInfo()
{
    var fi = typeof(Game.Version).GetField("parkingLaneImprovement2", BindingFlags.Public | BindingFlags.Static);
    var attr = fi?.GetCustomAttribute(typeof(VersionConstantAttribute)) as Attribute;
    // Read attribute data (implementation-dependent) and log it.
}

{{ YOUR_INFO }}
- Where to find more: open Game/Version.cs in the game's managed assemblies (Assembly-CSharp) to see the full list of version constants.
- Why this matters for modders: comparing against these constants lets mods guard code and data handling depending on which game features or serialization formats are present, improving compatibility across game updates.
- Caution: Do not attempt to modify these constants in-game; they are used by internal serialization/migration logic. Use them only for read/compare operations.