@jip
Ok, the pull request is there and ready.
https://github.com/FAForever/fa/pull/4789
Thanks for your help, this had been fun.
I never did even a single line of Lua before.
But I have to say, Lua is cool.
Cheers!
@jip
Ok, the pull request is there and ready.
https://github.com/FAForever/fa/pull/4789
Thanks for your help, this had been fun.
I never did even a single line of Lua before.
But I have to say, Lua is cool.
Cheers!
Wow, that would be very cool.
I was wondering also about this solution, but was not sure I could recommend something that would introduce changes into the core of FAF.
I might even do it myself. The dev process is well documented.
I will come up with a pull request in the future then.
If I get stuck on the way I will seek help.
Cheers!
Ok, I did some digging.
Surely the ArmyBrains can only be accessed if I were to use a mod, which is not a ui_only mod.
Hence my Idea: if a fellow streamer were to modify the fafreplay file saying to run it with a patched version of SupremeScoreBoard, which is patched to be a sim mod, and that has access to the armybrains.
Then the replay would still be replayed just as it was played (not causing desyncs), because the armybrains is only read, and never modified. Right?
This might be an ugly way to do it, but hey it should work, I guess.
Hi Jip,
Thanks a lot.
So this would explain why for example the Phantom X mod has access to the ArmyBrains global variable, because it is not a UI mod?
Because I guess if I UI mod would have access to ArmyBrains it could influence the game simulation.
In the end what I am trying to do work out, is how to fix Hussars Scoreboard Kill notification.
https://github.com/FA-mods/SupremeScoreBoard
What broke the kill notification is basically this change in the FA Core.
https://github.com/FAForever/fa/pull/4016
Earlier the DoGameResult would receive also the score results, after the change it is only the defeat.
So the Scoreboard UI mod does not know anymore who performed a kill, it only knows an ACU was defeated, hence it always shows that a ctrl+k happened.
So I wondered how I could get access to the kills information. This is why I wanted to read out the Armybrains, because it seems this info could be extracted from there.
Cheers!
Is there a possibility to access this function: GetArmyBrain()
from inside a hook of a mod, when running a replay?
GetArmyBrain() returns the ArmyBrains global variable.
No matter how I try, I get error messages saying that I can not access that global variable or function.
Any pointers would be appreciated!
Cheers!