Page MenuHomeWildfire Games

[WIP] Winter skin support
Needs ReviewPublic

Authored by Stan on Feb 13 2023, 6:26 PM.

Details

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

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.

Test Plan

Run Alpine valleys as the gauls, notice the houses get snowy

Event Timeline

Stan created this revision.Feb 13 2023, 6:26 PM

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

Stan requested review of this revision.Feb 13 2023, 6:29 PM
marder added a subscriber: marder.
Stan edited the summary of this revision. (Show Details)Feb 15 2023, 9:06 AM
sera added a subscriber: sera.Feb 16 2023, 9:19 AM

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.

Stan added a comment.Feb 16 2023, 9:31 AM

Sure everything can be done with shaders. But it's not flexible.

Probably slow too.

I'd say the cmpVisual should maybe listen to a BiomeChanged message? (Where 'Biome' is maybe not the best word, but looks allright.)

Stan added a comment.Feb 17 2023, 9:33 AM

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.

In D4938#210832, @Stan wrote:

But then we have a strong dependency on the two components

You have that now as well?

In D4938#210832, @Stan wrote:

the message is only sent one per match

Says who? ;P
I can imagine the weather turns, or the map is large enough to cross biomes.

In D4938#210832, @Stan wrote:

so all subsequent buildings won't be notified.

Yeah, a hard dependency on init then.

I'll have to give it some thought.

Freagarach added inline comments.Feb 17 2023, 3:04 PM
binaries/data/mods/public/simulation/templates/special/filter/construction.xml
8

BiomeReplacer?

Stan added a comment.Feb 17 2023, 3:38 PM

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

marder added a comment.EditedFeb 24 2023, 8:23 PM

Paraphrased comments from elexis:
There are two problem with the design of this patch:

  1. 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.
  2. 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?

Stan added a comment.Feb 25 2023, 2:52 AM

Thanks for posting their thoughts. Paraphrasing myself from an IRC PM.

  1. 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.
  2. One can just use a mixin with that component. One file to change, no mod issues.
  3. We don't have the art but you could have dusty desert, autumn trees or any kind of scifi biome.
Silier added a subscriber: Silier.Feb 25 2023, 11:38 AM

So are now buildings stuck with variants depending on the season? Or can there be variants inside those variants?

Stan added a comment.Feb 25 2023, 11:55 AM

Well I suppose variants inside variants are defined in other groups :)