Posts
-
Unit Logger mod
I have created the "Unit Logger" mod. It is in the mod vault. It is a UI mod.
It logs information on every unit in the game log of the focus army every 10 game ticks, configureable in main.lua
Information logged:
"UL02","GameTick","EntityId","Army","UnitId","FractionComplete","Position.x","Position.y","Position.z","MaxHealth","Health","ShieldRatio","IsIdle","MassKilled"Log size for long games is normally a few MegaBytes
It works in replays if you select the army of the player you require logging.
It requires UMT / UI Mod Tools / ui-mod-tools-4z0t-v12
Thanks for @Ctrl-K / 4z0t for some of the code that makes this work
This data is not in an compact format. It will compress at around ~ 8>1 ratio
Build order can be extracted from this data - and not just the time units / buildings are started or commands given but when units are finished and where they actually are on the map.
using an external tool unit icons could be plotted onto a map with this data for a kind of "replay prieview" function that can be scrolled fowards and back in time, without having to launch the FAF executable.
Does anyone know about selecting all units while in observer? I would like to convert replay files to this unit position format, and currently I can only run one army at a time.
Example data:
info: UL02 GameTick EntityId Army UnitId FractionComplete Position.x Position.y Position.z MaxHealth Health ShieldRatio IsIdle MassKilled info: UL02 1350 321 1 uea0303 1 171.915 35.555 717.439 2300 1550 0 0 180 info: UL02 1350 421 1 uea0303 1 231.838 34.695 652.384 2300 300 0 0 482 info: UL02 1350 344 1 uea0303 1 109.883 35.376 720.888 2300 2050 0 0 45 info: UL02 1350 369 1 uea0303 1 142.596 38.140 688.592 2300 1300 0 0 45 info: UL02 1360 736 1 uea0303 1 111.701 36.286 717.892 2300 1550 0 0 270 info: UL02 1360 0 1 ual0001 1 108.207 25.830 920.259 11000 11000 0 1 0 info: UL02 1360 262 1 uea0303 1 98.083 37.232 730.919 2300 1550 0 0 450 info: UL02 1360 280 1 uea0303 1 97.939 36.571 708.237 2300 1050 0 0 90 info: UL02 1360 364 1 uea0303 1 145.077 37.485 686.651 2300 1800 0 0 225 info: UL02 1360 318 1 uea0303 1 142.312 37.525 684.928 2300 1550 0 0 360 info: UL02 1360 438 1 uea0303 1 196.809 37.850 668.522 2300 1550 0 0 433
An example log from a high ranked setons game
replay ID 22654992
from the south air player from 0 mins to 20 mins in
20 mins of a setons game is now only 1.6MB log size with the floating point decimal trimming
test.log -
RE: Add a latest replay URL
I have created the "Unit Logger" mod. It is in the mod vault. It is a UI mod.
EDIT - V2 Released with reduced decimal places and unit masskilled added
Logs information on every unit of of focus army every 10 game ticks, configureable in main.lua
Information logged:
"UL02","GameTick","EntityId","Army","UnitId","FractionComplete","Position.x","Position.y","Position.z","MaxHealth","Health","ShieldRatio","IsIdle","MassKilled"
WARNING: If you have 1500 units and an hour game expect gigabyte size logs.
It works in replays if you select the army of the player you require logging.
It requires UMT / UI Mod Tools / ui-mod-tools-4z0t-v12
Thanks for 4z0t for some of the code that makes this workThis data is not in an eficcient format at all - that can be done after the game has ended.
I need to look at logging all units from all armies at once when observer. i dont know if this is possible with a UI mod.
Example data:
info: UL02 GameTick EntityId Army UnitId FractionComplete Position.x Position.y Position.z MaxHealth Health ShieldRatio IsIdle MassKilled info: UL02 1350 321 1 uea0303 1 171.915 35.555 717.439 2300 1550 0 0 180 info: UL02 1350 421 1 uea0303 1 231.838 34.695 652.384 2300 300 0 0 482 info: UL02 1350 344 1 uea0303 1 109.883 35.376 720.888 2300 2050 0 0 45 info: UL02 1350 369 1 uea0303 1 142.596 38.140 688.592 2300 1300 0 0 45 info: UL02 1360 736 1 uea0303 1 111.701 36.286 717.892 2300 1550 0 0 270 info: UL02 1360 0 1 ual0001 1 108.207 25.830 920.259 11000 11000 0 1 0 info: UL02 1360 262 1 uea0303 1 98.083 37.232 730.919 2300 1550 0 0 450 info: UL02 1360 280 1 uea0303 1 97.939 36.571 708.237 2300 1050 0 0 90 info: UL02 1360 364 1 uea0303 1 145.077 37.485 686.651 2300 1800 0 0 225 info: UL02 1360 318 1 uea0303 1 142.312 37.525 684.928 2300 1550 0 0 360 info: UL02 1360 438 1 uea0303 1 196.809 37.850 668.522 2300 1550 0 0 433
-
RE: Add a latest replay URL
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.luadoes 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
UserUnitrepeat 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 / scriptingIs this much script to write? is anyone here able to do so? @maudlin27
-
RE: Add a latest replay URL
Thanks for all the info @maudlin27
While I am sure I could figure out some python scripting around launching the faf.exe and replays automatically
The exporting information to a text file is beyond my skillset
Is it possible to run the FAF EXE in a windowless or headless graphics free mode?
Is there a documented list of command line options avalable to the executable? -
RE: Add a latest replay URL
@sainserow said in Add a latest replay URL:
@nooby The first part is probably possible, Kazbek faf analysis was doing something similar. You could scroll the entire game directly on the website in 15-30 seconds and units were displayed at yellow dots. The more units in the same area, the bigger the dots. You could basically see map control. But it didn’t distinguish t1 scout and gc in these dots.
I think it was analysing commands, as Askaholic stated, rather than where the units actually were.
I dont understand what you mean by creating a new replay from the old one?
The purpose is to generate unit position, identifcation and time data that can be used to get some insight into the way the game is played with other tools.
-
RE: Add a latest replay URL
thanks for all this info - It was very easy to get the AI automation script running.
To use this script to anaylse replays could some LUA script get all the existing units and there locations every 10? seconds and dump it to a text file?
And then just modify the script to run replays instead of make new games?
-
RE: Add a latest replay URL
I would like to automatically review some replays (units built, when they were built) in certian rating brackets on certian maps using askaholics python replay parser and get a win / loss from each one using the API. Is there no way to do this now?
-
RE: Add a latest replay URL
@brutus5000 said in Add a latest replay URL:
No it would not be good to add logic to this endpoint. Nobody is supposed to filter on the replay.faforever.com domain.
Just (learn to) use our api instead.https://api.faforever.com/data/game?filter=replayAvailable==true&sort=-id&page[limit]=1 gives you the latest present replay in the
replayUrl
field.Has the API been locked down? I am getting a permissions error on this link.
-
RE: Telemazer - time for change?
I dont like the teleport mechanic, but I think it should be left in the game. I think that a good way to balance it would be that enemy teleports within omni range it is pinged as a nuke ping would be, rather than just the visual icon. This would give a few more seconds of time to move units into position.
Teleport in higher rated teamgames does not improve the game, does not require much skill and does not carry much risk.
-
RE: The issue with Chrono Dampener
Has anyone got some hih level replays ID showing the power of this?
-
RE: [simple mod request] Commander teleporter balance change
I would prefer if teleport required a large amount of instant energy in use - Like the eye of riahhne. This would make it easier to scout by the large ( think 20 + ) E storages required.
Making it more expensive use wise just means you can stall your eco for a few more seconds then forcing storage.
-
RE: 403s when trying to load replays with ID #16999999 and older
I have this same problem. Any updates from server admin?
I do have a local copy of most of the replays ~ 750 GB
-
RE: Add a latest replay URL
I am getting service unavalable for the API. Is the API down or have I been too much "API learning" to be IP banned?
-
Add a latest replay URL
Currently you can get replays from FAF with a URL as such:
https://replay.faforever.com/18645999
It would be good if a URL that downloaded the highest number avalable replay like
https://replay.faforever.com/latest
was implemented
This should not be a hard feature to add
Something with some more utility and harder to add would be the ability to download all replays based on a date played example
-
RE: Novax needs to be nerfed, here's why.
The novax building is a pretty large footprint so requireing t3 power around it does not make it fit into your air grid niceley. I also like the idea of it needing power to fire. Any thoughts on drawing so much power (~ 20K?) for its short beam duration it needs E storage to fire like the eye?.
On it being annoying a large problem is the APM required to use vs APM required to counter - building shields, reclaiming pgens, protecting engineers.
On large maps like sentons it would still be built over t3 arty at higher cost, its just too usefull, but it would give more time to prepare and scout. I agree that part of the problem is the cost and how easy it is to build one pretty fast.
If it is not OP why are they built so often in higher level 1200+ rating ~ 1700 avg rating sentons games? There is almost always one or more built. There is never t3 arty built. It is also common to see two or three from one team.
-
RE: Novax needs to be nerfed, here's why.
Whats wrong with just decreasing its damage and allowing it to take advantage of ajacency for firerate increase.
Make the unit so that once surrounded by 4 t3 pgens it is as powerfull as it is now, but without them it is much weaker. This increases cost by 10K mass, time to build and makes it harder to defend the control center.
-
RE: Novax needs to be nerfed, here's why.
@comradestryker
First of all, its 1200 mass per point defended (UEF t2 shield) as novax kill anything under a single t2 shield. It also required buildpower being avalable at every one of these points on the map, this takes time and increases cost.You should have a look at how the novax was used in that replay. No other unit in the game can replace the novax in that situation. A first novax on setons is always cost effective (The same can be said with nuke)
The game would not have been won without the novax. T3 arty is almost always worse, not better than novax on setons. The novax were more effective than the mavor at less cost. and had greater impact on game outcome.
Comparing the two once a single shield is up against a shielded base is stupid, they are for differrent things, and the novax is too good in its niche . T3 arty does not kill expanding engineers or moving cruisers. T3 arty does not snipe thigs like stealthed pgens built across the map. T3 arty does not provide omni vision and scouting. T3 arty does not have infintite range. T3 arty is more eggs in one basket making it easier to snipe. T3 arty takes longer to payoff and longer to build, making it easier to scout and counter. T3 arty cannot be split against multiple targets around the map. It is not cost effective to fire t3 arty at single mexes, but it is with novax.
-
RE: Weekly Discussion #18 - Making Hydro more interesting
The use of a hydro in the late T2 stage to rest of game is in its ajacency. Building your T2 air factories / shield / nuke / nuke defence / radar near it is absolutley worth it, as you cant use the space for anything else and its not explosive