Bug; Toggle All Unit Abilities Hotkey [SOLVED]

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Bug; Toggle All Unit Abilities Hotkey

Postby Stealth » 28 Jul 2020, 15:20

Hi,

I seem to be unable to use hotkeys for any 'toggle' function. I have tried to search for other people experiencing the same problem and have found one post on this forum (unsolved) that seems to revolve around the same issue /viewtopic.php?f=3&t=17228&p=171986&hilit=bug+toggle+abilities#p171986 .

All orders, selection, hotbuild etc. hotkeys work as expected except for a few which i will list in part here:

- toggle all unit abilities (& similar 'toggle' functions)
- factory infinite repeat toggle

sidenote: I am able to turn infinite build on by using the 'stop all orders' command however, I am not able to turn it off after.

I have tried a lot of different combinations to make sure it was not the key itself, none of them worked.
I did a test match earlier today, you can follow the chat where I describe my actions. All mods are disabled.

Match ID : 12269341

I attached the logs of this game and the client log. I would really appreciate it if someone could take a look at this because it is frustrating.

The following line is present in my game.prefs: ['Ctrl-Tab'] = 'toggle_all'.

thank you for your attention,

EDIT: just to get ahead, I have seen this post /viewtopic.php?f=3&t=12321&p=125855&hilit=bug+toggle+abilities#p125855. Although the first issue seems similar, the problem I am experiencing is not due to lag or delay. It simply doesn't function at all.
Attachments
28-7-ToggleAllAbilitiesTEST-downlords-faf-clientLOG.txt
Client Log 12269341
(112.78 KiB) Downloaded 4 times
28-7-ToggleAllAbilitiesTEST-GAMELOG.txt
Gamelog 12269341
(105.87 KiB) Downloaded 5 times
Stealth
 
Posts: 3
Joined: 28 Jul 2020, 10:49
Has liked: 0 time
Been liked: 0 time
FAF User Name: Burial

Re: Bug; Toggle All Unit Abilities Hotkey

Postby Uveso » 28 Jul 2020, 16:54

Hello Stealth,

i checked the function and its working.

I assigned the toogle all function to the [CTRL]+[TAB] key:
game.prefs:
Code: Select all
['Ctrl-Tab'] = 'toggle_all',


This function will call this keyaction:
Code: Select all
['toggle_all'] = {action = 'UI_Lua import("/lua/keymap/misckeyactions.lua").toggleAllScript()',
Code inside keyactions.lua:
https://github.com/FAForever/fa/blob/develop/lua/keymap/keyactions.lua#L316


This keyaction will call the function toggleAllScript() inside the file misckeyactions.lua
Code:
https://github.com/FAForever/fa/blob/develop/lua/keymap/misckeyactions.lua#L76

I build a tech2 shield, massextractor and a masscreator. Selected them all, pressed [CTRL]+[TAB] and the toogle works.

The keypress has a output to the game.log.
So every time you are pressing the [CTRL]+[TAB] keys, this debugline should show up:
Code: Select all
info: UI_Lua import("/lua/keymap/misckeyactions.lua").toggleAllScript()
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Bug; Toggle All Unit Abilities Hotkey

Postby Stealth » 28 Jul 2020, 19:26

Hi Uveso,

I looked at the files and I indeed found those lines were present in both keyactions.lua & misckeyaction.lua.
If you take a look at my gamelog you can see that debugline show up however, it does not translate to any actions in-game.

Are there other things I should try?
Stealth
 
Posts: 3
Joined: 28 Jul 2020, 10:49
Has liked: 0 time
Been liked: 0 time
FAF User Name: Burial

Re: Bug; Toggle All Unit Abilities Hotkey

Postby R_Charger » 28 Jul 2020, 20:08

Have you checked your preferences file to see if there are any errors or duplicated actions in it?
R_Charger
Avatar-of-War
 
Posts: 141
Joined: 30 Jul 2016, 16:27
Has liked: 9 times
Been liked: 14 times
FAF User Name: Reckless_Charger

Re: Bug; Toggle All Unit Abilities Hotkey  [SOLVED]

Postby Stealth » 29 Jul 2020, 12:54

Hi Charger,

Until now I only briefly looked through the .prefs file. Following your advice I tried to examine the .prefs file in more detail. This led me to find the following:
Userkeyactions all have a dedicated order number. I searched the .prefs file for 'order = 15' (since the 'toggle all unit abilities' order number is 15).

I found out that for orders #1 - #30, two different entries existed. The second order for each respectively, originated from the UI_party mod. The function to split groups and the orders associated with these actions were called upon by using an ordernumber already occupied by the game.

Example of problem:
Code: Select all
['Disable UI-Party'] = {
                    order = 1,
                    action = "UI_Lua import('/mods/UI-Party/modules/UI-Party.lua').ToggleEnabled()",
                    category = 'UI Party'
                },


Conflicting with:
Code: Select all
['toggle_repeat_build'] = {
                    order = 1,
                    action = 'UI_Lua import("/lua/gaz_ui/modules/keymapping.lua").ToggleRepeatBuild()',
                    category = 'orders'
                },


Having first saved my original .prefs I started to rearrange the order numbers for the UI_party actions. I made changes to each order up until number 30.
Possible Solution:
Code: Select all
['Disable UI-Party'] = {
                    order = 501,
                    action = "UI_Lua import('/mods/UI-Party/modules/UI-Party.lua').ToggleEnabled()",
                    category = 'UI Party'
                },


I set up a test match and to my surprise, the 'toggle all unit abilities' hotkey worked. I will have to do some more testing to see if this change will last but for now I am content.
Something that I don't quite understand is why these actions (UI_party) were not removed when I uninstalled all my Supcom & Faf files. I deleted all mods and did not install them until after i did some test matches.
I don't know how the creator of UI_party put these orders in, for some reason they only conflicted on my system and it does not seem to be a common issue, but it could be a good idea to rearrange the orders in the mod to not conflict with original game orders.

Thanks to Uveso & Charger!
glhf
Stealth
 
Posts: 3
Joined: 28 Jul 2020, 10:49
Has liked: 0 time
Been liked: 0 time
FAF User Name: Burial


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest