CodingSquirrel wrote:QuestionMarkNoob wrote:Thank you for fixing the mod, it is one my favorites
Sadly, with assisting units now being deselected, this also means that assisting engies are being deselected as well. I found it very difficult to play with this.
Is it possible to remove this feature for engineers only?
I played a game with it today and have to say I'm not sure whether or not I like the general assist filter. Makes it hard to select some things I want to, like you're finding with the engies. Going to play around with it more before deciding whether I like it for myself. Thankfully if you want the new filter off completely you can set filterAssisters to false in SelectionDeprioritizer.lua
Alternatively if you just want the engies off, you can create a list of blueprints (e.g., excludeBlueprintIds) for things you want to exclude, and edit line 285 to
- Code: Select all
if unit:GetGuardedEntity() and (not arrayContains(excludeBlueprintIds,unit:GetBlueprint().BlueprintId)) then
That should make it so anything on that list won't be filtered out for assisting. You could do a similar check for the double clicked unit above if you don't want that to run on them either.
Newbie to modding here, I assume that the excludeBlueprintIds array should be created in SelectionDeprioritizerConfig.lua, and then the above line of code will work? As for the unit ids, I assume we get them from the cheating menu.
I tried the above line and replaced the filterAssisters boolean, but it just broke the game for me while the mod was enabled (couldn't see build bar). I created a local array of
local excludeBlueprintIds = {
-- all engineers
"ual0105", --aeon t1 engie
"ual0208", --aeon t2 engie
"ual0309", --aeon t3 engie
"uel0105", --uef t1 engie
"uel0208", --uef t2 engie
"uel0309", --uef t3 engie
"url0105", --cybran t1 engie
"url0208", --cybran t2 engie
"url0309", --cybran t3 engie
"xsl0105", --sera t1 engie
"xsl0208", --sera t2 engie
"xsl0309", --sera t3 engie
}
in the SelectionDeprioritizer.lua file, and then replaced the line on line 285 as instructed.
EDIT:
Somehow, I got it working (at least 90%) while debugging it, and I have zero clue as to why it now works:
All I did was change line 285 to:
- Code: Select all
if filterAssisters and false then
while creating the excludeBlueprint array in the config file in the same manner as all the others (which I never call or use anywhere), and somehow it suddenly works.
The above code makes it so that scouts that assist a tank are still not selected when I box them, but idle engies and assisting engies can be boxed together. I assume this is because there is some other code in the mod that uses the filterAssisters variable? (I can't find it in the lua file that I edited however).