Navigation

    FAForever Forums
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. crispweed
    C

    crispweed

    @crispweed

    6
    Reputation
    17
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    crispweed Follow

    Best posts made by crispweed

    RE: 100 days of ladder

    @evan_ said in 100 days of ladder:

    How have you guys been finding these reports? Does anyone relate to the issues I am trying to fix with my playstyle? Anyone feel inspired to try and get better with me?

    As someone who has been playing for a long time, but not frequently enough, and without seeing much in the way rating improvement, it is definitely interesting to follow your progress (and motivating for me to try something similar, or at least play ladder a bit more often). Don't give up!

    posted in General Discussion •
    Benchmarking time spent in beat functions, 'avatar update' is very expensive

    I've been looking into benchmarking the performance cost of different ui mods, and made a minimal ui mod for this purpose.
    ('OnBeatTimings', uploaded to the mod vault.)

    This tells you how long is being spent in UI 'beat functions', on average. (Not the total performance cost of UI mods, in all situations, but something which I think is significant, and which can be measured quite easily.)

    To use this, run FAF windowed, open the log viewer and console, set up a benchmark situation, leave it to run for a bit (10 seconds or so) and then enter the following in the console:

    UI_Lua import("/lua/ui/game/gamemain.lua").AverageOnBeatTime()
    

    This tells you the average time spent in beat functions which are not flagged as 'throttled', per update.
    You can also get the average time spent in 'throttled' beat functions, with:

    UI_Lua import("/lua/ui/game/gamemain.lua").AverageOnBeatTime(true)
    

    Note that these timings include time spent in built-in beat functions, as well as beat functions in mods you have enabled, but you can disabled and enable mods and see how this affects the timings.

    To quickly set up a benchmark situation, I suggest enabling cheats and then using the copy and paste units thing. (So set up a situation with a load of units placed one time. Select the units. Hit ctrl-shift-C to copy placement script for these units. Paste that into a text editor. To place the units back into game for future benchmarking copy the buffer out of your text editor and then ctrl-shift-V in game.)

    When looking into the timings coming out of this I found that one built-in beat function in particular, for 'avatar update', was taking a disproportionate amount of the time spent in situations I was benchmarking.

    'Avatar update' is for the ui elements normally towards the top right of the screen that show things like ACU health and shield, number of idle engineers, and so on.

    I made another 'micro mod', then, to simply remove this update function. ('DisableAvatarUpdate', also uploaded to the vault.) With this mod installed and enabled, the avatars no longer get updated, so no longer work correctly, but this enables us to quickly check the cost of this beat function, and also enables you to reduce your total UI beat function overhead quite significantly, if you are so inclined.

    If anyone is interested:

    • Have a go and see if you can repeat my findings (e.g. benchmarking beat function times with and without DisableAvatarUpdate enabled)
    • Check the beat function cost of other ui mods you have installed (if there are significant performance costs for running popular UI mods then it would be good for people to know this)
    posted in Modding & Tools •
    RE: 100 days of ladder

    @evan_ said in 100 days of ladder:

    This leads into the next point. I've uncovered yet another issue of mine that has gone unnoticed until now: Move overriding. I will give a move order to a unit and then give another order to override it. An example of this is when I put an attack order on a lab that had slipped through, only to change it into a move order for some reason, which caused the lab to escape and continue to cause trouble.

    Setting up some hotkeys of the form 'select nearest idle [unit type]' (or similar but adding to existing selection) could perhaps be useful here.

    posted in General Discussion •
    How to detecting when selected units have been given a command? (for incremental selection mod)

    So I'm working on a selection helper mod where I want a given hotkey to sometimes add a unit to the current selection, and sometimes start a new selection, depending on context.

    The way I have it set up currently is that, after you made your initial selection, (or add to a selection) it stays in 'incremental selection' mode for a fixed time. So if you press a selection hotkey several times in quick succession you get that many units of that type, but if you wait a certain amount of time before pressing again, it starts a new selection.

    The problem with this is that this depends on the user having some idea of the time that has passed since the last key press, which ends up being not so intuitive (in that it will sometimes not do the selection action that the user wanted).

    What I would really like is for incremental mode to remain in effect until the current selection is given some command, with selection mode then reverting back, such that the next hotkey press after the command is given starts a new selection.

    For this, I need to detect when a command has been given, but I can't see an easy way to this.

    Does anyone here know how this can be done (detecting when selected units have been given a command)?
    Any other ideas?

    posted in Modding & Tools •
    RE: How to use different strategic icons

    @crispweed said in How to use different strategic icons:

    @jip what is the status of this now?

    I tried installing "BrewLAN UI Strategic Icon Overhaul Small", which has a load of icons directly inside 'custom-strategic-icons.scd', inside the mod folder, but this doesn't seem to work, I just see the default icons.

    Ah, never mind. I was testing by watching recent replays, and seems like these were from a different patch or something. Running patch 3724 now and seeing different icons with this version..

    posted in Modding & Tools •

    Latest posts made by crispweed

    RE: 100 days of ladder

    @evan_ said in 100 days of ladder:

    How have you guys been finding these reports? Does anyone relate to the issues I am trying to fix with my playstyle? Anyone feel inspired to try and get better with me?

    As someone who has been playing for a long time, but not frequently enough, and without seeing much in the way rating improvement, it is definitely interesting to follow your progress (and motivating for me to try something similar, or at least play ladder a bit more often). Don't give up!

    posted in General Discussion •
    RE: 100 days of ladder

    @evan_ said in 100 days of ladder:

    This leads into the next point. I've uncovered yet another issue of mine that has gone unnoticed until now: Move overriding. I will give a move order to a unit and then give another order to override it. An example of this is when I put an attack order on a lab that had slipped through, only to change it into a move order for some reason, which caused the lab to escape and continue to cause trouble.

    Setting up some hotkeys of the form 'select nearest idle [unit type]' (or similar but adding to existing selection) could perhaps be useful here.

    posted in General Discussion •
    Sound bug, current status?

    I just played a game on ladder where I had that sound problem, where something happens shortly after game start and you lose sounds for some of the game events.

    I think this is an old problem, right, and there were some things to try as workarounds?
    (I seem to remember changing the frequency for a sound device to 22000, or something like that, at one point in the past.)

    In any case this is something I haven't seen in a while.
    I also didn't see any recent forum posts on this.

    What is the current state of the art with respect to this bug, likely causes, and known workarounds?

    posted in FAF support (client and account issues) •
    RE: How to use different strategic icons

    @crispweed said in How to use different strategic icons:

    @jip what is the status of this now?

    I tried installing "BrewLAN UI Strategic Icon Overhaul Small", which has a load of icons directly inside 'custom-strategic-icons.scd', inside the mod folder, but this doesn't seem to work, I just see the default icons.

    Ah, never mind. I was testing by watching recent replays, and seems like these were from a different patch or something. Running patch 3724 now and seeing different icons with this version..

    posted in Modding & Tools •
    RE: How to use different strategic icons

    @jip what is the status of this now?

    I tried installing "BrewLAN UI Strategic Icon Overhaul Small", which has a load of icons directly inside 'custom-strategic-icons.scd', inside the mod folder, but this doesn't seem to work, I just see the default icons.

    posted in Modding & Tools •
    RE: How to detecting when selected units have been given a command? (for incremental selection mod)

    @uveso Looks like this works very nicely. Thank you!

    posted in Modding & Tools •
    How to detecting when selected units have been given a command? (for incremental selection mod)

    So I'm working on a selection helper mod where I want a given hotkey to sometimes add a unit to the current selection, and sometimes start a new selection, depending on context.

    The way I have it set up currently is that, after you made your initial selection, (or add to a selection) it stays in 'incremental selection' mode for a fixed time. So if you press a selection hotkey several times in quick succession you get that many units of that type, but if you wait a certain amount of time before pressing again, it starts a new selection.

    The problem with this is that this depends on the user having some idea of the time that has passed since the last key press, which ends up being not so intuitive (in that it will sometimes not do the selection action that the user wanted).

    What I would really like is for incremental mode to remain in effect until the current selection is given some command, with selection mode then reverting back, such that the next hotkey press after the command is given starts a new selection.

    For this, I need to detect when a command has been given, but I can't see an easy way to this.

    Does anyone here know how this can be done (detecting when selected units have been given a command)?
    Any other ideas?

    posted in Modding & Tools •
    RE: Benchmarking time spent in beat functions, 'avatar update' is very expensive

    @uveso said in Benchmarking time spent in beat functions, 'avatar update' is very expensive:

    @crispweed

    i am hooking the beatfunction destructive because i test the function for a gamepatch.
    I plan to remove the beat throttling completely from the game. ( i can't see any speedimprovements here on my PC)

    OK.

    Got to say I did wonder how useful this throttling actually is.

    I mean, with the way this is setup, it seems like, as more units get created, and the game slows down, the 'throttled' functions are actually going to be run in more game ticks..

    posted in Modding & Tools •
    RE: Benchmarking time spent in beat functions, 'avatar update' is very expensive

    @giebmasse said in Benchmarking time spent in beat functions, 'avatar update' is very expensive:

    Is disabling the avatar updates in anyway noticeable in terms of reduced UI lag or otherwise improved performance?

    So I've had issues with lag in the past that seemed to me to be related to beat functions taking too long. This includes an issue with the UI refusing to accept my commands, in certain situations, as well as more general problems with UI responsiveness. I'm pretty sure that reducing time in beat functions has helped a lot with this problem, for me.

    It's going to depend on the machine you are playing on, and stuff like that, I guess. And just avatar updates by itself may not be an issue, whereas the time spent in this plus time spent in other UI mods may become an issue, depending on what kind of mods you are using..

    posted in Modding & Tools •
    RE: Benchmarking time spent in beat functions, 'avatar update' is very expensive

    @uveso

    If it's just about wanting to prevent your beat function from being skipped, maybe you could just change the following line:

    GameMain.AddBeatFunction(_BeatFunction, true)
    

    to

    GameMain.AddBeatFunction(_BeatFunction)
    

    The point is that the second parameter to GameMain.AddBeatFunction() says whether the beat function you are adding should be throttled, as I understand.

    And then maybe you wouldn't need to destructively hook OnBeat().

    (I haven't read all the code involved though, and I could definitely be misunderstanding the situation.)

    posted in Modding & Tools •