Documentation
¶
Overview ¶
pkg/core/events.go
pkg/core/marker.go
pkg/core/mission.go
pkg/core/soldier.go
pkg/core/types.go
pkg/core/vehicle.go
Index ¶
- type Ace3DeathEvent
- type Ace3UnconsciousEvent
- type Addon
- type ChatEvent
- type DeleteMarker
- type EntityLocality
- type FiredEvent
- type GeneralEvent
- type GlobalEntityCount
- type HitEvent
- type KillEvent
- type Marker
- type MarkerState
- type Mission
- type PlayableSlots
- type PlayerNetworkData
- type Polyline
- type Position2D
- type Position3D
- type ProjectileEvent
- type ProjectileHit
- type RadioEvent
- type ScriptCounts
- type SideEntityCount
- type SideEntityCounts
- type SideFriendly
- type Soldier
- type SoldierScores
- type SoldierState
- type TelemetryEvent
- type TimeState
- type TrajectoryPoint
- type UploadMetadata
- type Vehicle
- type VehicleState
- type WeatherData
- type World
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ace3DeathEvent ¶
type Ace3DeathEvent struct {
ID uint
SoldierID uint
Time time.Time
CaptureFrame uint
Reason string
LastDamageSourceID *uint
}
Ace3DeathEvent represents ACE3 medical death
type Ace3UnconsciousEvent ¶
type Ace3UnconsciousEvent struct {
ID uint
SoldierID uint
Time time.Time
CaptureFrame uint
IsUnconscious bool // true = went unconscious, false = regained consciousness
}
Ace3UnconsciousEvent represents ACE3 unconscious state change
type ChatEvent ¶
type ChatEvent struct {
ID uint
SoldierID *uint
Time time.Time
CaptureFrame uint
Channel string
FromName string
SenderName string
Message string
PlayerUID string
}
ChatEvent represents a chat message
type DeleteMarker ¶
DeleteMarker represents a marker deletion at a specific frame
type EntityLocality ¶
type EntityLocality struct {
UnitsTotal uint
UnitsAlive uint
UnitsDead uint
Groups uint
Vehicles uint
WeaponHolders uint
}
EntityLocality holds entity counts for one locality (server-local or remote).
type FiredEvent ¶
type FiredEvent struct {
SoldierID uint16 // ObjectID of the soldier who fired
Time time.Time
CaptureFrame uint
Weapon string
Magazine string
FiringMode string
StartPos Position3D
EndPos Position3D
}
FiredEvent represents a weapon being fired. SoldierID is the ObjectID of the soldier who fired.
type GeneralEvent ¶
type GeneralEvent struct {
ID uint
Time time.Time
CaptureFrame uint
Name string
Message string
ExtraData map[string]any
}
GeneralEvent is a generic event
type GlobalEntityCount ¶
type GlobalEntityCount struct {
UnitsAlive uint
UnitsDead uint
Groups uint
Vehicles uint
WeaponHolders uint
PlayersAlive uint
PlayersDead uint
PlayersConnected uint
}
GlobalEntityCount holds global entity counts across all sides.
type HitEvent ¶
type HitEvent struct {
ID uint
Time time.Time
CaptureFrame uint
VictimSoldierID *uint
VictimVehicleID *uint
ShooterSoldierID *uint
ShooterVehicleID *uint
WeaponVehicle string
WeaponName string
WeaponMagazine string
EventText string
Distance float32
}
HitEvent represents something being hit
type KillEvent ¶
type KillEvent struct {
ID uint
Time time.Time
CaptureFrame uint
VictimSoldierID *uint
VictimVehicleID *uint
KillerSoldierID *uint
KillerVehicleID *uint
WeaponVehicle string
WeaponName string
WeaponMagazine string
EventText string
Distance float32
}
KillEvent represents something being killed
type Marker ¶
type Marker struct {
ID uint
Time time.Time
CaptureFrame uint
EndFrame int // -1 means persist until end, otherwise frame when marker disappears
MarkerName string
Direction float32
MarkerType string
Text string
OwnerID int
Color string
Size string
Side string
Position Position3D
Polyline Polyline
Shape string
Alpha float32
Brush string
IsDeleted bool
}
Marker represents a map marker
type MarkerState ¶
type MarkerState struct {
ID uint
MarkerID uint
Time time.Time
CaptureFrame uint
Position Position3D
Direction float32
Alpha float32
}
MarkerState tracks marker position changes over time
type Mission ¶
type Mission struct {
ID uint
MissionName string
BriefingName string
MissionNameSource string
OnLoadName string
Author string
ServerName string
ServerProfile string
StartTime time.Time
WorldID uint
CaptureDelay float32
AddonVersion string
ExtensionVersion string
ExtensionBuild string
OcapRecorderExtensionVersion string
Tag string
PlayableSlots PlayableSlots
SideFriendly SideFriendly
Addons []Addon
}
Mission represents a recorded mission
type PlayableSlots ¶
type PlayableSlots struct {
West uint8 `json:"west"`
East uint8 `json:"east"`
Independent uint8 `json:"independent"`
Civilian uint8 `json:"civilian"`
Logic uint8 `json:"logic"`
}
PlayableSlots shows counts of playable slots by side
type PlayerNetworkData ¶
PlayerNetworkData holds network stats for a single player.
type Polyline ¶
type Polyline []Position2D
Polyline represents a sequence of 2D positions for line markers
type Position2D ¶
Position2D represents a 2D map coordinate
type Position3D ¶
type Position3D struct {
X float64 `json:"x"` // easting
Y float64 `json:"y"` // northing
Z float64 `json:"z"` // elevation ASL
}
Position3D represents a 3D coordinate without GIS dependencies
type ProjectileEvent ¶
type ProjectileEvent struct {
CaptureFrame uint
FirerObjectID uint16
VehicleObjectID *uint16 // nil if not fired from vehicle
WeaponDisplay string
MagazineDisplay string
MuzzleDisplay string
SimulationType string
MagazineIcon string
Trajectory []TrajectoryPoint
Hits []ProjectileHit
}
ProjectileEvent represents a raw projectile event from the game.
type ProjectileHit ¶
type ProjectileHit struct {
CaptureFrame uint
Position Position3D
SoldierID *uint16 // set if soldier was hit
VehicleID *uint16 // set if vehicle was hit
ComponentsHit []string // body/vehicle parts hit
}
ProjectileHit represents a hit from a projectile on a soldier or vehicle.
type RadioEvent ¶
type RadioEvent struct {
ID uint
SoldierID *uint
Time time.Time
CaptureFrame uint
Radio string
RadioType string
StartEnd string
Channel int8
IsAdditional bool
Frequency float32
Code string
}
RadioEvent represents radio transmission
type ScriptCounts ¶
ScriptCounts holds the number of running scripts by type.
type SideEntityCount ¶
type SideEntityCount struct {
Local EntityLocality
Remote EntityLocality
}
SideEntityCount holds entity counts for a single side, split by locality.
type SideEntityCounts ¶
type SideEntityCounts struct {
East SideEntityCount
West SideEntityCount
Independent SideEntityCount
Civilian SideEntityCount
}
SideEntityCounts holds entity counts for all four sides.
type SideFriendly ¶
type SideFriendly struct {
EastWest bool `json:"eastWest"`
EastIndependent bool `json:"eastIndependent"`
WestIndependent bool `json:"westIndependent"`
}
SideFriendly represents which sides are allied
type Soldier ¶
type Soldier struct {
ID uint16 // ObjectID - game identifier
JoinTime time.Time
JoinFrame uint
OcapType string
UnitName string
GroupID string
Side string
IsPlayer bool
RoleDescription string
ClassName string
DisplayName string
PlayerUID string
SquadParams []any
}
Soldier represents a player or AI unit. ID is the ObjectID - the game's identifier for this entity.
type SoldierScores ¶
type SoldierScores struct {
InfantryKills uint8 `json:"infantryKills"`
VehicleKills uint8 `json:"vehicleKills"`
ArmorKills uint8 `json:"armorKills"`
AirKills uint8 `json:"airKills"`
Deaths uint8 `json:"deaths"`
TotalScore uint8 `json:"totalScore"`
}
SoldierScores stores Arma 3 player scores
type SoldierState ¶
type SoldierState struct {
SoldierID uint16 // References Soldier.ID (ObjectID)
Time time.Time
CaptureFrame uint
Position Position3D
Bearing uint16
Lifestate uint8
InVehicle bool
InVehicleObjectID *uint16 // ObjectID of vehicle, if in one
VehicleRole string
UnitName string
IsPlayer bool
CurrentRole string
HasStableVitals bool
IsDraggedCarried bool
Stance string
GroupID string
Side string
Scores SoldierScores
}
SoldierState represents soldier state at a point in time. SoldierID references the Soldier's ID (ObjectID).
type TelemetryEvent ¶
type TelemetryEvent struct {
Time time.Time
CaptureFrame uint
// FPS data (also written to mission recording by DB backends)
FpsAverage float32
FpsMin float32
// Per-side entity counts
SideEntityCounts SideEntityCounts
// Global entity counts (all sides combined)
GlobalCounts GlobalEntityCount
// Running script counts
Scripts ScriptCounts
// Weather snapshot
Weather WeatherData
// Per-player network stats (variable length)
Players []PlayerNetworkData
}
TelemetryEvent represents a unified telemetry snapshot from the game server. Replaces the old :FPS: and :METRIC: commands with a single :TELEMETRY: call.
type TimeState ¶
type TimeState struct {
ID uint
Time time.Time
CaptureFrame uint
SystemTimeUTC string
MissionDate string
TimeMultiplier float32
MissionTime float32
}
TimeState represents mission time synchronization data
type TrajectoryPoint ¶
type TrajectoryPoint struct {
Position Position3D
Frame uint
}
TrajectoryPoint represents a single position sample in a projectile trajectory.
type UploadMetadata ¶
type UploadMetadata struct {
WorldName string
MissionName string
MissionDuration float64
Tag string
}
UploadMetadata contains mission information needed for upload.
type Vehicle ¶
type Vehicle struct {
ID uint16 // ObjectID - game identifier
JoinTime time.Time
JoinFrame uint
OcapType string
ClassName string
DisplayName string
Customization string
}
Vehicle represents a vehicle or static weapon. ID is the ObjectID - the game's identifier for this entity.
type VehicleState ¶
type VehicleState struct {
VehicleID uint16 // References Vehicle.ID (ObjectID)
Time time.Time
CaptureFrame uint
Position Position3D
Bearing uint16
IsAlive bool
Crew string
Fuel float32
Damage float32
Locked bool
EngineOn bool
Side string
VectorDir string
VectorUp string
TurretAzimuth float32
TurretElevation float32
}
VehicleState represents vehicle state at a point in time. VehicleID references the Vehicle's ID (ObjectID).