Table of Contents

Class MBAgentVisuals

Namespace
TaleWorlds.MountAndBlade
Assembly
TaleWorlds.MountAndBlade.dll
[EngineClass("Agent_visuals")]
public sealed class MBAgentVisuals : NativeObject
Inheritance
MBAgentVisuals
Inherited Members

Methods

AddChildEntity(GameEntity)

public void AddChildEntity(GameEntity entity)

Parameters

entity GameEntity

AddHorseReinsClothMesh(MetaMesh, MetaMesh)

public void AddHorseReinsClothMesh(MetaMesh reinMesh, MetaMesh ropeMesh)

Parameters

reinMesh MetaMesh
ropeMesh MetaMesh

AddMultiMesh(MetaMesh, BodyMeshTypes)

public void AddMultiMesh(MetaMesh metaMesh, BodyMeshTypes bodyMeshIndex)

Parameters

metaMesh MetaMesh
bodyMeshIndex BodyMeshTypes

AddPrefabToAgentVisualBoneByBoneType(string, HumanBone)

public CompositeComponent AddPrefabToAgentVisualBoneByBoneType(string prefabName, HumanBone boneType)

Parameters

prefabName string
boneType HumanBone

Returns

CompositeComponent

AddPrefabToAgentVisualBoneByRealBoneIndex(string, sbyte)

public CompositeComponent AddPrefabToAgentVisualBoneByRealBoneIndex(string prefabName, sbyte realBoneIndex)

Parameters

prefabName string
realBoneIndex sbyte

Returns

CompositeComponent

AddSkinMeshes(SkinGenerationParams, BodyProperties, bool, bool)

public void AddSkinMeshes(SkinGenerationParams skinParams, BodyProperties bodyProperties, bool useGPUMorph, bool useFaceCache)

Parameters

skinParams SkinGenerationParams
bodyProperties BodyProperties
useGPUMorph bool
useFaceCache bool

AddWeaponToAgentEntity(int, in WeaponData, WeaponStatsData[], in WeaponData, WeaponStatsData[], GameEntity)

public void AddWeaponToAgentEntity(int slotIndex, in WeaponData weaponData, WeaponStatsData[] weaponStatsData, in WeaponData ammoWeaponData, WeaponStatsData[] ammoWeaponStatsData, GameEntity cachedEntity)

Parameters

slotIndex int
weaponData WeaponData
weaponStatsData WeaponStatsData[]
ammoWeaponData WeaponData
ammoWeaponStatsData WeaponStatsData[]
cachedEntity GameEntity

ApplySkeletonScale(Vec3, float, sbyte[], Vec3[])

public void ApplySkeletonScale(Vec3 mountSitBoneScale, float mountRadiusAdder, sbyte[] boneIndices, Vec3[] boneScales)

Parameters

mountSitBoneScale Vec3
mountRadiusAdder float
boneIndices sbyte[]
boneScales Vec3[]

BatchLastLodMeshes()

public void BatchLastLodMeshes()

CheckResources(bool)

public bool CheckResources(bool addToQueue)

Parameters

addToQueue bool

Returns

bool

ClearAllWeaponMeshes()

public void ClearAllWeaponMeshes()

ClearVisualComponents(bool)

public void ClearVisualComponents(bool removeSkeleton)

Parameters

removeSkeleton bool

ClearWeaponMeshes(EquipmentIndex)

public void ClearWeaponMeshes(EquipmentIndex index)

Parameters

index EquipmentIndex

CreateAgentVisuals(Scene, string, Vec3)

public static MBAgentVisuals CreateAgentVisuals(Scene scene, string ownerName, Vec3 eyeOffset)

Parameters

scene Scene
ownerName string
eyeOffset Vec3

Returns

MBAgentVisuals

CreateParticleSystemAttachedToBone(int, sbyte, ref MatrixFrame)

public void CreateParticleSystemAttachedToBone(int runtimeParticleindex, sbyte boneIndex, ref MatrixFrame boneLocalParticleFrame)

Parameters

runtimeParticleindex int
boneIndex sbyte
boneLocalParticleFrame MatrixFrame

CreateParticleSystemAttachedToBone(string, sbyte, ref MatrixFrame)

public void CreateParticleSystemAttachedToBone(string particleName, sbyte boneIndex, ref MatrixFrame boneLocalParticleFrame)

Parameters

particleName string
boneIndex sbyte
boneLocalParticleFrame MatrixFrame

FillEntityWithBodyMeshesWithoutAgentVisuals(GameEntity, SkinGenerationParams, BodyProperties, MetaMesh)

public static void FillEntityWithBodyMeshesWithoutAgentVisuals(GameEntity entity, SkinGenerationParams skinParams, BodyProperties bodyProperties, MetaMesh glovesMesh)

Parameters

entity GameEntity
skinParams SkinGenerationParams
bodyProperties BodyProperties
glovesMesh MetaMesh

GetAttachedWeaponEntity(int)

public GameEntity GetAttachedWeaponEntity(int attachedWeaponIndex)

Parameters

attachedWeaponIndex int

Returns

GameEntity

GetBodyMeshIndex(EquipmentIndex)

public static BodyMeshTypes GetBodyMeshIndex(EquipmentIndex equipmentIndex)

Parameters

equipmentIndex EquipmentIndex

Returns

BodyMeshTypes

GetBoneEntitialFrame(sbyte, bool)

public MatrixFrame GetBoneEntitialFrame(sbyte bone, bool useBoneMapping)

Parameters

bone sbyte
useBoneMapping bool

Returns

MatrixFrame

GetBoneTypeData(sbyte)

public BoneBodyTypeData GetBoneTypeData(sbyte boneIndex)

Parameters

boneIndex sbyte

Returns

BoneBodyTypeData

GetCurrentRagdollState()

public RagdollState GetCurrentRagdollState()

Returns

RagdollState

GetEntity()

public GameEntity GetEntity()

Returns

GameEntity

GetFacegenScalingMatrix()

public MatrixFrame GetFacegenScalingMatrix()

Returns

MatrixFrame

GetFrame()

public MatrixFrame GetFrame()

Returns

MatrixFrame

GetGlobalFrame()

public MatrixFrame GetGlobalFrame()

Returns

MatrixFrame

GetGlobalStableEyePoint(bool)

public Vec3 GetGlobalStableEyePoint(bool isHumanoid)

Parameters

isHumanoid bool

Returns

Vec3

GetGlobalStableNeckPoint(bool)

public Vec3 GetGlobalStableNeckPoint(bool isHumanoid)

Parameters

isHumanoid bool

Returns

Vec3

GetRealBoneIndex(HumanBone)

public sbyte GetRealBoneIndex(HumanBone boneType)

Parameters

boneType HumanBone

Returns

sbyte

GetSkeleton()

public Skeleton GetSkeleton()

Returns

Skeleton

GetVisible()

public bool GetVisible()

Returns

bool

IsValid()

public bool IsValid()

Returns

bool

LazyUpdateAgentRendererData()

public void LazyUpdateAgentRendererData()

MakeVoice(int, Vec3)

public void MakeVoice(int voiceId, Vec3 position)

Parameters

voiceId int
position Vec3

RemoveChildEntity(GameEntity, int)

public void RemoveChildEntity(GameEntity entity, int removeReason)

Parameters

entity GameEntity
removeReason int

ReplaceMeshWithMesh(MetaMesh, MetaMesh, BodyMeshTypes)

public void ReplaceMeshWithMesh(MetaMesh oldMetaMesh, MetaMesh newMetaMesh, BodyMeshTypes bodyMeshIndex)

Parameters

oldMetaMesh MetaMesh
newMetaMesh MetaMesh
bodyMeshIndex BodyMeshTypes

Reset()

public void Reset()

ResetNextFrame()

public void ResetNextFrame()

SetAgentActionChannel(int, int, float, float, bool)

public void SetAgentActionChannel(int actionChannelNo, int actionIndex, float channelParameter = 0, float blendPeriodOverride = -0.2, bool forceFaceMorphRestart = true)

Parameters

actionChannelNo int
actionIndex int
channelParameter float
blendPeriodOverride float
forceFaceMorphRestart bool

SetAgentLocalSpeed(Vec2)

public void SetAgentLocalSpeed(Vec2 speed)

Parameters

speed Vec2

SetAgentLodZeroOrMax(bool)

public void SetAgentLodZeroOrMax(bool makeZero)

Parameters

makeZero bool

SetClothComponentKeepStateOfAllMeshes(bool)

public void SetClothComponentKeepStateOfAllMeshes(bool keepState)

Parameters

keepState bool

SetClothWindToWeaponAtIndex(Vec3, bool, EquipmentIndex)

public void SetClothWindToWeaponAtIndex(Vec3 windDirection, bool isLocal, EquipmentIndex weaponIndex)

Parameters

windDirection Vec3
isLocal bool
weaponIndex EquipmentIndex

SetContourColor(uint?, bool)

public void SetContourColor(uint? color, bool alwaysVisible = true)

Parameters

color uint?
alwaysVisible bool

SetEnableOcclusionCulling(bool)

public void SetEnableOcclusionCulling(bool enable)

Parameters

enable bool

SetEntity(GameEntity)

public void SetEntity(GameEntity value)

Parameters

value GameEntity

SetFaceGenerationParams(FaceGenerationParams)

public void SetFaceGenerationParams(FaceGenerationParams faceGenerationParams)

Parameters

faceGenerationParams FaceGenerationParams

SetFrame(ref MatrixFrame)

public void SetFrame(ref MatrixFrame frame)

Parameters

frame MatrixFrame

SetLodAtlasShadingIndex(int, bool, uint, uint)

public void SetLodAtlasShadingIndex(int index, bool useTeamColor, uint teamColor1, uint teamColor2)

Parameters

index int
useTeamColor bool
teamColor1 uint
teamColor2 uint

SetLookDirection(Vec3)

public void SetLookDirection(Vec3 direction)

Parameters

direction Vec3

SetSetupMorphNode(bool)

public void SetSetupMorphNode(bool value)

Parameters

value bool

SetSkeleton(Skeleton)

public void SetSkeleton(Skeleton newSkeleton)

Parameters

newSkeleton Skeleton

SetVisible(bool)

public void SetVisible(bool value)

Parameters

value bool

SetVoiceDefinitionIndex(int, float)

public void SetVoiceDefinitionIndex(int voiceDefinitionIndex, float voicePitch)

Parameters

voiceDefinitionIndex int
voicePitch float

SetWieldedWeaponIndices(int, int)

public void SetWieldedWeaponIndices(int slotIndexRightHand, int slotIndexLeftHand)

Parameters

slotIndexRightHand int
slotIndexLeftHand int

StartRhubarbRecord(string, int)

public void StartRhubarbRecord(string path, int soundId)

Parameters

path string
soundId int

Tick(MBAgentVisuals, float, bool, float)

public void Tick(MBAgentVisuals parentAgentVisuals, float dt, bool entityMoving, float speed)

Parameters

parentAgentVisuals MBAgentVisuals
dt float
entityMoving bool
speed float

UpdateQuiverMeshesWithoutAgent(int, int)

public void UpdateQuiverMeshesWithoutAgent(int weaponIndex, int ammoCount)

Parameters

weaponIndex int
ammoCount int

UpdateSkeletonScale(int)

public void UpdateSkeletonScale(int bodyDeformType)

Parameters

bodyDeformType int

UseScaledWeapons(bool)

public void UseScaledWeapons(bool value)

Parameters

value bool

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