[REL] Reduced Unit Alerts

Discussion in 'Released Mods' started by wondible, October 3, 2018.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Last edited: October 3, 2018
    Quitch, grandhomie and lulamae like this.
  2. grandhomie

    grandhomie Active Member

    Messages:
    173
    Likes Received:
    188
    Thanks, that's a really cool mod, looking forward to trying it. Right now I don't pay any attentions to alerts, I'm amazed when I see people looking at them on twitch.
  3. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    Wondible would you know how to increase the alerts for unit lost?
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Unfortunately that would involve increasing the watch list, which is a global resource that could affect all game notifications and mods using alerts. You could probably compensate for the main game stuff, but tracking down all the mod interactions may be interesting.

    core sets in live_game.js

    Code:
    engine.call('watchlist.setDeathAlertTypes', JSON.stringify(['Factory', 'Commander', 'Recon', 'Important', 'Titan']), JSON.stringify(['Wall']));
  5. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    Ok thank you. I got a mod working which adds notifications for units in the economy subset, so that you know when your fabber/mex/energy plant gets attacked or destroyed. It's for my own use - and doesn't seem to conflict with anything.

    Edit: Conflicts with being able to continue in galactic war.

    Could you remind me with how shadowing works? I shadowed the directory, made a new version of live_game.js, and edited the lines I wanted to edit, but I wasn't sure whether to delete all the lines I didn't edit or whether to include the whole file. I included the whole file and it works, but it might be inefficient?
    Last edited: October 29, 2018
  6. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    That is a very weird bug given the circumstances. I seem to recall some skullduggery with GW changing live game behavior, but I didn't think it was that fragile.

    Only one mod gets to shadow, and it will probably break on game updates - pretty much don't do it.

    Look at almost any UI mod for using "scenes" in the modinfo. That gives you small piece of code in the mod that will run and do just it's little bit, in your case probably just the death alerts call. Might possibly be a timing issue relative to when the game sends it's alert configuration, that could take some extra work.

Share This Page