Entity
Namespace: SharpPluginLoader.Core.Entities
Represents a Monster Hunter World uCharacterModel instance.
public class Entity : SharpPluginLoader.Core.Models.Model
Inheritance Object → NativeWrapper → MtObject → Model → Entity
Properties
CollisionComponent
Gets the entity's collision component
public CollisionComponent CollisionComponent { get; }
Property Value
ActionController
The entity's action controller
public ActionController ActionController { get; }
Property Value
Position
The position of the model
public MtVector3& Position { get; }
Property Value
Size
The size of the model
public MtVector3& Size { get; }
Property Value
CollisionPosition
The position of the model's collision box
public MtVector3& CollisionPosition { get; }
Property Value
Rotation
The rotation of the model
public MtQuaternion& Rotation { get; }
Property Value
Forward
The model's forward vector
public MtVector3 Forward { get; }
Property Value
AnimationFrame
The current frame of the model's current animation
public float AnimationFrame { get; set; }
Property Value
MaxAnimationFrame
The frame count of the model's current animation
public float MaxAnimationFrame { get; set; }
Property Value
AnimationSpeed
The speed of the model's current animation. Note, this value gets set every frame.
public float AnimationSpeed { get; set; }
Property Value
CurrentAnimation
Gets the current animation of the model
public AnimationId& CurrentAnimation { get; }
Property Value
AnimationLayer
The model's animation component
public AnimationLayerComponent AnimationLayer { get; }
Property Value
MotionLists
The model's motion lists.
public IEnumerable<MotionList> MotionLists { get; }
Property Value
Instance
The native pointer.
public nint Instance { get; set; }
Property Value
Constructors
Entity(IntPtr)
public Entity(nint instance)
Parameters
instance
IntPtr
Entity()
public Entity()
Methods
CreateEffect(UInt32, UInt32)
Creates an effect on the entity
public void CreateEffect(uint groupId, uint effectId)
Parameters
groupId
UInt32
The efx group id
effectId
UInt32
The efx id
Exceptions
CreateEffect(EffectProvider, UInt32, UInt32)
Creates an effect on the entity from the given epv file
public void CreateEffect(EffectProvider epv, uint groupId, uint effectId)
Parameters
epv
EffectProvider
The EPV file to take the efx from
groupId
UInt32
The efx group id
effectId
UInt32
The efx id
Exceptions
Remarks:
Tip: You can load any EPV file using ResourceManager.GetResource<T>(String, MtDti, UInt32)
CreateEffect(MtObject)
Creates the given effect on the entity
public void CreateEffect(MtObject effect)
Parameters
effect
MtObject
The effect to create
Exceptions
CreateShell(Int32, Int32, MtVector3, Nullable<MtVector3>)
Spawns a shell on the entity
public void CreateShell(int shllIndex, int shlpIndex, MtVector3 target, Nullable<MtVector3> origin)
Parameters
shllIndex
Int32
The index of the shll in the entities shll list
shlpIndex
Int32
The index of the shlp in the shll
target
MtVector3
The position the shell should travel towards
origin
Nullable<MtVector3>
The origin of the shell (or null for the entity itself)
CreateShell(Int32, Int32)
Spawns a shell on the entity
public void CreateShell(int shllIndex, int shlpIndex)
Parameters
shllIndex
Int32
The index of the shll in the entities shll list
shlpIndex
Int32
The index of the shlp in the shll
CreateShell(UInt32, MtVector3, Nullable<MtVector3>)
Spawns a shell on the entity
public void CreateShell(uint index, MtVector3 target, Nullable<MtVector3> origin)
Parameters
index
UInt32
The index of the shell in the entities shell list (shll)
target
MtVector3
The position the shell should travel towards
origin
Nullable<MtVector3>
The origin of the shell (or null for the entity itself)
CreateShell(ShellParamList, UInt32, MtVector3, Nullable<MtVector3>)
Spawns a shell on the entity from the given shll file
public void CreateShell(ShellParamList shll, uint index, MtVector3 target, Nullable<MtVector3> origin)
Parameters
shll
ShellParamList
The shll file to take the shell from
index
UInt32
The index of the shell in the entities shell list (shll)
target
MtVector3
The position the shell should travel towards
origin
Nullable<MtVector3>
The origin of the shell (or null for the entity itself)
Remarks:
Tip: You can load any shll file using ResourceManager.GetResource<T>(String, MtDti, UInt32)
CreateShell(ShellParam, MtVector3, Nullable<MtVector3>)
Spawns the given shell on the entity
public void CreateShell(ShellParam shell, MtVector3 target, Nullable<MtVector3> origin)
Parameters
shell
ShellParam
The shell to spawn
target
MtVector3
The target position of the shell
origin
Nullable<MtVector3>
The origin position of the shell (or null for the entity itself)
RegisterShll(ShellParamList, Int32, Boolean)
Registers a shll file on the entity
public bool RegisterShll(ShellParamList shll, int index, bool force)
Parameters
shll
ShellParamList
The shll to register
index
Int32
The index at which to register, must be less than 8. Passing -1 for this parameter will register the shll at the first free index.
force
Boolean
Whether to force the registration or not (only works when an index is specified)
Returns
Boolean
True if the shll was successfully registered
RegisterShll(String, Int32)
Registers a shll file on the entity
public bool RegisterShll(string path, int index)
Parameters
path
String
The path to the shll file
index
Int32
The index at which to register, must be less than 8. Passing -1 for this parameter will register the shll at the first free index.
Returns
Boolean
True if the shll was successfully registered