Skip to content

Game.Prefabs.CitizenHappinessParameterData

Assembly:
Namespace: Game.Prefabs

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
Container of tuning parameters used by the citizen happiness/wellbeing systems. This struct exposes many raw numeric and curve-based values that the game uses to compute how pollution, utilities (electricity, water, sewage), services (healthcare, education, entertainment, welfare, mail, telecom), crime, taxes and other factors influence citizen health and wellbeing. Modders can add this as an ECS component to supply or override tuning data for systems that calculate citizen happiness.


Fields

  • public int m_PollutionBonusDivisor
    Controls scaling/division used when converting pollution values into happiness/bonus contributions. A larger divisor reduces the pollution-based bonus magnitude.

  • public int m_MaxAirAndGroundPollutionBonus
    Maximum bonus (positive or negative limit) from air and ground pollution effects on citizen happiness.

  • public int m_MaxNoisePollutionBonus
    Maximum bonus/penalty applied from noise pollution to citizen happiness.

  • public float m_ElectricityWellbeingPenalty
    Wellbeing penalty applied when electricity service is insufficient or cut off.

  • public float m_ElectricityPenaltyDelay
    Delay (seconds or internal time units) before the electricity wellbeing penalty starts applying after a supply problem begins.

  • public AnimationCurve1 m_ElectricityFeeWellbeingEffect
    Curve mapping electricity fee/price (or relative fee change) to a wellbeing effect. AnimationCurve1 is the game's lightweight curve type used to express non-linear relationships.

  • public int m_WaterHealthPenalty
    Health penalty applied when water service is inadequate or polluted.

  • public int m_WaterWellbeingPenalty
    Wellbeing penalty applied for water service problems.

  • public float m_WaterPenaltyDelay
    Delay before water-related penalties begin to affect citizens after a problem occurs.

  • public float m_WaterPollutionBonusMultiplier
    Multiplier applied to water-related pollution bonuses/penalties when computing effects on citizens.

  • public int m_SewageHealthEffect
    Health effect (positive/negative integer) caused by sewage conditions.

  • public int m_SewageWellbeingEffect
    Wellbeing effect coming from sewage service quality or problems.

  • public float m_SewagePenaltyDelay
    Delay before sewage-related penalties are applied.

  • public AnimationCurve1 m_WaterFeeHealthEffect
    Curve mapping water fees to health effects (non-linear relationships between price and perceived health impact).

  • public AnimationCurve1 m_WaterFeeWellbeingEffect
    Curve mapping water fees to wellbeing effects.

  • public int4 m_WealthyMoneyAmount
    int4 (four-component integer vector) used to store wealth-related money amounts — typically used per citizen wealth/level category or internal slots. Interpreted by game code according to context.

  • public float m_HealthCareHealthMultiplier
    Multiplier that scales the effect of healthcare service on citizen health.

  • public float m_HealthCareWellbeingMultiplier
    Multiplier that scales the effect of healthcare service on citizen wellbeing.

  • public float m_EducationWellbeingMultiplier
    Multiplier for how education affects citizen wellbeing.

  • public float m_NeutralEducation
    Baseline (neutral) education value; used as a reference point for education-related effects.

  • public float m_EntertainmentWellbeingMultiplier
    Multiplier that controls how entertainment service contributes to wellbeing.

  • public int m_NegligibleCrime
    Crime value considered negligible (below this value crime has little or no effect).

  • public float m_CrimeMultiplier
    Multiplier used to scale crime values into wellbeing/penalty contributions.

  • public int m_MaxCrimePenalty
    Upper bound on the penalty that crime can impose on citizens.

  • public float m_MailMultiplier
    Multiplier for mail delivery quality/availability effects on wellbeing.

  • public int m_NegligibleMail
    Mail quantity/quality threshold considered negligible for effects.

  • public float m_TelecomBaseline
    Baseline telecom score used as a starting point before applying bonuses/penalties.

  • public float m_TelecomBonusMultiplier
    Multiplier scaling positive telecom improvements into citizen benefits.

  • public float m_TelecomPenaltyMultiplier
    Multiplier scaling telecom deficiencies into penalties.

  • public float m_WelfareMultiplier
    Multiplier affecting how welfare service impacts citizen wellbeing/health.

  • public int m_HealthProblemHealthPenalty
    Health penalty applied for health problems in the population (disease, epidemics).

  • public int m_DeathWellbeingPenalty
    Wellbeing penalty applied when citizens die (e.g., due to disasters or healthcare failure).

  • public int m_DeathHealthPenalty
    Health penalty related to death events (affects remaining population metrics).

  • public float m_ConsumptionMultiplier
    Multiplier that adjusts consumption-related impacts on wellbeing (e.g., consumption-driven happiness effects).

  • public int m_LowWellbeing
    Threshold considered "low" wellbeing; below this value citizens are treated as having poor wellbeing.

  • public int m_LowHealth
    Threshold for "low" health; used to trigger low-health behaviors/penalties.

  • public float m_TaxUneducatedMultiplier
    Multiplier that adjusts tax-related satisfaction/effects for uneducated citizens.

  • public float m_TaxPoorlyEducatedMultiplier
    Multiplier for poorly educated citizens' tax reaction.

  • public float m_TaxEducatedMultiplier
    Multiplier for educated citizens' tax reaction.

  • public float m_TaxWellEducatedMultiplier
    Multiplier for well-educated citizens' tax reaction.

  • public float m_TaxHighlyEducatedMultiplier
    Multiplier for highly educated citizens' tax reaction.

  • public int m_PenaltyEffect
    General integer scale used by various penalty computations (game-specific usage).

  • public int m_HomelessHealthEffect
    Health effect applied to homeless citizens.

  • public int m_HomelessWellbeingEffect
    Wellbeing effect applied to homeless citizens.

Properties

  • This struct declares no properties.
    All data are exposed as public fields intended for direct access by systems reading citizen happiness parameters.

Constructors

  • public CitizenHappinessParameterData()
    No explicit constructor is defined in the source — the struct uses the default value-initialized constructor. When added as a component, initialize fields explicitly to desired tuning values before using.

Methods

  • This struct declares no methods. It is a plain data container (IComponentData) meant to be read by gameplay systems.

Usage Example

// Example: creating and adding this parameter struct to an entity (ECS usage)
var happinessParams = new Game.Prefabs.CitizenHappinessParameterData
{
    m_PollutionBonusDivisor = 100,
    m_MaxAirAndGroundPollutionBonus = 20,
    m_MaxNoisePollutionBonus = 10,
    m_ElectricityWellbeingPenalty = 5f,
    m_ElectricityPenaltyDelay = 10f,
    // ... set other fields as needed ...
};

// Assuming 'entityManager' and 'entity' are available in your system:
entityManager.AddComponentData(entity, happinessParams);

Notes and modding tips: - Many fields are thresholds, multipliers, or maximums — small changes can have large gameplay effects. Test changes incrementally. - AnimationCurve1 fields are used for non-linear mappings (fees -> effects). Replace or modify these carefully to preserve expected curve shapes. - Because this struct implements IComponentData, it is intended for ECS-style usage. Provide values per archetype/entity as appropriate to target sets of citizens or districts.