Jump to content

Problem with object_color variants in unit actor.xml


wackyserious
 Share

Recommended Posts

In my SVN game copy, the engine automatically matches similarly named object_color variants when spawning units (I'm not sure if this was intentional, or if it is a bug)

Ex.

Unit actor file units/rome/infantry_spearman_b.xml uses object_color and had a color variant

Quote

    <variant frequency="0" name="white">
      <color>255 255 255</color>
    </variant>

While, prop actor file props/units/shields/rome_scutum_b.xml also uses object_color and had a similarly named color variant

Quote

    <variant frequency="0" name="white">
      <color>255 255 255</color>
    </variant>

Every time the game spawns a unit variant, it will always spawn a variant that combines the two similarly named variant, and ignores other color variants.

So you will only see, white colored spearmen with white shields. The game will never spawn red colored spearmen with white shields or vice versa.

A working solution would be to name the actor color variant shirt-white, and the prop color, shield-white, avoid similarly named variants (I believe that it had something to do with similarly named color variants)

I'm not sure if this problem is endemic only to my game copy, or if it also occurs in others, you can try and test it

Link to comment
Share on other sites

This is intended behaviour, it's meant to be sure that the selected animation matches the props. It would be silly if an archer would start chopping a tree with a bow and arrow.

However, it's also mildly annoying that the name selection is passed on to prop actors. F.e. the farm field has a few variations of plants, but once a variation is chose by its name, it's chosen for all plants on that field.

So on the one hand, it's intended behaviour that we can't change without breaking all unit animations. On the other hand, it's also slightly annoying.

Link to comment
Share on other sites

Ahh, I see.. Thank you for clarifying it, so it was intended

It is not really that bothersome for me, as it can be fixed by proper variant naming, I just hope that other modders/players can read this post too, so that they won't fall victim to the confusion caused by this crucial game behavior.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...