Single page documentation
IO Namespace
Math Namespace
const double PI
const int INT_MIN
const int INT_MAX
const uint UINT_MAX
const uint64 UINT64_MAX
Net Namespace
class Net::Socket {
// Behaviors
Net::Socket();
~Net::Socket();
// Methods
bool Connect(const string&in host, uint16 port, uint timeout = Math :: UINT_MAX);
bool Listen(const string&in host, uint16 port);
string ReadString(uint bytes);
array<uint8>@ ReadBytes(uint bytes);
int8 ReadInt8();
uint8 ReadUint8();
int16 ReadInt16();
uint16 ReadUint16();
int ReadInt32();
uint ReadUint32();
int64 ReadInt64();
uint64 ReadUint64();
float ReadFloat();
double ReadDouble();
bool Write(const string&in data);
bool Write(const array<uint8>&in data);
bool Write(int8 value);
bool Write(uint8 value);
bool Write(int16 value);
bool Write(uint16 value);
bool Write(int value);
bool Write(uint value);
bool Write(int64 value);
bool Write(uint64 value);
bool Write(float value);
bool Write(double value);
Net::Socket@ Accept(uint timeoutMs = Math :: UINT_MAX);
uint get_Available();
void set_NoDelay(bool value);
string get_RemoteIP();
}
TM Namespace
class TM::HmsStateDyna {
// Properties
quat Quat;
iso4 Location;
vec3 LinearSpeed;
vec3 AddLinearSpeed;
vec3 AngularSpeed;
vec3 Force;
vec3 Torque;
vec3 InverseInertiaTensor;
vec3 NotTweakedLinearSpeed;
}
class TM::GameCtnBlock {
// Methods
string get_Name();
TM::WayPointType get_WayPointType();
// Properties
const nat3 Coord;
const TM::CardinalDir Dir;
}
class TM::GameCtnChallenge {
// Methods
string get_Name();
string get_Uid();
string get_Author();
array<TM::GameCtnBlock@>@ get_Blocks();
}
class TM::PlayerCheckpoint {
// Behaviors
~TM::PlayerCheckpoint();
TM::PlayerCheckpoint();
// Methods
TM::PlayerCheckpoint& opAssign(const TM::PlayerCheckpoint&in other);
// Properties
int Time;
uint Score;
}
class TM::PlayerInfo {
// Methods
array<int>@ get_CheckpointStates();
array<TM::PlayerCheckpoint>@ get_Checkpoints();
// Properties
uint Team;
iso4 VehicleRespawnLoc;
iso4 VehicleSpawnLoc;
uint PrevRaceTime;
int RaceTime;
uint RaceStartTime;
uint RaceBestTime;
uint LapStartTime;
uint LapTime;
uint LapBestTime;
uint MinRespawns;
uint NbCompleted;
uint MaxCompleted;
uint StuntsScore;
uint BestStuntsScore;
uint CurCheckpoint;
float AverageRank;
uint CurrentRaceRank;
uint CurrentRoundRank;
uint CurrentTime;
uint ReadyEnum;
uint TMRoundNum;
float OffsetFromBestAtCurrentCP;
uint CurLapCheckpointCount;
uint CurCheckpointCount;
uint CurLap;
bool RaceFinished;
uint DisplaySpeed;
bool FinishNotPassed;
uint CountdownTime;
}
class TM::SceneVehicleCar {
// Properties
bool IsUpdateAsync;
float InputGas;
float InputBrake;
float InputSteer;
bool IsLightTrailsSet;
bool IsNetworked;
int Quality;
float MaxLinearSpeed;
int GearboxState;
TM::SceneVehicleCar::VehicleCarState PrevSyncVehicleState;
TM::SceneVehicleCar::VehicleCarState SyncVehicleState;
TM::SceneVehicleCar::VehicleCarState AsyncVehicleState;
TM::SceneVehicleCar::VehicleCarState PrevAsyncVehicleState;
TM::SceneVehicleCar::Engine CarEngine;
bool HasAnyLateralContact;
uint LastHasAnyLateralContactTime;
bool WaterForcesApplied;
float TurningRate;
float TurboBoostFactor;
uint LastTurboTypeChangeTime;
uint LastTurboTime;
TM::SceneVehicleCar::TurboType Turbo;
float RouletteValue01;
bool IsFreeWheeling;
bool IsSliding;
uint WheelContactAbsorbCounter;
TM::SceneVehicleCar::BurnoutState Burnout;
vec3 CurrentLocalSpeed;
vec3 TotalCentralForceAdded;
bool IsRubberBall;
iso4 SavedState;
}
class TM::HmsDyna {
// Properties
bool HasAngularVelictyLimit;
float AngularVelocityLimit;
TM::HmsStateDyna PreviousState;
TM::HmsStateDyna CurrentState;
TM::HmsStateDyna TempState;
TM::HmsStateDyna@ RefStatePrevious;
TM::HmsStateDyna@ RefStateCurrent;
bool HasReplacement;
int DynamicType;
}
class TM::InputEventValue {
// Behaviors
~TM::InputEventValue();
TM::InputEventValue();
// Methods
TM::InputEventValue& opAssign(const TM::InputEventValue&in other);
bool get_Binary();
void set_Binary(bool value);
int get_Analog();
void set_Analog(int value);
// Properties
int8 EventIndex;
}
class TM::InputEvent {
// Behaviors
~TM::InputEvent();
TM::InputEvent();
// Methods
TM::InputEvent& opAssign(const TM::InputEvent&in other);
// Properties
uint Time;
TM::InputEventValue Value;
}
class TM::InputEventBuffer {
// Methods
void Add(const TM::InputEvent&in event);
void Clear();
void RemoveAt(uint index, uint count = 1);
uint get_Length();
TM::InputEvent& opIndex(uint index);
const TM::InputEvent& opIndex(uint index);
array<uint>@ Find(int inputTime = - 1, InputType type = InputType :: None, int value = Math :: INT_MAX);
void Add(int time, InputType type, int value);
EventIndices get_EventIndices();
string ToCommandsText(InputFormatFlags flags = InputFormatFlags :: Default);
}
class TM::GameCamera {
// Methods
string get_NameId();
vec3 get_Speed();
// Properties
iso4 Location;
float Fov;
}
enum TM::CardinalDir {
North = 0,
East = 1,
South = 2,
West = 3
}
enum TM::WayPointType {
Start = 0,
Finish = 1,
Checkpoint = 2,
None = 3,
StartFinish = 4
}
enum TM::PlugSurfaceMaterialId {
Concrete = 0,
Pavement = 1,
Grass = 2,
Ice = 3,
Metal = 4,
Sand = 5,
Dirt = 6,
Turbo = 7,
DirtRoad = 8,
Rubber = 9,
SlidingRubber = 10,
Test = 11,
Rock = 12,
Water = 13,
Wood = 14,
Danger = 15,
Asphalt = 16,
WetDirtRoad = 17,
WetAsphalt = 18,
WetPavement = 19,
WetGrass = 20,
Snow = 21,
ResonantMetal = 22,
GolfBall = 23,
GolfWall = 24,
GolfGround = 25,
Turbo2 = 26,
Bumper = 27,
NotCollidable = 28,
FreeWheeling = 29,
TurboRoulette = 30
}
enum TM::GameState {
None = 0,
GameNetMenus = 1,
GameNetRoundPrepare = 2,
GameNetRoundPlay = 4,
GameNetRoundExit = 8,
StartUp = 16,
Menus = 32,
Quit = 64,
LocalInit = 128,
LocalEditor = 256,
LocalRace = 512,
LocalRaceEndDialog = 1024,
LocalReplayEditor = 2048,
LocalReplay = 4096,
LocalEnd = 8192,
NetSync = 16384,
NetPlaying = 32768,
NetExitRound = 65536,
Unknown1 = 262144,
Unknown2 = 1048576,
Unknown3 = 2097152,
Unknown4 = 4194304,
Unknown5 = 8388608,
Unknown6 = 16777216
}
class TM::SceneVehicleCar::Engine {
// Properties
float MaxRPM;
float BrakingFactor;
float ClampedRPM;
float ActualRPM;
float SlideFactor;
int RearGear;
int Gear;
}
class TM::SceneVehicleCar::SurfaceHandler {
// Properties
iso4 Location;
}
class TM::SceneVehicleCar::SimulationWheel {
// Properties
bool Steerable;
TM::SceneVehicleCar::SurfaceHandler SurfaceHandler;
vec3 OffsetFromVehicle;
TM::SceneVehicleCar::SimulationWheel::RealTimeState RTState;
vec3 ContactRelativeLocalDistance;
TM::SceneVehicleCar::SimulationWheel::State PrevSyncWheelState;
TM::SceneVehicleCar::SimulationWheel::State SyncWheelState;
TM::SceneVehicleCar::SimulationWheel::State AsyncWheelState;
}
class TM::SceneVehicleCar::VehicleCarState {
// Properties
float RPM;
int GearboxState;
}
enum TM::SceneVehicleCar::BurnoutState {
None = 0,
Burnout = 1,
Donut = 2,
AfterBurnout = 3
}
enum TM::SceneVehicleCar::TurboType {
None = 0,
Normal = 1,
Roulette = 2
}
class TM::SceneVehicleCar::SimulationWheel::State {
}
class TM::SceneVehicleCar::SimulationWheel::RealTimeState {
// Methods
TM::PlugSurfaceMaterialId get_ContactMaterialId();
void set_ContactMaterialId(TM::PlugSurfaceMaterialId id);
// Properties
float DamperAbsorbVal;
bool HasGroundContact;
bool IsSliding;
vec3 RelativeRotZAxis;
int NbGroundContacts;
}
Text Namespace
Time Namespace
UI Namespace
bool UI::DragFloat3(const string&in label, vec3&inout value, float speed = 1.0f, float min = 0.0f, float max = 0.0f, const string&inout format = "%.3f")
class array<T> {
// Behaviors
array<T>();
array<T>(uint size);
~array<T>();
// Methods
array<T>& opAssign(const array<T>&in value);
void Add(const T&in value);
void InsertAt(uint index, const T&in value);
uint get_Length();
const T& opIndex(uint index);
T& opIndex(uint index);
bool IsEmpty();
void RemoveAt(uint index, uint count = 1);
void Clear();
void Resize(uint length);
void SortAsc();
void SortDesc();
int Find(const T&in value);
int Find(uint startAt, const T&in value);
}
class string {
// Behaviors
~string();
string();
string(const string&in);
// Methods
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in);
int opCmp(const string&in);
string opAdd(const string&in);
void Resize(uint);
uint get_Length();
void set_Length(uint);
bool IsEmpty();
uint8& opIndex(uint);
const uint8& opIndex(uint);
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double);
string opAdd_r(double);
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float);
string opAdd_r(float);
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64);
string opAdd_r(int64);
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64);
string opAdd_r(uint64);
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool);
string opAdd_r(bool);
string Substr(uint start = 0, int count = - 1);
int FindFirst(const string&in, uint start = 0);
int FindFirstOf(const string&in, uint start = 0);
int FindFirstNotOf(const string&in, uint start = 0);
int FindLast(const string&in, int start = - 1);
int FindLastOf(const string&in, int start = - 1);
int FindLastNotOf(const string&in, int start = - 1);
void Insert(uint pos, const string&in other);
void Erase(uint pos, int count = - 1);
array<string>@ Split(const string&in);
}
class dictionaryValue {
// Behaviors
~dictionaryValue();
dictionaryValue();
// Methods
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
// Behaviors
dictionary();
~dictionary();
// Methods
dictionary& opAssign(const dictionary&in);
void Set(const string&in, const ?&in);
bool Get(const string&in, ?&out);
void Set(const string&in, const int64&in);
bool Get(const string&in, int64&out);
void Set(const string&in, const double&in);
bool Get(const string&in, double&out);
bool Exists(const string&in);
bool IsEmpty();
uint GetSize();
bool Delete(const string&in);
void DeleteAll();
array<string>@ GetKeys();
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in);
}
class PluginInfo {
// Behaviors
PluginInfo();
~PluginInfo();
// Properties
string Author;
string Name;
string Description;
string Version;
}
class vec2 {
// Behaviors
~vec2();
vec2();
vec2(float init);
vec2(float x, float y);
// Methods
float Length();
float LengthSquared();
vec2 Normalized();
string ToString();
vec2 opAdd(const vec2&in);
vec2 opAdd(const float&in);
vec2& opAddAssign(const vec2&in);
vec2& opAddAssign(const float&in);
vec2 opSub(const vec2&in);
vec2 opSub(const float&in);
vec2& opSubAssign(const vec2&in);
vec2& opSubAssign(const float&in);
vec2 opDiv(const vec2&in);
vec2 opDiv(const float&in);
vec2& opDivAssign(const vec2&in);
vec2& opDivAssign(const float&in);
vec2 opMul(const vec2&in);
vec2 opMul(const float&in);
vec2& opMulAssign(const vec2&in);
vec2& opMulAssign(const float&in);
bool opEquals(const vec2&in other);
vec2& opAssign(const vec2&in v);
float& opIndex(uint index);
// Properties
float x;
float y;
}
class vec3 {
// Behaviors
~vec3();
vec3();
vec3(float init);
vec3(float x, float y, float z);
// Methods
vec3& opAssign(const vec3&in v);
float& opIndex(uint index);
float Length();
float LengthSquared();
vec3 Normalized();
string ToString();
vec3 opAdd(const vec3&in);
vec3 opAdd(const float&in);
vec3& opAddAssign(const vec3&in);
vec3& opAddAssign(const float&in);
vec3 opSub(const vec3&in);
vec3 opSub(const float&in);
vec3& opSubAssign(const vec3&in);
vec3& opSubAssign(const float&in);
vec3 opDiv(const vec3&in);
vec3 opDiv(const float&in);
vec3& opDivAssign(const vec3&in);
vec3& opDivAssign(const float&in);
vec3 opMul(const vec3&in);
vec3 opMul(const float&in);
vec3& opMulAssign(const vec3&in);
vec3& opMulAssign(const float&in);
bool opEquals(const vec3&in other);
// Properties
float x;
float y;
float z;
}
class mat2 {
// Behaviors
~mat2();
mat2();
// Methods
mat2& opAssign(const mat2&in m);
void SetIdentity();
void Transpose();
// Properties
vec2 x;
vec2 y;
}
class mat3 {
// Behaviors
~mat3();
mat3();
// Methods
mat3& opAssign(const mat3&in m);
void GetYawPitchRoll(float&out yaw, float&out pitch, float&out roll);
void SetIdentity();
void Transpose();
// Properties
vec3 x;
vec3 y;
vec3 z;
}
class quat {
// Behaviors
~quat();
quat();
quat(float x, float y, float z, float w);
quat(const mat3&in m);
// Methods
quat& opAssign(const quat&in q);
void GetYawPitchRoll(float&out yaw, float&out pitch, float&out roll);
void SetYawPitchRoll(float yaw, float pitch, float roll);
void SetIdentity();
void SetInverse(quat&in q);
string ToString();
// Properties
float w;
float x;
float y;
float z;
}
class iso4 {
// Behaviors
~iso4();
iso4();
// Methods
iso4& opAssign(const iso4&in iso);
// Properties
mat3 Rotation;
vec3 Position;
}
class nat3 {
// Behaviors
~nat3();
nat3();
// Methods
nat3& opAssign(const nat3&in m);
// Properties
uint x;
uint y;
uint z;
}
class BFEvaluationInfo {
// Behaviors
~BFEvaluationInfo();
BFEvaluationInfo();
// Methods
BFEvaluationInfo& opAssign(const BFEvaluationInfo&in other);
// Properties
BFPhase Phase;
bool Rewinded;
uint Iterations;
}
class BFEvaluationResponse {
// Behaviors
BFEvaluationResponse();
~BFEvaluationResponse();
// Methods
BFEvaluationResponse& opAssign(const BFEvaluationResponse&in other);
// Properties
BFEvaluationDecision Decision;
int RewindTime;
string ResultFileStartContent;
}
class InputState {
// Behaviors
~InputState();
InputState();
// Methods
InputState& opAssign(const InputState&in other);
// Properties
bool Left;
bool Right;
bool Up;
bool Down;
int Gas;
int Steer;
}
class EventIndices {
// Behaviors
~EventIndices();
EventIndices();
// Methods
EventIndices& opAssign(const EventIndices&in other);
// Properties
int RaceRunningId;
int FinishLineId;
int AccelerateId;
int BrakeId;
int SteerLeftId;
int SteerRightId;
int SteerId;
int GasId;
int RespawnId;
int HornId;
}
class SimulationWheels {
// Methods
TM::SceneVehicleCar::SimulationWheel@ opIndex(uint index);
TM::SceneVehicleCar::SimulationWheel@ get_FrontLeft();
TM::SceneVehicleCar::SimulationWheel@ get_FrontRight();
TM::SceneVehicleCar::SimulationWheel@ get_BackRight();
TM::SceneVehicleCar::SimulationWheel@ get_BackLeft();
}
class SimulationState {
// Behaviors
SimulationState();
SimulationState(const array<uint8>&in array);
~SimulationState();
// Methods
SimulationState& opAssign(const SimulationState&in other);
TM::PlayerInfo@ get_PlayerInfo();
SimulationWheels@ get_Wheels();
TM::HmsDyna@ get_Dyna();
TM::SceneVehicleCar@ get_SceneVehicleCar();
array<uint8>@ ToArray();
// Properties
ContextMode Mode;
}
class SimulationManager {
// Methods
void ForceFinish();
void ResetCamera();
void SetInputState(InputType state, int value);
InputState GetInputState();
void SetSpeed(float speed);
void Resync();
void GiveUp();
void Respawn();
void Horn();
void RemoveStateValidation();
void PreventSimulationFinish();
SimulationState@ SaveState();
void RewindToState(const SimulationState&in state, bool resetCamera = true);
void SetSimulationTimeLimit(int timeMs);
bool get_Running();
void set_Running(bool running);
bool get_SimulationOnly();
void set_SimulationOnly(bool simulationOnly);
TM::PlayerInfo@ get_PlayerInfo();
SimulationWheels@ get_Wheels();
TM::HmsDyna@ get_Dyna();
TM::SceneVehicleCar@ get_SceneVehicleCar();
TM::InputEventBuffer@ get_InputEvents();
int get_RaceTime();
int get_TickTime();
uint get_EventsDuration();
bool get_InRace();
void RewindToState(const SimulationStateFile&in file, bool resetCamera = true);
}
class SimulationStateFile {
// Behaviors
SimulationStateFile();
~SimulationStateFile();
// Methods
SimulationStateFile& opAssign(const SimulationStateFile&in other);
bool Load(const string&in stateRelativePath, string&out error);
bool Save(const string&in stateRelativePath, string&out error);
bool CaptureCurrentState(SimulationManager@ simManager, bool withStatesAndInputs);
string get_ChallengeName();
SimulationState@ ToState();
// Properties
const string ChallengeUID;
const string ChallengeEnvironment;
}
class TimedCommand {
// Behaviors
~TimedCommand();
TimedCommand();
// Methods
TimedCommand& opAssign(const TimedCommand&in other);
// Properties
string Content;
int Timestamp;
}
class InputCommand {
// Behaviors
~InputCommand();
InputCommand();
// Methods
InputCommand& opAssign(const InputCommand&in other);
string ToScript(bool useDecimalTime = true);
string ToString(bool useDecimalTime = true);
// Properties
InputType Type;
int Timestamp;
int State;
}
class CommandList {
// Behaviors
CommandList();
CommandList(const string&in scriptRelativePath);
~CommandList();
// Methods
CommandList& opAssign(const CommandList&in other);
void Process(CommandListProcessOption option = CommandListProcessOption :: QueueAndExecute);
bool get_IsFullyProcessed();
string get_Filename();
string get_Content();
void set_Content(const string&in content);
bool Save(const string&in scriptRelativePath);
array<TimedCommand>@ get_TimedCommands();
array<InputCommand>@ get_InputCommands();
}
class VariableInfo {
// Behaviors
~VariableInfo();
VariableInfo();
// Methods
VariableInfo& opAssign(const VariableInfo&in other);
// Properties
string Name;
VariableType Type;
}
class Trigger3D {
// Behaviors
~Trigger3D();
Trigger3D();
Trigger3D(const vec3&in position, const vec3&in size);
// Methods
Trigger3D& opAssign(const Trigger3D&in other);
bool opImplConv();
bool opEquals(const Trigger3D&in other);
bool ContainsPoint(const vec3&in p);
float Distance(const vec3&in p);
// Properties
vec3 Position;
vec3 Size;
}
enum Severity {
Info = 0,
Success = 1,
Warning = 2,
Error = 3
}
enum ContextMode {
Simulation = 0,
Run = 1
}
enum VariableType {
Double = 0,
String = 1,
Boolean = 2
}
enum InputType {
None = -1,
Down = 0,
Up = 1,
Left = 2,
Right = 3,
Steer = 4,
Gas = 5,
Respawn = 6,
GiveUp = 7,
Horn = 8,
FakeFinish = 9
}
enum SimulationResult {
Valid = 1,
Invalid = 0,
WrongSimulation = 2
}
enum BFPhase {
Initial = 0,
Search = 1
}
enum BFEvaluationDecision {
DoNothing = 1,
Accept = 2,
Reject = 3,
Stop = 4
}
enum InputFormatFlags {
None = 0,
DecimalTime = 1,
SeperateRelease = 2,
Default = 4
}
enum CommandListProcessOption {
OnlyParse = 0,
QueueAndExecute = 1,
ExecuteImmediately = 2
}