Back to the Vavoom Forum Archives


Forum

[Not a bug][1.30] Decorate definitions flag name

Tue, 24 Feb 2009 14:53:22

Crimson Wizard

I found that if I add a new flag property in vavoom_decorate_defs.xml, and that property name for decorate includes a class name before actual variable name, then decorate parser does not recognise such property. Perhaps following example will make it more clear. I added following into vavoom_decorate_defs.xml:
<class name="HexenWeapon">
    ...........
    <prop_name name="HexenWeapon.MeleeSound" property="MeleeSound" />
    ...........
  </class>
And in decorate I write simply like:
actor MyNewWeapon : HexenWeapon
{
     HexenWeapon.MeleeSound "SoundName"
}
And that works. But then I add boolean property (flag):
<class name="HexenWeapon">
    ...........
    <flag name="HexenWeapon.MagicMelee" property="bMagicMelee" />
    ...........
  </class>
And in decorate I write:
actor MyNewWeapon : HexenWeapon
{
     +HexenWeapon.MagicMelee
}
Upon launching the game Vavoom displays an error, like "unknown flag magicmelee". Then tried to define this flag differently:
<class name="HexenWeapon">
    ...........
    <flag name="MagicMelee" property="bMagicMelee" />
    ...........
  </class>
And that worked, even though in decorate script this proeprty was still referenced as HexenWeapon.MagicMelee.
Fri, 27 Feb 2009 20:53:14

Janis Legzdinsh

That's the way DECORATE flags work. Unlike properties that have strict prefixes, for flags prefix is optional and it's always the class name.

Back to the Vavoom Forum Archives