Page MenuHomeWildfire Games

Number of relics Gamesetup option
ClosedPublic

Authored by elexis on May 3 2017, 1:34 PM.

Details

Summary

Currently round((NumPlayers + Gaia) / 2) relics are spawned. It would be nice for the player to specify a custom value for that.
The number should then also be displayed in the objectives dialog.

Test Plan

Start a capture the relic game with 1 and 12 relics set. Resign to count them in the top panel. Open the objectives dialog to verify the number being displayed.
Open Arcadia.xml and replace "conquest" with "capture_the_relic" and ensure that the setting is unavailable in the gamesetup.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.May 3 2017, 1:34 PM
Vulcan added a subscriber: Vulcan.May 3 2017, 5:16 PM

Build has FAILED

Link to build: http://jw:8080/job/phabricator/973/
See console output for more information: http://jw:8080/job/phabricator/973/console

Sandarac accepted this revision.May 5 2017, 4:27 AM

This will be a great option to have for this victory condition! This diff also showcases the ease-of-use of the gamesetup code after the changes in rP19504.

Having the relic count in the objectives menu is also really nice, as before the number of relics that were actually on the map wasn't very clear.

binaries/data/mods/public/gui/common/gamedescription.js
242 ↗(On Diff #1608)

The count won't be updated in-game if relics are deleted, but this isn't supposed to happen anyways (refs D229).

binaries/data/mods/public/simulation/helpers/Setup.js
48 ↗(On Diff #1608)

This if could maybe be moved further down below cmpEndGameManager.SetGameType (it might make more sense this way when reading the file if the game type/victory condition is set first).

This revision is now accepted and ready to land.May 5 2017, 4:27 AM
elexis marked an inline comment as done.May 5 2017, 9:40 PM
elexis added inline comments.
binaries/data/mods/public/gui/common/gamedescription.js
242 ↗(On Diff #1608)

Good point actually.

I still think it should be possible to play D229 with the relic victory condition.

(1) Players have like 25min time to capture the relics, so if the victory duration is < 25min, the mode works already
(2) Players can move the relics to their civic center or the volcano, therefore have even about 50min time to keep all relics
(3) If relics are sunk, the map itself can just display a big chat notification if we wanted that and the number in the objectives can take into account the change (GUI knows about the number in g_PanelEntities f.e.). We could also add a custom GUIInterface notification, so that this chat message will be supported for all maps that run into this unlikely event.
The only use of the warning when relics are deleted is that we have it in the logs and if it is unexpected that they disappear, we can lookup the exact turn on which it happened. If this use case is kept, the map could add a boolean flag in the JSON/XML file relicDeleteWarning, so that we can disable it for extinct volcano or other scenario maps that do trigger scripts that happen to nuke relic entities or come with relic-inheriting templates that actually are destructable.

binaries/data/mods/public/simulation/helpers/Setup.js
48 ↗(On Diff #1608)

below cmpEndGameManager.SetGameType

SetGameType must still be called with gameTypeSettings as an argument to that and we can't inline the object since then the properties are defined, even if they have the value undefined.

Unless we add a separate SetGameTypeSettings function that is, but IMO it seems more coherent to set the settings of the victory condition with the victory condition (This means the EndgameManager will always have the gameTypeSettings that fit to the gameType)

This revision was automatically updated to reflect the committed changes.
elexis marked an inline comment as done.