Table of Contents

Class RangedSiegeWeapon

Namespace
TaleWorlds.MountAndBlade
Assembly
TaleWorlds.MountAndBlade.dll
public abstract class RangedSiegeWeapon : SiegeWeapon, IFocusable, IOrderable, IDetachment, ITargetable
Inheritance
RangedSiegeWeapon
Implements
Derived
Inherited Members

Constructors

RangedSiegeWeapon()

protected RangedSiegeWeapon()

Fields

AmmoLoadTag

public const string AmmoLoadTag = "ammoload"

Field Value

string

AmmoPickUpStandingPoints

protected List<StandingPointWithWeaponRequirement> AmmoPickUpStandingPoints

Field Value

List<StandingPointWithWeaponRequirement>

AttackClickWillReload

protected bool AttackClickWillReload

Field Value

bool

BottomReleaseAngleRestriction

public float BottomReleaseAngleRestriction

Field Value

float

CameraHolderTag

public const string CameraHolderTag = "cameraHolder"

Field Value

string

CanGoAmmoPickupTag

public const string CanGoAmmoPickupTag = "can_pick_up_ammo"

Field Value

string

CanPickUpAmmoStandingPoints

protected List<StandingPoint> CanPickUpAmmoStandingPoints

Field Value

List<StandingPoint>

CurrentAmmo

protected int CurrentAmmo

Field Value

int

DefaultDirectionRestriction

public const float DefaultDirectionRestriction = 2.0943952

Field Value

float

DontApplySidePenaltyTag

public const string DontApplySidePenaltyTag = "no_ammo_pick_up_penalty"

Field Value

string

FireAnimationIndices

protected int[] FireAnimationIndices

Field Value

int[]

FireAnimations

protected string[] FireAnimations

Field Value

string[]

Focus

public RangedSiegeWeapon.FiringFocus Focus

Field Value

RangedSiegeWeapon.FiringFocus

LoadAmmoStandingPoint

protected StandingPointWithWeaponRequirement LoadAmmoStandingPoint

Field Value

StandingPointWithWeaponRequirement

LoadedMissileItem

protected ItemObject LoadedMissileItem

Field Value

ItemObject

MissileItemID

public string MissileItemID

Field Value

string

MissileStartingPositionEntityForSimulation

protected GameEntity MissileStartingPositionEntityForSimulation

Field Value

GameEntity

MoveSound

protected SoundEvent MoveSound

Field Value

SoundEvent

MoveSoundIndex

protected int MoveSoundIndex

Field Value

int

MultipleProjectileCount

public const int MultipleProjectileCount = 5

Field Value

int

MultipleProjectileFlyingId

public const string MultipleProjectileFlyingId = "grapeshot_fire_projectile"

Field Value

string

MultipleProjectileId

public const string MultipleProjectileId = "grapeshot_fire_stack"

Field Value

string

OriginalMissileItem

protected ItemObject OriginalMissileItem

Field Value

ItemObject

PilotReservePriorityValues

protected Dictionary<StandingPoint, float> PilotReservePriorityValues

Field Value

Dictionary<StandingPoint, float>

ProjectileTag

public const string ProjectileTag = "projectile"

Field Value

string

ReleaseAngleRestrictionAngle

protected float ReleaseAngleRestrictionAngle

Field Value

float

ReleaseAngleRestrictionCenter

protected float ReleaseAngleRestrictionCenter

Field Value

float

ReloadEndSoundIndex

protected int ReloadEndSoundIndex

Field Value

int

ReloadSound

protected SoundEvent ReloadSound

Field Value

SoundEvent

ReloadSoundIndex

protected int ReloadSoundIndex

Field Value

int

ReloadStandingPoints

protected List<StandingPoint> ReloadStandingPoints

Field Value

List<StandingPoint>

ReloadTag

public const string ReloadTag = "reload"

Field Value

string

ReloaderAgent

protected Agent ReloaderAgent

Field Value

Agent

ReloaderAgentOriginalPoint

protected StandingPoint ReloaderAgentOriginalPoint

Field Value

StandingPoint

RotationObject

protected SynchedMissionObject RotationObject

Field Value

SynchedMissionObject

SetUpAnimationIndices

protected int[] SetUpAnimationIndices

Field Value

int[]

SetUpAnimations

protected string[] SetUpAnimations

Field Value

string[]

SkeletonNames

protected string[] SkeletonNames

Field Value

string[]

SkeletonOwnerObjects

protected SynchedMissionObject[] SkeletonOwnerObjects

Field Value

SynchedMissionObject[]

Skeletons

protected Skeleton[] Skeletons

Field Value

Skeleton[]

TopReleaseAngleRestriction

public float TopReleaseAngleRestriction

Field Value

float

UsesMouseForAiming

protected bool UsesMouseForAiming

Field Value

bool

WeaponNeedsClickToReload

protected bool WeaponNeedsClickToReload

Field Value

bool

_defaultSide

protected BattleSideEnum _defaultSide

Field Value

BattleSideEnum

_stonePile

protected SiegeMachineStonePile _stonePile

Field Value

SiegeMachineStonePile

cameraDirection

protected float cameraDirection

Field Value

float

cameraReleaseAngle

protected float cameraReleaseAngle

Field Value

float

currentDirection

protected float currentDirection

Field Value

float

currentReleaseAngle

protected float currentReleaseAngle

Field Value

float

dontMoveTimer

protected float dontMoveTimer

Field Value

float

maxRotateSpeed

protected float maxRotateSpeed

Field Value

float

reloadTargetReleaseAngle

protected float reloadTargetReleaseAngle

Field Value

float

startingAmmoCount

public int startingAmmoCount

Field Value

int

targetDirection

protected float targetDirection

Field Value

float

targetReleaseAngle

protected float targetReleaseAngle

Field Value

float

timeGapBetweenShootActionAndProjectileLeaving

protected float timeGapBetweenShootActionAndProjectileLeaving

Field Value

float

timeGapBetweenShootingEndAndReloadingStart

protected float timeGapBetweenShootingEndAndReloadingStart

Field Value

float

Properties

AmmoCount

public int AmmoCount { get; protected set; }

Property Value

int

CanShootAtPointCheckingOffset

public virtual Vec3 CanShootAtPointCheckingOffset { get; }

Property Value

Vec3

DirectionRestriction

public virtual float DirectionRestriction { get; }

Property Value

float

FireAnimation

protected string FireAnimation { set; }

Property Value

string

FireAnimationIndex

protected int FireAnimationIndex { set; }

Property Value

int

HasAmmo

protected virtual bool HasAmmo { get; set; }

Property Value

bool

HorizontalAimSensitivity

protected virtual float HorizontalAimSensitivity { get; }

Property Value

float

MaximumBallisticError

protected virtual float MaximumBallisticError { get; }

Property Value

float

MissleStartingPositionForSimulation

protected Vec3 MissleStartingPositionForSimulation { get; }

Property Value

Vec3

OriginalDirection

public Vec3 OriginalDirection { get; }

Property Value

Vec3

Projectile

protected SynchedMissionObject Projectile { get; }

Property Value

SynchedMissionObject

ProjectileEntityCurrentGlobalPosition

public virtual Vec3 ProjectileEntityCurrentGlobalPosition { get; }

Property Value

Vec3

SetUpAnimation

protected string SetUpAnimation { set; }

Property Value

string

SetUpAnimationIndex

protected int SetUpAnimationIndex { set; }

Property Value

int

ShootingDirection

protected virtual Vec3 ShootingDirection { get; }

Property Value

Vec3

ShootingSpeed

protected abstract float ShootingSpeed { get; }

Property Value

float

Side

public override BattleSideEnum Side { get; }

Property Value

BattleSideEnum

SkeletonName

protected string SkeletonName { set; }

Property Value

string

State

public RangedSiegeWeapon.WeaponState State { get; set; }

Property Value

RangedSiegeWeapon.WeaponState

VerticalAimSensitivity

protected virtual float VerticalAimSensitivity { get; }

Property Value

float

cameraHolder

public GameEntity cameraHolder { get; }

Property Value

GameEntity

Methods

AiRequestsManualReload()

public void AiRequestsManualReload()

AiRequestsShoot()

public void AiRequestsShoot()

AimAtRotation(float, float)

public virtual void AimAtRotation(float horizontalRotation, float verticalRotation)

Parameters

horizontalRotation float
verticalRotation float

AimAtThreat(Threat)

public virtual bool AimAtThreat(Threat threat)

Parameters

threat Threat

Returns

bool

ApplyAimChange()

protected virtual void ApplyAimChange()

ApplyCurrentDirectionToEntity()

protected virtual void ApplyCurrentDirectionToEntity()

ApproachToAngle(ref float, float, bool, float, float, float)

protected static bool ApproachToAngle(ref float angle, float angleToApproach, bool isMouse, float speed_limit, float dt, float sensitivity)

Parameters

angle float
angleToApproach float
isMouse bool
speed_limit float
dt float
sensitivity float

Returns

bool

CalculateShootingRange(float)

protected virtual float CalculateShootingRange(float heightDifference)

Parameters

heightDifference float

Returns

float

CanRotate()

protected virtual bool CanRotate()

Returns

bool

CanShootAtAgent(Agent)

public bool CanShootAtAgent(Agent agent)

Parameters

agent Agent

Returns

bool

CanShootAtBox(Vec3, Vec3, uint)

public bool CanShootAtBox(Vec3 boxMin, Vec3 boxMax, uint attempts = 5)

Parameters

boxMin Vec3
boxMax Vec3
attempts uint

Returns

bool

CanShootAtBoxSimplified(Vec3, Vec3)

public bool CanShootAtBoxSimplified(Vec3 boxMin, Vec3 boxMax)

Parameters

boxMin Vec3
boxMax Vec3

Returns

bool

CanShootAtPoint(Vec3)

public bool CanShootAtPoint(Vec3 target)

Parameters

target Vec3

Returns

bool

CanShootAtThreat(Threat)

public bool CanShootAtThreat(Threat threat)

Parameters

threat Threat

Returns

bool

ChangeProjectileEntityClient(int)

public void ChangeProjectileEntityClient(int index)

Parameters

index int

ChangeProjectileEntityServer(Agent, string)

protected void ChangeProjectileEntityServer(Agent loadingAgent, string missileItemID)

Parameters

loadingAgent Agent
missileItemID string

CheckAmmo()

protected virtual void CheckAmmo()

ConsumeAmmo()

protected virtual void ConsumeAmmo()

GetBestPointAlternativeTo(StandingPoint, Agent)

public override StandingPoint GetBestPointAlternativeTo(StandingPoint standingPoint, Agent agent)

Parameters

standingPoint StandingPoint
agent Agent

Returns

StandingPoint

GetDetachmentWeightAuxForExternalAmmoWeapons(BattleSideEnum)

protected float GetDetachmentWeightAuxForExternalAmmoWeapons(BattleSideEnum side)

Parameters

side BattleSideEnum

Returns

float

GetEntityToAttachNavMeshFaces()

protected override GameEntity GetEntityToAttachNavMeshFaces()

Returns

GameEntity

GetEstimatedTargetMovementVector(Vec3, Vec3)

public Vec3 GetEstimatedTargetMovementVector(Vec3 targetCurrentPosition, Vec3 targetVelocity)

Parameters

targetCurrentPosition Vec3
targetVelocity Vec3

Returns

Vec3

GetOrder(BattleSideEnum)

public override OrderType GetOrder(BattleSideEnum side)

Parameters

side BattleSideEnum

Returns

OrderType

GetSiegeEngineType()

public override abstract SiegeEngineType GetSiegeEngineType()

Returns

SiegeEngineType

GetSoundEventIndices()

protected abstract void GetSoundEventIndices()

GetTargetDirection(Vec3)

public virtual float GetTargetDirection(Vec3 target)

Parameters

target Vec3

Returns

float

GetTargetReleaseAngle(Vec3)

public virtual float GetTargetReleaseAngle(Vec3 target)

Parameters

target Vec3

Returns

float

GetTickRequirement()

public override ScriptComponentBehavior.TickRequirement GetTickRequirement()

Returns

ScriptComponentBehavior.TickRequirement

GiveExactInput(float, float)

public void GiveExactInput(float targetX, float targetY)

Parameters

targetX float
targetY float

GiveInput(float, float)

public void GiveInput(float inputX, float inputY)

Parameters

inputX float
inputY float

HandleUserAiming(float)

protected virtual void HandleUserAiming(float dt)

Parameters

dt float

IsAnyUserBelongsToFormation(Formation)

protected override bool IsAnyUserBelongsToFormation(Formation formation)

Parameters

formation Formation

Returns

bool

IsInRangeToCheckAlternativePoints(Agent)

public override bool IsInRangeToCheckAlternativePoints(Agent agent)

Parameters

agent Agent

Returns

bool

IsTargetValid(ITargetable)

protected virtual bool IsTargetValid(ITargetable target)

Parameters

target ITargetable

Returns

bool

ManualReload()

public void ManualReload()

OnAfterReadFromNetwork((BaseSynchedMissionObjectReadableRecord, ISynchedMissionObjectReadableRecord))

public override void OnAfterReadFromNetwork((BaseSynchedMissionObjectReadableRecord, ISynchedMissionObjectReadableRecord) synchedMissionObjectReadableRecord)

Parameters

synchedMissionObjectReadableRecord (BaseSynchedMissionObjectReadableRecord, ISynchedMissionObjectReadableRecord)

OnAmmoPickupUsingCancelled(Agent, bool)

protected void OnAmmoPickupUsingCancelled(Agent agent, bool isCanceledBecauseOfAnimation)

Parameters

agent Agent
isCanceledBecauseOfAnimation bool

OnEditorInit()

protected override void OnEditorInit()

OnInit()

protected override void OnInit()

OnLoadingAmmoPointUsingCancelled(Agent, bool)

protected void OnLoadingAmmoPointUsingCancelled(Agent agent, bool isCanceledBecauseOfAnimation)

Parameters

agent Agent
isCanceledBecauseOfAnimation bool

OnMissionReset()

protected override void OnMissionReset()

OnRangedSiegeWeaponStateChange()

protected virtual void OnRangedSiegeWeaponStateChange()

OnRotationStarted()

protected void OnRotationStarted()

OnRotationStopped()

protected void OnRotationStopped()

OnTick(float)

protected override void OnTick(float dt)

Parameters

dt float

ProcessTargetValue(float, TargetFlags)

public abstract float ProcessTargetValue(float baseValue, TargetFlags flags)

Parameters

baseValue float
flags TargetFlags

Returns

float

RegisterAnimationParameters()

protected abstract void RegisterAnimationParameters()

SendAgentToAmmoPickup(Agent)

protected void SendAgentToAmmoPickup(Agent agent)

Parameters

agent Agent

SendReloaderAgentToOriginalPoint()

protected void SendReloaderAgentToOriginalPoint()

SetActivationLoadAmmoPoint(bool)

protected virtual void SetActivationLoadAmmoPoint(bool activate)

Parameters

activate bool

SetAmmo(int)

public virtual void SetAmmo(int ammoLeft)

Parameters

ammoLeft int

Shoot()

public bool Shoot()

Returns

bool

UpdateAmmoMesh()

protected virtual void UpdateAmmoMesh()

UpdateProjectilePosition()

protected virtual void UpdateProjectilePosition()

WriteToNetwork()

public override void WriteToNetwork()

Events

OnAgentLoadsMachine

public event Action<RangedSiegeWeapon, Agent> OnAgentLoadsMachine

Event Type

Action<RangedSiegeWeapon, Agent>

OnReloadDone

public event RangedSiegeWeapon.OnSiegeWeaponReloadDone OnReloadDone

Event Type

RangedSiegeWeapon.OnSiegeWeaponReloadDone

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