Difference between revisions of "User:Trang Oul/Sandbox/Template:Property"

From Basin Wiki
Jump to navigation Jump to search
Line 1: Line 1:
−
<includeonly>{{#switch: {{{1|}}}
+
<noinclude>
−
| att-skill             = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[on attack]]
+
Formats a property defines as a 4-tuple like in data files (<code>magicprefix.txt</code>, <code>magicsuffix.txt</code>, <code>automagic.txt</code>, <code>setitems.txt</code>, <code>sets.txt</code>, <code>uniqueitems.txt</code>, <code>runes.txt</code>, <code>gems.txt</code>, <code>propertygroups.txt</code> and others)
−
| hit-skill             = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[on striking]]
+
 
−
| gethit-skill           = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[when struck]]
+
=== Sources ===
−
| Gethit-skill           = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[when struck]]
+
Built by hand from:
−
| kill-skill             = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[when you Kill an Enemy]]
+
* <code>properties.txt</code> (cols: <code>code</code> - property code, <code>func<X></code> - how the stat is used, <code>stat<X></code> - corresponding stat from <code>itemstatcost.txt</code>)
−
| death-skill           = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[when you Die]]
+
* <code>itemstatcost.txt</code> (cols: <code>Stat</code> - stat code (matched with <code>stat<X></code> from <code>properties.txt</code>), <code>descstrpos</code>, <code>descstrneg</code> - keys for string labels)
−
| levelup-skill         = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill|{{{2|}}}}} [[when you Level-Up]]
+
* <code>data\local\lng\strings</code> (string table labels for property text)
−
| noheal                 = [[Prevent Monster Heal]]
+
 
−
| half-freeze           = [[Half Freeze Duration]]
+
Labels are slightly modified to display value ranges and to include links.
−
| nofreeze               = [[Cannot Be Frozen]]
+
 
−
| knock                 = [[Knockback]]
+
=== Usage ===
 +
<code><nowiki>{{Item property|<property key>|[param]|[min value]|[max value]}}</nowiki></code><br/>
 +
To use, simply copy the property 4-tuple from the data file and replace tabs with <code>|</code>.
 +
 
 +
==== Examples ====
 +
No param, min and max values equal:<br/>
 +
<code><nowiki>{{Property|ac||60|60}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|ac||60|60}}<br/>
 +
No param, min and max values not equal:<br/>
 +
<code><nowiki>{{Property|abs-fire||5|11}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|abs-fire||5|11}}<br/>
 +
Param, min value, max value (latter two re-used for a different purpose):<br/>
 +
<code><nowiki>{{Property|Gethit-skill|235|1|25}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|Gethit-skill|235|1|25}}<br/>
 +
No param, min and max value ignored:<br/>
 +
<code><nowiki>{{Property|indestruct||1|1}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|indestruct||1|1}}<br/>
 +
As above, just with no min and max values:<br/>
 +
<code><nowiki>{{Property|indestruct|||}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|indestruct|||}}<br/>
 +
Calculated value - param:<br/>
 +
<code><nowiki>{{Property|ac/lvl|30||}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|ac/lvl|30||}}<br/>
 +
Calculated value - min and max values:<br/>
 +
<code><nowiki>{{Property|hp/lvl||8|12}}</nowiki></code> &rarr; {{User:Trang Oul/Sandbox/Template:Property|hp/lvl||8|12}}<br/>
 +
 
 +
</noinclude><includeonly>{{#switch: {{{1|}}}
 +
| att-skill               = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[on attack]]
 +
| hit-skill               = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[on striking]]
 +
| gethit-skill           = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[when struck]]
 +
| Gethit-skill           = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[when struck]]
 +
| kill-skill             = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[when you Kill an Enemy]]
 +
| death-skill             = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[when you Die]]
 +
| levelup-skill           = {{{3|}}}% [[Chance to cast]] level {{{4|}}} {{User:Trang Oul/Sandbox/Template:Skill name|{{{2|}}}}} [[when you Level-Up]]
 +
| noheal                 = [[Prevent Monster Heal]]
 +
| half-freeze             = [[Half Freeze Duration]]
 +
| nofreeze               = [[Cannot Be Frozen]]
 +
| knock                   = [[Knockback]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 19:01, 1 November 2026

Formats a property defines as a 4-tuple like in data files (magicprefix.txt, magicsuffix.txt, automagic.txt, setitems.txt, sets.txt, uniqueitems.txt, runes.txt, gems.txt, propertygroups.txt and others)

Sources

Built by hand from:

  • properties.txt (cols: code - property code, func<X> - how the stat is used, stat<X> - corresponding stat from itemstatcost.txt)
  • itemstatcost.txt (cols: Stat - stat code (matched with stat<X> from properties.txt), descstrpos, descstrneg - keys for string labels)
  • data\local\lng\strings (string table labels for property text)

Labels are slightly modified to display value ranges and to include links.

Usage

{{Item property|<property key>|[param]|[min value]|[max value]}}
To use, simply copy the property 4-tuple from the data file and replace tabs with |.

Examples

No param, min and max values equal:
{{Property|ac||60|60}} →
No param, min and max values not equal:
{{Property|abs-fire||5|11}} →
Param, min value, max value (latter two re-used for a different purpose):
{{Property|Gethit-skill|235|1|25}} → 1% Chance to cast level 25 Cyclone Armor when struck
No param, min and max value ignored:
{{Property|indestruct||1|1}} →
As above, just with no min and max values:
{{Property|indestruct|||}} →
Calculated value - param:
{{Property|ac/lvl|30||}} →
Calculated value - min and max values:
{{Property|hp/lvl||8|12}} →