Author Topic: effects and emanations affecting buildings  (Read 2182 times)

wecl0me12

  • Guest
effects and emanations affecting buildings
« on: 16 July 2011, 02:52:07 »
If I want an effect or emanation to not target buildings, how would I do that in 0.4?
Effects target buildings by default in 0.4 .
Also, If I want an e/ to ONLY target buildings, how would I do that? the <buildings /> tag just causes it to crash.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: effects and emanations affecting buildings
« Reply #1 on: 16 July 2011, 05:08:09 »
Sounds like the buildings tag is broken. Thanks for pointing that out. Hopefully one of the GAE team members will be able to fix it soon. Of course, 0.4 is still a WIP, so not completely done yet, which may be the reason.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: effects and emanations affecting buildings
« Reply #2 on: 16 July 2011, 17:21:50 »
I think the buildings tag has been rendered obsolete by unit-type labels.  I don't know where the documentation for that might be, as the wiki is being rearranged every time I turn around. :O

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: effects and emanations affecting buildings
« Reply #3 on: 16 July 2011, 23:40:33 »
I think the buildings tag has been rendered obsolete by unit-type labels.
Not sure how you specify tags in emanations and effects though. If this is possible, can someone post the syntax?

"Unit-type labels", better known as "tags", don't have their own wiki page (they're simple enough to explain on the XML/Unit and XML/Upgrade pages, which I presumed was the only place they were used.

If they can be used in emanations, please do add it, they have a specific page at GAE/Emanations.

I don't know where the documentation for that might be, as the wiki is being rearranged every time I turn around. :O
In case you missed it in the general discussion board, the three engine's XML documentations have been merged. No data was removed and much was added, but my Documenting thread seems to have died before all my questions were answered. If you happen to know any, please feel free to answer, or if you want to see them documented, bump the thread. Most of them are features that were never announced on the board, but I found when combing through Shibboleth.

As for the layout of the wiki, all XMLs can be accessed from the XMLs page. Since GAE has so many specific features that require more depth in documenting, many have individual pages with stronger documentation (to do: expand those pages not to skip common elements) and examples. A full list of these pages can be found on the GAE/Features page.
« Last Edit: 18 June 2016, 18:10:02 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: effects and emanations affecting buildings
« Reply #4 on: 19 July 2011, 01:54:00 »
'buildings', 'no-normal-units' & 'non-living' have all been commented out, I'm not sure if I intended to re-implement them with hidden tags or not, but tags would be the preferred way to do it now.

In an Effect the way to restrict the effects to tagged unit types is,
Code: [Select]
<effect>
   <!-- . . . -->
   <affect value="my_tag" />
   <!-- . . . -->
</effect>

Seems it can only support one tag atm, will fix that.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: effects and emanations affecting buildings
« Reply #5 on: 19 July 2011, 06:04:57 »
'buildings', 'no-normal-units' & 'non-living' have all been commented out, I'm not sure if I intended to re-implement them with hidden tags or not, but tags would be the preferred way to do it now.

In an Effect the way to restrict the effects to tagged unit types is,
Code: [Select]
<effect>
   <!-- . . . -->
   <affect value="my_tag" />
   <!-- . . . -->
</effect>

Seems it can only support one tag atm, will fix that.
Awesome silnarm. I assume this applies to both effects and emanations? I added it to the Wiki. The one tag limitation is for the most part fine, as you can give units multiple tags, so could give all the units you want affected a tag specifically unique for the effect. Of course, the ability to specify multiple tags in the effect/emanation is more versatile and could save you from having to give more tags to the units.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: effects and emanations affecting buildings
« Reply #6 on: 20 July 2011, 03:23:04 »
I assume this applies to both effects and emanations?

Yep, an Emanation is an Effect, anything that applies to Effects applies to Emanations.

Quote
The one tag limitation is for the most part fine, as you can give units multiple tags, so could give all the units you want affected a tag specifically unique for the effect. Of course, the ability to specify multiple tags in the effect/emanation is more versatile and could save you from having to give more tags to the units.

Yeah, could be worked around easily enough, but isn't very convenient.
Glest Advanced Engine - Code Monkey

Timeline | Downloads