New Mod: Selection Deprioritizer

Everything about mods can be found here.

Moderator: Morax

Re: New Mod: Selection Deprioritizer

Postby CodingSquirrel » 07 Sep 2019, 22:52

I just uploaded a new version of Selection Deprioritizer (version 5) which should solve the random selection issue. I was getting the same problem, but after a test game with the new version it worked perfectly. I also added for it to not select units who are assisting. This can be disabled with a flag, like the other filters.

I've also created a github repo for it at https://github.com/CodingSquirrel/Selec ... rioritizer
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Mod: Selection Deprioritizer

Postby QuestionMarkNoob » 08 Sep 2019, 22:17

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?
QuestionMarkNoob
Avatar-of-War
 
Posts: 170
Joined: 02 Feb 2018, 15:55
Has liked: 47 times
Been liked: 24 times

Re: New Mod: Selection Deprioritizer

Postby CodingSquirrel » 09 Sep 2019, 01:32

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.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Mod: Selection Deprioritizer

Postby Farmsletje » 20 Nov 2019, 18:43

Would be extremely nice to see an addition of hotkeys to be able to manually switch your unit selection priorities midgame.
FtXCommando wrote:
need to give him some time to blossom into an aids flower
Farmsletje
Contributor
 
Posts: 1099
Joined: 14 Sep 2016, 18:38
Has liked: 368 times
Been liked: 450 times
FAF User Name: Farmsletje

Re: New Mod: Selection Deprioritizer

Postby Myxir » 01 Dec 2019, 12:24

Farmsletje wrote:Would be extremely nice to see an addition of hotkeys to be able to manually switch your unit selection priorities midgame.


Image

since i've not asked whether i can upload this to the vault, the mod is attached here
as usual, place it in C:\Users\%USERNAME%\Documents\My Games\Gas Powered Games\Supreme Commander Forged Alliance\Mods and enable it in the lobby (uuid changed) for it to work

CodingSquirrel wrote:I've also created a github repo for it at https://github.com/CodingSquirrel/Selec ... rioritizer


added a pull request


Edit:
reuploaded the mod and added a new PR, messed some default value up which caused a black screen
Attachments
SelectionDeprioritizer.zip
(62.26 KiB) Downloaded 51 times
Unhappy with balance http://i.imgur.com/q5G2BlM.png
User avatar
Myxir
Evaluator
 
Posts: 790
Joined: 09 Apr 2012, 14:01
Has liked: 94 times
Been liked: 304 times
FAF User Name: Washy (irc)

Re: New Mod: Selection Deprioritizer

Postby Cetea » 05 May 2020, 08:24

I just downloaded the mod provided by Myxir in the above post, and installed it to the correct location. The hotkeys show up when I look for it in the f1 menu, but the mod doesn't work for me when I have a mixture of air, land and navy. The hotkeys don't seem to do anything. However, cloaked selens are not selected when I box an army, and I'm pretty sure that's a feature of this mod? I was wondering if there was anything additional I needed to do to make this work.

EDIT: Just checked on FAF, version 4.1 works as intended (boxing land + air selects only land), but it doesn't do this in version 6.
Cetea
Crusader
 
Posts: 17
Joined: 21 Oct 2014, 06:19
Has liked: 4 times
Been liked: 2 times
FAF User Name: Cetea

Re: New Mod: Selection Deprioritizer

Postby keyser » 05 May 2020, 10:32

"cloaked selens are not selected when I box an army, and I'm pretty sure that's a feature of this mod"
this is in the game, not due to the mod.

just random idea, are you sure you enabled the mod in the lobby ?
Zockyzock:
VoR is the clan of upcoming top players now
keyser
Councillor - Game
 
Posts: 1830
Joined: 17 May 2013, 14:27
Has liked: 420 times
Been liked: 517 times
FAF User Name: keyser

Re: New Mod: Selection Deprioritizer

Postby Cetea » 05 May 2020, 12:58

Okay, thanks for the info about the selens! Yes, the mod is enabled in the lobby, else I wouldn't see the hotkeys in the f1 menu correct? I tried the same thing with v4.1, and that works as expected, but I don't think shift + box disables the mod like it would in v6.
Cetea
Crusader
 
Posts: 17
Joined: 21 Oct 2014, 06:19
Has liked: 4 times
Been liked: 2 times
FAF User Name: Cetea

Re: New Mod: Selection Deprioritizer

Postby R_Charger » 10 May 2020, 20:53

I had what sounds like the same issue as Cetea with Myxirs version above. I had previously had it working fine and it recently stopped working. Enabling it or disabling the mod via the toggle hotkey didn't help, but I went into the hotkey menu and defined a hotkey for the toggle domains option and then activated this on game, and it then started working as normal. Why this suddenly became necessary I don't know but it fixed it for me and I don't have to use an old version with the select everything and auto-lose the game bug...
R_Charger
Avatar-of-War
 
Posts: 133
Joined: 30 Jul 2016, 16:27
Has liked: 9 times
Been liked: 14 times
FAF User Name: Reckless_Charger

Re: New Mod: Selection Deprioritizer

Postby Cetea » 24 May 2020, 18:54

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).
Cetea
Crusader
 
Posts: 17
Joined: 21 Oct 2014, 06:19
Has liked: 4 times
Been liked: 2 times
FAF User Name: Cetea

Previous

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest