M&B: Bannerlord 1.0.0
The horns sound, the ravens gather.
|
Base class for ranged siege weapons that can shoot.
Inherits TaleWorlds.MountAndBlade.SiegeWeapon.
Inherited by TaleWorlds.MountAndBlade.Ballista, TaleWorlds.MountAndBlade.Mangonel, and TaleWorlds.MountAndBlade.Trebuchet.
Public Types | |
enum | WeaponState |
The cycle of states is as follows: Idle => WaitingBeforeProjectileLeaving => Shooting => WaitingBeforeReloading => Reloading => Idle. Shoot method should be called for moving from Idle state to WaitingBeforeProjectileLeaving state. All other state changes are done in StateUpdate method. Default value is Idle state. More... | |
enum | FiringFocus |
enum | CameraState |
Public Types inherited from TaleWorlds.MountAndBlade.SynchedMissionObject | |
enum | SynchFlags : uint |
Public Types inherited from TaleWorlds.Engine.ScriptComponentBehavior | |
enum | TickRequirement : uint |
Public Member Functions | |
delegate void | OnSiegeWeaponReloadDone () |
virtual void | SetAmmo (int ammoLeft) |
void | ChangeProjectileEntityClient (int index) |
override bool | ReadFromNetwork () |
override void | WriteToNetwork () |
override bool | IsInRangeToCheckAlternativePoints (Agent agent) |
override StandingPoint | GetBestPointAlternativeTo (StandingPoint standingPoint, Agent agent) |
override TickRequirement | GetTickRequirement () |
void | ToggleTrajectoryVisibility (bool isVisible) |
void | GiveInput (float inputX, float inputY) |
void | GiveExactInput (float targetX, float targetY) |
virtual float | GetTargetDirection (Vec3 target) |
Calculates the required direction of this ranged siege weapon to hit the param target More... | |
virtual float | GetTargetReleaseAngle (Vec3 target) |
Calculates the required release angle of this ranged siege weapon to hit the param target. More... | |
virtual bool | AimAtTarget (Vec3 target) |
Rotates the param current direction angle towards the param target direction angle. More... | |
virtual void | AimAtRotation (float horizontalRotation, float verticalRotation) |
bool | Shoot () |
Shoots if it is ready to shoot. More... | |
void | ManualReload () |
void | AiRequestsShoot () |
void | AiRequestsManualReload () |
abstract override SiegeEngineType | GetSiegeEngineType () |
bool | CanShootAtBox (Vec3 boxMin, Vec3 boxMax, uint attempts=5) |
bool | CanShootAtBoxSimplified (Vec3 boxMin, Vec3 boxMax) |
bool | CanShootAtAgent (Agent agent) |
bool | CanShootAtPoint (Vec3 target) |
override OrderType | GetOrder (BattleSideEnum side) |
abstract float | ProcessTargetValue (float baseValue, TargetFlags flags) |
Public Member Functions inherited from TaleWorlds.MountAndBlade.SiegeWeapon | |
abstract SiegeEngineType | GetSiegeEngineType () |
override TickRequirement | GetTickRequirement () |
GameEntity | GetTargetEntity () |
BattleSideEnum | GetSide () |
GameEntity | Entity () |
abstract TargetFlags | GetTargetFlags () |
abstract float | GetTargetValue (List< Vec3 > weaponPos) |
Public Member Functions inherited from TaleWorlds.MountAndBlade.UsableMachine | |
void | AddComponent (UsableMissionObjectComponent component) |
void | RemoveComponent (UsableMissionObjectComponent component) |
T | 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) |
WorldFrame? | GetAgentFrame (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) |
TargetFlags | GetTargetFlags () |
float | GetTargetValue (List< Vec3 > referencePositions) |
GameEntity | GetTargetEntity () |
BattleSideEnum | GetSide () |
GameEntity | Entity () |
Public Attributes | |
string | MissileItemID |
FiringFocus | Focus |
int | startingAmmoCount = 20 |
float | TopReleaseAngleRestriction = MBMath.PI / 2.0f |
/// More... | |
float | BottomReleaseAngleRestriction = -MBMath.PI / 2.0f |
float | VisualizeReleaseTrajectoryAngle |
Public Attributes inherited from TaleWorlds.MountAndBlade.SiegeWeapon | |
bool | ForcedUse |
Public Attributes inherited from TaleWorlds.MountAndBlade.UsableMachine | |
string | PilotStandingPointTag = "Pilot" |
string | AmmoPickUpTag = "ammopickup" |
string | WaitStandingPointTag = "Wait" |
Static Public Attributes | |
const float | DefaultDirectionRestriction = MBMath.PI / 1.5f |
const string | MultipleProjectileId = "grapeshot_fire_stack" |
const string | MultipleProjectileFlyingId = "grapeshot_fire_projectile" |
const int | MultipleProjectileCount = 5 |
const string | CanGoAmmoPickupTag = "can_pick_up_ammo" |
const string | DontApplySidePenaltyTag = "no_ammo_pick_up_penalty" |
const string | ReloadTag = "reload" |
const string | AmmoLoadTag = "ammoload" |
const string | CameraHolderTag = "cameraHolder" |
const string | ProjectileTag = "projectile" |
Static Public Attributes inherited from TaleWorlds.MountAndBlade.UsableMachine | |
const string | UsableMachineParentTag = "machine_parent" |
Static Protected Member Functions | |
static bool | ApproachToAngle (ref float angle, float angleToApproach, bool isMouse, float speed_limit, float dt, float sensitivity) |
Events | |
OnSiegeWeaponReloadDone | OnReloadDone |
Action< RangedSiegeWeapon, Agent > | OnAgentLoadsMachine |
Additional Inherited Members | |
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 |
delegate void TaleWorlds.MountAndBlade.RangedSiegeWeapon.OnSiegeWeaponReloadDone | ( | ) |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.ChangeProjectileEntityClient | ( | int | index | ) |
|
virtual |
Reimplemented from TaleWorlds.MountAndBlade.SynchedMissionObject.
|
virtual |
Reimplemented from TaleWorlds.MountAndBlade.SynchedMissionObject.
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Mangonel, and TaleWorlds.MountAndBlade.Trebuchet.
|
virtual |
Reimplemented from TaleWorlds.MountAndBlade.UsableMachine.
|
virtual |
Reimplemented from TaleWorlds.MountAndBlade.UsableMachine.
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Ballista, TaleWorlds.MountAndBlade.Mangonel, and TaleWorlds.MountAndBlade.Trebuchet.
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Mangonel, and TaleWorlds.MountAndBlade.Trebuchet.
|
protected |
|
virtual |
Reimplemented from TaleWorlds.Engine.ScriptComponentBehavior.
Reimplemented in TaleWorlds.MountAndBlade.Trebuchet.
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.ToggleTrajectoryVisibility | ( | bool | isVisible | ) |
|
protectedvirtual |
Reimplemented from TaleWorlds.MountAndBlade.MissionObject.
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Ballista.
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.GiveInput | ( | float | inputX, |
float | inputY | ||
) |
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.GiveExactInput | ( | float | targetX, |
float | targetY | ||
) |
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Ballista, TaleWorlds.MountAndBlade.Mangonel, and TaleWorlds.MountAndBlade.Trebuchet.
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Ballista, and TaleWorlds.MountAndBlade.Mangonel.
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Ballista.
|
virtual |
target | The target point to be hit |
|
virtual |
target | The target point to be hit. |
|
virtual |
current | The angle of current direction which will be rotated, θ, measured in radians, such that -π≤θ≤π. |
target | The angle of target direction, θ, measured in radians, such that -π≤θ≤π. |
delta | The maximum angle of rotation allowed, θ, measured in radians, such that 0≤θ≤2π. |
hasRotated | If any rotation has been applied or not |
Changes weapon's direction and angle of release to aim at the param target.
target | The target point to be aimed at. |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
bool TaleWorlds.MountAndBlade.RangedSiegeWeapon.Shoot | ( | ) |
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.ManualReload | ( | ) |
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.AiRequestsShoot | ( | ) |
void TaleWorlds.MountAndBlade.RangedSiegeWeapon.AiRequestsManualReload | ( | ) |
|
protected |
|
protected |
|
pure virtual |
Implements TaleWorlds.MountAndBlade.SiegeWeapon.
Implemented in TaleWorlds.MountAndBlade.Ballista, TaleWorlds.MountAndBlade.FireBallista, TaleWorlds.MountAndBlade.FireMangonel, TaleWorlds.MountAndBlade.Objects.Siege.FireTrebuchet, TaleWorlds.MountAndBlade.Mangonel, and TaleWorlds.MountAndBlade.Trebuchet.
bool TaleWorlds.MountAndBlade.RangedSiegeWeapon.CanShootAtBox | ( | Vec3 | boxMin, |
Vec3 | boxMax, | ||
uint | attempts = 5 |
||
) |
bool TaleWorlds.MountAndBlade.RangedSiegeWeapon.CanShootAtBoxSimplified | ( | Vec3 | boxMin, |
Vec3 | boxMax | ||
) |
bool TaleWorlds.MountAndBlade.RangedSiegeWeapon.CanShootAtAgent | ( | Agent | agent | ) |
bool TaleWorlds.MountAndBlade.RangedSiegeWeapon.CanShootAtPoint | ( | Vec3 | target | ) |
|
virtual |
Reimplemented from TaleWorlds.MountAndBlade.UsableMachine.
|
protectedvirtual |
Reimplemented from TaleWorlds.MountAndBlade.MissionObject.
|
pure virtual |
|
protectedvirtual |
Reimplemented in TaleWorlds.MountAndBlade.Ballista.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
string TaleWorlds.MountAndBlade.RangedSiegeWeapon.MissileItemID |
|
protected |
FiringFocus TaleWorlds.MountAndBlade.RangedSiegeWeapon.Focus |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int TaleWorlds.MountAndBlade.RangedSiegeWeapon.startingAmmoCount = 20 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float TaleWorlds.MountAndBlade.RangedSiegeWeapon.TopReleaseAngleRestriction = MBMath.PI / 2.0f |
Central angle of restriction circular sector of weapon's release angle, θ, measured in radians, such that 0<θ≤π/2.
float TaleWorlds.MountAndBlade.RangedSiegeWeapon.BottomReleaseAngleRestriction = -MBMath.PI / 2.0f |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float TaleWorlds.MountAndBlade.RangedSiegeWeapon.VisualizeReleaseTrajectoryAngle |
|
protected |
|
getset |
|
getprotected |
|
getprotected |
|
get |
|
get |
|
getprotected |
|
getprotected |
|
setprotected |
|
setprotected |
|
setprotected |
|
setprotected |
|
setprotected |
|
setprotected |
|
getprotected set |
|
getsetprotected |
|
get |
|
get |
|
getprotected |
|
getprotected |
|
getprotected |
|
getprotected |
|
get |
|
get |
OnSiegeWeaponReloadDone TaleWorlds.MountAndBlade.RangedSiegeWeapon.OnReloadDone |
Action<RangedSiegeWeapon, Agent> TaleWorlds.MountAndBlade.RangedSiegeWeapon.OnAgentLoadsMachine |