Page MenuHomeWildfire Games

Make rallypoints moddable.
Needs ReviewPublic

Authored by Stan on Jan 6 2020, 6:20 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Summary

Currently when using mods dependant on others, if you have various factions with rallypoints you always need the top mod to have a file called binaries/data/mods/{topmod}/art/actors/props/special/common/waypoint_flag.xml that contains all the rally points of all the factions included in that meta mod. This is annoying.

This patch removes the need by allowing {civ} tags inside rallypoints and defining the flags in templates rather than in the actors.

Test Plan

Make sure the {civ} replacement works.
Make sure one can add flags easily without dependency.
Make sure the flag colors are good and updated correctly
Make sure the flag civ are good and updated correctly
Make sure checkrefs.pl now detects correctly the {civ} replacement;

Agree with the change.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Vulcan added a comment.Jan 6 2020, 6:23 PM

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

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

Vulcan added a comment.Jan 6 2020, 6:25 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/60/display/redirect

Vulcan added a comment.Jan 6 2020, 6:29 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

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

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpVisualActor.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

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

Nescio added a subscriber: Nescio.Jan 7 2020, 4:01 PM
Nescio added inline comments.
binaries/data/mods/public/simulation/templates/special/rallypoint.xml
7

Why not {civ}_waypoint_flag?

Stan updated this revision to Diff 10911.Jan 7 2020, 5:38 PM

Working version!

Vulcan added a comment.Jan 7 2020, 5:39 PM

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

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

Vulcan added a comment.Jan 7 2020, 6:02 PM

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

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

Vulcan added a comment.Jan 7 2020, 6:29 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/67/display/redirect

Stan added inline comments.Jan 7 2020, 9:26 PM
binaries/data/mods/public/simulation/templates/special/rallypoint.xml
7

No reason. Do you think it's better?

Nescio added inline comments.Jan 9 2020, 2:40 PM
binaries/data/mods/public/simulation/templates/special/rallypoint.xml
7

Templates tend to start with the {civ}_ tag, e.g. athen_barracks.xml, as do unit icons, e.g. athen_champion_infantry.png, and actors are also grouped by their civilization.
I've no strong opinions on it, though, I was just asking out of curiosity. The organization of the art files is your domain.

Stan added inline comments.Jan 9 2020, 2:42 PM
binaries/data/mods/public/simulation/templates/special/rallypoint.xml
7

There is another flag called waypoint_flag_0ad so I wasn't sure. The naming conventions should prevail here.

Stan updated this revision to Diff 10943.Jan 9 2020, 2:51 PM

Fix useless prefix in CCmpVisualActor

Vulcan added a comment.Jan 9 2020, 2:54 PM

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

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

Vulcan added a comment.Jan 9 2020, 2:56 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/86/display/redirect

Vulcan added a comment.Jan 9 2020, 2:57 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

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

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpVisualActor.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/CCmpRallyPointRenderer.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

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

Stan updated this revision to Diff 10944.Jan 9 2020, 3:28 PM

Fix checkrefs.pl warnings.

Vulcan added a comment.Jan 9 2020, 3:30 PM

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

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

Vulcan added a comment.Jan 9 2020, 3:32 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/87/display/redirect

Vulcan added a comment.Jan 9 2020, 3:33 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

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

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpVisualActor.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/CCmpRallyPointRenderer.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

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

Stan updated this revision to Diff 10945.Jan 9 2020, 3:41 PM

Fix headers

Vulcan added a comment.Jan 9 2020, 3:43 PM

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

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

Vulcan added a comment.Jan 9 2020, 3:45 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/88/display/redirect

Vulcan added a comment.Jan 9 2020, 3:45 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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

Stan updated this revision to Diff 10961.Jan 10 2020, 4:59 PM

Use boost instead

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

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

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/95/display/redirect

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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

Stan updated this revision to Diff 10962.Jan 10 2020, 5:05 PM

Use it for RallyPoint too

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

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

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/96/display/redirect

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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

Nescio removed a subscriber: Nescio.Jan 10 2020, 6:20 PM
Stan updated this revision to Diff 10998.Jan 13 2020, 12:34 PM

Use the owner instead of the identity to pick the rally point template

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/120/display/redirect

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

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

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

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

Stan updated this revision to Diff 10999.Jan 13 2020, 12:45 PM

Fix copypasta

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/121/display/redirect

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

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

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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

Stan edited the summary of this revision. (Show Details)Mar 24 2020, 8:47 AM
Stan edited the test plan for this revision. (Show Details)
Stan added reviewers: Restricted Owners Package, Restricted Owners Package.

Regarding boost: https://code.wildfiregames.com/D1955?id=9184#inline-42118.
But I've got no clue about the reasoning ;) @elexis?

Stan updated this revision to Diff 11533.Mar 24 2020, 12:23 PM

Change name from waypoint_flag_{civ} to {civ}_waypoint_flag

Use a variant to remove duplication

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

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

Stan marked 2 inline comments as done.Mar 24 2020, 12:25 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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

bb added a subscriber: bb.May 1 2020, 6:00 PM
bb added inline comments.
binaries/data/mods/public/art/actors/props/special/common/ptol_waypoint_sele.xml
1 ↗(On Diff #11533)

Name?

binaries/data/mods/public/art/actors/props/special/common/waypoint_flag_gaul.xml
2

Name appears wrong

source/simulation2/components/CCmpRallyPointRenderer.cpp
272–279 ↗(On Diff #11533)

Seems like we request the same component twice here

source/simulation2/components/CCmpVisualActor.cpp
579

So in this case all phenotypes will stay? sounds like trouble

580

So captured entities will show the old-civs actor, is that intended? (could be dunno)

If I understand the checkrefs script well, then this else block should never do something right?

Stan added inline comments.May 1 2020, 6:20 PM
source/simulation2/components/CCmpRallyPointRenderer.cpp
272–279 ↗(On Diff #11533)

What do you mean?

source/simulation2/components/CCmpVisualActor.cpp
579

No identity no phenotype?

580

I guess I need to do that on ownership changed too then.

Stan updated this revision to Diff 11762.May 1 2020, 6:26 PM

Fix file names

bb added inline comments.May 1 2020, 6:27 PM
source/simulation2/components/CCmpRallyPointRenderer.cpp
272–279 ↗(On Diff #11533)

compare L273 with L232

source/simulation2/components/CCmpVisualActor.cpp
580

that too, but if the ent has an identity component, this code will not be executed...

Stan updated this revision to Diff 11764.May 1 2020, 7:08 PM
Stan marked 5 inline comments as done.

Optimize cmpownership by only getting it once

Vulcan added a comment.May 1 2020, 7:58 PM

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

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

Vulcan added a comment.May 1 2020, 8:14 PM

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

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

Vulcan added a comment.May 1 2020, 8:20 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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