Use tags instead. Tags are basically a label that can be slapped to any unit, and then effects can be limited to units with certain tags. For example, we might give all buildings a "building" tag. Or we might give defensive buildings a special tag of their own. Perhaps they take less damage from the effect? Essentially, tags are more versatile than just "buildings". Effects and emanations can currently only be applied to a single tag (although units can have multiple tags, so it's possible to make a tag for all units that can be hit by an attack and use that along with other tags).
Why is this better for you? Suppose you don't want an all-stone building to burn, but you do want the wooden buildings to burn. Now that can be narrowed down. And since you can give an attack command multiple effects, you could have different intensities of "burning". Perhaps one effect is just a minor burning which affects a building that is part wood and part stone (like Magic's Mage Tower, which has a wooden roof, but the rest is stone), but then a different effect makes a more intense burning on all wood buildings, such as Tech's Technodrome.
Personally, I would have kept the "effects-buildings" flag for legacy support, but we really want to push for the use of tags, I guess.
The code for adding tags to units is:
<unit>
<parameters>
[..]
<tags>
<tag value="defensive" />
<tag value="effected-by-ads" />
<tag value="unatf" />
</tags>
[..]
</parameters>
[..]
</unit>
And the code for limiting an effect/emanation to a tag is:
<effect name="active_denial" bias="detrimental" stacking="overwrite" target="any" chance="100.0" duration="1">
<affect value="effected-by-ads" /> <!-- Name of the tag -->
<multipliers>
<move-speed value="0.0" />
<attack-speed value="0.0" />
<production-speed value="0.0" />
<harvest-speed value="0.0" />
</multipliers>
<flags>
<scale-splash-strength />
</flags>
</effect>
Both code snippets from the abandoned and unreleased AD4. PS: Don't try and set a move speed multiplier of zero like this.Helpful links:
https://docs.megaglest.org/XML/Unit#tagshttps://docs.megaglest.org/GAE/Effects#XML_definitionhttps://docs.megaglest.org/GAE/Emanations#XML_definition