I am trying to understand how to make a mod that captures information about units through the replay
Looking at the LUA documentation:
https://supcom.fandom.com/wiki/LUADOC_1.5.3599#User
https://github.com/FAForever/fa/blob/develop/engine/User/UserUnit.lua
does using User.UserUnit make it a UI only mod?
For the dump to file script
if unit is alive (using IsDead)
if it is dump a line to log that contains
GetGameTick
GetArmy
GetUnitId
GetPosition
GetOrientation
GetVelocity
GetMaxHealth
GetHealth
GetShieldRatio
IsIdle
UserUnit
repeat every X seconds.
Could dump some unit types info at a faster rate than others, depending on unit speed, or importance for instance.
Do sim mods have access to any files that are not the game log?
Could just add an identifier start charicter to each line of the game log however.
Data could then be put into a better datasctructure and compressed using other external tools / scripting
Is this much script to write? is anyone here able to do so? @maudlin27