Difference between revisions of "Template:Sandbox"

From RimWorld Wiki
Jump to navigation Jump to search
Line 118: Line 118:
 
:{{{movespeed|}}}}}
 
:{{{movespeed|}}}}}
  
{{#if: {{{attack1dmg|}}}{{{attack1type|}}}{{{attack1part|}}}{{{attack1cool|}}}|
 
  {{#set:Attack 1 Damage = {{{attack1dmg|}}} }}
 
  {{#set:Attack 1 Type = {{{attack1type|}}} }}
 
  {{#set:Attack 1 Part = {{{attack1part|}}} }}
 
  {{#set:Attack 1 Cooldown = {{{attack1cool|}}} }}
 
  {{#vardefine: Attack1DPS | {{#expr: {{{attack1dmg|}}} / ({{{attack1cool}}} / 60) }} }}
 
  {{#set: Attack 1 DPS = {{#var: Attack1DPS}} }}
 
;Attack{{#if: {{{attack2dmg|}}}| 1}}
 
:{{{attack1part|Body part?}}}<br>{{{attack1dmg|?}}} dmg ({{{attack1type|type?}}})<br>{{ticks|{{{attack1cool|0}}}}} }}<!--
 
-->{{#if: {{{attack1stun|}}}|{{#set:Attack 1 Stun = {{{attack1stun|}}}}}<br>Stun for {{ticks|{{{attack1stun|0}}}*20}} on first strike}}
 
  
{{#if: {{{attack2dmg|}}}{{{attack2type|}}}{{{attack2part|}}}{{{attack2cool|}}}|
 
  {{#set:Attack 2 Damage = {{{attack2dmg|}}} }}
 
  {{#set:Attack 2 Type = {{{attack2type|}}} }}
 
  {{#set:Attack 2 Part = {{{attack2part|}}} }}
 
  {{#set:Attack 2 Cooldown = {{{attack2cool|}}} }}
 
  {{#vardefine: Attack2DPS | {{#expr: {{{attack2dmg|}}} / ({{{attack2cool}}} / 60) }} }}
 
  {{#set: Attack 2 DPS = {{#var: Attack2DPS}} }}
 
;Attack 2
 
:{{{attack2part|Body part?}}}<br>{{{attack2dmg|?}}} dmg ({{{attack2type|type?}}})<br>{{ticks|{{{attack2cool|0}}}}} }}<!--
 
-->{{#if: {{{attack2stun|}}}|{{#set:Attack 2 Stun = {{{attack2stun|}}}}}<br>Stun for {{ticks|{{{attack2stun|0}}}*20}} on first strike}}
 
 
{{#if: {{{attack3dmg|}}}{{{attack3type|}}}{{{attack3part|}}}{{{attack3cool|}}}|
 
  {{#set:Attack 3 Damage = {{{attack3dmg|}}} }}
 
  {{#set:Attack 3 Type = {{{attack3type|}}} }}
 
  {{#set:Attack 3 Part = {{{attack3part|}}} }}
 
  {{#set:Attack 3 Cooldown = {{{attack3cool|}}} }}
 
  {{#vardefine: Attack3DPS | {{#expr: {{{attack3dmg|}}} / ({{{attack3cool}}} / 60) }} }}
 
  {{#set: Attack 3 DPS = {{#var: Attack3DPS}} }}
 
;Attack 3
 
:{{{attack3part|Body part?}}}<br>{{{attack3dmg|?}}} dmg ({{{attack3type|type?}}})<br>{{ticks|{{{attack3cool|0}}}}} }}<!--
 
-->{{#if: {{{attack3stun|}}}|{{#set:Attack 3 Stun = {{{attack3stun|}}}}}<br>Stun for {{ticks|{{{attack3stun|0}}}*20}} on first strike}}
 
 
{{#if: {{{attack4dmg|}}}{{{attack4type|}}}{{{attack4part|}}}{{{attack4cool|}}}|
 
  {{#set:Attack 4 Damage = {{{attack4dmg|}}} }}
 
  {{#set:Attack 4 Type = {{{attack4type|}}} }}
 
  {{#set:Attack 4 Part = {{{attack4part|}}} }}
 
  {{#set:Attack 4 Cooldown = {{{attack4cool|}}} }}
 
  {{#vardefine: Attack4DPS | {{#expr: {{{attack4dmg|}}} / ({{{attack4cool}}} / 60) }} }}
 
  {{#set: Attack 4 DPS = {{#var: Attack4DPS}} }}
 
;Attack 4
 
:{{{attack4part|Body part?}}}<br>{{{attack4dmg|?}}} dmg ({{{attack4type|type?}}})<br>{{ticks|{{{attack4cool|0}}}}} on first strike}}<!--
 
-->{{#if: {{{attack4stun|}}}|{{#set:Attack 4 Stun = {{{attack4stun|}}}}}<br>Stun for {{ticks|{{{attack4stun|0}}}*20}}}}
 
 
{{#ifeq: {{#varexists: Attack4DPS}}|1|
 
  {{#vardefine: MobAverageDPS | {{#expr: ({{#var: Attack1DPS}} + {{#var: Attack2DPS}} + {{#var: Attack3DPS}} + {{#var: Attack4DPS}})/4 * 0.62 round 2}} }}|
 
{{#ifeq: {{#varexists: Attack3DPS}}|1|
 
  {{#vardefine: MobAverageDPS | {{#expr: ({{#var: Attack1DPS}} + {{#var: Attack2DPS}} + {{#var: Attack3DPS}})/3 * 0.62 round 2}} }}|
 
    {{#ifeq: {{#varexists: Attack2DPS}}|1|
 
      {{#vardefine: MobAverageDPS | {{#expr: ({{#var: Attack1DPS}} + {{#var: Attack2DPS}})/2 * 0.62 round 2}} }}|
 
      {{#ifeq: {{#varexists: Attack1DPS}}|1|
 
        {{#vardefine: MobAverageDPS | {{#expr: {{#var: Attack1DPS}} * 0.62 round 2}} }} }} }} }} }}
 
 
{{#ifeq: {{#varexists: MobAverageDPS}}|1|
 
;Average DPS
 
:{{#var: MobAverageDPS}}
 
{{#set: Mob Average DPS = {{#var: MobAverageDPS}} }} }}
 
 
{{#if: {{{mobdamage|}}}|{{#set:Melee Damage Base = {{{mobdamage|}}} }}
 
;Damage
 
:{{{mobdamage|}}}}}
 
 
{{#if: {{{mobdamagetype|}}}|{{#set:Melee Damage Def = {{{mobdamagetype|}}} }}
 
;Damage Type
 
:{{{mobdamagetype|}}}}}
 
 
{{#if: {{{mobdamage2|}}}|{{#set:Melee Damage Base = {{{mobdamage2|}}} }}
 
;Damage
 
:{{{mobdamage2|}}}}}
 
 
{{#if: {{{mobdamagetype2|}}}|{{#set:Melee Damage Def = {{{mobdamagetype2|}}} }}
 
;Damage Type
 
:{{{mobdamagetype2|}}}}}
 
 
{{#if: {{{mobdamage3|}}}|{{#set:Melee Damage Base = {{{mobdamage3|}}} }}
 
;Damage
 
:{{{mobdamage3|}}}}}
 
 
{{#if: {{{mobdamagetype3|}}}|{{#set:Melee Damage Def = {{{mobdamagetype3|}}} }}
 
;Damage Type
 
:{{{mobdamagetype3|}}}}}
 
 
{{#if: {{{mobdamageaverage|}}}|{{#set:Average Melee Damage = {{{mobdamageaverage|}}}}}}}
 
  
  

Revision as of 15:21, 8 May 2020


Documentation icon Template documentation[view] [edit] [history] [purge]

Description

This template is placed at the top of sandbox pages. By using a template, it becomes easy to fix if users make a mistake while playing in the sandbox.

Syntax

Type {{sandbox}} at the top of a sandbox.

Output

Sandbox


Type
[[{{{type}}}]]