Opened 8 years ago

Last modified 3 years ago

#3013 new enhancement

Gamesetup - Improve match setup support for special (trigger) map

Reported by: fabio Owned by:
Priority: Should Have Milestone: Backlog
Component: UI – Game setup Keywords: patch
Cc: Patch:

Description (last modified by fabio)

Special maps (such as using triggers) should be able to use an improved match setup setting, other than the Scenario currently used.

This is the current match setup when using A Silent Day In Gaul trigger map: https://i.imgur.com/58xMHEx.png

Some suggestions:

  • the user should not be able to change Player Placement ("You" and "AI" type should not be changeable);
  • AI setting (the gear) should be able to be hidden;
  • eventually part or the whole players section, as well as "Number of players" and some options inside "More Options" sub-window, should even be hidden in the setup interface, to avoid spoiling the map (with a trigger map they may don't have a real meaning anyway);
  • DONE in r18179 special maps should have a new category other than "Scenario" (e.g. "Mission", "Special", "Trigger" or something similar);
  • the map should eventually not be selectable in a multiplayer game.

See also #3049.

Attachments (2)

trigger-maps.patch (5.8 KB ) - added by fabio 7 years ago.
"Trigger Maps" map filter
3013.2.diff (5.4 KB ) - added by Stan` 7 years ago.
Rebase of Fabio's patch

Download all attachments as: .zip

Change History (20)

comment:1 by fabio, 8 years ago

Description: modified (diff)

comment:2 by fabio, 8 years ago

Description: modified (diff)
Milestone: BacklogAlpha 19

See also #3049.

comment:3 by mimo, 8 years ago

Milestone: Alpha 19Backlog

Put back in backlog as no activity

comment:4 by fabio, 7 years ago

Keywords: review patch added
Type: defectenhancement

The attached patch add the new map filter "Trigger Maps", along "Naval" and "Demo". It also add the trigger Keyword to trigger maps, as well to the two tutorials that don't use triggers but use a dedicated ai.

https://i.imgur.com/z9Vg9Or.png

by fabio, 7 years ago

Attachment: trigger-maps.patch added

"Trigger Maps" map filter

comment:5 by elexis, 7 years ago

Why do we need all these gamesetup changes? There is no map in vanilla 0 A.D. which requires those change, is there?

With regards to the trigger-maps patch. Why do we need that, can't we just use Demo maps? I'm worried that it might be a bit confusing to have multiple filters for demo-maps. Better keep it simple imo

Scenario maps already are special maps and we definitely need to fix some things in the gamesetup for scenario-maps. Hiding information seems to be plausible.

in reply to:  5 ; comment:6 by fabio, 7 years ago

Replying to elexis:

Why do we need all these gamesetup changes?

As I said in the first post, and mainly to avoid users tampering/seeing settings that should not be changed to avoid ruining the intended play experience. E.g. if you change the AI of the tutorial map to Petra you won't get the tutorial.

There is no map in vanilla 0 A.D. which requires those change, is there?

Yes, there are some maps, see my patch.

With regards to the trigger-maps patch. Why do we need that, can't we just use Demo maps?

Your previous question is an answer to this one... many players are unaware there are such maps. Adding a filter for them make clear their availability.

I'm worried that it might be a bit confusing to have multiple filters for demo-maps. Better keep it simple imo

Some maps already have naval + demo keywords, but I agree that maybe demo map should not be listed also in trigger or naval maps, since demo maps are not intended to be played.

comment:7 by elexis, 7 years ago

Milestone: BacklogAlpha 20

in reply to:  6 comment:8 by elexis, 7 years ago

Keywords: review removed

Replying to fabio:

With regards to the trigger-maps patch. Why do we need that, can't we just use Demo maps?

many players are unaware there are such maps. Adding a filter for them make clear their availability.

Ok, convinced.

Some maps already have naval + demo keywords, but I agree that maybe demo map should not be listed also in trigger or naval maps, since demo maps are not intended to be played.

Nah, its fine. IMO a naval trigger demo map can be listed in all three cases. The logic should be as simple as possible.

I run a grep through all maps and those are indeed all correct changes.

So rebase that gamesetup.js thing and commit it.

comment:9 by Itms, 7 years ago

Milestone: Alpha 20Alpha 21

comment:10 by sanderd17, 7 years ago

Why not just alter the map settings? Currently, these settings are only used as the default, which is not that good. It would be better if the map could force certain settings, or could force settings to be in a certain range.

Leaving a setting undefined would leave the choice to the player over some default values, setting a key to a certain value (like "PopulationLimit": 200) would fix that setting and disable user choice. But setting it to an array (like "PopulationLimit": [50, 100, 200]]) would give the user a choice between these values.

Of course, the GUI should still be simple enough, and the population limit probably should be set per player. So either this should be a global variable, or all arrays of all player settings should be equal in length in this case, and thus allow a "low", "medium" and "high" setting with different max pop per player.

comment:11 by elexis, 7 years ago

Summary: Improve match setup support for special (trigger) mapGamesetup - Improve match setup support for special (trigger) map

Backlogging due to lack of progress.

Last edited 7 years ago by elexis (previous) (diff)

by Stan`, 7 years ago

Attachment: 3013.2.diff added

Rebase of Fabio's patch

comment:12 by Stan`, 7 years ago

Milestone: Alpha 21Backlog

Backlogging effectively since it didn't go to backlog last time.

comment:13 by elexis, 7 years ago

In 18179:

Add maplist filter for maps that come with triggerscripts. Patch by fabio and Stan, refs #3013.

comment:14 by elexis, 7 years ago

  • Thanks for the patch. It should have been rebased and committed 5 months ago by me after I changed the filtercode.
  • There was a missing comma in that object breaking everything
  • Changed the patch to show triggerscript maps by default too.
  • What sanderd17 said -> #3049

comment:15 by elexis, 7 years ago

In 18182:

Remove the trigger keyword from these maps as they either use the Tutorial AI for scripting or use a script only to place entities on load, refs #3013.

comment:16 by fabio, 7 years ago

Description: modified (diff)

comment:17 by Imarok, 4 years ago

Component: UI & SimulationGame setup

Move tickets to Game Setup as UI & Simulation got some sub components.

comment:18 by elexis, 3 years ago

In 23374:

Gamesetup class rewrite, fixes #5322, refs #5387.

  • Decouples settings logically which in turn allows fixing many problems arising from previous coupling.
  • Fixes the persist-match-settings feature, refs #2963, refs #3049.
  • Improves performance of the matchsetup by rebuilding GUI objects only when necessary.

Provides groundwork for:

  • UI to control per-player handicap, such as StartingResources, PopulationCap, StartingTechnologies, DisabledTechnologies, DisabledTemplates, ..., refs #812.
  • Map specific settings (onMapChange event), refs #4838.
  • Chat notifications announcing which settings changed, refs D1195,
  • Multiple controllers setting up the game (since setting types can check for permissions in onUpdateGameAttributes without the need for a new data model or a second gamesetup data network message type), refs #3806, subsequently dedicated server, refs #3556.
  • MapBrowser (MapCache, MapTypes, onUpdateGameAttributes interface), refs D1703 and D1777,
  • Multiplayer saved games (decoupling and setting dependent unique logic), refs #1088.

Refs https://wildfiregames.com/forum/index.php?/topic/20787-paid-development-2016/ https://wildfiregames.com/forum/index.php?/topic/20789-paid-development-2016/

Enable maps to restrict setting values:

  • If a map specifies an AI or Civs for a playerslot, the controller can't assign a player/other AI or Civ to that slot, refs #3049, #3013.

Fix per player StartingResources, PopulationCap, StartingTechnologies, DisabledTechnologies, DisabledTemplates following rP12756, refs #812, fixes #4504. Use this for DisabledTechnologies on Polar Sea.

Persist user settings for Skirmish maps:

  • All user chosen settings are persisted when changing the selected map or maptype, except where the selected map overwrites the setting value and except for Scenario maps which still use the default value where the map doesn't specify the setting value.
  • Tickets relating to that Skirmish mapchange user setting persistance:
    • Selecting a map doesn't change the selected civilizations, fixes #3120 (together with r23279 removing map specified Civs).
    • Selecting a map type doesn't reset the selected settings, fixes #5372.
    • Selecting a map doesn't change the selected victory conditions, unless the map specifies those, refs #4661, #3209. (Atlas still writes VictoryConditions to every map.)
    • Consume the player color palette from Skirmish maps, refs rP17040 / #1580. Preserve the selected playercolors when switching the Skirmish/Random map by chosing the most similar colors if the map comes with a different palette.

Rated games:

  • Hide and disable Rated game setting unless there are exactly two players, fixes #3950, supersedes D2117.
  • Display conspicuous warning if the game is rated, so players are perfectly aware.

Autostarted games:

  • Allow using the gamesetup page to autostart matches with arbitrary maps, not only this one tutorial, as reported in D194 and rP19599, refs D11.

Networking:

  • Keep gamesetup page open after disconnect, allowing players to read chat messages indicating why the host stopped the server, fixes #4114.
  • The message subscription system allows new and mod settings to run custom logic on arbitrary setting changes (most importantly on map change). This removes hardcoded logic restrictions from the gamesetup option unification rewrite in rP19504/D322, refs #3994, such as the hardcoding of setting references in selectMap to biomes from rP20115/D852 and the difficulty from rP20760/D1189, RelicDuration, WonderDuration, LastManStanding, RegicideGarrison, TriggerScripts, CircularMap, Garrison, DisabledTemplates.

Checkboxes:

  • Display values of disabled checkboxes with Yes/No labels, fixes D2349, reviewed by nani.

Clean g_GameAttributes of invalid values and gamesetup GUI temporaries, refs #3049, #3883:

MapCache:

  • Refactor to MapCache class, store maps of all types and use it in the replaymenu, lobby and session as well.

SettingTabsPanel:

  • Remove hardcodings and coupling of the SettingTabsPanel with biomes/difficulties/chat UI from D1027/rP20945.

GamesetupPage.xml:

  • Restructure the page to use hierarchical object organization (topPanel, centerPanel, centerLeftPanel, bottomPanel, centerCenterPanel, centerRightPanel, bottomLeftPanel, bottomRightPanel), allowing to deduplicate object position margins and size math and ease navigation.

New defaults:

  • Check LockedTeams default in multiplayer (not only rated games).
  • Persist the rated game setting instead of defaulting to true when restarting a match, which often lead to unintentional rated games when rehosting.
  • 60 FPS in menus since they are animated

Autocomplete sorting fixed (playernames should be completed first).
Refactoring encompasses the one proposed in Polakrity and bb D1651.

Differential Revision: https://code.wildfiregames.com/D2483
Tested by: nani
Discussed with:

Emojis by: asterix, Imarok, fpre, nani, Krinkle, Stan, Angen, Freagarach

Note: See TracTickets for help on using tickets.