Skip to content

Game.DistrictModifierType

Assembly: Assembly-CSharp (game code)
Namespace: Game.Areas

Type: public enum

Base: System.Enum

Summary: DistrictModifierType enumerates the different kinds of district-wide modifiers used by the game to alter gameplay parameters for a district (for example: changing garbage production, crime accumulation, or street speed limits). Mod values represent distinct categories of effects that systems or mods can query and respond to when applying district-level adjustments.


Fields

  • GarbageProduction
    Increases or decreases the rate at which buildings or households in the district generate garbage.

  • ProductConsumption
    Modifies how quickly products/goods are consumed by residents or businesses in the district (affects demand/stock flows).

  • ParkingFee
    Affects parking fees charged in the district; can influence parking behaviour, traffic patterns, and parking revenue.

  • BuildingFireHazard
    Adjusts the fire hazard level of buildings in the district (higher values increase fire risk).

  • BuildingFireResponseTime
    Alters the effective fire department response time within the district (higher values slow response).

  • BuildingUpkeep
    Modifies maintenance/upkeep costs for buildings in the district.

  • LowCommercialTax
    A marker/type indicating lower commercial tax rate effects for the district (affects business profitability and growth).

  • Wellbeing
    Influences citizen wellbeing/happiness metrics for the district (could affect health, productivity, etc.).

  • CrimeAccumulation
    Controls the rate at which crime accumulates in the district (higher values increase crime levels).

  • StreetSpeedLimit
    Represents a district-level modifier for street speed limits (affects vehicle speeds and traffic flow).

  • StreetTrafficSafety
    Affects traffic safety in the district, changing accident likelihood and pedestrian safety.

  • EnergyConsumptionAwareness
    Alters citizen/building behavior related to energy usage (encourages or discourages energy-saving behaviour).

Note: Enum members are integer constants starting at 0 and incrementing by 1 in the order listed.

Properties

  • None (enum type).
    Standard System.Enum behaviour applies. Use Enum methods (ToString, Parse, TryParse, GetValues, etc.) as needed.

Constructors

  • None (enums do not expose public constructors).
    Each enum value is a compile-time constant.

Methods

  • None specific to this enum.
    Use standard System.Enum utilities:
  • Enum.ToString()
  • Enum.Parse / Enum.TryParse()
  • Enum.GetValues(typeof(DistrictModifierType))

Usage Example

// Example: mapping a DistrictModifierType to an effect application.
// Replace `District` and its properties with the real game API types/names
// (e.g., DistrictManager, district stats structures) as appropriate.

public void ApplyModifierToDistrict(District district, DistrictModifierType modifier, float factor)
{
    switch (modifier)
    {
        case DistrictModifierType.GarbageProduction:
            // hypothetical property; adapt to actual game API
            district.GarbageProductionRate *= factor;
            break;

        case DistrictModifierType.ParkingFee:
            district.ParkingFee *= factor; // adjust parking revenue/behaviour
            break;

        case DistrictModifierType.BuildingFireHazard:
            district.BuildingFireHazardLevel += factor; // additive or multiplicative depending on API
            break;

        case DistrictModifierType.Wellbeing:
            district.WellbeingMultiplier *= factor;
            break;

        // handle other modifier cases...
        default:
            // fallback or log unknown modifier
            break;
    }
}

// Example: parsing from string (e.g., data-driven config)
if (Enum.TryParse<DistrictModifierType>("GarbageProduction", out var parsed))
{
    ApplyModifierToDistrict(myDistrict, parsed, 0.9f); // reduce garbage production by 10%
}

Notes for modders: - This enum only identifies modifier categories. How a modifier is applied (multiplicative vs. additive, which underlying stat is affected, and which APIs to call) depends on the game's district/stat systems. Inspect the game's DistrictManager/Stats classes or existing mods to find the concrete properties and methods to change. - Keep changes performant and consider persistence: if your mod applies runtime modifications, ensure they are reapplied after saves/load or when district definitions change.