Difference between revisions of "Template:E"
m (→Saves) |
(adds === Maximum Amount ===) |
||
Line 56: | Line 56: | ||
| combat_spellresist = Spell save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}}) | | combat_spellresist = Spell save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}}) | ||
| combat_mentalresist = Mental save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}}) | | combat_mentalresist = Mental save: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}}) | ||
+ | | life_regen = Life regen: + ({{#expr: {{{3}}}/10 round 2 }}-{{#expr:({{{3}}}+{{{2}}})/10 round 2 }}) | ||
+ | | stamina_regen = Stamina each turn: + ({{#expr: {{{3}}}/10 round 2 }}-{{#expr:({{{3}}}+{{{2}}})/10 round 2 }}) | ||
+ | | hate_regen = Hate each turn: + ({{#expr: {{{3}}}/10 round 2 }}-{{#expr:({{{3}}}+{{{2}}})/10 round 2 }}) | ||
+ | | mana_regen = Mana each turn: + ({{#expr: {{{3}}}/100 round 2 }}-{{#expr:({{{3}}}+{{{2}}})/100 round 2 }}) | ||
+ | | psi_regen = Psi each turn: + ({{#expr: {{{3}}}/100 round 2 }}-{{#expr:({{{3}}}+{{{2}}})/100 round 2 }}) | ||
| max_life = Maximum life: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | | max_life = Maximum life: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | ||
| max_mana = Maximum mana: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | | max_mana = Maximum mana: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | ||
− | |||
| max_stamina = Maximum stamina: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | | max_stamina = Maximum stamina: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | ||
| max_hate = Maximum hate: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | | max_hate = Maximum hate: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | ||
Line 65: | Line 69: | ||
| max_positive = Maximum positive energy: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | | max_positive = Maximum positive energy: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | ||
| max_negative = Maximum negative energy: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | | max_negative = Maximum negative energy: + ({{#expr: {{{3}}} round 2 }}-{{#expr:({{{3}}}+{{{2}}}) round 2 }}) | ||
− | |||
| lite = Light radius: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}}) | | lite = Light radius: + ({{{3}}}-{{#expr:{{{3}}}+{{{2}}}}}) | ||
| ?? }}</onlyinclude></includeonly> | | ?? }}</onlyinclude></includeonly> | ||
Line 150: | Line 153: | ||
== Life and Resources == | == Life and Resources == | ||
+ | Supported: | ||
+ | * life (regen & max) | ||
+ | * mana (regen & max) | ||
+ | * stamina (regen & max) | ||
+ | * hate (regen & max) | ||
+ | * psi (regen & max) | ||
+ | * vim (max) | ||
+ | * positive energy (max) | ||
+ | * negative energy (max) | ||
+ | |||
+ | === Regeneration === | ||
+ | The lua code for an ego's effect on mana regeneration looks like | ||
+ | <pre>mana_regen = resolvers.mbonus_material(30, 10, function(e, v) v=v/100 return 0, v end)</pre> | ||
+ | (the divider value for v should be ignored when you use this template. There are different dividers for v in the source code, which is hard-coded in this template for the time being.) | ||
+ | |||
+ | Convert it with this template as | ||
+ | <pre>{{e|mana_regen|30|10}}</pre> | ||
+ | |||
+ | To produces the following text: {{e|mana_regen|30|10}} | ||
+ | === Maximum Amount === | ||
The lua code for an ego's effect on wearer's maximum life looks like | The lua code for an ego's effect on wearer's maximum life looks like | ||
<pre>max_life=resolvers.mbonus_material(60, 40)</pre> | <pre>max_life=resolvers.mbonus_material(60, 40)</pre> |
Revision as of 11:36, 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
Contents
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: ??
Saving Throws
Supported:
- physresist (physical save)
- spellresist (spell save)
- mentalresist (mental save)
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
Supported:
- life (regen & max)
- mana (regen & max)
- stamina (regen & max)
- hate (regen & max)
- psi (regen & max)
- vim (max)
- positive energy (max)
- negative energy (max)
Regeneration
The lua code for an ego's effect on mana regeneration looks like
mana_regen = resolvers.mbonus_material(30, 10, function(e, v) v=v/100 return 0, v end)
(the divider value for v should be ignored when you use this template. There are different dividers for v in the source code, which is hard-coded in this template for the time being.)
Convert it with this template as
{{e|mana_regen|30|10}}
To produces the following text: Mana each turn: + (0.1-0.4)
Maximum Amount
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)