Page MenuHomeWildfire Games

Use victory conditions json's in Atlas
Needs ReviewPublic

Authored by Stan on Oct 27 2019, 4:11 PM.

Details

Reviewers
Angen
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#5068
Summary

See #5068

TODO:
Help me fix the warning
2>source\third_party\jsonspirit\json_spirit_value.h(586): warning C4505: 'json_spirit::value_type_to_string': unreferenced local function has been removed (compiling source file ..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Sections\Map\Map.cpp)

Test Plan

Open atlas

  • Try saving a map and loading it and make sure the checkboxes of the gamemodes are chacked
  • Make sure they follow the previous naming conventions
  • Make sure it works for all mods
  • Add a new gamemode, make sure it appears in atlas without needing to recompile.

Diff Detail

Event Timeline

Stan created this revision.Oct 27 2019, 4:11 PM
Stan updated the Trac tickets for this revision.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/489/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/Simulation2.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/Simulation2.h
|  47| class·CSimulation2
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCSimulation2{' is invalid C code. Use --std or --language to configure the language.

source/tools/atlas/GameInterface/Messages.h
|  25| #include·<vector>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'namespaceAtlasMessage{' is invalid C code. Use --std or --language to configure the language.

source/tools/atlas/GameInterface/Messages.h
| 211| »   »   );
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp
|   1| /*·Copyright·(C)·2011·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2011"

source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp
| 211| The line belonging to the following result cannot be printed because it refers to a line that doesn't seem to exist in the given file.
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp
| 211| »   CMapWriter·writer;
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1004/display/redirect

Angen added a reviewer: Angen.Tue, Nov 26, 8:07 AM
Angen requested changes to this revision.Sun, Dec 1, 11:52 AM

It works nice, but there is problem aside small styling.

Conquest inserts both structures and units victory scripts and that is reason why there have been OnConquestChanged.

What you could do to solve that more generally is to parse victory data and create some sort of map where would be condition as a key and list of other conditions that needs to be disabled as value.

source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp
367–370

pls new line above

372

keep new empty line

source/tools/atlas/GameInterface/Handlers/PlayerHandlers.cpp
42 ↗(On Diff #10210)

dont remove this

source/tools/atlas/GameInterface/Messages.h
230

spaces like above

This revision now requires changes to proceed.Sun, Dec 1, 11:52 AM
Stan updated this revision to Diff 10460.Mon, Dec 2, 12:22 PM
Stan marked 4 inline comments as done.

Fix styling issues, and read the data in the json file to know what to disable enable depending on what's on.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/671/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1187/display/redirect