Page 1 of 1

Trouble using 0.* values with bset

Posted: 28 Sep 2016, 06:44
by Forboding Angel
I have a modoption and the possible values are 0 - 1 with a step of 0.1.

Hosting a game myself it works, but trying to give the spads host this command doesn't work:

Image

Code: Select all

[21:37:12] * EvoRTStest1 * Hi [Evo]ForbodingAngel (Above average player), welcome to EvoRTStest1 (SPADS 0.11.39, automated host).
[21:37:12] * EvoRTStest1 * For help, say "!help". Map link: http://spring.jobjol.nl/search_result.php?search=Akilon%20Wastelands%20-%20v18&select=select_all 
[21:37:12] * EvoRTStest1 * If you are new to Evolution RTS, Please check out the wiki for information on how to play: http://www.wiki.evolutionrts.info 
[21:37:12] * EvoRTStest1 *  Join us on Discord at: https://discord.gg/WUbAs2f
[21:37:36] <[Evo]ForbodingAngel> !bset metalperpoint 0.5
[21:37:36] * EvoRTStest1 * Value "0.5" for battle setting "metalperpoint" is not allowed with current mod or battle preset
[21:37:43] <[Evo]ForbodingAngel> !bset metalperpoint "0.5"
[21:37:43] * EvoRTStest1 * Value ""0.5"" for battle setting "metalperpoint" is not allowed with current mod or battle preset
[21:37:47] <[Evo]ForbodingAngel> !bset metalperpoint 1
[21:37:48] * EvoRTStest1 * Battle setting changed by [Evo]ForbodingAngel (metalperpoint=1)
[21:37:51] <[Evo]ForbodingAngel> !bset metalperpoint 5
[21:37:52] * EvoRTStest1 * Value "5" for battle setting "metalperpoint" is not allowed with current mod or battle preset
[21:37:58] <[Evo]ForbodingAngel> !bset metalperpoint .5
[21:37:58] * EvoRTStest1 * Value ".5" for battle setting "metalperpoint" is not allowed with current mod or battle preset
[21:38:12] <[Evo]ForbodingAngel> !bset metalperpoint 0\.5
[21:38:12] * EvoRTStest1 * Value "0\.5" for battle setting "metalperpoint" is not allowed with current mod or battle preset
As you can see I tried a few silly things just to check and see if there was something else going on.

Another thing I tried was a different value:
[21:44:54] <[Evo]ForbodingAngel> !bset decapspeed 0.1
[21:44:54] * EvoRTStest1 * Battle setting changed by [Evo]ForbodingAngel (decapspeed=0.1)

And that works fine. So I'm going to set max value on metalperpoint to 5 and see if that makes it work. Just thought you might want to know there was some weirdness going on.

This is the modoption in question:

Code: Select all

		{
		key    = 'metalperpoint',
		name   = 'Metal given to each player per captured point',
		desc   = 'Each player on an allyteam that has captured a point will receive this amount of resources per point captured per second',
		type   = 'number',
		section= 'controlvictoryoptions',
		def    = 0,
		min    = 0,
		max    = 1,
		step   = 0.1,  -- quantization is aligned to the def value
		-- (step <= 0) means that there is no quantization
	},

Re: Trouble using 0.* values with bset

Posted: 28 Sep 2016, 09:36
by Forboding Angel
I wonder... if my default were 0.0 would it work then?

Re: Trouble using 0.* values with bset

Posted: 28 Sep 2016, 10:29
by bibim
SPADS doesn't use the quantization parameter of map/mod options, instead it relies on the minimum and maximum number format: if at least one of the minimum and maximum values contains a ".", then it will allow decimal values. Otherwise it will only allow integers.

This is not correct, I will update SPADS to fix this.

Re: Trouble using 0.* values with bset

Posted: 28 Sep 2016, 11:14
by Forboding Angel
Ok thanks. So at least I'm not crazy. That's nice to know lol

Re: Trouble using 0.* values with bset

Posted: 09 Oct 2016, 20:01
by bibim
Should be fixed in SPADS >= 0.11.39a