Author Topic: Using Attack Boost to make self boosting ability ?  (Read 1498 times)

Manakel

  • Guest
Using Attack Boost to make self boosting ability ?
« on: 2 November 2012, 17:53:39 »
Hello,

I'm trying to create self boosting skill like "Heroic Resistance" (improved armor but slower speed) for the swordman that would grant modifier to the casting unit only.
I though about attack-boost with a radius of one and the faction tag and the unit type "swordman".
But it seems to apply only to other units and not to the casting unit.

Is there a way to create self boosting skills in MG xml?

The final target is to be able to have unit with different armor & hp value according to the skill used. I did not find how to do it in the simple attack tag, that's why i though about attack-boost.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Using Attack Boost to make self boosting ability ?
« Reply #1 on: 2 November 2012, 19:12:59 »
Post the xml here and we can help you. Yes you can apply the boost to self, Elimnator has used this a lot in his factions.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Using Attack Boost to make self boosting ability ?
« Reply #2 on: 2 November 2012, 19:35:04 »
As mentioned on the wiki page, the include-self attribute must be set to "true" to apply an attack boost to yourself (defaults to false).
« Last Edit: 18 June 2016, 18:39:58 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Manakel

  • Guest
Re: Using Attack Boost to make self boosting ability ?
« Reply #3 on: 3 November 2012, 08:57:57 »
Excellent , the include self was the issue. I had omitted the flag entirely  because i did not know the wiki, and was working by modification of the roman general...
I think the wiki will be a huge help. thanks a lot for the fast answer and sorry for the finally so simple question.

Btw, in any engine, is there a way to share the attack boost between unit. I mean, if i design an attack boost and give him a name and make it only based on multiplier, can i reuse it on several units without having to enter the full xml definition in each unit?

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Using Attack Boost to make self boosting ability ?
« Reply #4 on: 3 November 2012, 11:31:38 »
Excellent , the include self was the issue. I had omitted the flag entirely  because i did not know the wiki, and was working by modification of the roman general...
I think the wiki will be a huge help. thanks a lot for the fast answer and sorry for the finally so simple question.

Btw, in any engine, is there a way to share the attack boost between unit. I mean, if i design an attack boost and give him a name and make it only based on multiplier, can i reuse it on several units without having to enter the full xml definition in each unit?
I'm not sure what your asking for. By share, do you mean divide the effects of the attack boost amongst its receivers? If so, that's not possible (yet).

If you're just looking for a way to increase units' stats by a percentage instead of a static amount, value-percent-multipler has to be set as true and the stat's value will be a percentage multiplier (so 50 would mean the stat would be halved, 150 would mean the state would be increased by 50%, and so on).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Manakel

  • Guest
Re: Using Attack Boost to make self boosting ability ?
« Reply #5 on: 4 November 2012, 21:09:12 »
Hello,

In fact i was thinking about sharing the attack-boost definition between several unit type in my faction.
For example, i have an attack-boost "heroic defense" self boost that increase armor by 30% for a decrease of 25% in attack strength and 20% in movement speed.
I would like this attack boost to be available to my "swordsman" unit type and my horseman unit type.

So i wanted to know if there is way to define the attack boost only once and have it "called" in the swordsman.xml and in the horseman.xml. (like an "include" in other languages).
The idea is to maintain the parameters of the attack boost in only one location (1 xml file) even if it's used in the definition of several units (.xml files).

Hope it's more clear, my first explanation was really clumsy.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Using Attack Boost to make self boosting ability ?
« Reply #6 on: 5 November 2012, 02:02:34 »
Sharing attack-boost across multiple units is not supported currently, feel free to add a feature request

 

anything