Forged Alliance Forever Forged Alliance Forever Forums 2016-10-12T10:50:07+02:00 /feed.php?f=3&t=13252 2016-10-12T10:50:07+02:00 2016-10-12T10:50:07+02:00 /viewtopic.php?t=13252&p=137083#p137083 <![CDATA[Re: Default values of mod settings not respected]]> Statistics: Posted by EntropyWins — 12 Oct 2016, 10:50


]]>
2016-10-07T22:30:42+02:00 2016-10-07T22:30:42+02:00 /viewtopic.php?t=13252&p=136846#p136846 <![CDATA[Re: Default values of mod settings not respected]]>
EntropyWins wrote:
@KeyBlue: the workaround you describe could work yes, though I really rather avoid it.


Do you mean the little code snippet I posted?
Code:
opt_AutoReclaim = ScenarioInfo.Options.opt_AutoReclaim or [default value]


The original map that you linked uses the same workaround though.
See here: https://github.com/JeroenDeDauw/FinalRu ... pt.lua#L92
all those if's do the same thing as i described.

Statistics: Posted by KeyBlue — 07 Oct 2016, 22:30


]]>
2016-10-07T20:43:23+02:00 2016-10-07T20:43:23+02:00 /viewtopic.php?t=13252&p=136839#p136839 <![CDATA[Re: Default values of mod settings not respected]]>
Uveso wrote:
I have already a clue what happens there. I guess we have fixed this in the next patch.


Great, let's hope that is the case. Any idea when it will be rolled out?

@KeyBlue: the workaround you describe could work yes, though I really rather avoid it.

Uveso wrote:
Well, i tryed to debug the map, but it has to many errors for a short view. (tryed version 0007)


Yeah I know... the reason I noticed the issue reported here is because I'm working on a new version of the map that is not as broken: https://github.com/JeroenDeDauw/FinalRushPro5

Statistics: Posted by EntropyWins — 07 Oct 2016, 20:43


]]>
2016-10-04T17:39:32+02:00 2016-10-04T17:39:32+02:00 /viewtopic.php?t=13252&p=136669#p136669 <![CDATA[Re: Default values of mod settings not respected]]>
Uveso wrote:
@KeyBlue:

and how you explain this:

EntropyWins wrote:If I put the default to 6, I the lobby will show the 40% option.


The default value works with number 6 but not with number 7.


You explained this already, no?
The default is matched with the index, so default = 6 for 40% and default = 7 for 50% (this works according to his posts)

Reading the entire thread again:
In both cases (6 and 7) he encountered the problem i explained.
In both cases the lobby showed the correct default option. (resp. 40% and 50%)

So default doesn't work with neither 6 and 7.

Statistics: Posted by KeyBlue — 04 Oct 2016, 17:39


]]>
2016-10-04T16:16:51+02:00 2016-10-04T16:16:51+02:00 /viewtopic.php?t=13252&p=136665#p136665 <![CDATA[Re: Default values of mod settings not respected]]>
and how you explain this:

EntropyWins wrote:
If I put the default to 6, I the lobby will show the 40% option.


The default value works with number 6 but not with number 7.

Statistics: Posted by Uveso — 04 Oct 2016, 16:16


]]>
2016-10-04T13:31:21+02:00 2016-10-04T13:31:21+02:00 /viewtopic.php?t=13252&p=136660#p136660 <![CDATA[Re: Default values of mod settings not respected]]> In the script this is usually fixed by using something like
Code:
opt_AutoReclaim = ScenarioInfo.Options.opt_AutoReclaim or [default value]


So if you want to adjust the default value of an option, one has to go inside the script and change the default value used there.
So not broken, just stupid.

Statistics: Posted by KeyBlue — 04 Oct 2016, 13:31


]]>
2016-10-03T10:00:47+02:00 2016-10-03T10:00:47+02:00 /viewtopic.php?t=13252&p=136591#p136591 <![CDATA[Re: Default values of mod settings not respected]]>
But now i know, the option array is merged into the normal option array, and the default value is the index of the value array.

So default = 7, is indeed for the last (50%) option line.

This need further investigation.
Can you please post a issue report on Github ?

Name it like "Default game options from Maps are not used ingame"
Write some lines about the problem and maybe set a link to this forum thread.

Link to Github:
https://github.com/FAForever/fa/issues
Klick on the button "New Issue"

I have already a clue what happens there. I guess we have fixed this in the next patch.

Statistics: Posted by Uveso — 03 Oct 2016, 10:00


]]>
2016-10-02T22:35:50+02:00 2016-10-02T22:35:50+02:00 /viewtopic.php?t=13252&p=136563#p136563 <![CDATA[Re: Default values of mod settings not respected]]>
I just verified this again.

Statistics: Posted by EntropyWins — 02 Oct 2016, 22:35


]]>
2016-10-02T22:03:49+02:00 2016-10-02T22:03:49+02:00 /viewtopic.php?t=13252&p=136562#p136562 <![CDATA[Re: Default values of mod settings not respected]]> You don't have a "key = 7"

Your option number seven has the key 6.

So if you want the option "{text = "Auto Reclaim 50 percent", help = "50 percent", key = 6, }," because of key = 6, you must write:

default = 6,

Statistics: Posted by Uveso — 02 Oct 2016, 22:03


]]>
2016-10-02T21:54:33+02:00 2016-10-02T21:54:33+02:00 /viewtopic.php?t=13252&p=136560#p136560 <![CDATA[Default values of mod settings not respected]]>
Code:
   {
      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, },
      },
   },


When I change
Code:
default = 7,
(the index for 50 percent), the lobby shows the 50 percent in the options menu as expected. However, when the game is started, it is not getting key=6. It does when in the option menu I open the dropdown and select (the already selected) default value. That step defeats the purpose of having the default option of course.

Lobby version 3659, no idea how long this has been broken

Statistics: Posted by EntropyWins — 02 Oct 2016, 21:54


]]>