EDIT 9/25: minor changes and re-uploading files due to server deleting all files
tl;dr I made it so selection deprioritzer DOES select assisting engies.
- Download Selection Depriotizer from the vault if you don't have it already.
- Download these:
SelectionDeprioritizer.txt
SelectionDeprioritizerConfig.txt - Change extension to .lua (forums only allow uploading as .txt)
- Move to C:\Users[your username]\Documents\My Games\Gas Powered Games\Supreme Commander Forged Alliance\mods\SelectionDeprioritizer\modules
Explanation:
I recently acquired selection deprioritizer. Along with setting a hotkey for "select all fighters," it has made life much, much easier. SDP deselects air when I want to select land only, and I used ctrl+f to select fighters. That was the big thing. It's not an exaggeration to say I have lost games because I couldn't select one or the other fast enough. Stuff happens fast in the heat of the moment.
The smaller changes I'm still getting used to. I like that it auto-deselects assisting shields. Nothing like kiting your ACU only to find you accidentally ordered the assisting shield all the way back to your base, amiright?
I have also deleted the code to deselect exotics, since I prefer to have my snipers, t3 maa, etc. selected in with everything else. Just not having that code in optimizes it, but as a result, there is no on/off switch—it's just always off. Easy enough to add back in, however, if you want it.
So I added a list of engineers to config.lua:
-- Pearl12 9/19/20 don't filter assisting engineers
local engineerIds = {
-- uef
"uel0105", -- t1
"uel0208", -- t2
"xel0209", -- sparky
"uel0309", -- t3
--cybran
"url0105", -- t1
"url0208", -- t2
"url0309", -- t3
--aeon
"ual0105", -- t1
"ual0208", -- t2
"ual0309", -- t3
--seraphim
"xsl0105", --t1
"xsl0208", --t2
"xsl0309", --t3
}
and I changed the base lua's filterToNonAssisters function to always include engineers, regardless of whether they are assisting (see if isEngineer additions):
function filterToNonAssisters(selection)
local changed = false
local filtered = {}
-- if its a double click on an assister, select all fellow assisters
if isDoubleclick(selection) and dblClickUnit:GetGuardedEntity() then
for index, unit in selection do
if isEngineer(unit) then
table.insert(filtered,unit)
else
local isSame = unit:GetGuardedEntity() == dblClickUnit:GetGuardedEntity()
if isSame then
table.insert(filtered,unit)
else
changed = true
end
end
end
else
if selection and table.getn(selection) > 1 then
local guardedUnit = selection[1]:GetGuardedEntity()
local allSame = true
for index, unit in selection do
if isEngineer(unit) then
table.insert(filtered,unit)
else
if unit:GetGuardedEntity() then
if unit:GetGuardedEntity() != guardedUnit then
allSame = false
end
changed = true
else
allSame = false
table.insert(filtered,unit)
end
end
end
if allSame then
changed = false
end
end
end
if changed then
return filtered, changed
else
return selection, false
end
end
(in addition to minor changes elsewhere such as variable initialization)
I'm open to criticism about whether there is a more efficient way to do it. Obviously this way it's hard-coded and not configurable when playing; that's okay, since it's just my version of the mod that is this way.
Otherwise, for anybody else who might want it, enjoy.