M&B: Bannerlord 1.2.10
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
Helpers.MobilePartyHelper Class Reference

Public Member Functions

delegate void ResumePartyEscortBehaviorDelegate ()
 

Static Public Member Functions

static MobileParty SpawnLordParty (Hero hero, Settlement spawnSettlement)
 
static MobileParty SpawnLordParty (Hero hero, Vec2 position, float spawnRadius)
 
static void CreateNewClanMobileParty (Hero partyLeader, Clan clan, out bool leaderCameFromMainParty)
 
static void DesertTroopsFromParty (MobileParty party, int stackNo, int numberOfDeserters, int numberOfWoundedDeserters, ref TroopRoster desertedTroopList)
 
static bool IsHeroAssignableForScoutInParty (Hero hero, MobileParty party)
 
static bool IsHeroAssignableForEngineerInParty (Hero hero, MobileParty party)
 
static bool IsHeroAssignableForSurgeonInParty (Hero hero, MobileParty party)
 
static bool IsHeroAssignableForQuartermasterInParty (Hero hero, MobileParty party)
 
static Hero GetHeroWithHighestSkill (MobileParty party, SkillObject skill)
 
static TroopRoster GetStrongestAndPriorTroops (MobileParty mobileParty, int maxTroopCount, bool includePlayer)
 
static TroopRoster GetStrongestAndPriorTroops (FlattenedTroopRoster roster, int maxTroopCount, bool includePlayer)
 
static int GetMaximumXpAmountPartyCanGet (MobileParty party)
 
static void PartyAddSharedXp (MobileParty party, float xpToDistribute)
 
static bool CanTroopGainXp (PartyBase owner, CharacterObject character, out int gainableMaxXp)
 
static Vec2 FindReachablePointAroundPosition (Vec2 centerPosition, float maxDistance, float minDistance=0.0f)
 
static void TryMatchPartySpeedWithItemWeight (MobileParty party, float targetPartySpeed, ItemObject itemToUse=null)
 Adds or removes counts of the specified or default item object in an effort to match target party speed.
 
static void UtilizePartyEscortBehavior (MobileParty escortedParty, MobileParty escortParty, ref bool isWaitingForEscortParty, float innerRadius, float outerRadius, ResumePartyEscortBehaviorDelegate onPartyEscortBehaviorResumed, bool showDebugSpheres=false)
 Helper function that stops the escorted party when the escort is away and resumes movement when close.
 
static Hero GetMainPartySkillCounsellor (SkillObject skill)
 
static Settlement GetCurrentSettlementOfMobilePartyForAICalculation (MobileParty mobileParty)
 
static TroopRoster GetPlayerPrisonersPlayerCanSell ()
 

Member Function Documentation

◆ ResumePartyEscortBehaviorDelegate()

delegate void Helpers.MobilePartyHelper.ResumePartyEscortBehaviorDelegate ( )

◆ SpawnLordParty() [1/2]

static MobileParty Helpers.MobilePartyHelper.SpawnLordParty ( Hero hero,
Settlement spawnSettlement )
static

◆ SpawnLordParty() [2/2]

static MobileParty Helpers.MobilePartyHelper.SpawnLordParty ( Hero hero,
Vec2 position,
float spawnRadius )
static

◆ CreateNewClanMobileParty()

static void Helpers.MobilePartyHelper.CreateNewClanMobileParty ( Hero partyLeader,
Clan clan,
out bool leaderCameFromMainParty )
static

◆ DesertTroopsFromParty()

static void Helpers.MobilePartyHelper.DesertTroopsFromParty ( MobileParty party,
int stackNo,
int numberOfDeserters,
int numberOfWoundedDeserters,
ref TroopRoster desertedTroopList )
static

◆ IsHeroAssignableForScoutInParty()

static bool Helpers.MobilePartyHelper.IsHeroAssignableForScoutInParty ( Hero hero,
MobileParty party )
static

◆ IsHeroAssignableForEngineerInParty()

static bool Helpers.MobilePartyHelper.IsHeroAssignableForEngineerInParty ( Hero hero,
MobileParty party )
static

◆ IsHeroAssignableForSurgeonInParty()

static bool Helpers.MobilePartyHelper.IsHeroAssignableForSurgeonInParty ( Hero hero,
MobileParty party )
static

◆ IsHeroAssignableForQuartermasterInParty()

static bool Helpers.MobilePartyHelper.IsHeroAssignableForQuartermasterInParty ( Hero hero,
MobileParty party )
static

◆ GetHeroWithHighestSkill()

static Hero Helpers.MobilePartyHelper.GetHeroWithHighestSkill ( MobileParty party,
SkillObject skill )
static

◆ GetStrongestAndPriorTroops() [1/2]

static TroopRoster Helpers.MobilePartyHelper.GetStrongestAndPriorTroops ( MobileParty mobileParty,
int maxTroopCount,
bool includePlayer )
static

◆ GetStrongestAndPriorTroops() [2/2]

static TroopRoster Helpers.MobilePartyHelper.GetStrongestAndPriorTroops ( FlattenedTroopRoster roster,
int maxTroopCount,
bool includePlayer )
static

◆ GetMaximumXpAmountPartyCanGet()

static int Helpers.MobilePartyHelper.GetMaximumXpAmountPartyCanGet ( MobileParty party)
static

◆ PartyAddSharedXp()

static void Helpers.MobilePartyHelper.PartyAddSharedXp ( MobileParty party,
float xpToDistribute )
static

◆ CanTroopGainXp()

static bool Helpers.MobilePartyHelper.CanTroopGainXp ( PartyBase owner,
CharacterObject character,
out int gainableMaxXp )
static

◆ FindReachablePointAroundPosition()

static Vec2 Helpers.MobilePartyHelper.FindReachablePointAroundPosition ( Vec2 centerPosition,
float maxDistance,
float minDistance = 0::0f )
static

◆ TryMatchPartySpeedWithItemWeight()

static void Helpers.MobilePartyHelper.TryMatchPartySpeedWithItemWeight ( MobileParty party,
float targetPartySpeed,
ItemObject itemToUse = null )
static

◆ UtilizePartyEscortBehavior()

static void Helpers.MobilePartyHelper.UtilizePartyEscortBehavior ( MobileParty escortedParty,
MobileParty escortParty,
ref bool isWaitingForEscortParty,
float innerRadius,
float outerRadius,
ResumePartyEscortBehaviorDelegate onPartyEscortBehaviorResumed,
bool showDebugSpheres = false )
static
Parameters
escortedParty
escortParty
isWaitingForEscortPartyEscort behavior modifies this parameter when it decides movement states should be changed (wait, move). Should be stored by the caller.
innerRadiusEscorted party will start moving again if the escort party is within this radius
outerRadiusEscorted party will stop if the escort party is outside this radius
onPartyEscortBehaviorResumedDelegate invoked when the escorted party should start moving. i.e quest can specify which ai action should be called to move
showDebugSpheres

◆ GetMainPartySkillCounsellor()

static Hero Helpers.MobilePartyHelper.GetMainPartySkillCounsellor ( SkillObject skill)
static

◆ GetCurrentSettlementOfMobilePartyForAICalculation()

static Settlement Helpers.MobilePartyHelper.GetCurrentSettlementOfMobilePartyForAICalculation ( MobileParty mobileParty)
static

◆ GetPlayerPrisonersPlayerCanSell()

static TroopRoster Helpers.MobilePartyHelper.GetPlayerPrisonersPlayerCanSell ( )
static