name: "Arma2 Operation Arrowhead"
supports_workshop: false
startup:
  default_command: 'arma2oaserver.exe -ip=0.0.0.0 -port=2302 -config=server.cfg -cfg=basic.cfg -profiles=profiles -name=server -world=empty -mod="@CBA" -nosplash -noPause'
  ports:
    - { label: "Game Port (GP)", port: 2302, proto: "UDP", relative: "GP" }
    - { label: "Steam query", port: 2303, proto: "UDP", relative: "GP+1" }
    - { label: "Master/aux", port: 2304, proto: "UDP", relative: "GP+2" }
    - { label: "Aux/voice", port: 2305, proto: "UDP", relative: "GP+3" }
    - { label: "BattlEye RCon", port: 2306, proto: "TCP", relative: "configurable (often GP+4)" }
  flags:
    - { flag: "-ip", default: "0.0.0.0", type: "ip", desc: "Bind address" }
    - { flag: "-port", default: "2302", type: "int", desc: "Base game UDP port" }
    - { flag: "-config", default: "server.cfg", type: "path", desc: "Server rules/missions file" }
    - { flag: "-cfg", default: "basic.cfg", type: "path", desc: "Network/bandwidth tuning" }
    - { flag: "-profiles", default: "profiles", type: "path", desc: "Profiles root (RPT/logs/Users)" }
    - { flag: "-name", default: "server", type: "string", desc: "Profile folder name in Users/" }
    - { flag: "-mod", default: "", type: "modlist", desc: "Semicolon-separated mod order" }
    - { flag: "-world", default: "empty", type: "string", desc: "Skip world preload for dedicated" }
    - { flag: "-nosplash", default: "on", type: "switch", desc: "Skip splash screens" }
    - { flag: "-noPause", default: "on", type: "switch", desc: "Don’t pause when unfocused" }
    - { flag: "-cpuCount", default: "auto", type: "int", desc: "CPU core hint" }
    - { flag: "-exThreads", default: "auto", type: "int", desc: "Extra worker threads" }
    - { flag: "-malloc", default: "system", type: "string", desc: "Allocator DLL (e.g., tbbmalloc_bi.dll)" }
    - { flag: "-maxMem", default: "auto", type: "MB", desc: "Memory cap" }
    - { flag: "-netlog", default: "off", type: "switch", desc: "Legacy network log" }
    - { flag: "-ranking", default: "", type: "path", desc: "MP ranking output file" }
    - { flag: "-pid", default: "", type: "path", desc: "Write PID file" }
    - { flag: "-bepath", default: "./BattlEye", type: "path", desc: "BattlEye folder" }
    - { flag: "-par", default: "", type: "path", desc: "Read extra parameters from file" }
configs:
  - { file: "server.cfg", paths: ["./server.cfg"], desc: "Hostname/passwords/missions, verifySignatures, etc." }
  - { file: "basic.cfg", paths: ["./basic.cfg"], desc: "Network & bandwidth tuning" }
  - { file: "Users/<name>/<name>.Arma2OAProfile", paths: ["<profiles>/Users/<name>/"], desc: "Difficulty/profile" }
  - { file: "Users/<name>/<name>.vars.Arma2OAProfile", paths: ["<profiles>/Users/<name>/"], desc: "Profile vars" }
  - { file: "arma2oaserver.RPT", paths: ["<profiles>/"], desc: "Main runtime log" }
  - { file: "mpmissions/*.pbo", paths: ["./mpmissions/"], desc: "Mission packages" }
  - { file: "keys/*.bikey", paths: ["./keys/"], desc: "Allowed signatures" }
  - { file: "BattlEye/BEServer.cfg", paths: ["./BattlEye/"], desc: "RConPassword/RConPort" }
  - { file: "BattlEye/*.txt", paths: ["./BattlEye/"], desc: "BE filters (scripts, remoteexec, etc.)" }
troubleshooting:
  - "Not visible: open UDP GP..GP+3; confirm reportingIP; check NAT/ISP; inspect RPT."
  - "Signature check failed: place matching .bikey in keys/; verifySignatures=2; align mod versions."
  - "RCon fails: BattlEye/BEServer.cfg RConPassword/RConPort; open TCP; no BOM."
  - "Rubber-banding: tune basic.cfg (MaxMsgSend/MinErrorToSend/WindowSize); reduce AI/viewDistance."
  - "Crash on boot: trim -mod to core; check dependencies in RPT; disk space; allocator/malloc sanity."
  - "Waiting for host: mission addons mismatch; repack PBO; clear client cache."

