ManiaScript Trackmania 2020  30/10/2024
CSmPlayerDriver Class Reference

API for ShootMania bots. More...

#include <2024_10_30.h>

Inheritance diagram for CSmPlayerDriver:
CNod

Public Types

enum  ESmDriverBehaviour {
  Static, Turret, Scripted, IA,
  Patrol, Escape, Saunter, Orbit,
  Follow
}
 
enum  ESmDriverPathState {
  Static, None, Computing, Simple,
  Full, Incomplete, InFlock
}
 
enum  ESmDriverPatrolMode { OneTrip, BackAndForth, Loop }
 
enum  ESmAttackFilter {
  All, AllPlayers, AllBots, AllOpposite,
  OppositePlayers, OppositeBots, Nobody
}
 

Public Member Functions

Void Scripted_Move (Vec3 Goal)
 
Void Scripted_MoveDelta (Vec3 Delta)
 
Void Scripted_MoveAndAim (Vec3 Goal)
 
Void Scripted_MoveDeltaAndAim (Vec3 Delta)
 
Void Scripted_Aim (Vec3 Goal)
 
Void Scripted_AimDelta (Real DeltaYaw, Real DeltaPitch)
 
Void Scripted_RequestAction ()
 
Void Scripted_RequestGunTrigger ()
 
Void Scripted_RequestInput (CSmMode::EActionInput Input)
 

Public Attributes

CSmPlayerDriver::ESmDriverBehaviour Behaviour
 
Boolean PursueTarget
 
Real AggroRadius
 
Real ShootRadius
 
Real TargetMinDistance
 
Real DisengageDistance
 
Real PathSpeedCoef
 
Real Accuracy
 
Integer ReactionTime
 
Integer ShootPeriodMin
 
Integer ShootPeriodMax
 
Boolean RocketAnticipation
 
Real TargetDetectionFov
 
CSmPlayerDriver::ESmAttackFilter AttackFilter
 
CSmPlayer *const Target
 
Boolean const IsStuck
 
CSmPlayerDriver::ESmDriverPathState const PathState
 
CSmPlayer *const Owner
 
CSmPlayerDriver::ESmDriverPatrolMode Patrol_Mode
 
CMapBotPathPatrol_Path
 
Vec3 Escape_AnchorPoint
 
Real Escape_DistanceSafe
 
Real Escape_DistanceMinEscape
 
Real Escape_DistanceMaxEscape
 
Vec3 Saunter_AnchorPoint
 
Integer Saunter_BaseChillingTime
 
Integer Saunter_ChillingTimeDelta
 
Real Saunter_Radius
 
Vec3 Orbit_AnchorPoint
 
Real Orbit_Radius
 
Boolean Orbit_IsClockWise
 
Boolean Scripted_ForceAimInMoveDir
 
Vec3 Follow_Offset
 
Boolean Follow_ForceAimInLeaderDir
 
Boolean Follow_HasLeader
 
CSmPlayerFollow_Leader
 
Vec3 Follow_AnchorPoint
 
CSmPlayerForcedTarget
 
Array< CSmPlayer * > TargetsToAvoid
 
Boolean PredictJump
 
Boolean UsePathFinding
 
CSmMode::EActionInput OnStuckInput
 
Real MaxPathDivergence
 
Real TargetWorldRadius
 
Real TargetWorldPriority
 
Integer LostTargetChaseDuration
 
Array< CSmPlayerDriver * > FlockPartners
 
Real FlockRadius
 
Real FlockFov
 
Real FlockCohesionWeight
 
Real FlockAlignmentWeight
 
Real FlockSeparationWeight
 
- Public Attributes inherited from CNod
Ident const Id
 

Detailed Description

API for ShootMania bots.

Definition at line 17868 of file 2024_10_30.h.

Member Enumeration Documentation

◆ ESmAttackFilter

Enumerator
All 
AllPlayers 
AllBots 
AllOpposite 
OppositePlayers 
OppositeBots 
Nobody 

Definition at line 17907 of file 2024_10_30.h.

17907  {
17908  All,
17909  AllPlayers,
17910  AllBots,
17911  AllOpposite,
17913  OppositeBots,
17914  Nobody,
17915  };

◆ ESmDriverBehaviour

Enumerator
Static 
Turret 
Scripted 
IA 
Patrol 
Escape 
Saunter 
Orbit 
Follow 

Definition at line 17873 of file 2024_10_30.h.

17873  {
17874  Static,
17875  Turret,
17876  Scripted,
17877  IA,
17878  Patrol,
17879  Escape,
17880  Saunter,
17881  Orbit,
17882  Follow,
17883  };

◆ ESmDriverPathState

Enumerator
Static 
None 
Computing 
Simple 
Full 
Incomplete 
InFlock 

Definition at line 17887 of file 2024_10_30.h.

17887  {
17888  Static,
17889  None,
17890  Computing,
17891  Simple,
17892  Full,
17893  Incomplete,
17894  InFlock,
17895  };

◆ ESmDriverPatrolMode

Enumerator
OneTrip 
BackAndForth 
Loop 

Definition at line 17899 of file 2024_10_30.h.

17899  {
17900  OneTrip,
17901  BackAndForth,
17902  Loop,
17903  };

Member Function Documentation

◆ Scripted_Aim()

Void CSmPlayerDriver::Scripted_Aim ( Vec3  Goal)

◆ Scripted_AimDelta()

Void CSmPlayerDriver::Scripted_AimDelta ( Real  DeltaYaw,
Real  DeltaPitch 
)

◆ Scripted_Move()

Void CSmPlayerDriver::Scripted_Move ( Vec3  Goal)

◆ Scripted_MoveAndAim()

Void CSmPlayerDriver::Scripted_MoveAndAim ( Vec3  Goal)

◆ Scripted_MoveDelta()

Void CSmPlayerDriver::Scripted_MoveDelta ( Vec3  Delta)

◆ Scripted_MoveDeltaAndAim()

Void CSmPlayerDriver::Scripted_MoveDeltaAndAim ( Vec3  Delta)

◆ Scripted_RequestAction()

Void CSmPlayerDriver::Scripted_RequestAction ( )

Same as Scripted_RequestInput(CSmMode::EActionInput::Movement).

◆ Scripted_RequestGunTrigger()

Void CSmPlayerDriver::Scripted_RequestGunTrigger ( )

Same as Scripted_RequestInput(CSmMode::EActionInput::Weapon). This has no effect when ForcedTarget is not Null.

◆ Scripted_RequestInput()

Void CSmPlayerDriver::Scripted_RequestInput ( CSmMode::EActionInput  Input)

Member Data Documentation

◆ Accuracy

Real CSmPlayerDriver::Accuracy

Definition at line 17947 of file 2024_10_30.h.

◆ AggroRadius

Real CSmPlayerDriver::AggroRadius

Definition at line 17927 of file 2024_10_30.h.

◆ AttackFilter

CSmPlayerDriver::ESmAttackFilter CSmPlayerDriver::AttackFilter

Definition at line 17971 of file 2024_10_30.h.

◆ Behaviour

CSmPlayerDriver::ESmDriverBehaviour CSmPlayerDriver::Behaviour

Definition at line 17919 of file 2024_10_30.h.

◆ DisengageDistance

Real CSmPlayerDriver::DisengageDistance

Definition at line 17939 of file 2024_10_30.h.

◆ Escape_AnchorPoint

Vec3 CSmPlayerDriver::Escape_AnchorPoint

Note that CSmMode::SpawnPlayer and CSmMode::SpawnBotPlayer may reset this value to the spawn position.

Definition at line 18035 of file 2024_10_30.h.

◆ Escape_DistanceMaxEscape

Real CSmPlayerDriver::Escape_DistanceMaxEscape

Definition at line 18047 of file 2024_10_30.h.

◆ Escape_DistanceMinEscape

Real CSmPlayerDriver::Escape_DistanceMinEscape

Definition at line 18043 of file 2024_10_30.h.

◆ Escape_DistanceSafe

Real CSmPlayerDriver::Escape_DistanceSafe

Definition at line 18039 of file 2024_10_30.h.

◆ FlockAlignmentWeight

Real CSmPlayerDriver::FlockAlignmentWeight

Flocking is a work in progress. How much the driver values going the same direction as its neighbours.

Definition at line 18160 of file 2024_10_30.h.

◆ FlockCohesionWeight

Real CSmPlayerDriver::FlockCohesionWeight

Flocking is a work in progress. How much the driver values going towards its neighbours.

Definition at line 18155 of file 2024_10_30.h.

◆ FlockFov

Real CSmPlayerDriver::FlockFov

Flocking is a work in progress. The field of view angle the driver uses to see its neighbours. Value in degrees.Values in range (0.000000-360.000000)

Definition at line 18150 of file 2024_10_30.h.

◆ FlockPartners

Array<CSmPlayerDriver*> CSmPlayerDriver::FlockPartners

Flocking is a work in progress. You need to fill this array and define a default behaviour for each member of the flock.

Definition at line 18140 of file 2024_10_30.h.

◆ FlockRadius

Real CSmPlayerDriver::FlockRadius

Flocking is a work in progress. How far the driver see its neighbours.

Definition at line 18145 of file 2024_10_30.h.

◆ FlockSeparationWeight

Real CSmPlayerDriver::FlockSeparationWeight

Flocking is a work in progress. How much the driver values not hitting its neighbours.

Definition at line 18165 of file 2024_10_30.h.

◆ Follow_AnchorPoint

Vec3 CSmPlayerDriver::Follow_AnchorPoint

Definition at line 18099 of file 2024_10_30.h.

◆ Follow_ForceAimInLeaderDir

Boolean CSmPlayerDriver::Follow_ForceAimInLeaderDir

Definition at line 18087 of file 2024_10_30.h.

◆ Follow_HasLeader

Boolean CSmPlayerDriver::Follow_HasLeader

Definition at line 18091 of file 2024_10_30.h.

◆ Follow_Leader

CSmPlayer* CSmPlayerDriver::Follow_Leader

Definition at line 18095 of file 2024_10_30.h.

◆ Follow_Offset

Vec3 CSmPlayerDriver::Follow_Offset

Definition at line 18083 of file 2024_10_30.h.

◆ ForcedTarget

CSmPlayer* CSmPlayerDriver::ForcedTarget

Definition at line 18103 of file 2024_10_30.h.

◆ IsStuck

Boolean const CSmPlayerDriver::IsStuck

Definition at line 17979 of file 2024_10_30.h.

◆ LostTargetChaseDuration

Integer CSmPlayerDriver::LostTargetChaseDuration

How long the driver will try to chase its target after it can't see it, 0 to disable.

Definition at line 18135 of file 2024_10_30.h.

◆ MaxPathDivergence

Real CSmPlayerDriver::MaxPathDivergence

Definition at line 18123 of file 2024_10_30.h.

◆ OnStuckInput

CSmMode::EActionInput CSmPlayerDriver::OnStuckInput

Definition at line 18119 of file 2024_10_30.h.

◆ Orbit_AnchorPoint

Vec3 CSmPlayerDriver::Orbit_AnchorPoint

Note that CSmMode::SpawnPlayer and CSmMode::SpawnBotPlayer may reset this value to the spawn position.

Definition at line 18067 of file 2024_10_30.h.

◆ Orbit_IsClockWise

Boolean CSmPlayerDriver::Orbit_IsClockWise

Definition at line 18075 of file 2024_10_30.h.

◆ Orbit_Radius

Real CSmPlayerDriver::Orbit_Radius

Definition at line 18071 of file 2024_10_30.h.

◆ Owner

CSmPlayer* const CSmPlayerDriver::Owner

Definition at line 17987 of file 2024_10_30.h.

◆ PathSpeedCoef

Real CSmPlayerDriver::PathSpeedCoef

Definition at line 17943 of file 2024_10_30.h.

◆ PathState

CSmPlayerDriver::ESmDriverPathState const CSmPlayerDriver::PathState

PathFinding takes some time to compute and doesn't always reach the intended goal. The player will most probably reach the goal in the case CSmPlayerDriver::ESmDriverPathState::Full.

Definition at line 17983 of file 2024_10_30.h.

◆ Patrol_Mode

CSmPlayerDriver::ESmDriverPatrolMode CSmPlayerDriver::Patrol_Mode

Definition at line 18027 of file 2024_10_30.h.

◆ Patrol_Path

CMapBotPath* CSmPlayerDriver::Patrol_Path

Definition at line 18031 of file 2024_10_30.h.

◆ PredictJump

Boolean CSmPlayerDriver::PredictJump

Definition at line 18111 of file 2024_10_30.h.

◆ PursueTarget

Boolean CSmPlayerDriver::PursueTarget

Definition at line 17923 of file 2024_10_30.h.

◆ ReactionTime

Integer CSmPlayerDriver::ReactionTime

Definition at line 17951 of file 2024_10_30.h.

◆ RocketAnticipation

Boolean CSmPlayerDriver::RocketAnticipation

Definition at line 17963 of file 2024_10_30.h.

◆ Saunter_AnchorPoint

Vec3 CSmPlayerDriver::Saunter_AnchorPoint

Note that CSmMode::SpawnPlayer and CSmMode::SpawnBotPlayer may reset this value to the spawn position.

Definition at line 18051 of file 2024_10_30.h.

◆ Saunter_BaseChillingTime

Integer CSmPlayerDriver::Saunter_BaseChillingTime

Definition at line 18055 of file 2024_10_30.h.

◆ Saunter_ChillingTimeDelta

Integer CSmPlayerDriver::Saunter_ChillingTimeDelta

Definition at line 18059 of file 2024_10_30.h.

◆ Saunter_Radius

Real CSmPlayerDriver::Saunter_Radius

Definition at line 18063 of file 2024_10_30.h.

◆ Scripted_ForceAimInMoveDir

Boolean CSmPlayerDriver::Scripted_ForceAimInMoveDir

Definition at line 18079 of file 2024_10_30.h.

◆ ShootPeriodMax

Integer CSmPlayerDriver::ShootPeriodMax

Definition at line 17959 of file 2024_10_30.h.

◆ ShootPeriodMin

Integer CSmPlayerDriver::ShootPeriodMin

Definition at line 17955 of file 2024_10_30.h.

◆ ShootRadius

Real CSmPlayerDriver::ShootRadius

Definition at line 17931 of file 2024_10_30.h.

◆ Target

CSmPlayer* const CSmPlayerDriver::Target

Definition at line 17975 of file 2024_10_30.h.

◆ TargetDetectionFov

Real CSmPlayerDriver::TargetDetectionFov

The field of view angle the driver uses to search for targets. Value in degrees.Values in range (0.000000-360.000000)

Definition at line 17967 of file 2024_10_30.h.

◆ TargetMinDistance

Real CSmPlayerDriver::TargetMinDistance

Definition at line 17935 of file 2024_10_30.h.

◆ TargetsToAvoid

Array<CSmPlayer*> CSmPlayerDriver::TargetsToAvoid

Definition at line 18107 of file 2024_10_30.h.

◆ TargetWorldPriority

Real CSmPlayerDriver::TargetWorldPriority

How much the driver value attacking the world rather than players. 0.0 for players only, 1.0 for world only, 0.5 for no preference.Values in range (0.000000-1.000000)

Definition at line 18131 of file 2024_10_30.h.

◆ TargetWorldRadius

Real CSmPlayerDriver::TargetWorldRadius

If larger than 0.0, this bot can attack destructible parts of the world.

Definition at line 18127 of file 2024_10_30.h.

◆ UsePathFinding

Boolean CSmPlayerDriver::UsePathFinding

Definition at line 18115 of file 2024_10_30.h.


The documentation for this class was generated from the following file:
CSmPlayerDriver::Incomplete
@ Incomplete
Definition: 2024_10_30.h:17893
CSmPlayerDriver::Computing
@ Computing
Definition: 2024_10_30.h:17890
CSmPlayerDriver::Nobody
@ Nobody
Definition: 2024_10_30.h:17914
CSmPlayerDriver::OneTrip
@ OneTrip
Definition: 2024_10_30.h:17900
CSmPlayerDriver::IA
@ IA
Definition: 2024_10_30.h:17877
CSmPlayerDriver::Turret
@ Turret
Definition: 2024_10_30.h:17875
CSmPlayerDriver::Static
@ Static
Definition: 2024_10_30.h:17874
CSmPlayerDriver::Saunter
@ Saunter
Definition: 2024_10_30.h:17880
CSmPlayerDriver::OppositeBots
@ OppositeBots
Definition: 2024_10_30.h:17913
CSmPlayerDriver::Full
@ Full
Definition: 2024_10_30.h:17892
CSmPlayerDriver::AllOpposite
@ AllOpposite
Definition: 2024_10_30.h:17911
CSmPlayerDriver::InFlock
@ InFlock
Definition: 2024_10_30.h:17894
CSmPlayerDriver::Orbit
@ Orbit
Definition: 2024_10_30.h:17881
CSmPlayerDriver::Scripted
@ Scripted
Definition: 2024_10_30.h:17876
CSmPlayerDriver::OppositePlayers
@ OppositePlayers
Definition: 2024_10_30.h:17912
CSmPlayerDriver::Patrol
@ Patrol
Definition: 2024_10_30.h:17878
CSmPlayerDriver::All
@ All
Definition: 2024_10_30.h:17908
CSmPlayerDriver::None
@ None
Definition: 2024_10_30.h:17889
CSmPlayerDriver::AllPlayers
@ AllPlayers
Definition: 2024_10_30.h:17909
CSmPlayerDriver::Follow
@ Follow
Definition: 2024_10_30.h:17882
CSmPlayerDriver::Simple
@ Simple
Definition: 2024_10_30.h:17891
CSmPlayerDriver::Loop
@ Loop
Definition: 2024_10_30.h:17902
CSmPlayerDriver::BackAndForth
@ BackAndForth
Definition: 2024_10_30.h:17901
CSmPlayerDriver::Escape
@ Escape
Definition: 2024_10_30.h:17879
CSmPlayerDriver::AllBots
@ AllBots
Definition: 2024_10_30.h:17910