core

package
v5.0.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

internal/model/core/events.go

internal/model/core/marker.go

internal/model/core/mission.go

internal/model/core/soldier.go

internal/model/core/types.go

internal/model/core/vehicle.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ace3DeathEvent

type Ace3DeathEvent struct {
	ID                 uint
	MissionID          uint
	SoldierID          uint
	Time               time.Time
	CaptureFrame       uint
	Reason             string
	LastDamageSourceID *uint
}

Ace3DeathEvent represents ACE3 medical death

type Ace3UnconsciousEvent

type Ace3UnconsciousEvent struct {
	ID            uint
	MissionID     uint
	SoldierID     uint
	Time          time.Time
	CaptureFrame  uint
	IsUnconscious bool // true = went unconscious, false = regained consciousness
}

Ace3UnconsciousEvent represents ACE3 unconscious state change

type Addon

type Addon struct {
	ID         uint
	Name       string
	WorkshopID string
}

Addon represents a mod or DLC

type ChatEvent

type ChatEvent struct {
	ID           uint
	MissionID    uint
	SoldierID    *uint
	Time         time.Time
	CaptureFrame uint
	Channel      string
	FromName     string
	SenderName   string
	Message      string
	PlayerUID    string
}

ChatEvent represents a chat message

type FiredEvent

type FiredEvent struct {
	MissionID    uint
	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
	MissionID    uint
	Time         time.Time
	CaptureFrame uint
	Name         string
	Message      string
	ExtraData    map[string]any
}

GeneralEvent is a generic event

type HitEvent

type HitEvent struct {
	ID               uint
	MissionID        uint
	Time             time.Time
	CaptureFrame     uint
	VictimSoldierID  *uint
	VictimVehicleID  *uint
	ShooterSoldierID *uint
	ShooterVehicleID *uint
	EventText        string
	Distance         float32
}

HitEvent represents something being hit

type KillEvent

type KillEvent struct {
	ID              uint
	MissionID       uint
	Time            time.Time
	CaptureFrame    uint
	VictimSoldierID *uint
	VictimVehicleID *uint
	KillerSoldierID *uint
	KillerVehicleID *uint
	EventText       string
	Distance        float32
}

KillEvent represents something being killed

type Marker

type Marker struct {
	ID           uint
	MissionID    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
	MissionID    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 Polyline

type Polyline []Position2D

Polyline represents a sequence of 2D positions for line markers

type Position2D

type Position2D struct {
	X float64 `json:"x"` // easting
	Y float64 `json:"y"` // northing
}

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 RadioEvent

type RadioEvent struct {
	ID           uint
	MissionID    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 ServerFpsEvent

type ServerFpsEvent struct {
	ID           uint
	MissionID    uint
	Time         time.Time
	CaptureFrame uint
	FpsAverage   float32
	FpsMin       float32
}

ServerFpsEvent represents server performance data

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
	MissionID       uint
	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)
	MissionID         uint
	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
	Scores            SoldierScores
}

SoldierState represents soldier state at a point in time. SoldierID references the Soldier's ID (ObjectID).

type TimeState

type TimeState struct {
	ID             uint
	MissionID      uint
	Time           time.Time
	CaptureFrame   uint
	SystemTimeUTC  string
	MissionDate    string
	TimeMultiplier float32
	MissionTime    float32
}

TimeState represents mission time synchronization data

type Vehicle

type Vehicle struct {
	ID            uint16 // ObjectID - game identifier
	MissionID     uint
	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)
	MissionID       uint
	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).

type World

type World struct {
	ID                uint
	Author            string
	WorkshopID        string
	DisplayName       string
	WorldName         string
	WorldNameOriginal string
	WorldSize         float32
	Latitude          float32
	Longitude         float32
	Location          Position3D
}

World represents a map/terrain

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL