UseMapSettings

From The Battle for Wesnoth Wiki


This page describes the effects and the behaviour of the "Use map settings" button in the multiplayer "Create Game" screen. It is a working paper to explore the current behaviour and define how it should be implemented.


Game parameters affected by the "Use map settings" button

scenario::experience_modifier
scenario::random_start_time
side::team_name
side::fog/shroud
side::gold          (starting gold)
side::income        (modifier for game_config::base_income)
side::village_gold  (default in game_config::village_gold)

The location in front of each setting describes the WML part in which it is set.

Create game screen

Current behaviour (v1.3.6+svn):

If "Use map settings" is checked all UI buttons and sliders are still available to the user. The user can change the values and they will be displayed in the game list in the server lobby. But they will be ignored for the game, if the scenario also contains such settings. This can be quite irritating. The team settings are limited to the teams given by the scenario, but you still can mess up the team assignment of the players.

Proposal:

  • "Use map settings" on ("use settings which the map is originally balanced for")

Use settings specified by the scenario. If a setting is not explicitly specified by the scenario use the game_config or hardcoded defaults. Lock all buttons and sliders in the "Create Game" and "Game Lobby" screen which refer to one of the parameters named above.

  • "Use map settings" off ("allow the host of the game to use customized settings")

Use settings from the scenario (and from defaults if they are not specified). Overrule those parameters which can be modified in the "Create Game" and "Game Lobby" screen by the values set there (with respect to the side::gold_lock and side::income_lock settings).

There will be no mode which allows it to disable all scenario settings. But what are these "all" scenario settings? If they are different for distinct sides (e.g. fog or village gold) I think the scenario creator has a reason to set them differently. So does it make sense to ignore those settings at all?

Game list in the server lobby

Current behaviour (v1.3.6+svn):

The gold per village and the fog/shroud settings are displayed, but maybe wrong if the scenario configuration defines other values and "Use map settings" is on.

Proposal:

  • "Use map settings" on

Read the parameters from the scenario and display them in the lobby list. If a parameter differs between the sides of the scenario mark that parameter as "individual" (any better and shorter name?). Show "Use map settings", of course :).

  • "Use map settings" off

Display the values which are set in the "Create Game" screen.

Personal player preferences, save and load handling

Proposal:

  • If a new scenario is selected and "Use map settings" is on or "Use map settings" is switched from off to on load the parameters from the selected scenario and set all according buttons and sliders to the scenario values and lock them (what to do for parameters which differ between the sides? add a special state to the button/slider? maybe hide it?).
  • If "Use map settings" is switched from on to off leave all values at the scenario settings, only unlock the buttons and sliders (so you can modify single settings of a game without the need to adjust all values).
  • If a new scenario is selected and "Use map settings" is off load the personal settings.
  • Save the personal settings only when a game is started and "Use map settings" is off.


Solutions?

  • Is there a way to specify different defaults for SP and MP mode?
  • Add explicit defaults to the game_config:
fog:                 on
shroud:              off
random_start_time:   on
experience_modifier: 100% for SP, 70% for MP
  • Alternative: Add all recommended settings to all standard MP maps (not the way I would like it because of the high redundancy).

MP Dialog (WIP)

This section describes the way I think the ideal MP dialog should work from an UI perspective. Since I don't have MP experience I haven't taken that in mind, this is meant to be a base for discussion. (I'm aware certain widgets might not exist, but we do have coders here ;-) )

-- SkeletonCrew/Mordante

load game

It would be nice to have a button to load a game instead of having it in the scenario list, it's really hard to find for newbies.

scenario list

The scenario list can be quite long, would it be nice to have an hierarchical list which shows scenarios per category? These categories are stored in the scenarios. This way the list gets shorter and you can faster find the type of map you're looking for. (Of course it would be great to remember which items are unfolded in the preferences.)

map settings vs. side settings

At the moment a part of the side settings (gpv, fog and shroud) are set at the initial create screen. This means if the settings are set here they are set for every side, when the 'use_map_settings' is used it's set for every side, as specified in the scenario.

I'd like to move the side settings to the second screen, where there will be an option to set them for all sides or per side. This way there will also be some more room in the initial screen, since it's quite crowed there.

use_map_settings

I'd like make an new button set_map_setting, which does the same as the 'use_map_settings' but doesn't lock the settings. Also there will be the use map_settings, which sets and locks the map settings. This also means the WML 'locks' can be removed.

IMO use_map_settings should use the map settings, if a setting isn't defined it should use the default setting for this value. This default is hardcoded in the game and seen as a sane default.

Upon toggling the checkbox, the map settings should be used.
Upon untoggling the checkbox, the preferences (or even better the settings before toggling) should be used.

saving of settings

The following rules are applied whether or not to save the settings:

  • When the dialog is closed with cancel, no preferences are saved.
  • When the dialog is closed with ok and use_map_settings in unchecked, all settings are saved.
  • When the dialog is closed with ok and use_map_settings in checked, all settings except those controlled by use_map_settings are saved.
This page was last edited on 28 April 2014, at 22:16.