MegaGlest Forum

MegaGlest => MegaGlest => Topic started by: softcoder on 25 June 2011, 22:05:52

Title: A few new things
Post by: softcoder on 25 June 2011, 22:05:52
Elimnator and Tiger asked for it so here it is:

With svn version you can now:

#1. have multiple models per skill example:

Code: [Select]
<skill>
<type value="stop"/>
<name value="stop_skill"/>
<ep-cost value="0"/>
<speed value="1000"/>
<anim-speed value="45"/>

<animation-random-cycle-maxcount value="1" />
<animation path="models/archer_standing.g3d" />
                        <animation path="models/archer_walking.g3d" />
<sound enabled="false"/>
</skill>

<animation-random-cycle-maxcount value="1" />

This optional node tells the engine to cycle through a maximum of 1 random models (useful for death animations, pick a random one but don't switch to another after it finishes animating). If this node does not exist we assume no maximum

You simply stack the animation nodes in the skill and we will pick random models each time from that list.

To FORCE a particular model to be used when the unit's HP are within a certain range you may add the optional fromHp and toHp attributes:

<animation path="models/archer_walking.g3d" minHp="0" maxHp="7" />

This would tell the engine to always pick this model when the units hp is between 0 and 7

#2: Define attack-boost information per skill. Think of attack-boost as a 'temporary upgrade' which is associated to a skill of a unit. Once 'affected' units com within the range of the units attack-boost radius, a special upgrade + particles are applied while the affected units are in this radius, example:

Code: [Select]
<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="50"/>
<anim-speed value="50"/>
<animation path="models/archer_attacking.g3d"/>
<sound enabled="true" start-time="0.5">
<sound-file path="/sounds/archer_attack1.wav"/>
<sound-file path="/sounds/archer_attack2.wav"/>
<sound-file path="/sounds/archer_attack3.wav"/>
<sound-file path="/sounds/archer_attack4.wav"/>
</sound>
<attack-strenght value="100"/>
<attack-var value="50"/>
<attack-range value="10"/>
<attack-type value="piercing"/>
<attack-start-time value="0.5"/>
<attack-fields>
<field value="land"/>
<field value="air"/>
</attack-fields>

                        <attack-boost>
<allow-multiple-boosts value="false" />
<radius value="5"/>
                        <target value="faction"> <!-- ally foe faction unit-types all -->
<!-- <unit-type value="catapult" /> -->
                                </target>

<max-hp value="100"/>
<max-ep value="0"/>
<sight value="5"/>
<attack-strenght value="6"/>
<attack-range value="0"/>
<armor value="10"/>
<move-speed value="0"/>
<production-speed value="0"/>

<particles value="true">
<originator-particle-file path="glow_particles.xml"/>
<affected-particle-file path="glow_particles.xml"/>
</particles>

                        </attack-boost>

<projectile value="true">
<particle value="true" path="particle_proj.xml"/>
<sound enabled="true">
<sound-file path="/sounds/arrow_hit1.wav"/>
<sound-file path="/sounds/arrow_hit2.wav"/>
<sound-file path="/sounds/arrow_hit3.wav"/>
<sound-file path="/sounds/arrow_hit4.wav"/>
<sound-file path="/sounds/arrow_hit5.wav"/>
</sound>
</projectile>
<splash value="false"/>
</skill>

Title: Re: A few new things
Post by: Omega on 25 June 2011, 22:32:00
Add to wiki please? I did too much today (over 30kb) and haven't got enough feeling left in my fingers to do it...
Title: Re: A few new things
Post by: softcoder on 25 June 2011, 22:38:16
Once its fully tested and final changes are made it will be fully documented on the wiki.

The VBros are working out any issues they find as they test it in their mods.
Title: Re: A few new things
Post by: Omega on 25 June 2011, 22:48:26
Once its fully tested and final changes are made it will be fully documented on the wiki.

The VBros are working out any issues they find as they test it in their mods.
Mmk. A suggestion then, if willing to expand, would be to add multipliers too to number 2 (puns not intended). Static modifiers are great, but taking away 100 health is biased towards the weaker foes with very little health, where that could be 20% of their max, but almost nothing to a strong unit with, say, 2000 hp, where that would only be 5%. The solution is multipliers, a number that will multiply the stat. For example, increasing your units HP by 10% (a multiplier of 1.1) would be more consistent and is relative to the unit's abilities.
Title: Re: A few new things
Post by: Ishmaru on 26 June 2011, 00:36:01
Wow great stuff softcoder! I kinda want to try this stuff out as well.

I do agree with omega about multipliers. If ut not to busy of course. ;)
Title: Re: A few new things
Post by: Mr War on 26 June 2011, 02:56:00
Great stuff siftcoder, I can see good uses for this in my mods, I think it'll make gameplay and feel better
Title: Re: A few new things
Post by: softcoder on 26 June 2011, 04:05:48
Yes multipliers are an excellent idea. On another note, anyone who compiles from svn, you might be able to enter your native language characters now (German, Chinese, Italian etc), I changed stuff today and so far Tomreyn says he's able to type his special German characters in game :)

Edit:

Ok svn has support for multipliers: (static values are the default, but you can tell it to make the value a multiplier by adding a special attribute on the node). Below would add 300% to the units move speed. These tags ALSO should work for normal upgrades as well.

Code: [Select]
<move-speed value="300" value-percent-multipler="true" />
Update:

Any Windows users who want to try this out I have a current Windows binary snapshot here:

http://www.soft-haus.com/glest/temp/megaglest3.5.3-dev_i386_win32_bin.exe (http://www.soft-haus.com/glest/temp/megaglest3.5.3-dev_i386_win32_bin.exe)

Here is a sample of my XML file where I edited TECH's archer xml and added multiple animations for the 'stop_skill'. Likewise I added an 'attack-boost' to the archers 'attack_skill' so that and unit in the archers own faction that is within the radius if 5 cells will get a temporary upgrade of +100 hp, +5 sight, +6 attack strength, +!0 armor, * 300 (multiplier) move speed. When this boost is 'active' the archer AND the affected units will 'glow' similar to the genie does in Persian.

Code: [Select]
<?xml version="1.0" standalone="no"?>

<unit>
<parameters>
<size value="1"/>
<height value="3"/>
<max-hp value="700" regeneration="0"/>
<max-ep value="0"/>
<armor value="20"/>
<armor-type value="leather"/>
<sight value="15"/>
<time value="60"/>
<multi-selection value="true"/>
<cellmap value="false"/>
<levels>
<level name="elite" kills="5"/>
</levels>
<fields>
<field value="land"/>
<field value="air"/>
</fields>
<properties/>
<light enabled="false"/>
<unit-requirements>
<unit name="barracks"/>
</unit-requirements>
<upgrade-requirements/>
<resource-requirements>
<resource name="wood" amount="50"/>
<resource name="gold" amount="100"/>
<resource name="food" amount="1"/>
</resource-requirements>
<resources-stored/>
<image path="images/archer.bmp"/>
<image-cancel path="images/tech_cancel.bmp"/>
<meeting-point value="false"/>
<selection-sounds enabled="true">
<sound path="sounds/archer_select1.wav"/>
<sound path="sounds/archer_select2.wav"/>
<sound path="sounds/archer_select3.wav"/>
<sound path="sounds/archer_select4.wav"/>
<sound path="sounds/archer_select5.wav"/>
<sound path="sounds/archer_select6.wav"/>
<sound path="sounds/archer_select7.wav"/>
<sound path="sounds/archer_select8.wav"/>
<sound path="sounds/archer_select9.wav"/>
<sound path="sounds/archer_select10.wav"/>
<sound path="sounds/archer_select11.wav"/>

</selection-sounds>
<command-sounds enabled="true">
<sound path="sounds/archer_ack1.wav"/>
<sound path="sounds/archer_ack2.wav"/>
<sound path="sounds/archer_ack3.wav"/>
<sound path="sounds/archer_ack4.wav"/>
<sound path="sounds/archer_ack5.wav"/>
<sound path="sounds/archer_ack6.wav"/>
<sound path="sounds/archer_ack7.wav"/>
<sound path="sounds/archer_ack8.wav"/>
<sound path="sounds/archer_ack9.wav"/>
<sound path="sounds/archer_ack10.wav"/>
<sound path="sounds/archer_ack11.wav"/>
<sound path="sounds/archer_ack12.wav"/>
<sound path="sounds/archer_ack13.wav"/>
<sound path="sounds/archer_ack14.wav"/>
<sound path="sounds/archer_ack15.wav"/>
</command-sounds>
</parameters>

<skills>

<skill>
<type value="stop"/>
<name value="stop_skill"/>
<ep-cost value="0"/>
<speed value="1000"/>
<anim-speed value="45"/>
<animation path="models/archer_standing.g3d" />
                        <animation path="models/archer_walking.g3d" />
<sound enabled="false"/>
</skill>

<skill>
<type value="move"/>
<name value="move_skill"/>
<ep-cost value="0"/>
<speed value="220"/>
<anim-speed value="125"/>
<animation path="models/archer_walking.g3d"/>
<sound enabled="false"/>
</skill>

<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="50"/>
<anim-speed value="50"/>
<animation path="models/archer_attacking.g3d"/>
<sound enabled="true" start-time="0.5">
<sound-file path="/sounds/archer_attack1.wav"/>
<sound-file path="/sounds/archer_attack2.wav"/>
<sound-file path="/sounds/archer_attack3.wav"/>
<sound-file path="/sounds/archer_attack4.wav"/>
</sound>
<attack-strenght value="100"/>
<attack-var value="50"/>
<attack-range value="10"/>
<attack-type value="piercing"/>
<attack-start-time value="0.5"/>
<attack-fields>
<field value="land"/>
<field value="air"/>
</attack-fields>

                        <attack-boost>
<allow-multiple-boosts value="false" />
<radius value="5"/>
                         <target value="faction"> <!-- ally foe faction unit-types all -->
<!-- <unit-type value="catapult" /> -->
                                </target>

<max-hp value="100"/>
<max-ep value="0"/>
<sight value="5"/>
<attack-strenght value="6"/>
<attack-range value="0"/>
<armor value="10"/>
<move-speed value="300" value-percent-multipler="true" />
<production-speed value="0"/>

<particles value="true">
<originator-particle-file path="glow_particles.xml"/>
<affected-particle-file path="glow_particles.xml"/>
</particles>

                        </attack-boost>

<projectile value="true">
<particle value="true" path="particle_proj.xml"/>
<sound enabled="true">
<sound-file path="/sounds/arrow_hit1.wav"/>
<sound-file path="/sounds/arrow_hit2.wav"/>
<sound-file path="/sounds/arrow_hit3.wav"/>
<sound-file path="/sounds/arrow_hit4.wav"/>
<sound-file path="/sounds/arrow_hit5.wav"/>
</sound>
</projectile>
<splash value="false"/>
</skill>

<skill>
<type value="die"/>
<name value="die_skill"/>
<ep-cost value="0"/>
<speed value="60"/>
<anim-speed value="60"/>

<animation-random-cycle-maxcount value="1" />
<animation path="models/archer_dying.g3d"/>
<animation path="models/archer_attacking.g3d"/>
<sound enabled="true" start-time="0">
<sound-file path="sounds/archer_die1.wav"/>
<sound-file path="sounds/archer_die2.wav"/>
<sound-file path="sounds/archer_die3.wav"/>
<sound-file path="sounds/archer_die4.wav"/>
</sound>
<fade value="false"/>
</skill>

</skills>

<!-- *** commands *** -->

<commands>

<command>
<type value= "stop"/>
<name value="stop"/>
<image path="images/tech_stop.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<stop-skill value="stop_skill"/>
</command>

<command>
<type value="move"/>
<name value="move"/>
<image path="images/tech_move.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="move_skill"/>
</command>

<command>
<type value="attack"/>
<name value="attack"/>
<image path="images/archer_attack.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="move_skill"/>
<attack-skill value="attack_skill"/>
</command>

<command>
<type value="attack_stopped"/>
<name value="hold_position"/>
<image path="images/tech_hold.bmp"/>
<unit-requirements/>
<upgrade-requirements>
<upgrade name="training_field"/>
</upgrade-requirements>
<stop-skill value="stop_skill"/>
<attack-skill value="attack_skill"/>
</command>

</commands>
</unit>


Did a lot of testing and fixed some bugs related to these new features, also added (in svn):

- support for png textures for Water in tiles

Code: [Select]
<parameters>
<water effects="true">
<texture path="water/water_1.png"/>
<texture path="water/water_2.png"/>
<texture path="water/water_3.png"/>

                       etc..
- min/max hp values for damage particles:

Code: [Select]
<damage-particles value="true">
<particle-file path="fire_particles1.xml" minHp="4000" maxHp="5000"/>
<particle-file path="fire_particles2.xml" minHp="1000" maxHp="3999"/>
<particle-file path="fire_particles3.xml" minHp="1" maxHp="999"/>
</damage-particles>
Title: Re: A few new things
Post by: ElimiNator on 6 July 2011, 02:15:48
OK, I have been using the new stuff and here is an example pic:
(http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash4/264074_2134385089472_1541414237_2216039_4215272_n.jpg)
Download my new Creek (https://forum.megaglest.org/index.php?topic=7358.0) faction to try some new stuff.
Title: Re: A few new things
Post by: Omega on 6 July 2011, 06:08:08
Oh, wow, didn't notice that you edited your post. Thankfully Elim bumped it. Since it's now in the SVN and has a mod that uses some of the features, I think it's time to document it properly. I can happily do that if you supply a bit more information, or you can do so yourself.

I think multiple animations may be in there, not sure, if it is though, we'd probably have to add the min-hp and max-hp parameters. Question first: What happens if these parameters overlap, eg: one animation is when the unit's HP is 0-60, and the other is 40-100, what happens when the hp is 40-60, where it fills both animation requirements?

This here seems to be the full XML options for these unit boosts.
Code: [Select]
<allow-multiple-boosts value="false" />
<radius value="5"/>
<target value="all|ally|foe|faction"/>
<max-hp value="100"/>
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="0"/>
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="100" value-percent-multipler="true" />
<production-speed value="0"/>
<particles value="true">
<originator-particle-file path="glow_particles.xml"/>
<affected-particle-file path="glow_particles.xml"/>
</particles>
First tricky one we have seems to be the target tag. Am I correct in the assumption that if using the ally, all, foe, or faction values, the tag would simply look like <target value="value" /> while if the value is unit-types, then it would contain a children list of <unit-type name="name" /> tags? And another question about that tag, can it have units from any faction in that techtree, or just from the current faction? (eg: if a magic unit has point boost, can it use a unit-type tag to give a negative boost to tech's swordmen?)

The boosting tags seem to be the exact same as scenarios except that they can have an optional "value-percent-multiplier" which will have the value input instead be divided by 100 then multiply the stat (sadly, this percentage format is rather inconsistent with every other occurance in the XMLs, which instead use 1.0 = 100%, aka: decimal form).

As for particles, I'm assuming that originator-particle-file is the particles to give to the unit that will distribute the boost when the the affected unit is nearby (which would get the affected-particle-file particle system). This would last only while the affect unit is within the radius distance (and thus being affected), and would end when the affected unit leaves.

And the trickiest question: when using multiple boosts (and allow-multiple-boosts is true), how do multipliers stack? In GAE, the ADD all the multipliers together, then multiply them by the base stat, then finally add on the static modifiers (this prevents multipliers from becoming godly exponential increases, which could be too steep and thus be overpowered and unintended). The formula's GAE uses and examples are explained here: GAE/Enhancements#Analysis (https://docs.megaglest.org/GAE/Enhancements#Analysis)
Title: Re: A few new things
Post by: wciow on 6 July 2011, 06:38:06
Really nice stuff Softcoder  :thumbup:

I'll test the snapshot and report ny problems...
Title: Re: A few new things
Post by: softcoder on 6 July 2011, 06:43:25
The snapshot is ultra buggy, I have corrected many things in svn since that snapshot. I'll post a new windows build soon (in a day or two) once I hear from testers that all is stable (but the new features are definitely making the game play very cool) :)
Title: Re: A few new things
Post by: titi_son on 10 July 2011, 10:40:03
why can't you make that you boost hp-regeneration.
I want to make a unit that heals all units in range. I am not sure that i will use it anymore (now i will boost attack range).
AND ( this one i will use ) i want to use particles only for affected units!
AND (this one i will use too) i want to do the attack-boost only on ALLY unit-types (hm my bad english :) )
Title: Re: A few new things
Post by: Omega on 10 July 2011, 18:19:22
AND ( this one i will use ) i want to use particles only for affected units!
You can, just use the <affected-particle-file path="glow_particles.xml"/> tag as demonstrated in my example (which I will add to the wiki if softcoder could answer the few questions and/or confirm my guesses). Since I'm assuming both particles tags are optional, just don't use the <originator-particle-file path="glow_particles.xml"/> tag.

AND (this one i will use too) i want to do the attack-boost only on ALLY unit-types (hm my bad english :) )
Yeah, that doesn't seem possible, you could have either unit types or ally, but not both. Perhaps an improvement would be to allow the <unit-type name="name" /> tags to be used in any target tag, such as with the below example:

Code: [Select]
<target value="ally">
<unit-type name="name" />
</target>

That would actually make the unit-types tag obsolete, since if any of the target values could be used, they would be far more "accurate" in terms of defining what units exactly will be affected.
Title: Re: A few new things
Post by: John.d.h on 11 July 2011, 00:33:04
Yargh. :confused: I know I'm biased here, but the GAE effects syntax is much cleaner if you ask me.
https://docs.megaglest.org/GAE/Emanations (https://docs.megaglest.org/GAE/Emanations)

That would actually make the unit-types tag obsolete, since if any of the target values could be used, they would be far more "accurate" in terms of defining what units exactly will be affected.
No, not really.  Tags are far more flexible because they can refer to a hypothetical unit.  For example, if you have an effect that targets all "infantry" units, you don't have to worry about listing the Dwarven Warrior, Elvish Magol, Tech Sword(s)man, Axe Indian, etc., so long as they are tagged as "infantry" in their own respective XML files.  The same could go for "undead" or "vehicle" just as easily.  This allows the file to refer to units outside of its own tech tree without having to know what they are (and without having to maintain multiple lists across several XML files!).  The system was originally inspired by CSS, to which I'm sure you can relate.
Title: Re: A few new things
Post by: Omega on 11 July 2011, 07:07:20
That would actually make the unit-types tag obsolete, since if any of the target values could be used, they would be far more "accurate" in terms of defining what units exactly will be affected.
No, not really.  Tags are far more flexible because they can refer to a hypothetical unit.  For example, if you have an effect that targets all "infantry" units, you don't have to worry about listing the Dwarven Warrior, Elvish Magol, Tech Sword(s)man, Axe Indian, etc., so long as they are tagged as "infantry" in their own respective XML files.  The same could go for "undead" or "vehicle" just as easily.  This allows the file to refer to units outside of its own tech tree without having to know what they are (and without having to maintain multiple lists across several XML files!).  The system was originally inspired by CSS, to which I'm sure you can relate.
Sorry, I don't think I was clear enough. Long explanation time.

Firstly, MegaGlest doesn't support tags (or at least not to my knowledge), though they are quite useful in GAE for the reasons you mentioned. However, in this case, it's refer specifically to the target tag here. Currently, you can have either ally (effects any allied unit on the same team as you), faction (effects any unit in the same faction), foe (affects any unit not on your team), all (affects any unit), or unit-types (affects the listed units, on any team). However, if you, for example, want it to only affect one unit type that is on your team, there's a clash. To have it affect your team, you would normally use ally, but that won't let you specify the unit-type. The unit-types tag itself will affect everyone, to my understanding (I could be totally wrong, by the way, the XML layout isn't clear enough, and I cannot document in depth until my questions are answered, such as this one here. In the event I am totally wrong, disregard me completely as a bumbling fool). Thus, the ability to combine ally with a list of unit-types would fix that shortage.

The word "tag" in my quoted text is actually referring to an XML element (eg: <my-tag value="omega is awesome" />).

Offtopic: Can units have multiple tags?
Title: Re: A few new things
Post by: titi_son on 11 July 2011, 07:17:39

AND (this one i will use too) i want to do the attack-boost only on ALLY unit-types (hm my bad english :) )
Yeah, that doesn't seem possible, you could have either unit types or ally, but not both. Perhaps an improvement would be to allow the <unit-type name="name" /> tags to be used in any target tag, such as with the below example:

Code: [Select]
<target value="ally">
<unit-type name="name" />
</target>

That doesn't work: i tried it

but thank you for that:
Quote from: PT on 10 July 2011, 10:07:03 AM

    AND ( this one i will use ) i want to use particles only for affected units!

You can, just use the <affected-particle-file path="glow_particles.xml"/> tag as demonstrated in my example (which I will add to the wiki if softcoder could answer the few questions and/or confirm my guesses). Since I'm assuming both particles tags are optional, just don't use the <originator-particle-file path="glow_particles.xml"/> tag.
Title: Re: A few new things
Post by: Omega on 11 July 2011, 09:18:03

AND (this one i will use too) i want to do the attack-boost only on ALLY unit-types (hm my bad english :) )
Yeah, that doesn't seem possible, you could have either unit types or ally, but not both. Perhaps an improvement would be to allow the <unit-type name="name" /> tags to be used in any target tag, such as with the below example:

Code: [Select]
<target value="ally">
<unit-type name="name" />
</target>

That doesn't work: i tried it
Of course it doesn't, that's not a code example (though by testing it, you did verify that I am understanding Softcoder's XML example correctly), it's just an example of how this feature should be implemented.
Title: Re: A few new things
Post by: softcoder on 11 July 2011, 13:49:06
When it comes to targets of the attack-boost the following are valid:

Ally,Foe,Faction,UnitTypes,All

If the value is UnitType then you are able to specify specific unitTypes that should be affected (this is where the sub tags fit in). If modders want the ability to use these sub-tags as a 'second level filter' that could potentially also be done, but currently is not implemented as such.
Title: Re: A few new things
Post by: Omega on 11 July 2011, 21:03:02
When it comes to targets of the attack-boost the following are valid:

Ally,Foe,Faction,UnitTypes,All

If the value is UnitType then you are able to specify specific unitTypes that should be affected (this is where the sub tags fit in). If modders want the ability to use these sub-tags as a 'second level filter' that could potentially also be done, but currently is not implemented as such.
The problem is, those tags alone aren't very useful unless you can combine them with unit-types. That way you could have ONLY allied Guards be boosted, or maybe only enemy Archers, etc. Otherwise, it's impossible to affect units without accidentally boosting foes or reducing allies, unless you want to affect all units.
Title: Re: A few new things
Post by: softcoder on 12 July 2011, 02:04:12
Fair enough, unit-type may now be used for all types as a sub-filter
Title: Re: A few new things
Post by: Omega on 12 July 2011, 03:40:56
Fair enough, unit-type may now be used for all types as a sub-filter
Cool, but could you please answer my questions and assumptions in my previous post so that we can add this to the Wiki?

Oh, wow, didn't notice that you edited your post. Thankfully Elim bumped it. Since it's now in the SVN and has a mod that uses some of the features, I think it's time to document it properly. I can happily do that if you supply a bit more information, or you can do so yourself.

I think multiple animations may be in there, not sure, if it is though, we'd probably have to add the min-hp and max-hp parameters. Question first: What happens if these parameters overlap, eg: one animation is when the unit's HP is 0-60, and the other is 40-100, what happens when the hp is 40-60, where it fills both animation requirements?

This here seems to be the full XML options for these unit boosts.
Code: [Select]
<allow-multiple-boosts value="false" />
<radius value="5"/>
<target value="all|ally|foe|faction"/>
<max-hp value="100"/>
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="0"/>
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="100" value-percent-multipler="true" />
<production-speed value="0"/>
<particles value="true">
<originator-particle-file path="glow_particles.xml"/>
<affected-particle-file path="glow_particles.xml"/>
</particles>
First tricky one we have seems to be the target tag. Am I correct in the assumption that if using the ally, all, foe, or faction values, the tag would simply look like <target value="value" /> while if the value is unit-types, then it would contain a children list of <unit-type name="name" /> tags? And another question about that tag, can it have units from any faction in that techtree, or just from the current faction? (eg: if a magic unit has point boost, can it use a unit-type tag to give a negative boost to tech's swordmen?)

The boosting tags seem to be the exact same as scenarios except that they can have an optional "value-percent-multiplier" which will have the value input instead be divided by 100 then multiply the stat (sadly, this percentage format is rather inconsistent with every other occurance in the XMLs, which instead use 1.0 = 100%, aka: decimal form).

As for particles, I'm assuming that originator-particle-file is the particles to give to the unit that will distribute the boost when the the affected unit is nearby (which would get the affected-particle-file particle system). This would last only while the affect unit is within the radius distance (and thus being affected), and would end when the affected unit leaves.

And the trickiest question: when using multiple boosts (and allow-multiple-boosts is true), how do multipliers stack? In GAE, the ADD all the multipliers together, then multiply them by the base stat, then finally add on the static modifiers (this prevents multipliers from becoming godly exponential increases, which could be too steep and thus be overpowered and unintended). The formula's GAE uses and examples are explained here: GAE/Enhancements#Analysis (https://docs.megaglest.org/GAE/Enhancements#Analysis)
Title: Re: A few new things
Post by: titi_son on 14 July 2011, 00:07:07
should i post that a feature request now  :o ? Because i want to use the boost as home-boost (at home all warriors gets more strength) but it looks bad if the workers get this too.
Title: Re: A few new things
Post by: ElimiNator on 14 July 2011, 01:48:51
Just specify the army units:
Code: [Select]
<target value="faction">
<unit-type name="archer" />
<unit-type name="swordman" />
<unit-type name="guard" />
<unit-type name="ect" />
</target>
Title: Re: A few new things
Post by: titi_son on 14 July 2011, 19:12:39
for what is faction ( only for you or what? ) and the thing you write there does NOT WORK. I tried it with ally.
Title: Re: A few new things
Post by: ElimiNator on 14 July 2011, 21:15:25
Faction means you. Try it with faction.
Title: Re: A few new things
Post by: softcoder on 14 July 2011, 22:12:03
With the current svn you may specify unit types. The following explains the types.

target is a first level filter:
Code: [Select]
all = all units
ally = all alies (including your units)
foe (all enemy units)
faction (all units in your faction)
unit-types = the explicit list of unit types.

The second level filter for all types (except unit-types) is the optional list of units:

Code: [Select]
<unit-type name="archer" />
<unit-type name="swordman" />
<unit-type name="guard" />
<unit-type name="ect" />

but these are optional as a second level filter.

If you find that the current svn is not working like this let me know and I will fix it.
Title: Re: A few new things
Post by: Omega on 15 July 2011, 06:33:34
Added to the wiki.
XML/Skills (https://docs.megaglest.org/XML/Skills)
MG/Attack-boost (https://docs.megaglest.org/MG/Attack-boost)

However, you failed to answer my questions so it may not be as fully fleshed out as possible. Feel free to expand the pages. As well, I have no clue how multiple boosts stack if allow-multiple-boosts is true. Do they multiply, or do they add like GAE (https://docs.megaglest.org/GAE/Enhancements#Analysis)? I don't even know how multiple boosts work if allow-multiple-boosts is false. Do they reject the new boost, or does the new boost overwrite the old?

I added multiple animations, animation cycling maximum, and animations based on HP, but I couldn't figure out what these damage particles are!
Code: [Select]
<damage-particles value="true">
<particle-file path="fire_particles1.xml" minHp="4000" maxHp="5000"/>
<particle-file path="fire_particles2.xml" minHp="1000" maxHp="3999"/>
<particle-file path="fire_particles3.xml" minHp="1" maxHp="999"/>
</damage-particles>
The post only says the syntax, it doesn't explain what they are, what they do, or even what XML they belong in! Are these part of particle splashes? Unit particle systems? Can you post an example, please?
Title: Re: A few new things
Post by: titi_son on 15 July 2011, 20:55:31
@Omega: i think it means that the fire_particles1 are used from  1-999 hp, fire_Particles2 from 100 to 3999hp and fire_Particles3 from 4000-5000
Exp.: a unit has 6000hp and has the damage_particles. another unit is attack this unit. The Unit with max of 6000hp loses hp: now it has 4900 fire_Particles3 are activated...

and if you don't know what damage_particles are: THAT A VERY VERY OLD FEATURE.
@softcoder: IT WORKS  :D
Title: Re: A few new things
Post by: Omega on 15 July 2011, 21:54:46
@Omega: i think it means that the fire_particles1 are used from  1-999 hp, fire_Particles2 from 100 to 3999hp and fire_Particles3 from 4000-5000
Exp.: a unit has 6000hp and has the damage_particles. another unit is attack this unit. The Unit with max of 6000hp loses hp: now it has 4900 fire_Particles3 are activated...
Ah, but I still need the parent tag, and preferably a short example. Is it in the skill tag?

and if you don't know what damage_particles are: THAT A VERY VERY OLD FEATURE.
25 June is old? And regardless of how old one can consider it to be, it doesn't seem to be documented anywhere but the tiny snippet here. Can we get that expanded please?
Title: Re: A few new things
Post by: ElimiNator on 15 July 2011, 23:15:49
Damage particles have been out for over 4 months.
Title: Re: A few new things
Post by: Omega on 16 July 2011, 05:08:48
Damage particles have been out for over 4 months.
Ok, so just the HP part was added then...

At any rate, they aren't documented, so feel free to explain them.
Title: Re: A few new things
Post by: MuwuM on 16 July 2011, 12:51:20
Would it be possible to make the boost able to increase the (hp/ep-) regeneration, too?
Title: Re: A few new things
Post by: ElimiNator on 16 July 2011, 15:35:23
Well damage particles are pretty simple. Just like the burnable property, except you can specify the particle file you want. And now you can pick the HP too.
Title: Re: A few new things
Post by: titi_son on 16 July 2011, 19:35:51
Would it be possible to make the boost able to increase the (hp/ep-) regeneration, too?
i already wrote that here :)
Title: Re: A few new things
Post by: MuwuM on 16 July 2011, 21:22:09
oh, sorry... see it, as additional support to your idea.
Title: Re: A few new things
Post by: softcoder on 16 July 2011, 22:10:13
Yes, and while looking into it will likely make it so hp and ep regen are supportable items for any upgrade.
Title: Re: A few new things
Post by: MuwuM on 16 July 2011, 22:28:29
Yes, that would of course be good ;-)
Title: Re: A few new things
Post by: Omega on 16 July 2011, 23:22:28
Well damage particles are pretty simple. Just like the burnable property, except you can specify the particle file you want. And now you can pick the HP too.
While that's a start, I still need more than that... :P

Please state:
Title: Re: A few new things
Post by: MuwuM on 17 July 2011, 14:08:36
because some reason the attack boost doesn't work correctly for me.

http://www.youtube.com/watch?v=FU3nJhqSE_c
look on top right 1200 LP (which is HP) is usual and 1210 is boosted.

Xml of the unit granding the boost
(click to show/hide)

Xml of unit, that resives boost
(click to show/hide)
Title: Re: A few new things
Post by: Omega on 17 July 2011, 23:39:51
I fail to see what's wrong. Softcoder merely said he would try and allow adding HP and EP regen, not that it's already added.

will likely make it so hp and ep regen are supportable items for any upgrade.

As well, once it's implemented, if not already, wouldn't it use the same syntax as upgrades, seeing every other tag does (even strength is still misspelled :P)? <hp-regen value="30" />.

The syntax certainly hasn't been posted anywhere on the board yet.



Now that I have your attention, Softcoder:
I couldn't figure out what these damage particles are!
Code: [Select]
<damage-particles value="true">
<particle-file path="fire_particles1.xml" minHp="4000" maxHp="5000"/>
<particle-file path="fire_particles2.xml" minHp="1000" maxHp="3999"/>
<particle-file path="fire_particles3.xml" minHp="1" maxHp="999"/>
</damage-particles>
The post only says the syntax, it doesn't explain what they are, what they do, or even what XML they belong in! Are these part of particle splashes? Unit particle systems? Can you post an example, please?
Title: Re: A few new things
Post by: MuwuM on 18 July 2011, 00:07:34
The error is, that the boost sometimes doesn't end when leaving the boost-radius
Title: Re: A few new things
Post by: Omega on 18 July 2011, 02:21:49
The error is, that the boost sometimes doesn't end when leaving the boost-radius
Ah, I see. I'm a touch confused by your video, though. Where's the attacker?
Title: Re: A few new things
Post by: MuwuM on 18 July 2011, 11:23:44
it's an invisible unit in the corner of the map ;-)
Title: Re: A few new things
Post by: softcoder on 21 July 2011, 14:16:04
If possible package up your techtree so i can test it out and see the behaviour myself. In general i know the attack-boost is working as the vbros have already used many features, but its possible you are doing something that is exposing a bug.
Title: Re: A few new things
Post by: MuwuM on 21 July 2011, 16:13:21
Her is the download of my scenario (wich has the bug) http://magic.haus-romeo.de/0_battleglest.7z (http://magic.haus-romeo.de/0_battleglest.7z)
Title: Re: A few new things
Post by: ElimiNator on 21 July 2011, 17:36:08
Code: [Select]
<damage-particles value="true">
<particle-file path="fire_particles1.xml" minHp="4000" maxHp="5000"/>
<particle-file path="fire_particles2.xml" minHp="1000" maxHp="3999"/>
<particle-file path="fire_particles3.xml" minHp="1" maxHp="999"/>
</damage-particles>
The post only says the syntax, it doesn't explain what they are, what they do, or even what XML they belong in! Are these part of particle splashes? Unit particle systems? Can you post an example, please?
They are unit particle systems, like the fire in the campfire of Indians.
Title: Re: A few new things
Post by: Omega on 21 July 2011, 19:16:16
Code: [Select]
<damage-particles value="true">
<particle-file path="fire_particles1.xml" minHp="4000" maxHp="5000"/>
<particle-file path="fire_particles2.xml" minHp="1000" maxHp="3999"/>
<particle-file path="fire_particles3.xml" minHp="1" maxHp="999"/>
</damage-particles>
The post only says the syntax, it doesn't explain what they are, what they do, or even what XML they belong in! Are these part of particle splashes? Unit particle systems? Can you post an example, please?
They are unit particle systems, like the fire in the campfire of Indians.
Thanks Elim, I think I may have it in the right spot, now. https://docs.megaglest.org/XML/Skills
Title: Re: A few new things
Post by: softcoder on 22 July 2011, 06:15:55
I am unable to reproduce this on my end using your mod. Every time i move away from the circle the hp goes back to normal and the particle turns off. FYI to see unit id + name for all visible units hold ctrl + alt + ? then press ? by itself

Thanks

UPDATE:

svn now also support hpregeneration for upgrade and attackboost (use it in xml as you would normally and note that percent multiplier applies to both hp and hpregen)
Title: Re: A few new things
Post by: Ishmaru on 11 August 2011, 03:53:26
Would it be possible to have attack boost work for other skills such as stop and move?
Title: Re: A few new things
Post by: ElimiNator on 11 August 2011, 16:10:06
Would it be possible to have attack boost work for other skills such as stop and move?
Yes, it dose work for other skills. It can boost other skills and it can be located in other skills.
Title: Re: A few new things
Post by: Ishmaru on 12 August 2011, 03:07:18
Awsome! Just two things, is their code to increase hpregen only? and When using percentages sometime a unit will have less hp when leaving radius then with what it began with. In this case unit with 700 hp gets effected by hp boost  of 10% so it now has 770 hp when it leaves though instead of getting 700  hp, now it has 693 hp...

- actually 3 things when attached to a stop skill, if a unit moves into radius, gains boost, then leaves, loosing boost, and attempts reentering boost it no longer receives the boost.
Title: Re: A few new things
Post by: softcoder on 9 September 2011, 19:03:57
Could you post the faction(s) involved and tell me the steps to reproduce this?