Template:Sandbox/User:Teamtoto/newitem2/doc: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
m (Replaced content with "==Usage== <syntaxhighlight> </syntaxhighlight> ==Example== {{Sandbox/User:Teamtoto/newitem | title = {{#invoke: ColorParse | parse|club}} | pv = 4 | maxpv = 5 | damage...")
Line 2: Line 2:


<syntaxhighlight>
<syntaxhighlight>
{{#invoke:infobox|infobox
| rows =
<!--lists the max pv, with a default base pv of 4. if you want to change the base pv, set pv = (number)-->
<!--if you set vibro to a variable, it will replace the pv with the match armor value symbol-->
{{#if: {{{pv|}}}      | {{infobox row|[[PV]]|{{Color | C |→}}{{#if: {{{vibro|}}} |≈|{{{pv}}}{{Color | K |/{{{maxpv|{{{pv}}} }}} }} }} }} }}
{{#if: {{{powered|}}} | {{infobox row|PV (Unpowered)|{{Color | C |→}}4{{Color | K |/4}} }} }}
<!--write damage in its dice form, ie. 1d2-->
{{#if: {{{damage|}}}  | {{infobox row|Base Damage|{{Color | R |♥}}{{{damage}}} }} }}
{{#if: {{{av|}}}      | {{infobox row|AV|{{Color | b |♦}}{{{av}}} }} }}
{{#if: {{{dv|}}}      | {{infobox row|DV|{{Color | K |o}}{{{dv}}} }} }}
{{#if: {{{ma|}}}      | {{infobox row|MA|{{{ma}}} }} }}
<!-- +/- a number to hit-->
{{#if: {{{tohit|}}}  | {{infobox row|To Hit|{{{tohit}}} }} }}
<!-- Guns!-->
<!--the ammo it needs. lead slugs, arrows, blood, etc. -->
{{#if: {{{ammo|}}}    | {{infobox row|Ammo Type|{{{ammo}}} }} }}
{{#if: {{{accuracy|}}}| {{infobox row|Accuracy|{{{accuracy}}} }} }}
{{#if: {{{shots|}}}  | {{infobox row|Shots per Action|{{{shots}}} }} }}
{{#if: {{{maxammo|}}} | {{infobox row|Max Ammo|{{{maxammo}}} }} }}
<!--Generic item stuff-->
{{#if: {{{charge}}}  | {{infobox row|Charge per Use|{{{charge}}} }} }}
{{#if: {{{weight|}}}  | {{infobox row|Weight|{{{weight}}}'''#''' }} }}
{{#if: {{{commerce|}}}| {{infobox row|Value|{{{commerce}}} }} }}
{{#if: {{{tier|}}}    | {{infobox row|Tier|{{{tier}}} }} }}
{{#if: {{{bits|}}}    | {{infobox row|Bits|{{{bits}}} }} }}
<!--Is the weapon two handed? (yes/no)-->
{{#if: {{twohanded|}}}| {{infobox row|Two Handed|{{{twohanded}}} }} }}
<!--What skill tree it uses, or its weapon class-->
{{#if: {{{type|}}}    | {{infobox row|Type|{{{type}}} }} }}
<!--This is the name of the object in ObjectBlueprints.xml-->
{{#if: {{{id|}}}      | {{infobox row|ID|{{{id}}} }} }}
<!--if colorstr, is colored. This requires the letter by itself, without the &amp;-->
{{#if: {{{renderstr}}}| {{infobox row|Render String|{{#if: {{{colorstr|}}} | {{Color | {{{colorstr}}} |'''{{{renderstr}}}'''}} | {{{renderstr}}} }} }}
<!--This is more specific stuff-->
<!-- yes/no -->
{{#if: {{{metal|}}}  | {{infobox row|Metal|{{{metal}}} }} }}
{{#if: {{{lightradius|}}}| {{infobox row|Light Radius|{{{lightradius}}} }} }}
{{#if: {{{extra|}}}  | {{infobox row|Other Properties|{{{extra}}} }} }}
<!--Makes the attributes box show up if *any* of the attributes are filled out-->
{{#if: {{{strength|}}}{{{agility|}}}{{{toughness|}}}{{{intelligence|}}}{{{willpower|}}}{{{ego|}}} |
{{infobox row|Attributes|{{#if: {{{strength|}}}    | <p style="color:#FFFFFF">  {{{strength}}} Strength</p>}}{{#if: {{{agility|}}}      | <p style="color:#CFC041">  {{{agility}}} Agility</p>}}{{#if: {{{toughness|}}}    | <p style="color:#D74200">    {{{toughness}}} Toughness</p>}}{{#if: {{{intelligence|}}} | <p style="color:rgb(51,102,255)">    {{{intelligence}}} Intelligence</p>}}{{#if: {{{willpower|}}}    | <p style="color:#00C420">    {{{willpower}}} Willpower</p>}}{{#if: {{{ego|}}}          | <p style="color:#DA5BD6"> {{{ego}}} Ego</p>}} }} }}
<!--Makes the resistances box show up if *any* of the resistances are filled out-->
{{#if: {{{acid|}}}{{{electric|}}}{{{cold|}}}{{{heat|}}} |
{{infobox row|Elemental Damage|
{{#if: {{{acid|}}}    | <p style="color:#00C420">  {{{acid}}} Acid</p>}}{{#if: {{{electric|}}} | <p style="color:#CFC041"> {{{electric}}} Electric</p>}}{{#if: {{{cold|}}}    | <p style="color:#0096FF">  {{{cold}}} Cold</p>}}{{#if: {{{heat|}}}    | <p style="color:#D74200">    {{{heat}}} Heat</p>}} }} }}
}}
{{#if: {{{desc|}}} | {{Quote | {{{desc}}} }} }}
</noinclude>


</syntaxhighlight>
</syntaxhighlight>

Revision as of 18:04, 22 June 2019