Skip to content

Commit

Permalink
feat(start_position_suggestions): Add Start Position Suggestions widg…
Browse files Browse the repository at this point in the history
…et (#3486)

* feat(start_position_suggestions): Add Start Position Suggestions widget

This widget shows start position recommendations, as determined by
expert players. The intent is for these suggestions to be useful for new
players, and players new to the specific map. This should reduce
arguments and upset due to newer players being less familiar with the
metagame.

It reads start position data from the mod option `mapmetadata_startpos`,
encoded through `base64url(zlib(json))`. Each "role" in the data is used
as an i18n key to look up the role title and description.

* feat(start_position_suggestions): Show tutorial message on first run
  • Loading branch information
salinecitrine authored Aug 26, 2024
1 parent bf0020b commit 9f15b98
Show file tree
Hide file tree
Showing 3 changed files with 798 additions and 2 deletions.
55 changes: 53 additions & 2 deletions language/en/interface.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
"sellunit_tooltip": "Toggle currently selected units for sale, allies will be able to buy them",
"For Sale": "For Sale",
"Not For Sale": "Not For Sale",

"Fire at will": "Fire at will",
"Hold fire": "Hold fire",
"Return fire": "Return fire",
Expand Down Expand Up @@ -1626,7 +1626,58 @@
"spectator_hud_config_descr": "Select Spectator HUD mode",
"spectator_hud_config_basic": "Basic",
"spectator_hud_config_advanced": "Advanced",
"spectator_hud_config_expert": "Expert"
"spectator_hud_config_expert": "Expert",
"startpositionsuggestions": "Start Position Suggestions",
"startpositionsuggestions_descr": "Show expert recommended starting locations on the map"
}
},
"startPositionSuggestions": {
"tutorial": "Start positions and roles indicated within the circles are recommendations from expert players. If you're new to the game, or new to this map, these are solid options, but they aren't requirements. \n\nIf you'd like to disable this, check the Settings window for \"Start Position Suggestions\".",
"roles": {
"front": {
"title": "Frontline",
"description": "Build ground units early and bring your commander forward to secure a strong central position, taking metal spots along the way."
},
"tech": {
"title": "Tech",
"description": "Focus on early economy to support building a Tier 2 factory, in order to distribute Tier 2 constructors to the team, and attack with high tier units."
},
"air": {
"title": "Air",
"description": "Scout enemy players, distribute transports to allies, fight for air dominance, bomb enemy bases, and help defend against raids."
},
"sea": {
"title": "Sea",
"description": "Build navy units early and secure a strong position on the map. Later on, consider building amphibious or air units to invade enemies on land."
},
"air/front": {
"title": "Air/Front",
"description": "Scout enemy players, distribute transports to allies, fight for air dominance, bomb enemy bases, and help defend against raids.\n\nand/or\n\nBuild ground units early and bring your commander forward to secure a strong central position, taking metal spots along the way."
},
"air/sea": {
"title": "Air/Sea",
"description": "Scout enemy players, distribute transports to allies, fight for air dominance, bomb enemy bases, and help defend against raids.\n\nand/or\n\nBuild navy units early and secure a strong position on the map. Later on, consider building amphibious or air units to invade enemies on land."
},
"air/tech": {
"title": "Air/Tech",
"description": "Scout enemy players, distribute transports to allies, fight for air dominance, bomb enemy bases, and help defend against raids.\n\nand/or\n\nFocus on early economy to support building a Tier 2 factory, in order to distribute Tier 2 constructors to the team, and attack with high tier units."
},
"front/sea": {
"title": "Front/Sea",
"description": "Build ground units early and bring your commander forward to secure a strong central position, taking metal spots along the way.\n\nand/or\n\nBuild navy units early and secure a strong position on the map. Later on, consider building amphibious or air units to invade enemies on land."
},
"front/tech": {
"title": "Front/Tech",
"description": "Build ground units early and bring your commander forward to secure a strong central position, taking metal spots along the way.\n\nand/or\n\nFocus on early economy to support building a Tier 2 factory, in order to distribute Tier 2 constructors to the team, and attack with high tier units."
},
"sea/tech": {
"title": "Sea/Tech",
"description": "Build navy units early and secure a strong position on the map. Later on, consider building amphibious or air units to invade enemies on land.\n\nand/or\n\nFocus on early economy to support building a Tier 2 factory, in order to distribute Tier 2 constructors to the team, and attack with high tier units."
},
"baseCenter": {
"title": "Base Center",
"description": "Move your commander here shortly after spawning. Build your first factory in this area."
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions luaui/Widgets/gui_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4090,6 +4090,7 @@ function init()
end
end,
},
{ id = "startpositionsuggestions", group = "ui", category = types.basic, widget = "Start Position Suggestions", name = Spring.I18N('ui.settings.option.startpositionsuggestions'), type = "bool", value = GetWidgetToggleValue("Start Position Suggestions"), description = Spring.I18N('ui.settings.option.startpositionsuggestions_descr') },

{ id = "label_ui_ranges", group = "ui", name = Spring.I18N('ui.settings.option.label_ranges'), category = types.basic },
{ id = "label_ui_ranges_spacer", group = "ui", category = types.basic },
Expand Down
Loading

0 comments on commit 9f15b98

Please sign in to comment.