M&B: Bannerlord 1.2.12
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.CampaignSystem.Army Class Reference

Public Types

enum  AIBehaviorFlags : int {
  Unassigned = 0 ,
  PreGathering ,
  Gathering ,
  WaitingForArmyMembers ,
  TravellingToAssignment ,
  Besieging ,
  AssaultingTown ,
  Raiding ,
  Defending ,
  Patrolling ,
  GoToSettlement ,
  NumberOfAIBehaviorFlags
}
 
enum  ArmyTypes : int {
  Besieger = 0 ,
  Raider ,
  Defender ,
  Patrolling ,
  NumberOfArmyTypes
}
 
enum  ArmyDispersionReason {
  Unknown ,
  DismissalRequestedWithInfluence ,
  NotEnoughParty ,
  KingdomChanged ,
  CohesionDepleted ,
  ObjectiveFinished ,
  LeaderPartyRemoved ,
  PlayerTakenPrisoner ,
  CannotElectNewLeader ,
  LeaderCannotArrivePointOnTime ,
  ArmyLeaderIsDead ,
  FoodProblem ,
  NotEnoughTroop ,
  NoActiveWar
}
 
enum  ArmyLeaderThinkReason {
  Unknown ,
  FromGatheringToWaiting ,
  FromTravellingToBesieging ,
  FromWaitingToTravelling ,
  ChangingTarget ,
  FromTravellingToRaiding ,
  FromTravellingToDefending ,
  FromRaidingToTravelling ,
  FromBesiegingToTravelling ,
  FromDefendingToTravelling ,
  FromPatrollingToDefending ,
  FromBesiegingToDefending ,
  FromDefendingToBesieging ,
  FromDefendingToPatrolling ,
  FromUnassignedToPatrolling ,
  FromUnassignedToTravelling
}
 

Public Member Functions

override string ToString ()
 
 Army (Kingdom kingdom, MobileParty leaderParty, ArmyTypes armyType)
 
void UpdateName ()
 
bool DoesLeaderPartyAndAttachedPartiesContain (MobileParty party)
 
void BoostCohesionWithInfluence (float cohesionToGain, int cost)
 
void RecalculateArmyMorale ()
 
TextObject GetNotificationText ()
 
TextObject GetBehaviorText (bool setWithLink=false)
 
void Gather (Settlement initialHostileSettlement)
 
void ThinkAboutConcludingArmyGathering ()
 
void ThinkAboutTravelingToAssignment ()
 
void FinishArmyObjective ()
 
Vec2 GetRelativePositionForParty (MobileParty mobileParty, Vec2 armyFacing)
 
void AddPartyToMergedParties (MobileParty mobileParty)
 

Static Public Member Functions

static ArmyLeaderThinkReason GetBehaviorChangeExplanation (AIBehaviorFlags previousBehavior, AIBehaviorFlags currentBehavior)
 

Properties

MBReadOnlyList< MobilePartyParties [get]
 
TextObject EncyclopediaLinkWithName [get]
 
AIBehaviorFlags AIBehavior [get, set]
 
ArmyTypes ArmyType [get, set]
 
Hero ArmyOwner [get, set]
 
float Cohesion [get, set]
 
float DailyCohesionChange [get]
 
ExplainedNumber DailyCohesionChangeExplanation [get]
 
int CohesionThresholdForDispersion [get]
 
float Morale [get]
 
MobileParty LeaderParty [get]
 
int LeaderPartyAndAttachedPartiesCount [get]
 
float TotalStrength [get]
 
Kingdom Kingdom [get, set]
 
IMapPoint AiBehaviorObject [get, set]
 
TextObject Name [get]
 
int TotalHealthyMembers [get]
 
int TotalManCount [get]
 
int TotalRegularCount [get]
 

Member Enumeration Documentation

◆ AIBehaviorFlags

Enumerator
Unassigned 
PreGathering 
Gathering 
WaitingForArmyMembers 
TravellingToAssignment 
Besieging 
AssaultingTown 
Raiding 
Defending 
Patrolling 
GoToSettlement 
NumberOfAIBehaviorFlags 

◆ ArmyTypes

Enumerator
Besieger 
Raider 
Defender 
Patrolling 
NumberOfArmyTypes 

◆ ArmyDispersionReason

Enumerator
Unknown 
DismissalRequestedWithInfluence 
NotEnoughParty 
KingdomChanged 
CohesionDepleted 
ObjectiveFinished 
LeaderPartyRemoved 
PlayerTakenPrisoner 
CannotElectNewLeader 
LeaderCannotArrivePointOnTime 
ArmyLeaderIsDead 
FoodProblem 
NotEnoughTroop 
NoActiveWar 

◆ ArmyLeaderThinkReason

Enumerator
Unknown 
FromGatheringToWaiting 
FromTravellingToBesieging 
FromWaitingToTravelling 
ChangingTarget 
FromTravellingToRaiding 
FromTravellingToDefending 
FromRaidingToTravelling 
FromBesiegingToTravelling 
FromDefendingToTravelling 
FromPatrollingToDefending 
FromBesiegingToDefending 
FromDefendingToBesieging 
FromDefendingToPatrolling 
FromUnassignedToPatrolling 
FromUnassignedToTravelling 

Constructor & Destructor Documentation

◆ Army()

TaleWorlds.CampaignSystem.Army.Army ( Kingdom kingdom,
MobileParty leaderParty,
ArmyTypes armyType )

Member Function Documentation

◆ ToString()

override string TaleWorlds.CampaignSystem.Army.ToString ( )

◆ UpdateName()

void TaleWorlds.CampaignSystem.Army.UpdateName ( )

◆ DoesLeaderPartyAndAttachedPartiesContain()

bool TaleWorlds.CampaignSystem.Army.DoesLeaderPartyAndAttachedPartiesContain ( MobileParty party)

◆ BoostCohesionWithInfluence()

void TaleWorlds.CampaignSystem.Army.BoostCohesionWithInfluence ( float cohesionToGain,
int cost )

◆ RecalculateArmyMorale()

void TaleWorlds.CampaignSystem.Army.RecalculateArmyMorale ( )

◆ GetBehaviorChangeExplanation()

static ArmyLeaderThinkReason TaleWorlds.CampaignSystem.Army.GetBehaviorChangeExplanation ( AIBehaviorFlags previousBehavior,
AIBehaviorFlags currentBehavior )
static

◆ GetNotificationText()

TextObject TaleWorlds.CampaignSystem.Army.GetNotificationText ( )

◆ GetBehaviorText()

TextObject TaleWorlds.CampaignSystem.Army.GetBehaviorText ( bool setWithLink = false)

◆ Gather()

void TaleWorlds.CampaignSystem.Army.Gather ( Settlement initialHostileSettlement)

◆ ThinkAboutConcludingArmyGathering()

void TaleWorlds.CampaignSystem.Army.ThinkAboutConcludingArmyGathering ( )

◆ ThinkAboutTravelingToAssignment()

void TaleWorlds.CampaignSystem.Army.ThinkAboutTravelingToAssignment ( )

◆ FinishArmyObjective()

void TaleWorlds.CampaignSystem.Army.FinishArmyObjective ( )

◆ GetRelativePositionForParty()

Vec2 TaleWorlds.CampaignSystem.Army.GetRelativePositionForParty ( MobileParty mobileParty,
Vec2 armyFacing )

◆ AddPartyToMergedParties()

void TaleWorlds.CampaignSystem.Army.AddPartyToMergedParties ( MobileParty mobileParty)

Property Documentation

◆ Parties

MBReadOnlyList<MobileParty> TaleWorlds.CampaignSystem.Army.Parties
get

◆ EncyclopediaLinkWithName

TextObject TaleWorlds.CampaignSystem.Army.EncyclopediaLinkWithName
get

◆ AIBehavior

AIBehaviorFlags TaleWorlds.CampaignSystem.Army.AIBehavior
getset

◆ ArmyType

ArmyTypes TaleWorlds.CampaignSystem.Army.ArmyType
getset

◆ ArmyOwner

Hero TaleWorlds.CampaignSystem.Army.ArmyOwner
getset

◆ Cohesion

float TaleWorlds.CampaignSystem.Army.Cohesion
getset

◆ DailyCohesionChange

float TaleWorlds.CampaignSystem.Army.DailyCohesionChange
get

◆ DailyCohesionChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Army.DailyCohesionChangeExplanation
get

◆ CohesionThresholdForDispersion

int TaleWorlds.CampaignSystem.Army.CohesionThresholdForDispersion
get

◆ Morale

float TaleWorlds.CampaignSystem.Army.Morale
get

◆ LeaderParty

MobileParty TaleWorlds.CampaignSystem.Army.LeaderParty
get

◆ LeaderPartyAndAttachedPartiesCount

int TaleWorlds.CampaignSystem.Army.LeaderPartyAndAttachedPartiesCount
get

◆ TotalStrength

float TaleWorlds.CampaignSystem.Army.TotalStrength
get

◆ Kingdom

Kingdom TaleWorlds.CampaignSystem.Army.Kingdom
getset

◆ AiBehaviorObject

IMapPoint TaleWorlds.CampaignSystem.Army.AiBehaviorObject
getset

◆ Name

TextObject TaleWorlds.CampaignSystem.Army.Name
get

◆ TotalHealthyMembers

int TaleWorlds.CampaignSystem.Army.TotalHealthyMembers
get

◆ TotalManCount

int TaleWorlds.CampaignSystem.Army.TotalManCount
get

◆ TotalRegularCount

int TaleWorlds.CampaignSystem.Army.TotalRegularCount
get