Table of Contents

Class MobileParty

Namespace
TaleWorlds.CampaignSystem.Party
Assembly
TaleWorlds.CampaignSystem.dll
public sealed class MobileParty : CampaignObjectBase, IMapPoint, ITrackableCampaignObject, ITrackableBase, IMapEntity, IRandomOwner
Inheritance
MobileParty
Implements
Inherited Members
Extension Methods

Constructors

MobileParty()

public MobileParty()

Fields

AverageFleeTargetDirection

[SaveableField(1071)]
public Vec2 AverageFleeTargetDirection

Field Value

Vec2

ClanRoleAssignmentMinimumSkillValue

public const int ClanRoleAssignmentMinimumSkillValue = 0

Field Value

int

DefaultPartyTradeInitialGold

public const int DefaultPartyTradeInitialGold = 5000

Field Value

int

HasUnpaidWages

[SaveableField(1006)]
public float HasUnpaidWages

Field Value

float

Properties

ActualClan

public Clan ActualClan { get; set; }

Property Value

Clan

Aggressiveness

[SaveableProperty(1009)]
public float Aggressiveness { get; set; }

Property Value

float

Ai

[SaveableProperty(1019)]
public MobilePartyAi Ai { get; }

Property Value

MobilePartyAi

AiBehaviorTarget

public Vec2 AiBehaviorTarget { get; }

Property Value

Vec2

All

public static MBReadOnlyList<MobileParty> All { get; }

Property Value

MBReadOnlyList<MobileParty>

AllBanditParties

public static MBReadOnlyList<MobileParty> AllBanditParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AllCaravanParties

public static MBReadOnlyList<MobileParty> AllCaravanParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AllCustomParties

public static MBReadOnlyList<MobileParty> AllCustomParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AllGarrisonParties

public static MBReadOnlyList<MobileParty> AllGarrisonParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AllLordParties

public static MBReadOnlyList<MobileParty> AllLordParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AllMilitiaParties

public static MBReadOnlyList<MobileParty> AllMilitiaParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AllPartiesWithoutPartyComponent

public static MBReadOnlyList<MobileParty> AllPartiesWithoutPartyComponent { get; }

Property Value

MBReadOnlyList<MobileParty>

AllVillagerParties

public static MBReadOnlyList<MobileParty> AllVillagerParties { get; }

Property Value

MBReadOnlyList<MobileParty>

Army

public Army Army { get; set; }

Property Value

Army

ArmyName

public TextObject ArmyName { get; }

Property Value

TextObject

ArmyPositionAdder

[SaveableProperty(1005)]
public Vec2 ArmyPositionAdder { get; }

Property Value

Vec2

AttachedParties

public MBReadOnlyList<MobileParty> AttachedParties { get; }

Property Value

MBReadOnlyList<MobileParty>

AttachedTo

public MobileParty AttachedTo { get; set; }

Property Value

MobileParty

AvoidHostileActions

public bool AvoidHostileActions { get; }

Property Value

bool

BanditPartyComponent

public BanditPartyComponent BanditPartyComponent { get; }

Property Value

BanditPartyComponent

BaseFoodChange

public float BaseFoodChange { get; }

Property Value

float

Bearing

[SaveableProperty(1004)]
public Vec2 Bearing { get; }

Property Value

Vec2

BesiegedSettlement

public Settlement BesiegedSettlement { get; }

Property Value

Settlement

BesiegerCamp

public BesiegerCamp BesiegerCamp { get; set; }

Property Value

BesiegerCamp

CaravanPartyComponent

public CaravanPartyComponent CaravanPartyComponent { get; }

Property Value

CaravanPartyComponent

ConversationParty

public static MobileParty ConversationParty { get; }

Property Value

MobileParty

Count

public static int Count { get; }

Property Value

int

CurrentNavigationFace

[CachedData]
public PathFaceRecord CurrentNavigationFace { get; }

Property Value

PathFaceRecord

CurrentSettlement

public Settlement CurrentSettlement { get; set; }

Property Value

Settlement

DefaultBehavior

public AiBehavior DefaultBehavior { get; }

Property Value

AiBehavior

DisorganizedUntilTime

public CampaignTime DisorganizedUntilTime { get; }

Property Value

CampaignTime

EffectiveEngineer

public Hero EffectiveEngineer { get; }

Property Value

Hero

EffectiveQuartermaster

public Hero EffectiveQuartermaster { get; }

Property Value

Hero

EffectiveScout

public Hero EffectiveScout { get; }

Property Value

Hero

EffectiveSurgeon

public Hero EffectiveSurgeon { get; }

Property Value

Hero

ErrorPosition

[CachedData]
public Vec2 ErrorPosition { get; }

Property Value

Vec2

EventPositionAdder

public Vec2 EventPositionAdder { get; set; }

Property Value

Vec2

Food

public float Food { get; }

Property Value

float

FoodChange

public float FoodChange { get; }

Property Value

float

FoodChangeExplained

public ExplainedNumber FoodChangeExplained { get; }

Property Value

ExplainedNumber

GetPosition2D

public Vec2 GetPosition2D { get; }

Property Value

Vec2

HealingRateForHeroes

public float HealingRateForHeroes { get; }

Property Value

float

HealingRateForHeroesExplained

public ExplainedNumber HealingRateForHeroesExplained { get; }

Property Value

ExplainedNumber

HealingRateForRegulars

public float HealingRateForRegulars { get; }

Property Value

float

HealingRateForRegularsExplained

public ExplainedNumber HealingRateForRegularsExplained { get; }

Property Value

ExplainedNumber

HomeSettlement

public Settlement HomeSettlement { get; }

Property Value

Settlement

InventoryCapacity

public int InventoryCapacity { get; }

Property Value

int

InventoryCapacityExplainedNumber

public ExplainedNumber InventoryCapacityExplainedNumber { get; }

Property Value

ExplainedNumber

IsActive

[SaveableProperty(1023)]
public bool IsActive { get; set; }

Property Value

bool

IsBandit

[CachedData]
public bool IsBandit { get; }

Property Value

bool

IsBanditBossParty

public bool IsBanditBossParty { get; }

Property Value

bool

IsCaravan

[CachedData]
public bool IsCaravan { get; }

Property Value

bool

IsCurrentlyGoingToSettlement

public bool IsCurrentlyGoingToSettlement { get; }

Property Value

bool

IsCurrentlyUsedByAQuest

public bool IsCurrentlyUsedByAQuest { get; }

Property Value

bool

IsCustomParty

[CachedData]
public bool IsCustomParty { get; }

Property Value

bool

IsDisbanding

[SaveableProperty(1081)]
public bool IsDisbanding { get; set; }

Property Value

bool

IsDisorganized

public bool IsDisorganized { get; }

Property Value

bool

IsEngaging

public bool IsEngaging { get; }

Property Value

bool

IsGarrison

[CachedData]
public bool IsGarrison { get; }

Property Value

bool

IsInspected

public bool IsInspected { get; set; }

Property Value

bool

IsLordParty

[CachedData]
public bool IsLordParty { get; }

Property Value

bool

IsMainParty

public bool IsMainParty { get; }

Property Value

bool

IsMilitia

[CachedData]
public bool IsMilitia { get; }

Property Value

bool

IsMoving

public bool IsMoving { get; }

Property Value

bool

IsPartyTradeActive

[SaveableProperty(1958)]
public bool IsPartyTradeActive { get; }

Property Value

bool

IsVillager

[CachedData]
public bool IsVillager { get; }

Property Value

bool

IsVisible

public bool IsVisible { get; set; }

Property Value

bool

ItemRoster

public ItemRoster ItemRoster { get; }

Property Value

ItemRoster

LastVisitedSettlement

[SaveableProperty(1002)]
public Settlement LastVisitedSettlement { get; }

Property Value

Settlement

LeaderHero

public Hero LeaderHero { get; }

Property Value

Hero

LimitedPartySize

public int LimitedPartySize { get; }

Property Value

int

LordPartyComponent

public LordPartyComponent LordPartyComponent { get; }

Property Value

LordPartyComponent

MainParty

public static MobileParty MainParty { get; }

Property Value

MobileParty

MapEvent

public MapEvent MapEvent { get; }

Property Value

MapEvent

MapEventSide

public MapEventSide MapEventSide { get; set; }

Property Value

MapEventSide

MapFaction

public IFaction MapFaction { get; }

Property Value

IFaction

MemberRoster

public TroopRoster MemberRoster { get; }

Property Value

TroopRoster

Morale

public float Morale { get; }

Property Value

float

MoraleExplained

public ExplainedNumber MoraleExplained { get; }

Property Value

ExplainedNumber

Name

public TextObject Name { get; }

Property Value

TextObject

Objective

[SaveableProperty(1090)]
public MobileParty.PartyObjective Objective { get; }

Property Value

MobileParty.PartyObjective

Owner

public Hero Owner { get; }

Property Value

Hero

Party

[SaveableProperty(1020)]
public PartyBase Party { get; }

Property Value

PartyBase

PartyComponent

public PartyComponent PartyComponent { get; set; }

Property Value

PartyComponent

PartySizeRatio

public float PartySizeRatio { get; }

Property Value

float

PartyTradeGold

public int PartyTradeGold { get; set; }

Property Value

int

PartyTradeTaxGold

[SaveableProperty(1957)]
public int PartyTradeTaxGold { get; }

Property Value

int

PaymentLimit

public int PaymentLimit { get; }

Property Value

int

Position2D

public Vec2 Position2D { get; set; }

Property Value

Vec2

PrisonRoster

public TroopRoster PrisonRoster { get; }

Property Value

TroopRoster

RandomValue

public int RandomValue { get; }

Property Value

int

RecentEventsMorale

public float RecentEventsMorale { get; set; }

Property Value

float

SeeingRange

public float SeeingRange { get; }

Property Value

float

SeeingRangeExplanation

public ExplainedNumber SeeingRangeExplanation { get; }

Property Value

ExplainedNumber

ShortTermBehavior

[SaveableProperty(1050)]
public AiBehavior ShortTermBehavior { get; }

Property Value

AiBehavior

ShortTermTargetParty

public MobileParty ShortTermTargetParty { get; }

Property Value

MobileParty

ShortTermTargetSettlement

public Settlement ShortTermTargetSettlement { get; }

Property Value

Settlement

ShouldBeIgnored

public bool ShouldBeIgnored { get; }

Property Value

bool

ShouldJoinPlayerBattles

[SaveableProperty(1080)]
public bool ShouldJoinPlayerBattles { get; set; }

Property Value

bool

SiegeEvent

public SiegeEvent SiegeEvent { get; }

Property Value

SiegeEvent

Speed

public float Speed { get; }

Property Value

float

SpeedExplained

public ExplainedNumber SpeedExplained { get; }

Property Value

ExplainedNumber

StationaryStartTime

[SaveableProperty(1960)]
public CampaignTime StationaryStartTime { get; }

Property Value

CampaignTime

TargetParty

public MobileParty TargetParty { get; }

Property Value

MobileParty

TargetPosition

public Vec2 TargetPosition { get; }

Property Value

Vec2

TargetSettlement

public Settlement TargetSettlement { get; }

Property Value

Settlement

ThinkParamsCache

[CachedData]
public PartyThinkParams ThinkParamsCache { get; }

Property Value

PartyThinkParams

TotalFoodAtInventory

public int TotalFoodAtInventory { get; }

Property Value

int

TotalWage

public int TotalWage { get; }

Property Value

int

TotalWageExplained

public ExplainedNumber TotalWageExplained { get; }

Property Value

ExplainedNumber

TotalWeightCarried

public float TotalWeightCarried { get; }

Property Value

float

VersionNo

[CachedData]
public int VersionNo { get; }

Property Value

int

VisualPosition2DWithoutError

public Vec2 VisualPosition2DWithoutError { get; }

Property Value

Vec2

WarPartyComponent

public WarPartyComponent WarPartyComponent { get; }

Property Value

WarPartyComponent

Methods

AddElementToMemberRoster(CharacterObject, int, bool)

public int AddElementToMemberRoster(CharacterObject element, int numberToAdd, bool insertAtFront = false)

Parameters

element CharacterObject
numberToAdd int
insertAtFront bool

Returns

int

AddPrisoner(CharacterObject, int)

public int AddPrisoner(CharacterObject element, int numberToAdd)

Parameters

element CharacterObject
numberToAdd int

Returns

int

AddTaxGold(int)

public void AddTaxGold(int amount)

Parameters

amount int

AfterLoad()

protected override void AfterLoad()

AutoGeneratedInstanceCollectObjects(List<object>)

protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)

Parameters

collectedObjects List<object>

CanPayMoreWage()

public bool CanPayMoreWage()

Returns

bool

ChangePartyLeader(Hero)

public void ChangePartyLeader(Hero newLeader)

Parameters

newLeader Hero

CheckTracked(BasicCharacterObject)

public bool CheckTracked(BasicCharacterObject basicCharacter)

Parameters

basicCharacter BasicCharacterObject

Returns

bool

ComputeIsWaiting()

public bool ComputeIsWaiting()

Returns

bool

CreateParty(string, PartyComponent, OnPartyComponentCreatedDelegate)

public static MobileParty CreateParty(string stringId, PartyComponent component, PartyComponent.OnPartyComponentCreatedDelegate delegateFunction = null)

Parameters

stringId string
component PartyComponent
delegateFunction PartyComponent.OnPartyComponentCreatedDelegate

Returns

MobileParty

FindNextLocatable(ref LocatableSearchData<MobileParty>)

public static MobileParty FindNextLocatable(ref LocatableSearchData<MobileParty> data)

Parameters

data LocatableSearchData<MobileParty>

Returns

MobileParty

GetEffectiveRoleHolder(PerkRole)

public Hero GetEffectiveRoleHolder(SkillEffect.PerkRole perkRole)

Parameters

perkRole SkillEffect.PerkRole

Returns

Hero

GetHeroPerkRole(Hero)

public SkillEffect.PerkRole GetHeroPerkRole(Hero hero)

Parameters

hero Hero

Returns

SkillEffect.PerkRole

GetLogicalPosition()

public Vec3 GetLogicalPosition()

Returns

Vec3

GetMountAndHarnessVisualIdsForPartyIcon(out string, out string)

public void GetMountAndHarnessVisualIdsForPartyIcon(out string mountStringId, out string harnessStringId)

Parameters

mountStringId string
harnessStringId string

GetNumDaysForFoodToLast()

public int GetNumDaysForFoodToLast()

Returns

int

GetPosition()

public Vec3 GetPosition()

Returns

Vec3

GetRoleHolder(PerkRole)

public Hero GetRoleHolder(SkillEffect.PerkRole perkRole)

Parameters

perkRole SkillEffect.PerkRole

Returns

Hero

GetTotalStrengthWithFollowers(bool)

public float GetTotalStrengthWithFollowers(bool includeNonAttachedArmyMembers = true)

Parameters

includeNonAttachedArmyMembers bool

Returns

float

GetTrackDistanceToMainAgent()

public float GetTrackDistanceToMainAgent()

Returns

float

HasLimitedWage()

public bool HasLimitedWage()

Returns

bool

HasPerk(PerkObject, bool)

public bool HasPerk(PerkObject perk, bool checkSecondaryRole = false)

Parameters

perk PerkObject
checkSecondaryRole bool

Returns

bool

IgnoreByOtherPartiesTill(CampaignTime)

public void IgnoreByOtherPartiesTill(CampaignTime time)

Parameters

time CampaignTime

IgnoreForHours(float)

public void IgnoreForHours(float hours)

Parameters

hours float

Initialize()

public override void Initialize()

InitializeMobilePartyAroundPosition(PartyTemplateObject, Vec2, float, float, int)

public void InitializeMobilePartyAroundPosition(PartyTemplateObject pt, Vec2 position, float spawnRadius, float minSpawnRadius = 0, int troopNumberLimit = -1)

Parameters

pt PartyTemplateObject
position Vec2
spawnRadius float
minSpawnRadius float
troopNumberLimit int

InitializeMobilePartyAroundPosition(TroopRoster, TroopRoster, Vec2, float, float)

public void InitializeMobilePartyAroundPosition(TroopRoster memberRoster, TroopRoster prisonerRoster, Vec2 position, float spawnRadius, float minSpawnRadius = 0)

Parameters

memberRoster TroopRoster
prisonerRoster TroopRoster
position Vec2
spawnRadius float
minSpawnRadius float

InitializeMobilePartyAtPosition(PartyTemplateObject, Vec2, int)

public void InitializeMobilePartyAtPosition(PartyTemplateObject pt, Vec2 position, int troopNumberLimit = -1)

Parameters

pt PartyTemplateObject
position Vec2
troopNumberLimit int

InitializeMobilePartyAtPosition(TroopRoster, TroopRoster, Vec2)

public void InitializeMobilePartyAtPosition(TroopRoster memberRoster, TroopRoster prisonerRoster, Vec2 position)

Parameters

memberRoster TroopRoster
prisonerRoster TroopRoster
position Vec2

InitializePartyTrade(int)

public void InitializePartyTrade(int initialGold)

Parameters

initialGold int

IsSpotted()

public bool IsSpotted()

Returns

bool

IsWageLimitExceeded()

public bool IsWageLimitExceeded()

Returns

bool

OnBeforeLoad()

protected override void OnBeforeLoad()

OnGameInitialized()

public void OnGameInitialized()

PreAfterLoad()

protected override void PreAfterLoad()

RemoveHeroPerkRole(Hero)

public void RemoveHeroPerkRole(Hero hero)

Parameters

hero Hero

RemoveParty()

public void RemoveParty()

RemovePartyLeader()

public void RemovePartyLeader()

ResetTargetParty()

public void ResetTargetParty()

SetCustomHomeSettlement(Settlement)

public void SetCustomHomeSettlement(Settlement customHomeSettlement)

Parameters

customHomeSettlement Settlement

SetCustomName(TextObject)

public void SetCustomName(TextObject name)

Parameters

name TextObject

SetDisorganized(bool)

public void SetDisorganized(bool isDisorganized)

Parameters

isDisorganized bool

SetHeroPerkRole(Hero, PerkRole)

public void SetHeroPerkRole(Hero hero, SkillEffect.PerkRole perkRole)

Parameters

hero Hero
perkRole SkillEffect.PerkRole

SetPartyEngineer(Hero)

public void SetPartyEngineer(Hero hero)

Parameters

hero Hero

SetPartyObjective(PartyObjective)

public void SetPartyObjective(MobileParty.PartyObjective objective)

Parameters

objective MobileParty.PartyObjective

SetPartyQuartermaster(Hero)

public void SetPartyQuartermaster(Hero hero)

Parameters

hero Hero

SetPartyScout(Hero)

public void SetPartyScout(Hero hero)

Parameters

hero Hero

SetPartySurgeon(Hero)

public void SetPartySurgeon(Hero hero)

Parameters

hero Hero

SetPartyUsedByQuest(bool)

public void SetPartyUsedByQuest(bool isActivelyUsed)

Parameters

isActivelyUsed bool

SetWagePaymentLimit(int)

public void SetWagePaymentLimit(int newLimit)

Parameters

newLimit int

StartFindingLocatablesAroundPosition(Vec2, float)

public static LocatableSearchData<MobileParty> StartFindingLocatablesAroundPosition(Vec2 position, float radius)

Parameters

position Vec2
radius float

Returns

LocatableSearchData<MobileParty>

ToString()

public override string ToString()

Returns

string

UpdatePartyComponentFlags()

public void UpdatePartyComponentFlags()

UpdateVersionNo()

public void UpdateVersionNo()

ValidateSpeed()

public void ValidateSpeed()

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).