This patch allows buildings to adapt to their environment by changing variants depending on the biome they are in.
No context until the map is removed from the patch :)
TODO/Need Help: Figure out why skin is incorrect during construction, while preview and final work.
Details
- Reviewers
- None
- Group Reviewers
Restricted Owners Package (Owns No Changed Paths)
Run Alpine valleys as the gauls, notice the houses get snowy
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 21644 Build 52572: Vulcan Build Jenkins Build 52571: Vulcan Build (macOS) Jenkins Build 52570: Vulcan Build (Windows) Jenkins
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/6812/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/8485/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/7898/display/redirect
Can't this be done via shaders? If you need an extra set of textures I'm afraid you'd end up with the demo only just like what happened with the damage textures.
I'd say the cmpVisual should maybe listen to a BiomeChanged message? (Where 'Biome' is maybe not the best word, but looks allright.)
It could. But then we have a strong dependency on the two components, the message is only sent one per match so all subsequent buildings won't be notified.
You have that now as well?
Says who? ;P
I can imagine the weather turns, or the map is large enough to cross biomes.
Yeah, a hard dependency on init then.
I'll have to give it some thought.
binaries/data/mods/public/simulation/templates/special/filter/construction.xml | ||
---|---|---|
8 | BiomeReplacer? |
Not in the moddability sense. That component can be changed after a release. CmpVisual cannot.
There can be only one biome defined says the gamesettings :)
binaries/data/mods/public/simulation/templates/special/filter/construction.xml | ||
---|---|---|
8 | Yeah clearly. Now I wonder if it's why it didn't work when building. Need to check sometimes |
Paraphrased comments from elexis:
There are two problem with the design of this patch:
- biome is a setting / component of random maps - this this patch intermingles the rm component with actor changes that are also present on other maps, which is not great.
- The patch uses the filenames of biomes to decide when to switch the actors/ textures - this is very bad from a mod perspective. E.g. if you want to make your own random map that uses a custom "winter" -like biome you can't easily use this feature. You would have to copy and change all the actors as well, which is major work.
Conclusion: Better to make this a clearly separated component/ mapsetting e.g. mapActorVariant that just matches a generic string instead of a filename. e.g. winter or winterVariant. Then a modder can just use that string in the map setting to get the benefits and doesn't have to copy + change all actors.
Other thought from me:
Are there any other potential variants besides winter?
Thanks for posting their thoughts. Paraphrasing myself from an IRC PM.
- The GUI expects it to be around, we're just adding metadata to other maps. But fair enough we can add a new game setting and change all maps, and duplicate information. You still have to edit all actors to add variants. Note that Suppoted biome contains the RM map chosen biome no the list. happens to be afilename but i don't see an extension.
- One can just use a mixin with that component. One file to change, no mod issues.
- We don't have the art but you could have dusty desert, autumn trees or any kind of scifi biome.
So are now buildings stuck with variants depending on the season? Or can there be variants inside those variants?