Table of Contents

Interface IDetachment

Namespace
TaleWorlds.MountAndBlade
Assembly
TaleWorlds.MountAndBlade.dll
public interface IDetachment

Properties

IsLoose

bool IsLoose { get; }

Property Value

bool

UserFormations

MBReadOnlyList<Formation> UserFormations { get; }

Property Value

MBReadOnlyList<Formation>

Methods

AddAgent(Agent, int)

void AddAgent(Agent agent, int slotIndex = -1)

Parameters

agent Agent
slotIndex int

AddAgentAtSlotIndex(Agent, int)

void AddAgentAtSlotIndex(Agent agent, int slotIndex)

Parameters

agent Agent
slotIndex int

ComputeAndCacheDetachmentWeight(BattleSideEnum)

float ComputeAndCacheDetachmentWeight(BattleSideEnum side)

Parameters

side BattleSideEnum

Returns

float

FormationStartUsing(Formation)

void FormationStartUsing(Formation formation)

Parameters

formation Formation

FormationStopUsing(Formation)

void FormationStopUsing(Formation formation)

Parameters

formation Formation

GetAgentFrame(Agent)

WorldFrame? GetAgentFrame(Agent detachedAgent)

Parameters

detachedAgent Agent

Returns

WorldFrame?

GetDetachmentWeight(BattleSideEnum)

float GetDetachmentWeight(BattleSideEnum side)

Parameters

side BattleSideEnum

Returns

float

GetDetachmentWeightFromCache()

float GetDetachmentWeightFromCache()

Returns

float

GetExactCostOfAgentAtSlot(Agent, int)

float GetExactCostOfAgentAtSlot(Agent candidate, int slotIndex)

Parameters

candidate Agent
slotIndex int

Returns

float

GetMovingAgentAtSlotIndex(int)

Agent GetMovingAgentAtSlotIndex(int slotIndex)

Parameters

slotIndex int

Returns

Agent

GetNumberOfUsableSlots()

int GetNumberOfUsableSlots()

Returns

int

GetSlotIndexWeightTuples(List<(int, float)>)

void GetSlotIndexWeightTuples(List<(int, float)> slotIndexWeightTuples)

Parameters

slotIndexWeightTuples List<(int, float)>

GetTemplateCostsOfAgent(Agent, List<float>)

List<float> GetTemplateCostsOfAgent(Agent candidate, List<float> oldValue)

Parameters

candidate Agent
oldValue List<float>

Returns

List<float>

GetTemplateWeightOfAgent(Agent)

float GetTemplateWeightOfAgent(Agent candidate)

Parameters

candidate Agent

Returns

float

GetWeightOfAgentAtNextSlot(List<(Agent, float)>, out Agent)

float? GetWeightOfAgentAtNextSlot(List<(Agent, float)> agentTemplateScores, out Agent match)

Parameters

agentTemplateScores List<(Agent, float)>
match Agent

Returns

float?

GetWeightOfAgentAtNextSlot(List<Agent>, out Agent)

float? GetWeightOfAgentAtNextSlot(List<Agent> candidates, out Agent match)

Parameters

candidates List<Agent>
match Agent

Returns

float?

GetWeightOfAgentAtOccupiedSlot(Agent, List<Agent>, out Agent)

float? GetWeightOfAgentAtOccupiedSlot(Agent detachedAgent, List<Agent> candidates, out Agent match)

Parameters

detachedAgent Agent
candidates List<Agent>
match Agent

Returns

float?

GetWeightOfNextSlot(BattleSideEnum)

float? GetWeightOfNextSlot(BattleSideEnum side)

Parameters

side BattleSideEnum

Returns

float?

GetWeightOfOccupiedSlot(Agent)

float GetWeightOfOccupiedSlot(Agent detachedAgent)

Parameters

detachedAgent Agent

Returns

float

IsAgentEligible(Agent)

bool IsAgentEligible(Agent agent)

Parameters

agent Agent

Returns

bool

IsAgentUsingOrInterested(Agent)

bool IsAgentUsingOrInterested(Agent agent)

Parameters

agent Agent

Returns

bool

IsDetachmentRecentlyEvaluated()

bool IsDetachmentRecentlyEvaluated()

Returns

bool

IsEvaluated()

bool IsEvaluated()

Returns

bool

IsSlotAtIndexAvailableForAgent(int, Agent)

bool IsSlotAtIndexAvailableForAgent(int slotIndex, Agent agent)

Parameters

slotIndex int
agent Agent

Returns

bool

IsStandingPointAvailableForAgent(Agent)

bool IsStandingPointAvailableForAgent(Agent agent)

Parameters

agent Agent

Returns

bool

IsUsedByFormation(Formation)

bool IsUsedByFormation(Formation formation)

Parameters

formation Formation

Returns

bool

MarkSlotAtIndex(int)

void MarkSlotAtIndex(int slotIndex)

Parameters

slotIndex int

OnFormationLeave(Formation)

void OnFormationLeave(Formation formation)

Parameters

formation Formation

RemoveAgent(Agent)

void RemoveAgent(Agent detachedAgent)

Parameters

detachedAgent Agent

ResetEvaluation()

void ResetEvaluation()

SetAsEvaluated()

void SetAsEvaluated()

UnmarkDetachment()

void UnmarkDetachment()

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