Template talk:Magic Item: Difference between revisions

From Epic Path
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
}}</onlyinclude>
}}</onlyinclude>


| Buy-At-Level =
{{#vardefine:CostLevel|
}}


| Percent-Of-Total-Wealth =
{{#vardefine:CostMultiple|
  <!-- Values: integer between 0.01 and 1.00; percent of  -->
}}
  <!-- total wealth you must expend at the listed level  -->
 
  <!-- to get the item. (e.g. "0.10" to set it to 10%)    -->
{{#vardefine:Price|{{#number_format: {{#expr: {{Price-18|transcludesection={{#var:CostLevel}}}} * {{#var:CostMultiple|1}}}}|-2}}
  <!--  Typical values:                                 -->
}}
  <!--    weapon  - 20%                                -->
  <!--    armor    - 10%                                -->
  <!--    slotless - 20%                                -->
  <!--    wands    - 10%                                -->
  <!--    other    -  5%                                -->
        
        
| Price=<onlyinclude>{{#ifeq:{{{transcludesection|Price}}}
| Cost=<onlyinclude>{{#ifeq:{{{transcludesection|Cost}}}
| Price|{{#number_format: {{#expr:{{Player-Total-Wealth|transcludesection={{{Buy-At-Level}}}}} * {{{Percent-Of-Total-Wealth}}}}}|-2}}
| Cost|{{#var:Price}}
}}</onlyinclude>
}}</onlyinclude>
   <!-- Do not do anything with this field. Just include it in the template -->
   <!-- Do not do anything with this field. Just include it. -->


| CL =  
| CL =  

Revision as of 22:17, 4 June 2017

Usage:

{{Template:Magic_Item

| Name = 

| Slot=<onlyinclude>{{#ifeq:{{{transcludesection|Slot}}}
| Slot|
}}</onlyinclude>

{{#vardefine:CostLevel|
}}

{{#vardefine:CostMultiple|
}}

{{#vardefine:Price|{{#number_format: {{#expr: {{Price-18|transcludesection={{#var:CostLevel}}}} * {{#var:CostMultiple|1}}}}|-2}}
}}
       
| Cost=<onlyinclude>{{#ifeq:{{{transcludesection|Cost}}}
| Cost|{{#var:Price}}
}}</onlyinclude>
  <!-- Do not do anything with this field. Just include it. -->

| CL = 

| Aura=<onlyinclude>{{#ifeq:{{{transcludesection|Aura}}}
| Aura|
}}</onlyinclude>

| Weight=<onlyinclude>{{#ifeq:{{{transcludesection|Weight}}}
| Weight|
}}</onlyinclude>

| Description = 

| Requirements = 

| ShortDesc=<onlyinclude>{{#ifeq:{{{transcludesection|ShortDesc}}}
| ShortDesc|
}}</onlyinclude>

}}