summaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-11-09 03:45:42 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-02-02 15:35:17 +0100
commit1e562bdd132c4166ca4de2bdb3f241adaa9a7149 (patch)
tree84bca9f39cfd3c05d3a315c8e9cd854b18cb4682 /example
parent4cd1957231605e976c5cf001eddea80d5e49272f (diff)
downloadmanaserv-1e562bdd132c4166ca4de2bdb3f241adaa9a7149.tar.gz
manaserv-1e562bdd132c4166ca4de2bdb3f241adaa9a7149.tar.xz
manaserv-1e562bdd132c4166ca4de2bdb3f241adaa9a7149.zip
Added a way to specify the min and max attributes values.
This can now be done in attributes.xml through the minimum and maximum attribute parameters. I also changed the AttributeInfo struct as requested by bjorn. Reviewed-by: Erik Schilling, Thorbjørn Lindeijer
Diffstat (limited to 'example')
-rw-r--r--example/clientdata/attributes.xml157
1 files changed, 135 insertions, 22 deletions
diff --git a/example/clientdata/attributes.xml b/example/clientdata/attributes.xml
index 7501f14..69346e5 100644
--- a/example/clientdata/attributes.xml
+++ b/example/clientdata/attributes.xml
@@ -6,75 +6,188 @@
<!-- First Candidate for TMW attributes definitions -->
<!-- The id are linked to the engine core. Do not change them. -->
- <attribute id="1" name="Strength" desc="Increases carrying capacity and increases damage for many melee weapons." modifiable="true" scope="character">
+ <attribute id="1" name="Strength"
+ desc="Increases carrying capacity and increases damage for many melee weapons."
+ modifiable="true"
+ scope="character"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="str" effect="Strength %+.1f" />
</attribute>
- <attribute id="2" name="Agility" desc="Increases attack speed, conventional dodge, and also slightly increases movement speed." modifiable="true" scope="character">
+ <attribute id="2" name="Agility"
+ desc="Increases attack speed, conventional dodge, and also slightly increases movement speed."
+ modifiable="true"
+ scope="character"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="agi" effect="Agility %+.1f" />
</attribute>
- <attribute id="3" name="Vitality" desc="Increases the maximum number of hitpoints, defence, and also slightly increase hitpoint regeneration." modifiable="true" scope="character">
+ <attribute id="3" name="Vitality"
+ desc="Increases the maximum number of hitpoints, defence, and also slightly increase hitpoint regeneration."
+ modifiable="true"
+ scope="character"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="vit" effect="Vitality %+.1f" />
</attribute>
- <attribute id="4" name="Intelligence" desc="Involved in magic. So better not put too much in it for now..." modifiable="true" scope="character">
+ <attribute id="4" name="Intelligence"
+ desc="Involved in magic. So better not put too much in it for now..."
+ modifiable="true"
+ scope="character"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="int" effect="Intelligence %+.1f" />
</attribute>
- <attribute id="5" name="Dexterity" desc="Increases conventional accuracy, decreases the proportion of warmup time to cooldown time for conventional attacks and increases the damage for many ranged weapons." modifiable="true" scope="character">
+ <attribute id="5" name="Dexterity"
+ desc="Increases conventional accuracy, decreases the proportion of warmup time to cooldown time for conventional attacks and increases the damage for many ranged weapons."
+ modifiable="true"
+ scope="character"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="dex" effect="Dexterity %+.1f" />
</attribute>
- <attribute id="6" name="Willpower" desc="Increases magical dodge and decreases the proportion of warmup time to cooldown time for magical attacks." modifiable="true" scope="character">
+ <attribute id="6" name="Willpower"
+ desc="Increases magical dodge and decreases the proportion of warmup time to cooldown time for magical attacks."
+ modifiable="true"
+ scope="character"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="wil" effect="Willpower %+.1f" />
</attribute>
- <attribute id="7" name="Accuracy" desc="Increases the chance of outgoing physical attacks hitting their target." modifiable="false" scope="being">
+ <attribute id="7" name="Accuracy"
+ desc="Increases the chance of outgoing physical attacks hitting their target."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="100">
<modifier stacktype="stackable" modtype="additive" tag="acc1" effect="Accuracy %+.1f" />
<modifier stacktype="stackable" modtype="multiplicative" tag="acc2" />
</attribute>
- <attribute id="8" name="Defense" desc="Reduces incoming conventional damage." modifiable="false" scope="being">
+ <attribute id="8" name="Defense"
+ desc="Reduces incoming conventional damage."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="255">
<modifier stacktype="stackable" modtype="additive" tag="def1" effect="Defense %+.1f" />
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="def2" effect="Defense x%.3f" additional="This modifier does not stack with other ##1Greater##0 defensive type effects." />
</attribute>
- <attribute id="9" name="Dodge" desc="Decreases the chance of incoming physical attacks hitting you." modifiable="false" scope="being">
+ <attribute id="9" name="Dodge"
+ desc="Decreases the chance of incoming physical attacks hitting you."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="100">
<modifier stacktype="non stackable bonus" modtype="additive" tag="dge" effect="Dodge %+.2f. This modifier does not stack with other dodge modifiers. "/>
</attribute>
- <attribute id="10" name="M. dodge" desc="Decreases the chance of incoming magical attacks hitting you." modifiable="false" scope="being">
+ <attribute id="10" name="M. dodge"
+ desc="Decreases the chance of incoming magical attacks hitting you."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="100">
<modifier stacktype="stackable" modtype="additive" tag="mdge" effect="Magical dodge %+.2f"/>
</attribute>
- <attribute id="11" name="M. defense" desc="Reduces incoming magical damage." modifiable="false" scope="being">
+ <attribute id="11" name="M. defense"
+ desc="Reduces incoming magical damage."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="255">
<modifier stacktype="non stackable bonus" modtype="additive" tag="mdef" effect="Magical defense %+.1f" additional="This modifier does not stack with other ##1Magical defense##0 modifiers." /> <!-- should this be non stackable instead of non stackable bonus? -->
</attribute>
- <attribute id="12" name="Bonus att. speed" tag="aspd" effect="Bonus attack speed %+f" desc="Increases the attack speed of all active auto-attacks." modifiable="false" scope="being">
+ <attribute id="12" name="Bonus att. speed"
+ tag="aspd"
+ effect="Bonus attack speed %+f"
+ desc="Increases the attack speed of all active auto-attacks."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="255">
<modifier stacktype="non stackable" modtype="additive" tag="aspd1" />
<modifier stacktype="stackable" modtype="multiplicative" tag="aspd2" />
<modifier stacktype="stackable" modtype="additive" tag="aspd3" />
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="aspd4" />
</attribute>
- <attribute id="13" name="HP" desc="The number of hitpoints this being has. When this drops below 0, the being dies." modifiable="false" scope="being" player-info="hp">
+ <attribute id="13" name="HP"
+ desc="The number of hitpoints this being has. When this drops below 0, the being dies."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="9999"
+ player-info="hp">
<modifier stacktype="stackable" modtype="additive" tag="hp" effect="Hitpoints %+.1f" additional="The modifier will still be removed normally, increasing or decreasing hp as relevant." /> <!-- Not a typo. I really am allowing modifiers to be applied here. Most normal attacks will affect the base value, but interesting things happen when either bonus of malus effects here expire... :] -->
</attribute>
- <attribute id="14" name="Max HP" desc="The maximum number of hitpoints this being can have." modifiable="false" scope="being" player-info="max-hp">
+ <attribute id="14" name="Max HP"
+ desc="The maximum number of hitpoints this being can have."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="9999"
+ player-info="max-hp">
<modifier stacktype="stackable" modtype="additive" tag="mhp1" effect="Max hp %+.1f" />
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="mhp2" effect="Max hp x%.3f" additional="This modifier does not stack with other ##1Lesser##0 max hp type effects." />
<modifier stacktype="non stackable bonus" modtype="additive" tag="mhp3" effect="Max hp %+.1f" additional="This modifier does not stack with other ##1Greater##0 max hp type effects." />
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="mhp4" effect="Max hp x%.3f" additional="This modifier does not stack with other ##1Major##0 max hp type effects." />
</attribute>
- <attribute id="15" name="HP regeneration" tag="hpregen" effect="hp regen %+f" desc="The rate at which hitpoints are automatically replenished." modifiable="false" scope="character">
+ <attribute id="15" name="HP regeneration"
+ tag="hpregen"
+ effect="hp regen %+f"
+ desc="The rate at which hitpoints are automatically replenished."
+ modifiable="false"
+ scope="character"
+ minimum="0"
+ maximum="100">
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="hpr1" effect="You shouldn't be seeing this. Items shouldn't be affecting this layer." /> <!-- Reserved for map effects -->
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="hpr2" effect="Hitpoint regeneration x%.3f" additional="This modifier does not stack with other ##1Basic##0 hitpoint regeneration type effects."/> <!-- Reserved for passive item effects -->
<modifier stacktype="stackable" modtype="multiplicative" tag="hpr3" effect="Hitpoint regeneration x%.3f" /> <!-- Reserved for active effects -->
<modifier stacktype="stackable" modtype="additive" tag="hpr4" effect="Hitpoint regeneration %+.3f" /> <!-- General purpose -->
<modifier stacktype="non stackable bonus" modtype="multiplicative" tag="hpr5" effect="Hitpoint regeneration x%.4f" additional="This modifier does not stack with other ##1Greater##0 hitpoint regeneration type effects." /> <!-- For *Very* powerful effects only -->
</attribute>
- <attribute id="16" name="Movement speed" desc="The speed at which this being moves in tiles per second." modifiable="false" scope="being">
+ <attribute id="16" name="Movement speed"
+ desc="The speed at which this being moves in tiles per second."
+ modifiable="false"
+ scope="being"
+ minimum="0"
+ maximum="7">
<modifier stacktype="non stackable bonus" modtype="additive" tag="mspd" effect="Movement speed %+.2f" additional="This modifier does not stack with other ##1Movement speed##0 type effects." />
</attribute>
- <attribute id="17" name="Movement speed (raw)" desc="The raw movement speed of this being." modifiable="false" scope="being" player-info="none" />
- <attribute id="18" name="gp" desc="The number of gold pieces this being possesses." modifiable="false" scope="character" player-info="money" />
- <attribute id="19" name="Capacity" desc="The capacity of this character." modifiable="false" scope="character" player-info="max-weight" >
+ <attribute id="17" name="Movement speed (raw)"
+ desc="The raw movement speed of this being."
+ modifiable="false"
+ scope="being"
+ player-info="none" />
+ <attribute id="18" name="gp"
+ desc="The number of gold pieces this being possesses."
+ modifiable="false"
+ scope="character"
+ minimum="0"
+ player-info="money" />
+ <attribute id="19" name="Capacity"
+ desc="The capacity of this character."
+ modifiable="false"
+ scope="character"
+ minimum="0"
+ maximum="255"
+ player-info="max-weight" >
<modifier stacktype="stackable" modtype="additive" tag="cap1" effect="Capacity %+.2f" />
</attribute>
<!-- End of core-attributes definition -->
<!-- Temporary definitions for monsters until the auto-attack system is finished. -->
- <attribute id="20" name="physical attack (minimum)" modifiable="false" scope="monster" />
- <attribute id="21" name="physical attack (delta)" modifiable="false" scope="monster" />
- <attribute id="22" name="magical attack" modifiable="false" scope="monster" />
+ <attribute id="20" name="physical attack (minimum)"
+ modifiable="false"
+ scope="monster"
+ minimum="0"
+ maximum="255" />
+ <attribute id="21" name="physical attack (delta)"
+ modifiable="false"
+ scope="monster"
+ minimum="0"
+ maximum="255" />
+ <attribute id="22" name="magical attack"
+ modifiable="false"
+ scope="monster"
+ minimum="0"
+ maximum="255" />
</attributes>