Difference between revisions of "MG/Attack-boost"
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | Attack boosts are a [[MegaGlest]] only extender which allows boosts to be applied to units | + | Attack boosts are a [[MegaGlest]] only extender which allows boosts to be applied to units in the form of emanations. Within a radius of the unit with the attack boost, other units (which can be foes, allies, a specific faction, a specific unit, or any unit) can have their stats modified and have an optional particle effect. So in other words, attack boosts provide a way to boost or detriment nearby units. |
{{TOC limit|2}} | {{TOC limit|2}} | ||
Line 11: | Line 11: | ||
<unit-type name="name" /> | <unit-type name="name" /> | ||
</target> | </target> | ||
− | <max-hp value="0" value-percent- | + | <max-hp value="0" regeneration="0" value-percent-multiplier="false" /> |
− | <max-ep value="0" value-percent- | + | <max-ep value="0" regeneration="0" value-percent-multiplier="false" /> |
− | <sight value="0" value-percent- | + | <sight value="0" value-percent-multiplier="false" /> |
− | <attack- | + | <attack-strength value="0" value-percent-multiplier="false" /> |
− | <attack-range value="0" value-percent- | + | <attack-range value="0" value-percent-multiplier="false" /> |
− | <armor value="0" value-percent- | + | <armor value="0" value-percent-multiplier="false" /> |
− | <move-speed value="0" value-percent- | + | <move-speed value="0" value-percent-multiplier="false" /> |
− | <production-speed value="0" value-percent- | + | <production-speed value="0" value-percent-multiplier="false" /> |
<particles value="true"> | <particles value="true"> | ||
<originator-particle-file path="glow_particles.xml" /> | <originator-particle-file path="glow_particles.xml" /> | ||
Line 27: | Line 27: | ||
==Documentation== | ==Documentation== | ||
+ | All tags except <tt><allow-multiple-boost></tt>, <tt><radius></tt>, and <tt><target></tt> are optional. | ||
+ | |||
+ | The <tt>value-percent-multiplier</tt> attribute causes the value to be treated as a percentage of what was given in the xml. So if a unit has a base speed of 100 and you set the speed value of the attack boost to 50 with <tt>value-percent-multiplier</tt> true, then the speed will be increased by 50% to a total of 150 speed. | ||
+ | |||
+ | If <tt>value-percent-multiplier</tt> is false, the stat is simple added. | ||
+ | |||
+ | Hint: the value can be negative to "damage" units | ||
+ | |||
===allow-multiple-boosts=== | ===allow-multiple-boosts=== | ||
If true, there can be multiple boosts, which will stack. If false, boosts cannot stack, but will simply overwrite. | If true, there can be multiple boosts, which will stack. If false, boosts cannot stack, but will simply overwrite. | ||
Line 34: | Line 42: | ||
===target=== | ===target=== | ||
− | This tag defines who gets effected by the attack boosts. The value defines the broad characteristic, either <tt>all</tt> (any unit, regardless of alliances), <tt>ally</tt> (only allied units), <tt>foe</tt> (only opposing units), or <tt>faction</tt> (only units in the same faction). | + | This tag defines who gets effected by the attack boosts. The value defines the broad characteristic, either <tt>all</tt> (any unit, regardless of alliances), <tt>ally</tt> (only allied units), <tt>foe</tt> (only opposing units), or <tt>faction</tt> (only units in the same faction). |
− | This tag can have <tt>unit-type</tt> children which can limit them down to only the listed units that fit the broader characteristic previously listed. However, it's also possible to use just these broader characteristics. For example, having just <tt><target value="ally" /></tt> allows it to effect all unit types of all allies. However, you can give it <tt>unit-type</tt> children tags to allow it to effect those types of units only if they are allies. For example, you might want it to only boost allied melee units, where you'd set the target value to ally and give a child <tt>unit-type</tt> tag to each melee unit. | + | This tag can have a<tt>unit-type</tt> children which can limit them down to only the listed units that fit the broader characteristic previously listed. However, it's also possible to use just these broader characteristics. For example, having just <tt><target value="ally" /></tt> allows it to effect all unit types of all allies. However, you can give it <tt>unit-type</tt> children tags to allow it to effect those types of units only if they are allies. For example, you might want it to only boost allied melee units, where you'd set the target value to ally and give a child <tt>unit-type</tt> tag to each melee unit. |
The <tt>include-self</tt> tag defines whether or not the unit with the attack boost should be included as a target. | The <tt>include-self</tt> tag defines whether or not the unit with the attack boost should be included as a target. | ||
+ | |||
+ | Note:MG Deveopment branch features "tags" wich can be used to define a goup of units" this tag is suposed to work most places including here | ||
===max-hp=== | ===max-hp=== | ||
− | + | max-HP itself is ignored for boosts, just the <tt>regeneration</tt> attribute affects HP regeneration. | |
===max-ep=== | ===max-ep=== | ||
− | + | Max EP is ignored for boosts,just the <tt>regeneration</tt> attribute affects EP regeneration. | |
===sight=== | ===sight=== | ||
− | How much to effect the sight by. Negative numbers can decrease the skill | + | How much to effect the sight by. Negative numbers can decrease the skill. |
===attack-strenght=== | ===attack-strenght=== | ||
− | How much to effect the attack strength by (note the necessary misspelling of the tag). Negative numbers can decrease the skill | + | How much to effect the attack strength by (note the necessary misspelling of the tag). Negative numbers can decrease the skill. |
===attack-range=== | ===attack-range=== | ||
− | How much to effect the attack range by. Negative numbers can decrease the skill | + | How much to effect the attack range by. Negative numbers can decrease the skill. |
===armor=== | ===armor=== | ||
− | How much to effect the armor by. Negative numbers can decrease the skill | + | How much to effect the armor by. Negative numbers can decrease the skill. |
===move-speed=== | ===move-speed=== | ||
− | How much to effect the move speed by. Negative numbers can decrease the skill | + | How much to effect the move speed by. Negative numbers can decrease the skill. |
===production-speed=== | ===production-speed=== | ||
− | How much to effect the production speed (produce/morph/upgrade) by. Negative numbers can decrease the skill | + | How much to effect the production speed (produce/morph/upgrade) by. Negative numbers can decrease the skill. |
===Particles=== | ===Particles=== | ||
− | It's also possible to apply particle systems to the attacker and/or the affected units. These tags are optional. The attack can be given a particle system with the <tt>originator-particle-file</tt> tag, while the affected units can be given one with the <tt>affected-particle-file</tt> tag. | + | It's also possible to apply particle systems to the attacker and/or the affected units. These tags are optional. The attack can be given a particle system with the <tt>originator-particle-file</tt> tag, while the affected units can be given one with the <tt>affected-particle-file</tt> tag. The originator particle effect only occurs if the attack boost is being used (it must be affecting at least one unit, which can include the user if <tt>include-self</tt> is set to true. |
− | ==Example== | + | ==Examples== |
+ | ===Example 1=== | ||
In this example, all swordmen in the same faction within a five cell radius of the attacking unit will gain 10% more HP and +20 attack. The affected units will all have the particle system defined in the <tt>glow_particles.xml</tt> file applied to them. | In this example, all swordmen in the same faction within a five cell radius of the attacking unit will gain 10% more HP and +20 attack. The affected units will all have the particle system defined in the <tt>glow_particles.xml</tt> file applied to them. | ||
Line 77: | Line 88: | ||
<unit-type name="swordman" /> | <unit-type name="swordman" /> | ||
</target> | </target> | ||
− | <max-hp value="110" value-percent- | + | <max-hp value="110" value-percent-multiplier="true" /> |
<max-ep value="0"/> | <max-ep value="0"/> | ||
<sight value="0"/> | <sight value="0"/> | ||
Line 88: | Line 99: | ||
<affected-particle-file path="glow_particles.xml"/> | <affected-particle-file path="glow_particles.xml"/> | ||
</particles> | </particles> | ||
+ | </attack-boost> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===Example 2=== | ||
+ | In this system, all nearby enemy units (on a different team) within 10 tiles will have their move speed reduced by 20% (so it's 80% of the original). Multiple boosts will not stack (as that could result in extremely slow speeds). There are no used particle effects. In this example, all optional tags have been excluded. | ||
+ | |||
+ | <syntaxhighlight lang="xml"> | ||
+ | <attack-boost> | ||
+ | <allow-multiple-boosts value="false" /> | ||
+ | <radius value="10" /> | ||
+ | <target value="foe" include-self="false" /> | ||
+ | <move-speed value="80" value-percent-multiplier="true" /> | ||
</attack-boost> | </attack-boost> | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 20:40, 2 January 2021
Attack boosts are a MegaGlest only extender which allows boosts to be applied to units in the form of emanations. Within a radius of the unit with the attack boost, other units (which can be foes, allies, a specific faction, a specific unit, or any unit) can have their stats modified and have an optional particle effect. So in other words, attack boosts provide a way to boost or detriment nearby units.
XML[edit]
<attack-boost>
<allow-multiple-boosts value="false" />
<radius value="5" />
<target value="all|ally|foe|faction" include-self="false">
<unit-type name="name" />
</target>
<max-hp value="0" regeneration="0" value-percent-multiplier="false" />
<max-ep value="0" regeneration="0" value-percent-multiplier="false" />
<sight value="0" value-percent-multiplier="false" />
<attack-strength value="0" value-percent-multiplier="false" />
<attack-range value="0" value-percent-multiplier="false" />
<armor value="0" value-percent-multiplier="false" />
<move-speed value="0" value-percent-multiplier="false" />
<production-speed value="0" value-percent-multiplier="false" />
<particles value="true">
<originator-particle-file path="glow_particles.xml" />
<affected-particle-file path="glow_particles.xml" />
</particles>
</attack-boost>
Documentation[edit]
All tags except <allow-multiple-boost>, <radius>, and <target> are optional.
The value-percent-multiplier attribute causes the value to be treated as a percentage of what was given in the xml. So if a unit has a base speed of 100 and you set the speed value of the attack boost to 50 with value-percent-multiplier true, then the speed will be increased by 50% to a total of 150 speed.
If value-percent-multiplier is false, the stat is simple added.
Hint: the value can be negative to "damage" units
allow-multiple-boosts[edit]
If true, there can be multiple boosts, which will stack. If false, boosts cannot stack, but will simply overwrite.
radius[edit]
The maximum distance from the attacking unit from which the attack-boost will take effect.
target[edit]
This tag defines who gets effected by the attack boosts. The value defines the broad characteristic, either all (any unit, regardless of alliances), ally (only allied units), foe (only opposing units), or faction (only units in the same faction).
This tag can have aunit-type children which can limit them down to only the listed units that fit the broader characteristic previously listed. However, it's also possible to use just these broader characteristics. For example, having just <target value="ally" /> allows it to effect all unit types of all allies. However, you can give it unit-type children tags to allow it to effect those types of units only if they are allies. For example, you might want it to only boost allied melee units, where you'd set the target value to ally and give a child unit-type tag to each melee unit.
The include-self tag defines whether or not the unit with the attack boost should be included as a target.
Note:MG Deveopment branch features "tags" wich can be used to define a goup of units" this tag is suposed to work most places including here
max-hp[edit]
max-HP itself is ignored for boosts, just the regeneration attribute affects HP regeneration.
max-ep[edit]
Max EP is ignored for boosts,just the regeneration attribute affects EP regeneration.
sight[edit]
How much to effect the sight by. Negative numbers can decrease the skill.
attack-strenght[edit]
How much to effect the attack strength by (note the necessary misspelling of the tag). Negative numbers can decrease the skill.
attack-range[edit]
How much to effect the attack range by. Negative numbers can decrease the skill.
armor[edit]
How much to effect the armor by. Negative numbers can decrease the skill.
move-speed[edit]
How much to effect the move speed by. Negative numbers can decrease the skill.
production-speed[edit]
How much to effect the production speed (produce/morph/upgrade) by. Negative numbers can decrease the skill.
Particles[edit]
It's also possible to apply particle systems to the attacker and/or the affected units. These tags are optional. The attack can be given a particle system with the originator-particle-file tag, while the affected units can be given one with the affected-particle-file tag. The originator particle effect only occurs if the attack boost is being used (it must be affecting at least one unit, which can include the user if include-self is set to true.
Examples[edit]
Example 1[edit]
In this example, all swordmen in the same faction within a five cell radius of the attacking unit will gain 10% more HP and +20 attack. The affected units will all have the particle system defined in the glow_particles.xml file applied to them.
<attack-boost>
<allow-multiple-boosts value="false" />
<radius value="5"/>
<target value="faction">
<unit-type name="swordman" />
</target>
<max-hp value="110" value-percent-multiplier="true" />
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="20"/>
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="0" />
<production-speed value="0"/>
<particles value="true">
<affected-particle-file path="glow_particles.xml"/>
</particles>
</attack-boost>
Example 2[edit]
In this system, all nearby enemy units (on a different team) within 10 tiles will have their move speed reduced by 20% (so it's 80% of the original). Multiple boosts will not stack (as that could result in extremely slow speeds). There are no used particle effects. In this example, all optional tags have been excluded.
<attack-boost>
<allow-multiple-boosts value="false" />
<radius value="10" />
<target value="foe" include-self="false" />
<move-speed value="80" value-percent-multiplier="true" />
</attack-boost>