This mod allows you to select which unit types generate alerts when built (ready), under attack or destroyed. You can select the unit types in the UI tab in settings, hold down shift/control to select multiple types. With "Mobile" Ready Alerts selected: (Note: Under attack alerts trigger while the unit is under construction). Installation Current build: 58772 (version 1.0.0) Requires the Settings Manager mod (v1.2.0+) Ensure you update Settings Manager if you are using v1.1.1 or earlier. Step 1: Install the PA Mod Manager: https://forums.uberent.com/threads/rel-ui-mod-manager-v1-2.50726/ Step 2: Launch the Mod Manager and click Install next to "Alerts Filter" on the "Available Mods" page. Step 3: Tick the box for "Alerts Filter" in the Installed Mods list to enable to mod (Settings Manager will be automatically ticked).
I have not checked the code yet, but this may conflict withn how PA Stats gathers build/destroy events of everything. PA Stats basically calls the methods to ask for nearly all events and does all filtering inside the UI. So it might be that PA Stats either calls those methods after this mod does (resulting in this mod having no effect probably) or the other way around resulting in PA Stats failing to see events it should see.
I safely hooked the processList function: Code: model.unitAlertModel.oldProcessList = model.unitAlertModel.processList; model.unitAlertModel.processList = function (array) { <do non-destructive stuff> model.unitAlertModel.oldProcessList(array); }
That's only a part of the issue. To see some of those events you need to call some engine call to get all alerts. Do you just call it with "everything" or only with some parts? Also it will matter in what order PA Stats and this mod hook into the processList method. PA Stats works like this: 1.) engine.call('watchlist.setCreationAlertTypes', JSON.stringify(['Mobile', 'Structure'])); engine.call('watchlist.setDeathAlertTypes', JSON.stringify(['Mobile', 'Structure'])); 2.) Hook into the processlist and capture all those events. Filter events to recreate the default behavior so the player does not see the alerts. PA Stats basically has an alerts filter implemented in js, it is just not configurable. Your mod calls this: setTimeout(function () { engine.call('watchlist.setCreationAlertTypes', JSON.stringify(settings["rReadyAlerts"])); engine.call('watchlist.setDamageAlertTypes', JSON.stringify(settings["rUnderAttackAlerts"])); engine.call('watchlist.setDeathAlertTypes', JSON.stringify(settings["rDestroyedAlerts"])); }, 1000); So PA Stats wont get the events it wants to get anymore. I have not tested it, but I am pretty sure the result will be that PA Stats only sees the events that are not filtered by your mod. Since PA Stats uses no timeout 1000 but executes those methods earlier your mod will always be last in setting what alerts will be seen. Depending on the load order the filtering by PA Stats will also result in weird behavior of your mod, as it might filter non default events before your mod ever sees them. Can the manager somehow mark mods as conflicting? Otherwise we need to combine the mods. The basic problem is that we both depend on the watchlist.setXAlertTypes. I think I could merge your settings for the types with PA Stats though, should not be much work.
Looks like the UI APIs need some improvement. We need some generic way to subscribe to particular types of events. Something like events.subscribe('StructureCreated', function(event) {...}) which would allow multiple consumers to subscribe to the same events without conflicting with each other. Global variables such as setCreationAlertTypes limit them to only one consumer.
@raevn: I am starting on working to integrate this function into PA Stats + make it disable Alerts Filter.
So PA Stats can now filter by unit types and have inclusions/exclusions for single units. Check out the settings, tab "PA Stats". Note that PA Stats takes care of disabling this Alert Filter mod completely. I would recommend to deinstall it. Also note that you might find this list of unit to type mappings helpful: http://pastebin.com/t0J779n8
Thank you so much now I can use these alerts on OS X.(Raevn a OS X version of the mod manager would be very nice. Yes I know there is a OS X version made by DeathByDenim but its not up to date.)
It's possible to create such a system, but would need Cola's method of alert filtering as a base. DeathByDenim's version is up to date (it uses a different version number, but it's got the same features except for auto updating).
Huh then why can't I see this mod in the available mods? Thats the only reason I assumed the OS X version is not up to date.
You might want to try to hit the "Refresh"-button when you are in the "Available Mods" tab. Both mod managers retrieve the same mod list. It's probably using the cached version. It should refresh automatically every two days, but I should probably drop that and always load the latest version.
Also, endorsed this mod in UI Notifications discussion thread in the main PA forums. Also, the repair/build alerting to "attack" is an unintended hook the developers have. Basically, "changing health" is what alerts, while in actuality it should be lowering health (barring the player understands that reclaiming a living structure is a form of "attacking yourself). The commander mod suffers from this too, it alerts to attack and the bar screams red while the commander is being repaired after taking a nuke like he is just dying (big baby, doesn't like the doctor apparently )
I'm retiring this mod, as @cola_colin has made an excellent, much more general version - https://forums.uberent.com/threads/rel-alertsmanager-58772.55590/