M&B: Bannerlord 1.0.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.MountAndBlade.UsableMachine Class Referenceabstract

Inherits TaleWorlds.MountAndBlade.SynchedMissionObject, TaleWorlds.MountAndBlade.IFocusable, TaleWorlds.MountAndBlade.IOrderable, and TaleWorlds.MountAndBlade.IDetachment.

Inherited by SandBox.Objects.Usables.Chair, SandBox.Objects.Usables.MusicianGroup, SandBox.Objects.Usables.Passage, SandBox.Objects.Usables.PatrolArea, SandBox.Objects.Usables.SmithingMachine, SandBox.Objects.Usables.UsablePlace, TaleWorlds.MountAndBlade.ArrowBarrel, TaleWorlds.MountAndBlade.CastleGate, TaleWorlds.MountAndBlade.ExitDoor, TaleWorlds.MountAndBlade.Objects.Usables.SiegeMachineStonePile, TaleWorlds.MountAndBlade.SiegeWeapon, TaleWorlds.MountAndBlade.StonePile, and TaleWorlds.MountAndBlade.TrainingIcon.

Public Member Functions

void AddComponent (UsableMissionObjectComponent component)
 
void RemoveComponent (UsableMissionObjectComponent component)
 
GetComponent< T > ()
 
virtual OrderType GetOrder (BattleSideEnum side)
 
virtual UsableMachineAIBase CreateAIBehaviorObject ()
 
GameEntity GetValidStandingPointForAgent (Agent agent)
 
GameEntity GetValidStandingPointForAgentWithoutDistanceCheck (Agent agent)
 
StandingPoint GetVacantStandingPointForAI (Agent agent)
 
StandingPoint GetTargetStandingPointOfAIAgent (Agent agent)
 
override void SetVisibleSynched (bool value, bool forceChildrenVisible=false)
 The user agent who controls this object More...
 
override void SetPhysicsStateSynched (bool value, bool setChildren=true)
 
override TickRequirement GetTickRequirement ()
 
virtual void OnFocusGain (Agent userAgent)
 
virtual void OnFocusLose (Agent userAgent)
 
virtual TextObject GetInfoTextForBeingNotInteractable (Agent userAgent)
 
void Deactivate ()
 
void Activate ()
 
virtual bool IsDisabledForBattleSide (BattleSideEnum sideEnum)
 
virtual bool IsDisabledForBattleSideAI (BattleSideEnum sideEnum)
 
virtual void Disable ()
 
override bool ReadFromNetwork ()
 
override void WriteToNetwork ()
 
override string ToString ()
 
abstract TextObject GetActionTextForStandingPoint (UsableMissionObject usableGameObject)
 
virtual StandingPoint GetBestPointAlternativeTo (StandingPoint standingPoint, Agent agent)
 
virtual bool IsInRangeToCheckAlternativePoints (Agent agent)
 
void AddAgentAtSlotIndex (Agent agent, int slotIndex)
 
bool IsStandingPointAvailableForAgent (Agent agent)
 
bool IsUsedByFormation (Formation formation)
 
abstract string GetDescriptionText (GameEntity gameEntity=null)
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.SynchedMissionObject
override TickRequirement GetTickRequirement ()
 
void SetLocalPositionSmoothStep (ref Vec3 targetPosition)
 
virtual void SetVisibleSynched (bool value, bool forceChildrenVisible=false)
 
virtual void SetPhysicsStateSynched (bool value, bool setChildren=true)
 
virtual void SetDisabledSynched ()
 
void SetFrameSynched (ref MatrixFrame frame, bool isClient=false)
 
void SetGlobalFrameSynched (ref MatrixFrame frame, bool isClient=false)
 
void SetFrameSynchedOverTime (ref MatrixFrame frame, float duration, bool isClient=false)
 
void SetGlobalFrameSynchedOverTime (ref MatrixFrame frame, float duration, bool isClient=false)
 
void SetAnimationAtChannelSynched (string animationName, int channelNo, float animationSpeed=1.0f)
 
void SetAnimationAtChannelSynched (int animationIndex, int channelNo, float animationSpeed=1.0f)
 
void SetAnimationChannelParameterSynched (int channelNo, float parameter)
 
void PauseSkeletonAnimationSynched ()
 
void ResumeSkeletonAnimationSynched ()
 
void BurstParticlesSynched (bool doChildren=true)
 
void ApplyImpulseSynched (Vec3 localPosition, Vec3 impulse)
 
void AddBodyFlagsSynched (BodyFlags flags, bool applyToChildren=true)
 
void RemoveBodyFlagsSynched (BodyFlags flags, bool applyToChildren=true)
 
void SetTeamColors (uint color, uint color2)
 
virtual void SetTeamColorsSynched (uint color, uint color2)
 
virtual bool ReadFromNetwork ()
 
virtual void WriteToNetwork ()
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.MissionObject
 MissionObject ()
 
virtual void SetAbilityOfFaces (bool enabled)
 
override int GetHashCode ()
 
virtual void AfterMissionStart ()
 
void SetDisabled (bool isParentObject=false)
 Only disables the mission object script and removes it from active mission objects list but the object entity remains visible with active physics More...
 
void SetDisabledAndMakeInvisible (bool isParentObject=false)
 Mission object is disabled and removed from active mission objects list, its entity is made invisible and therefore its physics is turned off More...
 
virtual void OnEndMission ()
 
virtual void AddStuckMissile (GameEntity missileEntity)
 
- Public Member Functions inherited from TaleWorlds.Engine.ScriptComponentBehavior
void SetScriptComponentToTick (TickRequirement value)
 
void SetScriptComponentToTickMT (TickRequirement value)
 
virtual TickRequirement GetTickRequirement ()
 
void OnFocusGain (Agent userAgent)
 
void OnFocusLose (Agent userAgent)
 
TextObject GetInfoTextForBeingNotInteractable (Agent userAgent)
 
string GetDescriptionText (GameEntity gameEntity=null)
 
OrderType GetOrder (BattleSideEnum side)
 
bool IsAgentUsingOrMovingTo (Agent agent)
 
float? GetWeightOfNextSlot (BattleSideEnum side)
 Null if there is no vacancy left. Otherwise it is a positive number. More...
 
float GetDetachmentWeight (BattleSideEnum side)
 
float ComputeAndCacheDetachmentWeight (BattleSideEnum side)
 
float GetDetachmentWeightFromCache ()
 
List< ValueTuple< int, float > > GetSlotIndexWeightTuples ()
 
bool IsSlotAtIndexAvailableForAgent (int slotIndex, Agent agent)
 
bool IsAgentEligible (Agent agent)
 
void AddAgentAtSlotIndex (Agent agent, int slotIndex)
 
Agent GetMovingAgentAtSlotIndex (int slotIndex)
 
void MarkSlotAtIndex (int slotIndex)
 
bool IsDetachmentRecentlyEvaluated ()
 
void UnmarkDetachment ()
 
float? GetWeightOfAgentAtNextSlot (IEnumerable< Agent > candidates, out Agent match)
 
float? GetWeightOfAgentAtNextSlot (IEnumerable< AgentValuePair< float > > agentTemplateScores, out Agent match)
 
float GetTemplateWeightOfAgent (Agent candidate)
 
float[] GetTemplateCostsOfAgent (Agent candidate, float[] oldValue)
 
float GetExactCostOfAgentAtSlot (Agent candidate, int slotIndex)
 
float GetWeightOfOccupiedSlot (Agent detachedAgent)
 
float? GetWeightOfAgentAtOccupiedSlot (Agent detachedAgent, IEnumerable< Agent > candidates, out Agent match)
 
bool IsStandingPointAvailableForAgent (Agent agent)
 
void AddAgent (Agent agent, int slotIndex=-1)
 
void RemoveAgent (Agent detachedAgent)
 
void FormationStartUsing (Formation formation)
 
void FormationStopUsing (Formation formation)
 
bool IsUsedByFormation (Formation formation)
 
WorldFrameGetAgentFrame (Agent detachedAgent)
 Returns null for siege weapons and other detachments that sets scripted frame for the agent. Returns a frame otherwise. More...
 
void ResetEvaluation ()
 
bool IsEvaluated ()
 
void SetAsEvaluated ()
 
void OnFormationLeave (Formation formation)
 

Public Attributes

string PilotStandingPointTag = "Pilot"
 
string AmmoPickUpTag = "ammopickup"
 
string WaitStandingPointTag = "Wait"
 

Static Public Attributes

const string UsableMachineParentTag = "machine_parent"
 

Protected Member Functions

 UsableMachine ()
 
virtual void DebugTick (float dt)
 
override void OnRemoved (int removeReason)
 
virtual float GetWeightOfStandingPoint (StandingPoint sp)
 
virtual float GetDetachmentWeightAux (BattleSideEnum side)
 
virtual bool IsAgentOnInconvenientNavmesh (Agent agent, StandingPoint standingPoint)
 
virtual StandingPoint GetSuitableStandingPointFor (BattleSideEnum side, Agent agent=null, IEnumerable< Agent > agents=null, IEnumerable< AgentValuePair< float > > agentValuePairs=null)
 
- Protected Member Functions inherited from TaleWorlds.MountAndBlade.MissionObject
virtual void AttachDynamicNavmeshToEntity ()
 
virtual GameEntity GetEntityToAttachNavMeshFaces ()
 
override void OnRemoved (int removeReason)
 
- Protected Member Functions inherited from TaleWorlds.Engine.ScriptComponentBehavior
void InvalidateWeakPointersIfValid ()
 
 ScriptComponentBehavior ()
 
virtual void OnRemoved (int removeReason)
 

Protected Attributes

GameEntity ActiveWaitStandingPoint
 
bool _areUsableStandingPointsVacant = true
 
List< ValueTuple< int, StandingPoint > > _usableStandingPoints
 
bool _isDetachmentRecentlyEvaluated = false
 
float EnemyRangeToStopUsing = 0.0f
 
bool MakeVisibilityCheck = true
 
bool _isDisabledForAI = false
 
List< Formation_userFormations
 
- Protected Attributes inherited from TaleWorlds.MountAndBlade.MissionObject
string NavMeshPrefabName = ""
 
int DynamicNavmeshIdStart = 0
 

Properties

List< StandingPointStandingPoints [get]
 
StandingPoint PilotStandingPoint [get]
 
List< GameEntityWaitStandingPoints [get]
 
DestructableComponent DestructionComponent [get]
 
bool IsDestructible [get]
 
bool IsDestroyed [get]
 
Agent PilotAgent [get]
 
bool IsLoose [get]
 
UsableMachineAIBase Ai [get]
 
virtual FocusableObjectType FocusableObjectType [get]
 
StandingPoint CurrentlyUsedAmmoPickUpPoint [get, set]
 
bool HasAIPickingUpAmmo [get]
 
IReadOnlyList< FormationUserFormations [get]
 
IEnumerable< AgentUsers [get]
 
int UserCountNotInStruckAction [get]
 
int UserCountIncludingInStruckAction [get]
 
virtual int MaxUserCount [get]
 
virtual bool HasWaitFrame [get]
 
MatrixFrame WaitFrame [get]
 
GameEntity WaitEntity [get]
 
virtual bool IsDeactivated [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.SynchedMissionObject
uint Color [get]
 
uint Color2 [get]
 
bool SynchronizeCompleted [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.MissionObject
MissionObjectId Id [get, set]
 
bool IsDisabled [get]
 
bool CreatedAtRuntime [get]
 
- Properties inherited from TaleWorlds.Engine.ScriptComponentBehavior
GameEntity GameEntity [get]
 
ManagedScriptComponent ScriptComponent [get]
 
ManagedScriptHolder ManagedScriptHolder [get]
 
Scene Scene [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.IFocusable
FocusableObjectType FocusableObjectType [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.IDetachment
IEnumerable< AgentAgents [get]
 Detached agents of this detachment More...
 
IReadOnlyList< FormationUserFormations [get]
 
bool IsLoose [get]
 

Additional Inherited Members

- Public Types inherited from TaleWorlds.MountAndBlade.SynchedMissionObject
enum  SynchFlags : uint
 
- Public Types inherited from TaleWorlds.Engine.ScriptComponentBehavior
enum  TickRequirement : uint
 
- Static Protected Attributes inherited from TaleWorlds.MountAndBlade.MissionObject
const int InsideNavMeshIdLocal = 1
 
const int EnterNavMeshIdLocal = 2
 
const int ExitNavMeshIdLocal = 3
 
const int BlockerNavMeshIdLocal = 4
 
const int ExtraNavMesh1IdLocal = 5
 
const int ExtraNavMesh2IdLocal = 6
 
const int ExtraNavMesh3IdLocal = 7
 

Constructor & Destructor Documentation

◆ UsableMachine()

TaleWorlds.MountAndBlade.UsableMachine.UsableMachine ( )
protected

Member Function Documentation

◆ AddComponent()

void TaleWorlds.MountAndBlade.UsableMachine.AddComponent ( UsableMissionObjectComponent  component)

◆ RemoveComponent()

void TaleWorlds.MountAndBlade.UsableMachine.RemoveComponent ( UsableMissionObjectComponent  component)

◆ GetComponent< T >()

T TaleWorlds.MountAndBlade.UsableMachine.GetComponent< T > ( )
Type Constraints
T :UsableMissionObjectComponent 

◆ GetOrder()

◆ CreateAIBehaviorObject()

◆ GetValidStandingPointForAgent()

GameEntity TaleWorlds.MountAndBlade.UsableMachine.GetValidStandingPointForAgent ( Agent  agent)

◆ GetValidStandingPointForAgentWithoutDistanceCheck()

GameEntity TaleWorlds.MountAndBlade.UsableMachine.GetValidStandingPointForAgentWithoutDistanceCheck ( Agent  agent)

◆ GetVacantStandingPointForAI()

StandingPoint TaleWorlds.MountAndBlade.UsableMachine.GetVacantStandingPointForAI ( Agent  agent)

◆ GetTargetStandingPointOfAIAgent()

StandingPoint TaleWorlds.MountAndBlade.UsableMachine.GetTargetStandingPointOfAIAgent ( Agent  agent)

◆ SetVisibleSynched()

override void TaleWorlds.MountAndBlade.UsableMachine.SetVisibleSynched ( bool  value,
bool  forceChildrenVisible = false 
)
virtual

◆ SetPhysicsStateSynched()

override void TaleWorlds.MountAndBlade.UsableMachine.SetPhysicsStateSynched ( bool  value,
bool  setChildren = true 
)
virtual

◆ GetTickRequirement()

override TickRequirement TaleWorlds.MountAndBlade.UsableMachine.GetTickRequirement ( )
virtual

◆ DebugTick()

virtual void TaleWorlds.MountAndBlade.UsableMachine.DebugTick ( float  dt)
protectedvirtual

◆ OnFocusGain()

virtual void TaleWorlds.MountAndBlade.UsableMachine.OnFocusGain ( Agent  userAgent)
virtual

◆ OnFocusLose()

virtual void TaleWorlds.MountAndBlade.UsableMachine.OnFocusLose ( Agent  userAgent)
virtual

◆ GetInfoTextForBeingNotInteractable()

virtual TextObject TaleWorlds.MountAndBlade.UsableMachine.GetInfoTextForBeingNotInteractable ( Agent  userAgent)
virtual

◆ Deactivate()

void TaleWorlds.MountAndBlade.UsableMachine.Deactivate ( )

◆ Activate()

void TaleWorlds.MountAndBlade.UsableMachine.Activate ( )

◆ IsDisabledForBattleSide()

virtual bool TaleWorlds.MountAndBlade.UsableMachine.IsDisabledForBattleSide ( BattleSideEnum  sideEnum)
virtual

◆ IsDisabledForBattleSideAI()

virtual bool TaleWorlds.MountAndBlade.UsableMachine.IsDisabledForBattleSideAI ( BattleSideEnum  sideEnum)
virtual

◆ Disable()

virtual void TaleWorlds.MountAndBlade.UsableMachine.Disable ( )
virtual

◆ OnRemoved()

override void TaleWorlds.MountAndBlade.UsableMachine.OnRemoved ( int  removeReason)
protectedvirtual

◆ ReadFromNetwork()

override bool TaleWorlds.MountAndBlade.UsableMachine.ReadFromNetwork ( )
virtual

◆ WriteToNetwork()

override void TaleWorlds.MountAndBlade.UsableMachine.WriteToNetwork ( )
virtual

◆ ToString()

override string TaleWorlds.MountAndBlade.UsableMachine.ToString ( )

◆ GetActionTextForStandingPoint()

◆ GetBestPointAlternativeTo()

virtual StandingPoint TaleWorlds.MountAndBlade.UsableMachine.GetBestPointAlternativeTo ( StandingPoint  standingPoint,
Agent  agent 
)
virtual

◆ IsInRangeToCheckAlternativePoints()

virtual bool TaleWorlds.MountAndBlade.UsableMachine.IsInRangeToCheckAlternativePoints ( Agent  agent)
virtual

◆ GetWeightOfStandingPoint()

virtual float TaleWorlds.MountAndBlade.UsableMachine.GetWeightOfStandingPoint ( StandingPoint  sp)
protectedvirtual

◆ GetDetachmentWeightAux()

virtual float TaleWorlds.MountAndBlade.UsableMachine.GetDetachmentWeightAux ( BattleSideEnum  side)
protectedvirtual

◆ IsAgentOnInconvenientNavmesh()

virtual bool TaleWorlds.MountAndBlade.UsableMachine.IsAgentOnInconvenientNavmesh ( Agent  agent,
StandingPoint  standingPoint 
)
protectedvirtual

◆ AddAgentAtSlotIndex()

void TaleWorlds.MountAndBlade.UsableMachine.AddAgentAtSlotIndex ( Agent  agent,
int  slotIndex 
)

◆ IsStandingPointAvailableForAgent()

bool TaleWorlds.MountAndBlade.UsableMachine.IsStandingPointAvailableForAgent ( Agent  agent)

◆ IsUsedByFormation()

bool TaleWorlds.MountAndBlade.UsableMachine.IsUsedByFormation ( Formation  formation)

◆ GetSuitableStandingPointFor()

virtual StandingPoint TaleWorlds.MountAndBlade.UsableMachine.GetSuitableStandingPointFor ( BattleSideEnum  side,
Agent  agent = null,
IEnumerable< Agent agents = null,
IEnumerable< AgentValuePair< float > >  agentValuePairs = null 
)
protectedvirtual

◆ GetDescriptionText()

Member Data Documentation

◆ UsableMachineParentTag

const string TaleWorlds.MountAndBlade.UsableMachine.UsableMachineParentTag = "machine_parent"
static

◆ PilotStandingPointTag

string TaleWorlds.MountAndBlade.UsableMachine.PilotStandingPointTag = "Pilot"

◆ AmmoPickUpTag

string TaleWorlds.MountAndBlade.UsableMachine.AmmoPickUpTag = "ammopickup"

◆ WaitStandingPointTag

string TaleWorlds.MountAndBlade.UsableMachine.WaitStandingPointTag = "Wait"

◆ ActiveWaitStandingPoint

GameEntity TaleWorlds.MountAndBlade.UsableMachine.ActiveWaitStandingPoint
protected

◆ _areUsableStandingPointsVacant

bool TaleWorlds.MountAndBlade.UsableMachine._areUsableStandingPointsVacant = true
protected

◆ _usableStandingPoints

List<ValueTuple<int, StandingPoint> > TaleWorlds.MountAndBlade.UsableMachine._usableStandingPoints
protected

◆ _isDetachmentRecentlyEvaluated

bool TaleWorlds.MountAndBlade.UsableMachine._isDetachmentRecentlyEvaluated = false
protected

◆ EnemyRangeToStopUsing

float TaleWorlds.MountAndBlade.UsableMachine.EnemyRangeToStopUsing = 0.0f
protected

◆ MakeVisibilityCheck

bool TaleWorlds.MountAndBlade.UsableMachine.MakeVisibilityCheck = true
protected

◆ _isDisabledForAI

bool TaleWorlds.MountAndBlade.UsableMachine._isDisabledForAI = false
protected

◆ _userFormations

List<Formation> TaleWorlds.MountAndBlade.UsableMachine._userFormations
protected

Property Documentation

◆ StandingPoints

List<StandingPoint> TaleWorlds.MountAndBlade.UsableMachine.StandingPoints
get

◆ PilotStandingPoint

StandingPoint TaleWorlds.MountAndBlade.UsableMachine.PilotStandingPoint
get

◆ WaitStandingPoints

List<GameEntity> TaleWorlds.MountAndBlade.UsableMachine.WaitStandingPoints
getprotected

◆ DestructionComponent

DestructableComponent TaleWorlds.MountAndBlade.UsableMachine.DestructionComponent
get

◆ IsDestructible

bool TaleWorlds.MountAndBlade.UsableMachine.IsDestructible
get

◆ IsDestroyed

bool TaleWorlds.MountAndBlade.UsableMachine.IsDestroyed
get

◆ PilotAgent

Agent TaleWorlds.MountAndBlade.UsableMachine.PilotAgent
get

◆ IsLoose

bool TaleWorlds.MountAndBlade.UsableMachine.IsLoose
get

◆ Ai

UsableMachineAIBase TaleWorlds.MountAndBlade.UsableMachine.Ai
get

◆ FocusableObjectType

virtual FocusableObjectType TaleWorlds.MountAndBlade.UsableMachine.FocusableObjectType
get

◆ CurrentlyUsedAmmoPickUpPoint

StandingPoint TaleWorlds.MountAndBlade.UsableMachine.CurrentlyUsedAmmoPickUpPoint
getset

◆ HasAIPickingUpAmmo

bool TaleWorlds.MountAndBlade.UsableMachine.HasAIPickingUpAmmo
get

◆ UserFormations

IReadOnlyList<Formation> TaleWorlds.MountAndBlade.UsableMachine.UserFormations
get

◆ Users

IEnumerable<Agent> TaleWorlds.MountAndBlade.UsableMachine.Users
get

◆ UserCountNotInStruckAction

int TaleWorlds.MountAndBlade.UsableMachine.UserCountNotInStruckAction
get

◆ UserCountIncludingInStruckAction

int TaleWorlds.MountAndBlade.UsableMachine.UserCountIncludingInStruckAction
get

◆ MaxUserCount

virtual int TaleWorlds.MountAndBlade.UsableMachine.MaxUserCount
get

◆ HasWaitFrame

virtual bool TaleWorlds.MountAndBlade.UsableMachine.HasWaitFrame
get

◆ WaitFrame

MatrixFrame TaleWorlds.MountAndBlade.UsableMachine.WaitFrame
get

◆ WaitEntity

GameEntity TaleWorlds.MountAndBlade.UsableMachine.WaitEntity
get

◆ IsDeactivated

virtual bool TaleWorlds.MountAndBlade.UsableMachine.IsDeactivated
get