What does it do? mAdvancedSelect provides a set of hotkeys for working with unit selections in the heat of battle. Compatibility(last checked): Gamma v 63180 Features: 1. Orbital Unit Selection! 2. Given a Selection of Units allows to sub-select Land/Air/Naval/Orbital, if no units are selected it will simply select all Land/Air/Naval/Orbital units on screen, so no hotkeys are wasted. 3. If a Selection is filtered by mAdvancedSelect, it preserves the original selection so you can switch around in your active selection with a simple key-press. 4. Also works for fabbers and factories! Example: You have panic-dragged a big ball of units and attack-move. You decide you want all the air units to perform a different maneuver or save them from flying in ahead to get butchered. You press the hotkey for "Select Air" and all the air units in your selection get selected, so you order them to take a longer route. Now you want to get back to moving the other units in your deathball, so you hit the "Select Excluded" key and your original deathball is selected again - you hit "Select Land" and now you can move your Land Units. I.e.: no more frantic dragging or clicking to filter out special units! Combine this mod with hotbuild2 and its unit selection keys and you can easily micro groups of units without having to painfully organize Selection Groups! Installation: Get it off the PA Mod Manager. You will also need the mEventHandler Mod (Automatically added if by PAMM, Links below). You can set up the hotkeys in your keyboard settings section. You should replace Select All X Units on Screen with the respective keybinds under mAdvancedSelect. I suggest the following setup: CTRL+SHIFT+A : All units on screen CTRL+A: Select Air CTRL+S: Select Naval CTRL+D: Select Land CTRL+Q: Recall Select Github URL: https://github.com/Mauru/mAdvancedSelect Note: This mode requires mEventHandler to work: https://forums.uberent.com/threads/rel-wip-reventhandler-a-pa-engine-process-event-framework.57858/
Does this always select ahh the units of sleted type on your screen or can i click shift, drag a box and then have only ground/air/orbital/naval units selected?
I believe these keys are for narrowing an existing selection. Say you select some planes and tanks, you then press CTRL-D and it changes the selection to the tanks only.
elmauru: Great stuff. I needed the user rectangle selection be remembered and being based off that when pressing "air", "land", etc. keys, without using "recall key", until another rectangle selection takes place. So I've modded your mod: Add this to C:\Users\<yourname>\AppData\Local\Uber Entertainment\Planetary Annihilation\mods\mAdvancedSelect\ui\mods\mAdvancedSelect\mAdvancedSelect_live.js: Code: //reference: ui/main/game/live_game/live_game.js //HOOK into model.playSelectionSound, so we can react to the call to holodeck.endDragSelect var oldPlaySelectionSound_tew3tg4r45y983 = model.playSelectionSound; model.playSelectionSound = function() { oldPlaySelectionSound_tew3tg4r45y983.apply(this, arguments); //user made rectancle select, store it in group 99 api.select.captureGroup(99); } Add/change this in C:\Users\<yourname>\AppData\Local\Uber Entertainment\Planetary Annihilation\mods\mAdvancedSelect\ui\mods\mAdvancedSelect\mAdvancedSelect.js: Code: // given a selectionList-array, return the array without _type this.filter_apply_exclude2= function(excludePath, typeArr) { var typeArrWithoutExcludePath= []; for(i in typeArr) { if(typeArr.indexOf('units/'+excludePath+'/') === -1) { typeArrWithoutExcludePath.push(typeArr); } } return(typeArrWithoutExcludePath); } // filter the active selection this.filter_select=function(_type){ //restore previous rectangle select api.select.recallGroup(99); setTimeout(function() { //model = LiveGameViewModel var selectionViewModel= model.selectionModel(); //types = ["/pa/units/air/air_scout/air_scout.json", "/pa/units/air/bomber/bomber.json", "/pa/units/air/fighter/fighter.json"] var types= selectionViewModel.types(); //unselect all units not of wanted _type model.holodeck.view.selectByTypes("remove", COBJ.filter_apply_exclude2(_type, types)); }, 100); }; Are there any more elegant ways how to hook model.playSelectionSound ? Can I subscribe some kind of listener to the recallGroup(99) call, so I don't have to use setTimeout ?
Take a look at the eventHandler class and how this mod handles orbital selection filters - that should point you into the righ direction. I will eventually add more detailed selection types or the ability to customize the filters but hotbuild does this allready in a way and i didn't see much use for it yet.
One thing I'm curious about - can you mod a way to alter what gets selected in the first place when you drag a selection box or use left-click? For example, say you wanted to select three bot factories in the middle of a group of units - could you alter drag-select to ignore the units and select the buildings? (double clicking a bot factory wouldn't work, since that would select every bot factory nearby)
I'm thinking this might be bugged in the current 68331 build. That or the Process-Event-Handler Framework I get an odd bug when I press enter or shift-enter to chat - the chat box stays open and the camera locks and during this you can't control anything. The only option is to ALT+F4. The mod wasn't working for me anyway so I'm thinking this is generally our of date, though I like the idea for quick tactical reactions during a fight. Disabling the mod caused the bug to not occur any longer.
unfortunately i don't have the time to look at this right now, but it sounds like uber did some changes to event handling
Hope you get the time to look into getting this to work again. This was really helpful in my opinion. They should definitely incorporate various selection features like this into the game.
I've been playing a lot the last few days and I really really want this mod back The amount of time I spend manually filtering my selections is astonishing. I offer virtual cookies!
Does this do the same function - https://forums.uberent.com/threads/rel-pamm-hotbuild2-v1-37-74525.54561/page-39#post-1033547