Lobby regression: % in option text

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

Moderator: PhilipJFry

Lobby regression: % in option text

Postby EntropyWins » 02 Oct 2016, 20:37

Options added by mods or maps to the game options with a text label containing a % symbol break the option. Removing the % symbol is a way to work around the issue.

Observed with both Phantom-X (Phantom bonus multiplier) and Final Rush Pro4 4v4 (Auto Relciam) using Lobby version 3659. This is a regression introduced with one of the more recent updates to the lobby, or some other FAF infrastructure.

Example: Final Rush Pro4 4v4 has the following in its _options.lua file:

Code: Select all
   {
      default = 0,
      label = "Auto Reclaim",
      tooltip = "Sets an Auto Reclaim level and turns wreckages off.",
      help = "AutoReclaim.",
      key = 'opt_AutoReclaim',
      pref = 'opt_AutoReclaim',
      values = {
         {text = "Disabled (Wreckages On)", help = "Off", key = 0, },
         {text = "Auto Reclaim 10%", help = "10%", key = 1, },
         {text = "Auto Reclaim 15%", help = "15%", key = 2, },
         {text = "Auto Reclaim 20%", help = "20%", key = 3, },
         {text = "Auto Reclaim 30%", help = "30%", key = 4, },
         {text = "Auto Reclaim 40%", help = "40%", key = 5, },
         {text = "Auto Reclaim 50%", help = "50%", key = 6, },
      },
   },


This does not show up in a working manner in the lobby. Changing it to the following makes it work:

Code: Select all
   {
      default = 0,
      label = "Auto Reclaim",
      help = "AutoReclaim.",
      key = 'opt_AutoReclaim',
      pref = 'opt_AutoReclaim',
      values = {
         {text = "Disabled (Wreckages On)", help = "Off", key = 0, },
         {text = "Auto Reclaim 10 percent", help = "10 percent", key = 1, },
         {text = "Auto Reclaim 15 percent", help = "15 percent", key = 2, },
         {text = "Auto Reclaim 20 percent", help = "20 percent", key = 3, },
         {text = "Auto Reclaim 30 percent", help = "30 percent", key = 4, },
         {text = "Auto Reclaim 40 percent", help = "40 percent", key = 5, },
         {text = "Auto Reclaim 50 percent", help = "50 percent", key = 6, },
      },
   },
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Lobby regression: % in option text

Postby Exotic_Retard » 02 Oct 2016, 20:52

the lobby takes the % symbol as a special character and tries to insert a variable there. you can see this with dynamic lobby options for ai multipliers.

this regression could be because these fields did not contain that functionality in the past, however the specific patch im talking about is reasonable ancient so it might not be it.

this can be fixed by updating the maps/mods to have either proper % variables or putting \ infront of the % to make it work (or what you said)
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Lobby regression: % in option text

Postby EntropyWins » 02 Oct 2016, 21:49

Thanks for the insight. I figured it probably was such a replace operation causing the problem. Presumably it can be made to not fail when the % is not followed by a number (assuming the format is like %1 and %2... I tried finding the relevant code on GitHub but was unable to)?

Anyway, would be cool to not break major mods such as Phantom-X and then leave them be broken for months.
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Lobby regression: % in option text

Postby EntropyWins » 07 Oct 2016, 20:36

EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Lobby regression: % in option text

Postby Vanguard » 12 Oct 2016, 16:58

Possible as in untested? How about we test it and see if it actually DOES fix stuff? Hit me in FAF lobby if I don´t respond in skype.
Vanguard
Avatar-of-War
 
Posts: 88
Joined: 05 Apr 2016, 13:45
Has liked: 15 times
Been liked: 11 times
FAF User Name: Vanguard

Re: Lobby regression: % in option text

Postby EntropyWins » 29 Oct 2016, 01:08

I don't know how to test this as I do not know where FAF is putting this code on my PC, and hence cannot modify it there.
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Lobby regression: % in option text

Postby Exotic_Retard » 29 Oct 2016, 01:44

User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Lobby regression: % in option text

Postby EntropyWins » 29 Nov 2016, 23:54

This is not very serious... Phantom-X is one of the most popular game modes, a significant regression to it does not get fixed in months, and then when a PR is submitted, it is just left sitting there. Looking at https://github.com/FAForever/faf-phantomx/issues/12 and https://github.com/FAForever/faf-phantomx/pull/11, the situation is only getting worse :(
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Re: Lobby regression: % in option text

Postby Exotic_Retard » 30 Nov 2016, 00:03

such is faf.

6 months is totally legit for prs sometimes so eh.

pm people to merge it? dunno.
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Lobby regression: % in option text

Postby EntropyWins » 30 Nov 2016, 00:13

Who would you recommend pinging? (I'm bitching in this thread now in the hope the relevant people see it.) The only one that has commits in this repo is Duck42, the original author of the mod. Not sure if this person plays FAF, certainly not in the lobby at present.
EntropyWins
Avatar-of-War
 
Posts: 113
Joined: 02 Oct 2016, 20:26
Has liked: 18 times
Been liked: 4 times
FAF User Name: EntropyWins

Next

Return to Tech Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest