Class Settlement
- Namespace
- TaleWorlds.CampaignSystem.Settlements
- Assembly
- TaleWorlds.CampaignSystem.dll
public sealed class Settlement : MBObjectBase, IMapPoint, ITrackableCampaignObject, ITrackableBase, ISiegeEventSide, IMapEntity, IRandomOwner
- Inheritance
-
Settlement
- Implements
- Inherited Members
- Extension Methods
Constructors
Settlement()
public Settlement()
Settlement(TextObject, LocationComplex, PartyTemplateObject)
public Settlement(TextObject name, LocationComplex locationComplex, PartyTemplateObject pt)
Parameters
nameTextObjectlocationComplexLocationComplexptPartyTemplateObject
Fields
CanBeClaimed
[SaveableField(104)]
public int CanBeClaimed
Field Value
ClaimValue
[SaveableField(105)]
public float ClaimValue
Field Value
ClaimedBy
[SaveableField(106)]
public Hero ClaimedBy
Field Value
Culture
public CultureObject Culture
Field Value
HasVisited
[SaveableField(107)]
public bool HasVisited
Field Value
Hideout
public Hideout Hideout
Field Value
LastVisitTimeOfOwner
[SaveableField(110)]
public float LastVisitTimeOfOwner
Field Value
MilitiaPartyComponent
[CachedData]
public MilitiaPartyComponent MilitiaPartyComponent
Field Value
NumberOfLordPartiesTargeting
[SaveableField(102)]
public int NumberOfLordPartiesTargeting
Field Value
Stash
[SaveableField(145)]
public readonly ItemRoster Stash
Field Value
Town
public Town Town
Field Value
Village
public Village Village
Field Value
Properties
All
public static MBReadOnlyList<Settlement> All { get; }
Property Value
Alleys
[SaveableProperty(133)]
public List<Alley> Alleys { get; }
Property Value
BattleSide
public BattleSideEnum BattleSide { get; }
Property Value
BoundVillages
public MBReadOnlyList<Village> BoundVillages { get; }
Property Value
BribePaid
[SaveableProperty(116)]
public int BribePaid { get; set; }
Property Value
CurrentNavigationFace
public PathFaceRecord CurrentNavigationFace { get; }
Property Value
CurrentSettlement
public static Settlement CurrentSettlement { get; }
Property Value
CurrentSiegeState
[SaveableProperty(142)]
public Settlement.SiegeState CurrentSiegeState { get; }
Property Value
EncyclopediaLink
public string EncyclopediaLink { get; }
Property Value
EncyclopediaLinkWithName
public TextObject EncyclopediaLinkWithName { get; }
Property Value
EncyclopediaText
public TextObject EncyclopediaText { get; }
Property Value
GarrisonWagePaymentLimit
[SaveableProperty(122)]
public int GarrisonWagePaymentLimit { get; }
Property Value
GatePosition
public Vec2 GatePosition { get; }
Property Value
GetFirst
public static Settlement GetFirst { get; }
Property Value
GetPosition2D
public Vec2 GetPosition2D { get; }
Property Value
HeroesWithoutParty
public MBReadOnlyList<Hero> HeroesWithoutParty { get; }
Property Value
InRebelliousState
public bool InRebelliousState { get; }
Property Value
IsActive
[SaveableProperty(112)]
public bool IsActive { get; set; }
Property Value
IsAlerted
public bool IsAlerted { get; }
Property Value
IsCastle
public bool IsCastle { get; }
Property Value
IsFortification
public bool IsFortification { get; }
Property Value
IsHideout
public bool IsHideout { get; }
Property Value
IsInspected
[CachedData]
public bool IsInspected { get; set; }
Property Value
IsRaided
public bool IsRaided { get; }
Property Value
IsStarving
public bool IsStarving { get; }
Property Value
IsTown
public bool IsTown { get; }
Property Value
IsUnderRaid
public bool IsUnderRaid { get; }
Property Value
IsUnderSiege
public bool IsUnderSiege { get; }
Property Value
IsVillage
public bool IsVillage { get; }
Property Value
IsVisible
public bool IsVisible { get; set; }
Property Value
ItemRoster
public ItemRoster ItemRoster { get; }
Property Value
LastAttackerParty
public MobileParty LastAttackerParty { get; set; }
Property Value
LastThreatTime
[SaveableProperty(137)]
public CampaignTime LastThreatTime { get; }
Property Value
LocationComplex
[SaveableProperty(138)]
public LocationComplex LocationComplex { get; }
Property Value
MapFaction
public IFaction MapFaction { get; }
Property Value
MaxHitPointsOfOneWallSection
public float MaxHitPointsOfOneWallSection { get; }
Property Value
MaxWallHitPoints
public float MaxWallHitPoints { get; }
Property Value
Militia
public float Militia { get; set; }
Property Value
Name
public TextObject Name { get; set; }
Property Value
Notables
public MBReadOnlyList<Hero> Notables { get; }
Property Value
NumberOfAlliesSpottedAround
[SaveableProperty(128)]
public float NumberOfAlliesSpottedAround { get; set; }
Property Value
NumberOfEnemiesSpottedAround
[SaveableProperty(115)]
public float NumberOfEnemiesSpottedAround { get; set; }
Property Value
NumberOfLordPartiesAt
public int NumberOfLordPartiesAt { get; }
Property Value
NumberOfTroopsKilledOnSide
[SaveableProperty(150)]
public int NumberOfTroopsKilledOnSide { get; }
Property Value
Owner
public Hero Owner { get; }
Property Value
OwnerClan
public Clan OwnerClan { get; }
Property Value
Parties
public MBReadOnlyList<MobileParty> Parties { get; }
Property Value
Party
[SaveableProperty(101)]
public PartyBase Party { get; }
Property Value
Position2D
public Vec2 Position2D { get; }
Property Value
RandomValue
public int RandomValue { get; }
Property Value
SettlementComponent
[SaveableProperty(152)]
public SettlementComponent SettlementComponent { get; }
Property Value
SettlementHitPoints
[SaveableProperty(121)]
public float SettlementHitPoints { get; }
Property Value
SettlementTotalWallHitPoints
public float SettlementTotalWallHitPoints { get; }
Property Value
SettlementWallSectionHitPointsRatioList
public MBReadOnlyList<float> SettlementWallSectionHitPointsRatioList { get; }
Property Value
SiegeEngineMissiles
public MBReadOnlyList<SiegeEvent.SiegeEngineMissile> SiegeEngineMissiles { get; }
Property Value
SiegeEngines
[SaveableProperty(149)]
public SiegeEvent.SiegeEnginesContainer SiegeEngines { get; }
Property Value
SiegeEvent
[SaveableProperty(111)]
public SiegeEvent SiegeEvent { get; set; }
Property Value
SiegeStrategy
[SaveableProperty(151)]
public SiegeStrategy SiegeStrategy { get; }
Property Value
WallSectionCount
public int WallSectionCount { get; }
Property Value
Methods
AddGarrisonParty(bool)
public void AddGarrisonParty(bool addInitialGarrison = false)
Parameters
addInitialGarrisonbool
AddSiegeEngineMissile(SiegeEngineMissile)
public void AddSiegeEngineMissile(SiegeEvent.SiegeEngineMissile missile)
Parameters
missileSiegeEvent.SiegeEngineMissile
AfterLoad()
protected override void AfterLoad()
AutoGeneratedInstanceCollectObjects(List<object>)
protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
Parameters
CheckTracked(BasicCharacterObject)
public bool CheckTracked(BasicCharacterObject basicCharacter)
Parameters
basicCharacterBasicCharacterObject
Returns
Deserialize(MBObjectManager, XmlNode)
public override void Deserialize(MBObjectManager objectManager, XmlNode node)
Parameters
objectManagerMBObjectManagernodeXmlNode
FinalizeSiegeEvent()
public void FinalizeSiegeEvent()
Find(string)
public static Settlement Find(string idString)
Parameters
idStringstring
Returns
FindAll(Func<Settlement, bool>)
public static IEnumerable<Settlement> FindAll(Func<Settlement, bool> predicate)
Parameters
predicateFunc<Settlement, bool>
Returns
FindFirst(Func<Settlement, bool>)
public static Settlement FindFirst(Func<Settlement, bool> predicate)
Parameters
predicateFunc<Settlement, bool>
Returns
FindNextLocatable(ref LocatableSearchData<Settlement>)
public static Settlement FindNextLocatable(ref LocatableSearchData<Settlement> data)
Parameters
Returns
GetAttackTarget(ISiegeEventSide, SiegeEngineType, int, out SiegeBombardTargets, out int)
public void GetAttackTarget(ISiegeEventSide siegeEventSide, SiegeEngineType siegeEngine, int siegeEngineSlot, out SiegeBombardTargets targetType, out int targetIndex)
Parameters
siegeEventSideISiegeEventSidesiegeEngineSiegeEngineTypesiegeEngineSlotinttargetTypeSiegeBombardTargetstargetIndexint
GetInvolvedPartiesForEventType(BattleTypes)
public IEnumerable<PartyBase> GetInvolvedPartiesForEventType(MapEvent.BattleTypes mapEventType = BattleTypes.Siege)
Parameters
mapEventTypeMapEvent.BattleTypes
Returns
GetLogicalPosition()
public Vec3 GetLogicalPosition()
Returns
GetMountAndHarnessVisualIdsForPartyIcon(out string, out string)
public void GetMountAndHarnessVisualIdsForPartyIcon(out string mountStringId, out string harnessStringId)
Parameters
GetName()
public override TextObject GetName()
Returns
GetNextInvolvedPartyForEventType(ref int, BattleTypes)
public PartyBase GetNextInvolvedPartyForEventType(ref int partyIndex, MapEvent.BattleTypes mapEventType = BattleTypes.Siege)
Parameters
partyIndexintmapEventTypeMapEvent.BattleTypes
Returns
GetPosition()
public Vec3 GetPosition()
Returns
GetSettlementValueForEnemyHero(Hero)
public float GetSettlementValueForEnemyHero(Hero hero)
Parameters
heroHero
Returns
GetSettlementValueForFaction(IFaction)
public float GetSettlementValueForFaction(IFaction faction)
Parameters
factionIFaction
Returns
GetTrackDistanceToMainAgent()
public float GetTrackDistanceToMainAgent()
Returns
GetValue(Hero, bool)
public float GetValue(Hero hero = null, bool countAlsoBoundedSettlements = true)
Parameters
Returns
HasInvolvedPartyForEventType(PartyBase, BattleTypes)
public bool HasInvolvedPartyForEventType(PartyBase party, MapEvent.BattleTypes mapEventType = BattleTypes.Siege)
Parameters
partyPartyBasemapEventTypeMapEvent.BattleTypes
Returns
InitializeSiegeEventSide()
public void InitializeSiegeEventSide()
IsUnderRebellionAttack()
public bool IsUnderRebellionAttack()
Returns
OnFinishLoadState()
public void OnFinishLoadState()
OnGameCreated()
public void OnGameCreated()
OnGameInitialized()
public void OnGameInitialized()
OnPartyInteraction(MobileParty)
public void OnPartyInteraction(MobileParty mobileParty)
Parameters
mobilePartyMobileParty
OnPlayerEncounterFinish()
public void OnPlayerEncounterFinish()
OnSessionStart()
public void OnSessionStart()
OnTroopsKilledOnSide(int)
public void OnTroopsKilledOnSide(int killCount)
Parameters
killCountint
RemoveDeprecatedMissiles()
public void RemoveDeprecatedMissiles()
ResetSiegeState()
public void ResetSiegeState()
SetGarrisonWagePaymentLimit(int)
public void SetGarrisonWagePaymentLimit(int limit)
Parameters
limitint
SetNextSiegeState()
public void SetNextSiegeState()
SetSettlementComponent(SettlementComponent)
public void SetSettlementComponent(SettlementComponent settlementComponent)
Parameters
settlementComponentSettlementComponent
SetSiegeStrategy(SiegeStrategy)
public void SetSiegeStrategy(SiegeStrategy strategy)
Parameters
strategySiegeStrategy
SetWallSectionHitPointsRatioAtIndex(int, float)
public void SetWallSectionHitPointsRatioAtIndex(int index, float hitPointsRatio)
Parameters
StartFindingLocatablesAroundPosition(Vec2, float)
public static LocatableSearchData<Settlement> StartFindingLocatablesAroundPosition(Vec2 position, float radius)
Parameters
Returns
ToString()
public override string ToString()
Returns
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).