Home

Content Type Reference

This page documents every auto-discovered content type that does not involve player actions (interactions, policies, edicts are covered in Interactions; scripted events are covered in Events).

Each section includes a property table, overridable methods, and a working code example.


Traits (UTrait)#

Traits are permanent or temporary character modifiers that affect stats, behaviour, and events.

Properties

PropertyTypeDefaultDescriptionTraitNameFText--Display name.DescriptionFText--Tooltip description.IconKeyFName--Row key in the TraitIcons DataTable.SortOrderint0Display order in the trait list (lower = earlier).Tacticsfloat0Modifier to the Tactics stat.Authorityfloat0Modifier to the Authority stat.Cunningfloat0Modifier to the Cunning stat.Loyaltyfloat0Modifier to the Loyalty stat.Governancefloat0Modifier to the Governance stat.Constitutionfloat0Modifier to the Constitution stat.HonourDreadfloat0Modifier to honour/dread balance. Positive = honourable.LuxurySlotModifierint320Modifier to luxury consumption slots.Heritabilityfloat0Chance (0.0--1.0) that children inherit this trait from a parent.Probabilityfloat0Base chance (0.0--1.0) for random generation on new characters.bCanBeGainedboolfalseWhether the trait can be gained during gameplay (vs. only at generation).bIsTemporaryboolfalseWhether the trait expires after a duration.MinDurationDaysint3230Minimum duration in days (if temporary).MaxDurationDaysint3290Maximum duration in days (if temporary).ConflictingTraitsTArray<TSubclassOf<UTrait>>--Traits that cannot coexist with this one. Set in constructor.GainedEventFTraitEvent--Event popup shown when the trait is gained. Has .Title, .Message, .Option fields.LostEventFTraitEvent--Event popup shown when the trait is lost. Same fields as GainedEvent.TraitDataClassTSubclassOf<UTraitData>--Optional data class for extended trait behaviour.

Overridable Methods

MethodWhen CalledPurposebool CanBeGained(UPerson Character) constEach tick, for characters without this traitReturn true if the character is eligible to gain this trait.bool CanBeLost(UPerson Character) constEach tick, for characters with this traitReturn true if the character should lose this trait.void Apply(UPerson Character)When the trait is addedApply custom effects beyond stat modifiers.void Remove(UPerson Character)When the trait is removedUndo custom effects applied in Apply().

Example

angelscript
UCLASS()
class UBattleHardened : UTrait
{
    UBattleHardened()
    {
        ConflictingTraits.Add(UTimid::StaticClass());
        ConflictingTraits.Add(UCowardly::StaticClass());
    }

    default TraitName = Localization::GetText("MyMod", "BattleHardened_Name");
    default Description = Localization::GetText("MyMod", "BattleHardened_Description");
    default SortOrder = 12;
    default IconKey = n"BattleHardened";

    default Heritability = 0.0f;
    default Probability = 0.0f;     // Never randomly generated
    default bCanBeGained = true;

    default Tactics = 10.0f;
    default Authority = 5.0f;
    default Constitution = 5.0f;
    default Loyalty = 0.0f;
    default Cunning = 0.0f;
    default Governance = -5.0f;

    default GainedEvent.Title = Localization::GetText("MyMod", "BattleHardened_GainedTitle");
    default GainedEvent.Message = Localization::GetText("MyMod", "BattleHardened_GainedMessage");
    default GainedEvent.Option = Localization::GetText("MyMod", "BattleHardened_GainedOption");

    UFUNCTION(BlueprintOverride)
    bool CanBeGained(UPerson Character) const
    {
        return Character.Stats.GetTactics() > 70.0f;
    }

    UFUNCTION(BlueprintOverride)
    bool CanBeLost(UPerson Character) const
    {
        return false;
    }
}

Tips

  • Stat modifiers stack additively. A trait with Authority = 10.0f adds 10 to the character's base authority.
  • Set Probability = 0.0f for traits that should only be gained through gameplay conditions, never randomly.
  • ConflictingTraits is bidirectional -- if A conflicts with B, B should also list A.
  • Use HonourDread sparingly. Values typically range from -0.1 to 0.1.

Buildings (UBuilding)#

Buildings are constructed in settlements and provide economic, military, or cultural effects.

Enums

angelscript
// Building type (affects military/naval logic)
enum EBuildingType { Military, Wall, Other, Naval }

// Building category (affects UI grouping)
enum EBuildingCategory { Economic, Military, Infrastructure, Cultural, Defensive, Naval, Administrative, Other }

// Build button state
enum EBuildButtonState { Visible, GreyedOut, Hidden }

Properties

PropertyTypeDefaultDescriptionNameFText--Display name. Set in constructor.DescriptionFText--Tooltip description.DefaultEffectsFText--Static effects text shown in the build menu.AssetKeyFName--Key for icon/portrait lookup.Priceint320Gold cost to build.BuildTimefloat0Days to construct.MaxLevelint0Maximum upgrade level (0 = no upgrades).Upkeepint320Monthly gold upkeep.BuildingTypeEBuildingTypeOtherType classification.CategoryEBuildingCategoryOtherUI category grouping.ResourceCostTMap<FName, float>--Resource costs (e.g., n"Iron", n"Wood"). Set in constructor.AvailableToCultureGroupsTSet<FName>--Culture groups that can build this. Empty = available to all.CanBeDevelopedIntoTArray<TSubclassOf<UBuilding>>--Buildings this can upgrade into.DevelopedFromTSubclassOf<UBuilding>--Prerequisite building (this replaces it on upgrade).bReplacesParentbooltrueWhether upgrading replaces the parent building.RequiredBuildingsTArray<TSubclassOf<UBuilding>>--Other buildings that must exist in the settlement.ProcessingRecipeFProcessingRecipe--Resource conversion recipe (input resources to output).BaseProcessingCapacityfloat0Base processing throughput.

Overridable Methods

MethodWhen CalledPurposevoid OnAdd(APopulationCentre Settlement)When built or loadedApply modifiers to the settlement.void OnRemove(APopulationCentre Settlement)When demolished or destroyedRemove modifiers from the settlement.FText GetEffectsText() constWhen rendering tooltipReturn dynamic effects text (can reference Level).FBuildRequirementResult CanBuild(APopulationCentre Settlement) constWhen checking requirementsReturn whether the building can be constructed.FBuildButtonInfo GetBuildButtonInfo(APopulationCentre Settlement) constWhen rendering build menuControl button visibility and greyed-out state.

Example

angelscript
class UGranary : UBuilding
{
    UGranary()
    {
        Name = Localization::GetText("MyMod", "Granary_Name");
        AssetKey = n"Granary";
        BuildTime = 45.0f;
        Price = 200;
        MaxLevel = 3;
        Upkeep = 2;
        BuildingType = EBuildingType::Other;
        Category = EBuildingCategory::Economic;

        ResourceCost.Add(n"Wood", 25.0f);

        Description = Localization::GetText("MyMod", "Granary_Description");
        DefaultEffects = Localization::GetText("MyMod", "Granary_DefaultEffects");
    }

    UFUNCTION(BlueprintOverride)
    FText GetEffectsText() const
    {
        float Bonus = Level * 15.0f;
        return FText::FromString(
            Localization::GetText("MyMod", "Granary_Effects").ToString()
                .Replace("{Bonus}", "" + Bonus)
        );
    }

    UFUNCTION(BlueprintOverride)
    void OnAdd(APopulationCentre Settlement)
    {
        Settlement.Modifiers.FoodProduction += Level * 0.15f;
    }

    UFUNCTION(BlueprintOverride)
    void OnRemove(APopulationCentre Settlement)
    {
        Settlement.Modifiers.FoodProduction -= Level * 0.15f;
    }

    UFUNCTION(BlueprintOverride)
    FBuildButtonInfo GetBuildButtonInfo(const APopulationCentre Settlement) const
    {
        FBuildButtonInfo Info;

        if (Settlement.Population < 1000)
        {
            Info.State = EBuildButtonState::GreyedOut;
            Info.Reason = FText::FromString(
                Localization::GetText("MyMod", "Granary_NeedPop").ToString()
                    .Replace("{Population}", "1000")
            );
        }

        return Info;
    }
}

Tips

  • Set AvailableToCultureGroups to restrict the building to certain cultures. Leave it empty for universal availability.
  • The Level property (inherited from USettlementEffect) starts at 1 and increments with each upgrade, up to MaxLevel.
  • OnAdd() and OnRemove() must be symmetrical -- whatever you add in OnAdd(), subtract in OnRemove().
  • Use GetBuildButtonInfo() to hide the build button when a mutually exclusive building is present, or grey it out when prerequisites are not met.
  • ResourceCost keys must match resource FNames registered in the game (e.g., n"Wood", n"Iron", n"Clothes", n"Weapons", n"PreciousMetals", n"Horses").

Army Units (UArmyUnit)#

Army units are military units that can be recruited at settlements and deployed in armies.

Enums

angelscript
enum EArmyUnitType { Infantry, Ranged, Cavalry, Siege, Special }
enum EMilitaryUnitTier { Tier1, Tier2, Tier3, Tier4, Tier5 }

Properties

Properties are split between UArmyUnit and its parent UMilitaryUnit.

PropertyTypeDefaultDescriptionUnitNameFString--Display name.DescriptionFString--Tooltip description.UnitTypeEArmyUnitType--Unit classification (Infantry, Ranged, Cavalry, Siege, Special).TierEMilitaryUnitTier--Quality tier (Tier1 = basic, Tier5 = elite).Priceint320Gold cost to recruit.BuildTimefloat0Days to recruit.Upkeepint320Monthly gold upkeep.FoodConsumptionfloat0Monthly food consumed.MaxStrengthint320Maximum troop count.Strengthint320Starting troop count. Usually set equal to MaxStrength.Speedfloat0Movement speed on the map.Rangefloat0Attack range. 0.0 = melee.Weightfloat0Transport/supply weight factor.SiegePowerfloat0Effectiveness against fortifications.PierceDamagefloat0Pierce damage dealt in combat.CrushDamagefloat0Crush damage dealt in combat.SlashDamagefloat0Slash damage dealt in combat.PierceArmourfloat0Defence against pierce damage.CrushArmourfloat0Defence against crush damage.SlashArmourfloat0Defence against slash damage.ResourceUsageTMap<FName, float>--Monthly resource consumption (e.g., n"Iron", n"Weapons"). Set in constructor.BattleActionsTArray<TSubclassOf<UBattleAction>>--Special actions available in battle. Set in constructor.bImmuneToSnowAttritionboolfalseImmune to snow/cold terrain attrition.bImmuneToDesertAttritionboolfalseImmune to desert/heat terrain attrition.

Example

angelscript
class UDesertRaiders : UArmyUnit
{
    UDesertRaiders()
    {
        UnitName = Localization::GetText("MyMod", "DesertRaiders_Name").ToString();
        Description = Localization::GetText("MyMod", "DesertRaiders_Description").ToString();

        ResourceUsage.Add(n"Iron", 10);
        ResourceUsage.Add(n"Weapons", 15);
        ResourceUsage.Add(n"Horses", 20);

        BattleActions.Add(UChargeAction::StaticClass());
    }

    default Tier = EMilitaryUnitTier::Tier2;
    default UnitType = EArmyUnitType::Cavalry;
    default Upkeep = 12;
    default FoodConsumption = 3.0;
    default MaxStrength = 60;
    default Strength = 60;
    default Range = 0.0;
    default Speed = 240.0;
    default Price = 800;
    default BuildTime = 50.0;
    default Weight = 5.0;
    default SiegePower = 1.0;

    default PierceDamage = 12.0;
    default CrushDamage = 8.0;
    default SlashDamage = 14.0;
    default PierceArmour = 4.0;
    default CrushArmour = 3.0;
    default SlashArmour = 5.0;

    default bImmuneToDesertAttrition = true;
}

Tips

  • UnitName and Description are FString, not FText. Use .ToString() when assigning from Localization::GetText().
  • The combat system uses three damage types (pierce, crush, slash) and three corresponding armour types. Damage reduction is calculated per-type.
  • Units are linked to cultures through the culture's unit lists. To make your unit recruitable, you need to either create a new culture that includes it, or modify an existing culture's unit DataTable.
  • Strength should usually equal MaxStrength -- it represents the unit's starting troop count.

Cultures (UCulture)#

Cultures define naming conventions, titles, available units, visual styles, and gameplay flags for factions and characters.

Properties

PropertyTypeDefaultDescriptionCultureNameFText--Display name.DescriptionFText--Tooltip description.GroupFName--Culture group identifier (e.g., n"Rephsian", n"Neutarnic"). Extensible by mods.GroupDisplayNameFText--Display name for the culture group.GroupColourFLinearColorGreyColour used for the culture group on maps.ColourFLinearColorGreenPrimary colour for this culture.IconKeyFString--Key for culture icon lookup.bUsesLevySystemboolfalseWhether this culture uses the levy recruitment system (vs. professional armies).bCanRaidbooltrueWhether factions of this culture can raid.DefaultVassalTypeint321Default vassal relationship type for this culture.RebelLeaderTitleFString"Usurper"Title used for rebel leaders.RebelFactionNameFormatFString--Format string for rebel faction names.NamingDataTableUDataTable*--DataTable with character names, titles, and epithets.PhenotypeDatabaseUPhenotypeDatabase*--Character appearance database.ClothingDatabaseUClothingDatabase*--Character clothing database.BuildingSetUBuildingSet*--Visual building set for settlements.UnitPortraitTableUDataTable*--Unit portrait lookup table.NavyUnitPortraitTableUDataTable*--Navy unit portrait lookup table.

Naming Data (FCultureNamingData)

The naming DataTable uses the FCultureNamingData row struct with these fields:

FieldTypeDescriptionFirstNamesTArray<FString>Male first names.LastNamesTArray<FString>Surnames / family names.MiddleNamesTArray<FString>Middle names (optional).FemaleFirstNamesTArray<FString>Female first names.FemaleMiddleNamesTArray<FString>Female middle names.FemaleLastNamesTArray<FString>Female surnames.EpithetsTArray<FString>Character epithets (e.g., "the Wise").RulerTitleFStringTitle for rulers (e.g., "Emperor").VassalRulerTitleFStringTitle for vassal rulers.GovernorTitleFStringTitle for governors.HeirTitleFStringTitle for heirs.ConsortTitleFStringTitle for consorts.GeneralTitleFStringTitle for army commanders.AdmiralTitleFStringTitle for navy commanders.FemaleRulerTitleFStringFemale ruler title variant.FemaleVassalRulerTitleFStringFemale vassal ruler title variant.FemaleHeirTitleFStringFemale heir title variant.FemaleGovernorTitleFStringFemale governor title variant.MaleConsortTitleFStringMale consort title.RulerChildTitleFStringTitle for children of the ruler.FemaleRulerChildTitleFStringFemale variant of ruler child title.RulerSiblingTitleFStringTitle for siblings of the ruler.RegnalNamesTArray<FString>Regnal name pool.ArmyNameFormatFStringFormat string for army names.ArmyNameSuffixesTArray<FString>Suffixes appended to army names.FleetNameFormatFStringFormat string for fleet names.FleetNameSuffixesTArray<FString>Suffixes appended to fleet names.RebelFactionNamesTArray<FString>Names for rebel factions.RebelArmyNamesTArray<FString>Names for rebel armies.

Overridable Methods

MethodWhen CalledPurposeFString FormatPersonName(UPerson Person, ENameDisplayFormat Format) constWhen displaying a character nameCustom name formatting logic.

Tips

  • Culture groups use extensible FName values. You can create entirely new culture groups (e.g., n"MyCustomGroup") without modifying engine code.
  • When creating a new culture, you will need to create a NamingDataTable asset and import it. This requires PAK packaging for distribution.
  • The existing culture groups are: n"Rephsian", n"Neutarnic", n"Svaranic", n"Tarhanic", n"Gwenedic", n"Imerassian", n"Shabarim", n"Shakharin".

Religions (UReligion)#

Religions provide stat bonuses and economic/military modifiers to characters and factions that follow them.

Properties

PropertyTypeDefaultDescriptionReligionNameFString--Display name.DescriptionFString--Tooltip description.ReligionGroupFName--Group identifier (e.g., n"Borgutian", n"Pagan", n"Mystery"). Extensible by mods.ReligionLeaderTitleFString"Master of Religion"Title for the religious leader.ColourFLinearColor--Map colour for this religion.IconKeyFString--Key for religion icon lookup.MajorDeitiesTArray<FString>--Major deity names (for flavour text and events).MinorDeitiesTArray<FString>--Minor deity names.RelicsTArray<FString>--Sacred relics.TacticsBonusfloat0Bonus to Tactics stat for followers.AuthorityBonusfloat0Bonus to Authority stat for followers.CunningBonusfloat0Bonus to Cunning stat for followers.GovernanceBonusfloat0Bonus to Governance stat for followers.TaxEfficiencyModifierfloat0Modifier to tax collection efficiency.DevelopmentSpeedModifierfloat0Modifier to settlement development speed.ArmyMoraleBonusfloat0Bonus to army morale.RecruitmentSpeedModifierfloat0Modifier to unit recruitment speed.SettlementGrowthModifierfloat0Modifier to settlement population growth.UnrestModifierfloat0Modifier to settlement unrest. Positive = more unrest.

Example

angelscript
UCLASS()
class UCultOfTheDeep : UReligion
{
    default ReligionName = "Cult of the Deep";
    default Description = "Followers revere the unfathomable depths of the ocean and the creatures that dwell within.";
    default ReligionGroup = n"Mystery";
    default ReligionLeaderTitle = "Depth Speaker";
    default IconKey = "CultOfTheDeep";

    UCultOfTheDeep()
    {
        MajorDeities.Add("The Leviathan");
        MajorDeities.Add("The Drowned One");
        MinorDeities.Add("The Tidecaller");
        Relics.Add("Pearl of the Abyss");
    }

    default CunningBonus = 5.0f;
    default TaxEfficiencyModifier = 0.05f;
    default ArmyMoraleBonus = -5.0f;
    default SettlementGrowthModifier = 0.03f;
}

Tips

  • Religion groups use extensible FName values. The base game groups are n"Borgutian", n"Pagan", and n"Mystery".
  • ReligionName and Description are FString, not FText. For production mods, wrap them with Localization::GetText().ToString().
  • Stat bonuses on religions apply to all characters of that religion. Keep values modest -- they stack with trait bonuses.

Diseases (UDisease)#

Diseases are epidemics that spread between settlements, affecting population, economy, and characters.

Properties

PropertyTypeDefaultDescriptionDiseaseNameFString--Display name.DescriptionFText--Tooltip description.AssetKeyFName--Key for icon lookup.MapColourFLinearColor--Colour shown on the disease map mode.SpreadBaseTransmissionChancefloat0Base chance (0.0--1.0) to spread to adjacent settlements per tick.SeaTransmissionMultiplierfloat0Multiplier for spread via sea routes.PopulationDensityMultiplierfloat0Multiplier based on target settlement population.EffectsBaseMortalityRatefloat0Population death rate per tick (0.0--0.1).BaseUnrestContributionfloat0Unrest added to infected settlements.FoodProductionPenaltyfloat0Reduction to food production (0.0--1.0).ResourceProductionPenaltyfloat0Reduction to resource production (0.0--1.0).TaxPenaltyfloat0Reduction to tax income (0.0--1.0).DurationMinDurationDaysint320Minimum epidemic duration.MaxDurationDaysint320Maximum epidemic duration.BurnoutPopulationThresholdfloat0Population ratio (0.0--1.0) at which disease burns out.CharactersCharacterInfectionChancefloat0Chance (0.0--1.0) per tick for characters in infected settlements to catch it.AfflictionTraitClassTSubclassOf<UTrait>--Trait applied to infected characters.SpawnMinPopulationForSpawnint320Minimum settlement population for spontaneous outbreak.SpawnChancePerDayfloat0Daily probability of spontaneous outbreak (0.0--0.01).bRequiresPortboolfalseOnly spawns in port settlements.bRequiresFoodShortageboolfalseOnly spawns during food shortages.SeasonalMultipliersTMap<ESeason, float>--Transmission multipliers by season.

Example

angelscript
UCLASS()
class URedPox : UDisease
{
    default DiseaseName = "Red Pox";
    default Description = Localization::GetText("MyMod", "RedPox_Description");
    default AssetKey = n"RedPox";
    default MapColour = FLinearColor(0.8f, 0.1f, 0.1f, 1.0f);

    // Spread
    default BaseTransmissionChance = 0.15f;
    default SeaTransmissionMultiplier = 0.5f;
    default PopulationDensityMultiplier = 1.2f;

    // Effects
    default BaseMortalityRate = 0.02f;
    default BaseUnrestContribution = 5.0f;
    default FoodProductionPenalty = 0.1f;
    default ResourceProductionPenalty = 0.15f;
    default TaxPenalty = 0.1f;

    // Duration
    default MinDurationDays = 60;
    default MaxDurationDays = 180;
    default BurnoutPopulationThreshold = 0.7f;

    // Characters
    default CharacterInfectionChance = 0.05f;

    // Spawn conditions
    default MinPopulationForSpawn = 5000;
    default SpawnChancePerDay = 0.001f;
    default bRequiresPort = false;
    default bRequiresFoodShortage = false;

    URedPox()
    {
        AfflictionTraitClass = UPoxAfflicted::StaticClass();
        SeasonalMultipliers.Add(ESeason::Summer, 1.5f);
        SeasonalMultipliers.Add(ESeason::Winter, 0.5f);
    }
}

Tips

  • Keep BaseMortalityRate low (0.01--0.05). Even small values cause significant population loss over an epidemic's duration.
  • The AfflictionTraitClass should be a separate trait you define. Create a temporary trait with bIsTemporary = true that represents the character being sick.
  • BurnoutPopulationThreshold of 0.7 means the disease burns out when population drops to 70% of its pre-epidemic level.
  • SeasonalMultipliers modify the transmission chance. A summer multiplier of 1.5 means 50% more spread during summer.

Battle Actions (UBattleAction)#

Battle actions are special abilities that army units can use during combat, activated by commanders who meet stat requirements.

Properties

PropertyTypeDefaultDescriptionActionNameFString--Display name.DescriptionFString--Tooltip description.IconKeyFName--Key for icon lookup in the BattleActionIcons DataTable.RequiredTacticsint320Minimum Tactics stat for the commander to activate.RequiredAuthorityint320Minimum Authority stat for the commander to activate.DamageMultiplierfloat1.0Multiplier to damage dealt (1.0 = normal, 1.5 = 50% more).DamageTakenMultiplierfloat1.0Multiplier to damage received (0.8 = 20% less).ArmourMultiplierfloat1.0Multiplier to armour values.MoraleModifierfloat0Flat modifier to unit morale during combat.SpeedMultiplierfloat1.0Multiplier to unit speed during combat.

Overridable Methods

MethodWhen CalledPurposebool CanUseAction(AMilitary Army) constBefore activationCustom eligibility beyond stat requirements.

Example

angelscript
UCLASS()
class UShieldWall : UBattleAction
{
    default ActionName = Localization::GetText("MyMod", "ShieldWall_Name").ToString();
    default Description = Localization::GetText("MyMod", "ShieldWall_Description").ToString();
    default IconKey = n"ShieldWall";

    default RequiredTactics = 40;
    default RequiredAuthority = 0;

    default DamageMultiplier = 0.7f;        // Deal 30% less damage
    default DamageTakenMultiplier = 0.5f;    // Take 50% less damage
    default ArmourMultiplier = 1.5f;         // 50% more armour
    default MoraleModifier = 10.0f;          // Morale boost
    default SpeedMultiplier = 0.5f;          // Half speed (formation is slow)
}

Tips

  • Battle actions are assigned to unit types via the unit's BattleActions array. A single action can be shared across multiple unit types.
  • The commander's stats are checked against RequiredTactics and RequiredAuthority at activation time. If the commander doesn't meet the requirements, the action is unavailable.
  • Multipliers of 1.0 mean no change. Design trade-offs: a powerful defensive action should reduce damage dealt or speed.
  • ActionName and Description are FString. Use .ToString() when assigning from Localization::GetText().

Next Steps#

  • Interactions -- Diplomacy, espionage, character, and power bloc interactions
  • Events -- Scripted event system with context slots and chains
  • Assets & Packaging -- Icons, DataTables, localisation, and distribution