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 EndMissionEvent
- type EntityLocality
- type FiredEvent
- type FocusRange
- type Frame
- type GeneralEvent
- type GlobalEntityCount
- type HitEvent
- type KillEvent
- type Marker
- type MarkerState
- type Mission
- type PlacedObject
- type PlacedObjectEvent
- type PlayableSlots
- type PlayerNetworkData
- type Polyline
- type Position2D
- type Position3D
- type ProjectileEvent
- type ProjectileHit
- type RadioEvent
- type ScriptCounts
- type SectorEvent
- 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 Frame
Reason string
LastDamageSourceID *uint
}
Ace3DeathEvent represents ACE3 medical death
type Ace3UnconsciousEvent ¶
type Ace3UnconsciousEvent struct {
ID uint
SoldierID uint
Time time.Time
CaptureFrame Frame
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 Frame
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 EndMissionEvent ¶
type EndMissionEvent struct {
ID uint
Time time.Time
CaptureFrame Frame
Side string // winning side ("WEST", "EAST", etc.) or empty
Message string // victory description
}
EndMissionEvent represents the end of a mission.
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 Frame
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 FocusRange ¶
FocusRange represents a focus range in the recording timeline.
type Frame ¶
type Frame uint
Frame represents a capture frame number in the recording timeline. The zero value (FrameForever) means "unset" or "persists until mission end". Valid frames start at 1; frame 0 means "unset".
const FrameForever Frame = 0
FrameForever is the zero value — indicates no defined end (persists until mission end).
type GeneralEvent ¶
type GeneralEvent struct {
ID uint
Time time.Time
CaptureFrame Frame
Name string
Message string
ExtraData map[string]any
}
GeneralEvent is a generic event (connected, disconnected, generalEvent, respawnTickets, etc.)
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 Frame
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 Frame
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 Frame
EndFrame Frame // FrameForever (0) 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 Frame
Position Position3D
Direction float32
Alpha float32
Text string
Color string
Size string
MarkerType string
Brush string
Shape string
}
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 PlacedObject ¶
type PlacedObject struct {
ID uint16 // ObjectID - game identifier
JoinTime time.Time
JoinFrame Frame
ClassName string
DisplayName string
Position Position3D
OwnerID uint16 // OCAP ID of soldier who placed it
Side string
Weapon string
MagazineIcon string
}
PlacedObject represents a placed object (mine, explosive, etc.) in the game world. ID is the ObjectID - the game's identifier for this entity.
type PlacedObjectEvent ¶
type PlacedObjectEvent struct {
CaptureFrame Frame
PlacedID uint16
EventType string // "detonated", "deleted", or "hit"
Position Position3D
HitEntityID *uint16 // OCAP ID of hit entity (only for "hit" events)
}
PlacedObjectEvent represents a lifecycle event (detonation or deletion) for a placed object.
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 Frame
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 Frame
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 Frame
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 SectorEvent ¶
type SectorEvent struct {
ID uint
Time time.Time
CaptureFrame Frame
Name string // "captured", "contested"
ObjectType string // "sector", etc.
UnitName string // name of the sector
Side string // capturing side ("WEST", "EAST", etc.) or empty
PosX float64
PosY float64
PosZ float64
}
SectorEvent represents a sector state change (captured, contested).
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 Frame
OcapType string
UnitName string
GroupID string
Side string
IsPlayer bool
RoleDescription string
ClassName string
DisplayName string
PlayerUID string
SquadParams []any
DeleteFrame Frame // Frame when entity was excluded (0 = active until end)
}
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 Frame
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 Frame
// 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:FRAME: call.
type TimeState ¶
type TimeState struct {
ID uint
Time time.Time
CaptureFrame Frame
SystemTimeUTC string
MissionDate string
TimeMultiplier float32
MissionTime float32
}
TimeState represents mission time synchronization data
type TrajectoryPoint ¶
type TrajectoryPoint struct {
Position Position3D
FrameNum Frame
}
TrajectoryPoint represents a single position sample in a projectile trajectory.
type UploadMetadata ¶
type UploadMetadata struct {
WorldName string
MissionName string
MissionDuration float64
Tag string
EndFrame Frame
FocusRanges []FocusRange
}
UploadMetadata contains mission information needed for upload.
type Vehicle ¶
type Vehicle struct {
ID uint16 // ObjectID - game identifier
JoinTime time.Time
JoinFrame Frame
OcapType string
ClassName string
DisplayName string
Customization string
Side string // Config side: WEST, EAST, GUER, CIV (from "str side vehicle")
DeleteFrame Frame // Frame when entity was excluded (0 = active until end)
}
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 Frame
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).