Page 1 of 1

MapOptions. GameSpeed. In yaml file.

Posted: Thu Aug 06, 2020 12:46 pm
by Adrian
I read documentation here.
https://github.com/OpenRA/OpenRA/wiki/Map-Options

And I try to set GameSpeed (from the example below). But it does not work for some reason. Do I write something wrong?

* * *

Example from documentation.

AVAILABLE OPTIONS

Code: Select all

Rules: 
	World:
		MapOptions:
			TechLevelDropdownLocked: true
			TechLevel: unrestricted
			# other options are infonly, low, medium, nosuper (d2k also has: high)
			ShortGameCheckboxEnabled: true
			ShortGameCheckboxLocked: true
			GameSpeedDropdownLocked: true
			GameSpeed: default
			# other options are slower, fast, faster, fastest
My code from map.yaml file

Code: Select all

Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
	World:
		MapOptions:
			GameSpeed: slower
* * *

I also tried to write GameSpeed in the file rules.yaml. To add it in ready (existing) division "MapOptions". It does not work too.

Code: Select all

	MapOptions:
		TechLevel: medium
		GameSpeeds: slower
* * *

Button "Difficulty" works.

At the same time, I change easily default value of dropdown button "Difficulty". In the file rules.yaml.
From "Easy" to "Normal". The button appears in the menu "Missions".

Dropdown button "GameSpeed" is in the same menu "Missions" too.

Correct code for "Difficulty" :

Code: Select all

	ScriptLobbyDropdown@difficulty:
		ID: difficulty
		Label: Difficulty
		Values:
			easy: Easy
			normal: Normal
			hard: Hard
		Default: normal
In order of appearance. :-)

Actually I set default value for "Difficulty" first. For my map. It was not difficult :-)
Then, I supposed, it would be so easy for "GameSpeed" too. No... not for me.

Re: MapOptions. GameSpeed. In yaml file.

Posted: Thu Aug 06, 2020 2:16 pm
by abcdefg30
You wrote "GameSpeeds: slower" in your post once, should make sure it is just "GameSpeed: slower". I'd also add "GameSpeedDropdownLocked: true" which will lock the setting but show you if it worked at all, because sometimes non-locked map defaults are just overwritten by the game while changing the selected map.

Re: MapOptions. GameSpeed. In yaml file.

Posted: Thu Aug 06, 2020 2:49 pm
by Adrian
Unfortunately nothing changes in (Singleplayer -> Missions) dropdown button "GameSpeed".
Default value is still "Normal".

I try to do:

1)
In the file map.yaml

Code: Select all

Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
	World:
		MapOptions:
			GameSpeedDropdownLocked: true
			GameSpeed: slower
2)
In the file rules.yaml

Code: Select all

MapOptions:
		TechLevel: low
		# added to existing code
		GameSpeedDropdownLocked: true
		GameSpeed: fast

Re: MapOptions. GameSpeed. In yaml file.

Posted: Thu Aug 06, 2020 3:22 pm
by Adrian
I even try to make something similar to "Difficulty" dropdown button in the file rules.yaml.
Nothing changes.

Code: Select all

	ScriptLobbyDropdown@gamespeed:
		ID: gamespeed
		Label: Gamespeed
		Values:
			slower: Slower	
			normal: Normal
			fast: Fast
			faster: Faster
			fastest: Fastest
		Default: fast
Another question.
Is it possible, in general, in Dune2000 ? I mean, to create own dropdown menu and checkboxes, as documentation writes.
https://github.com/OpenRA/OpenRA/wiki/Map-Options
ScriptLobbyDropdown@Your_custom_dropdown:

LobbyPrerequisiteCheckbox@Your_custom_checkbox:

Re: MapOptions. GameSpeed. In yaml file.

Posted: Thu Aug 06, 2020 4:15 pm
by SirCake
Adrian wrote:
Thu Aug 06, 2020 3:22 pm
Another question.
Is it possible, in general, in Dune2000 ? I mean, to create own dropdown menu and checkboxes, as documentation writes.
https://github.com/OpenRA/OpenRA/wiki/Map-Options
Yes. Just checked that it is working indeeed like shown in the documentation:

Re: MapOptions. GameSpeed. In yaml file.

Posted: Thu Aug 06, 2020 4:42 pm
by Adrian
Thank you very much, SirCake!
(your answers are really very informative, and I can understand how exactly it works)
So, at least, it works in "Skirmish Game".

It's still interesting, how to reach default value (for own separate map) here:
Singleplayer -> Missions -> dropdown button "Speed".

It was so easy for dropdown button "Difficulty".

Re: MapOptions. GameSpeed. In yaml file.

Posted: Fri Aug 07, 2020 10:54 am
by abcdefg30
The MapOptions thing is definitely a bug, I filed a bug report: OpenRA/OpenRA#18497