Difference between revisions of "Template:E"

From Tales of Maj'Eyal
Jump to: navigation, search
(adds section: 'Life and Resources')
(Redesigning the template to copy terminology directly from lua file, as I'm afraid that inventing new ways to categorize each effect would lead to future confusion.)
Line 53: Line 53:
 
| lck = Luck
 
| lck = Luck
 
| ?? }}
 
| ?? }}
| combat = {{#switch: {{{2}}}
+
| combat_physresist = Physical save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}})
| physresist = Physical save:
+
| combat_spellresist = Spell save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}})
| spellresist = Spell save:
+
| combat_mentalresist = Mental save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}})
| mentalresist = Mental save:
+
| max_life = Maximum life: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| ?? }} + ({{{4}}}-{{#expr:{{{4}}}+{{{3}}}}})
+
| max_mana = Maximum mana: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| max = Maximum {{#switch: {{{2}}}
+
| max_soul = Maximum souls: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| life = life
+
| max_stamina = Maximum stamina: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| mana = mana
+
| max_hate = Maximum hate: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| soul = souls
+
| max_psi = Maximum psi: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| stamina = stamina
+
| max_vim = Maximum vim: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| hate = hate
+
| max_positive = Maximum positive energy: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| psi = psi
+
| max_negative = Maximum negative energy: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| vim = vim
+
| max_air = Maximum air capacity: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }})
| positive = positive energy
+
| negative = negative energy
+
| air = air capacity
+
| ?? }}: + ({{{4}}}-{{#expr:{{{4}}}+{{{3}}}}})
+
 
| lite = Light radius: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}})
 
| lite = Light radius: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}})
 
| ?? }}</onlyinclude></includeonly>
 
| ?? }}</onlyinclude></includeonly>
Line 94: Line 90:
  
 
=== Resistances ===
 
=== Resistances ===
The lua code specifying an ego's effect on fire resistance is
+
The lua code specifying an ego's effect on fire resistance looks like
 
<pre>resists={[DamageType.FIRE] = resolvers.mbonus_material(15, 15)}</pre>
 
<pre>resists={[DamageType.FIRE] = resolvers.mbonus_material(15, 15)}</pre>
  
Line 103: Line 99:
  
 
=== Effects on Hit ===
 
=== Effects on Hit ===
The lua code specifying an ego's effect when the wearer is hit is
+
The lua code specifying an ego's dealing physical damage when the wearer is hit looks like
 
<pre>on_melee_hit={[DamageType.PHYSICAL] = resolvers.mbonus_material(10, 10)}</pre>
 
<pre>on_melee_hit={[DamageType.PHYSICAL] = resolvers.mbonus_material(10, 10)}</pre>
  
Line 112: Line 108:
  
 
=== Melee and Ranged Attacks with Extra Flat Damage ===
 
=== Melee and Ranged Attacks with Extra Flat Damage ===
The lua code specifying an ego's effect on wearer's melee attacks regarding flat damage looks like
+
The lua code specifying an ego's effect on wearer's melee attacks dealing extra fire damage looks like
 
<pre>melee_project={[DamageType.FIRE] = resolvers.mbonus_material(15, 8),}</pre>
 
<pre>melee_project={[DamageType.FIRE] = resolvers.mbonus_material(15, 8),}</pre>
  
Line 123: Line 119:
  
 
Supported:
 
Supported:
* str (Strength)
+
* Strength (str)
* dex (Dexterity)
+
* Dexterity (dex)
* con (Constitution)
+
* Constitution (con)
* mag (Magic)
+
* Magic (mag)
* wil (Willpower)
+
* Willpower (wil)
* cun (Cunning)
+
* Cunning (cun)
* lck (Luck)
+
* Luck (lck)
  
The lua code for an ego's effect on a character's stats looks like
+
The lua code for an ego's effect on increasing willpower looks like
 
<pre>inc_stats = {[Stats.STAT_WIL] = resolvers.mbonus_material(5, 1)}</pre>
 
<pre>inc_stats = {[Stats.STAT_WIL] = resolvers.mbonus_material(5, 1)}</pre>
  
Line 139: Line 135:
 
To produces the following text: {{e|stats|wil|5|1}}
 
To produces the following text: {{e|stats|wil|5|1}}
  
== Stats Beginning with combat_ in LUA Code ==
+
== Saves ==
Supported combat stats:
+
Supported:
 
* physresist (physical save)
 
* physresist (physical save)
 
* spellresist (spell save)
 
* spellresist (spell save)
Line 151: Line 147:
  
 
Convert it with this template as
 
Convert it with this template as
<pre>{{e|combat|physresist|15|10}}</pre>
+
<pre>{{e|combat_physresist|15|10}}</pre>
  
To produces the following text: {{e|combat|physresist|15|10}}
+
To produces the following text: {{e|combat_physresist|15|10}}
  
 
== Life and Resources ==
 
== Life and Resources ==
Line 161: Line 157:
  
 
Convert it with this template as
 
Convert it with this template as
<pre>{{e|max|life|60|40}}</pre>
+
<pre>{{e|max_life|60|40}}</pre>
  
To produces the following text: {{e|max|life|60|40}}
+
To produces the following text: {{e|max_life|60|40}}
  
 
== Light radius ==
 
== Light radius ==

Revision as of 11:03, 15 November 2016


This template is designed to match item effects descriptions and their lua code, to ensure consistency, intuitive conversion, and keep the wording in line with their in-game description. Source:game/modules/mod/class/Object.lua


Damage Types: Increases, Resistances and So Forth

Supported damage types:

  • all
  • acid
  • arcane
  • blight
  • cold
  • darkness
  • fire
  • light
  • lightning
  • mind
  • nature
  • physical
  • temporal

Resistances

The lua code specifying an ego's effect on fire resistance looks like

resists={[DamageType.FIRE] = resolvers.mbonus_material(15, 15)}

Convert it with this template as

{{e|resists|fire|15|15}}

To produces the following text: Changes resistances: + (15-30)% Fire

Effects on Hit

The lua code specifying an ego's dealing physical damage when the wearer is hit looks like

on_melee_hit={[DamageType.PHYSICAL] = resolvers.mbonus_material(10, 10)}

Convert it with this template as

{{e|on_melee_hit|physical|10|10}}

To produces the following text: Damage when hit (Melee): + (10-20) Physical

Melee and Ranged Attacks with Extra Flat Damage

The lua code specifying an ego's effect on wearer's melee attacks dealing extra fire damage looks like

melee_project={[DamageType.FIRE] = resolvers.mbonus_material(15, 8),}

Convert it with this template as

{{e|melee_project|fire|15|8}}

To produces the following text: Damage (Melee): + (8-23) Fire

Stats

Supported:

  • Strength (str)
  • Dexterity (dex)
  • Constitution (con)
  • Magic (mag)
  • Willpower (wil)
  • Cunning (cun)
  • Luck (lck)

The lua code for an ego's effect on increasing willpower looks like

inc_stats = {[Stats.STAT_WIL] = resolvers.mbonus_material(5, 1)}

Convert it with this template as

{{e|stats|wil|5|1}}

To produces the following text: ??

Saves

Supported:

  • physresist (physical save)
  • spellresist (spell save)
  • mentalresist (mental save)

Saving Throws

The lua code for an ego's effect on physical save looks like

combat_physresist = resolvers.mbonus_material(15, 10)

Convert it with this template as

{{e|combat_physresist|15|10}}

To produces the following text: Physical save: + (10-25)

Life and Resources

The lua code for an ego's effect on wearer's maximum life looks like

max_life=resolvers.mbonus_material(60, 40)

Convert it with this template as

{{e|max_life|60|40}}

To produces the following text: Maximum life: + (40-100)

Light radius

The lua code for an ego's effect on light radius looks like

lite = resolvers.mbonus_material(1, 2)

Convert it with this template as

{{e|lite|1|2}}

To produces the following text: Light radius: + (2-3)