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

Inherits TaleWorlds.CampaignSystem.ITrackableCampaignObject.

Public Types

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 ,
  NoShipToUse ,
  Inactivity
}
 

Public Member Functions

override string ToString ()
 
float CalculateCurrentStrength ()
 
float GetCustomStrength (BattleSideEnum side, MapEvent.PowerCalculationContext context)
 
 Army (Kingdom kingdom, MobileParty leaderParty, ArmyTypes armyType)
 
void UpdateName ()
 
bool DoesLeaderPartyAndAttachedPartiesContain (MobileParty party)
 
void BoostCohesionWithInfluence (float cohesionToGain, int cost)
 
void RecalculateArmyMorale ()
 
TextObject GetNotificationText ()
 
TextObject GetLongTermBehaviorText (bool setWithLink=false)
 
void Gather (Settlement initialHostileSettlement, MBReadOnlyList< MobileParty > partiesToCallToArmy=null)
 
bool IsWaitingForArmyMembers ()
 
void FinishArmyObjective ()
 
Vec2 GetRelativePositionForParty (MobileParty mobileParty, Vec2 armyFacing)
 
void AddPartyToMergedParties (MobileParty mobileParty)
 
void SetPositionAfterMapChange (CampaignVec2 newPosition)
 
void CheckPositionsForMapChangeAndUpdateIfNeeded ()
 

Properties

float GatheringPositionMaxDistanceToTheSettlement [get]
 
float GatheringPositionMinDistanceToTheSettlement [get]
 
MBReadOnlyList< MobilePartyParties [get]
 
TextObject EncyclopediaLinkWithName [get]
 
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 EstimatedStrength [get]
 
Kingdom Kingdom [get, set]
 
IMapPoint AiBehaviorObject [get, set]
 
TextObject Name [get]
 
int TotalHealthyMembers [get]
 
int TotalManCount [get]
 
int TotalRegularCount [get]
 
bool IsReady [get]
 
bool IsArmyInGatheringState [get]
 
- Properties inherited from TaleWorlds.CampaignSystem.ITrackableCampaignObject

Member Enumeration Documentation

◆ ArmyTypes

Enumerator
Besieger 
Raider 
Defender 
Patrolling 
NumberOfArmyTypes 

◆ ArmyDispersionReason

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

Constructor & Destructor Documentation

◆ Army()

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

Member Function Documentation

◆ ToString()

override string TaleWorlds.CampaignSystem.Army.ToString ( )

◆ CalculateCurrentStrength()

float TaleWorlds.CampaignSystem.Army.CalculateCurrentStrength ( )

◆ GetCustomStrength()

float TaleWorlds.CampaignSystem.Army.GetCustomStrength ( BattleSideEnum side,
MapEvent.PowerCalculationContext context )

◆ 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 ( )

◆ GetNotificationText()

TextObject TaleWorlds.CampaignSystem.Army.GetNotificationText ( )

◆ GetLongTermBehaviorText()

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

◆ Gather()

void TaleWorlds.CampaignSystem.Army.Gather ( Settlement initialHostileSettlement,
MBReadOnlyList< MobileParty > partiesToCallToArmy = null )

◆ IsWaitingForArmyMembers()

bool TaleWorlds.CampaignSystem.Army.IsWaitingForArmyMembers ( )

◆ FinishArmyObjective()

void TaleWorlds.CampaignSystem.Army.FinishArmyObjective ( )

◆ GetRelativePositionForParty()

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

◆ AddPartyToMergedParties()

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

◆ SetPositionAfterMapChange()

void TaleWorlds.CampaignSystem.Army.SetPositionAfterMapChange ( CampaignVec2 newPosition)

◆ CheckPositionsForMapChangeAndUpdateIfNeeded()

void TaleWorlds.CampaignSystem.Army.CheckPositionsForMapChangeAndUpdateIfNeeded ( )

Property Documentation

◆ GatheringPositionMaxDistanceToTheSettlement

float TaleWorlds.CampaignSystem.Army.GatheringPositionMaxDistanceToTheSettlement
get

◆ GatheringPositionMinDistanceToTheSettlement

float TaleWorlds.CampaignSystem.Army.GatheringPositionMinDistanceToTheSettlement
get

◆ Parties

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

◆ EncyclopediaLinkWithName

TextObject TaleWorlds.CampaignSystem.Army.EncyclopediaLinkWithName
get

◆ 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

◆ EstimatedStrength

float TaleWorlds.CampaignSystem.Army.EstimatedStrength
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

◆ IsReady

bool TaleWorlds.CampaignSystem.Army.IsReady
get

◆ IsArmyInGatheringState

bool TaleWorlds.CampaignSystem.Army.IsArmyInGatheringState
get