Template:Autofill tag/row: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
No edit summary
(added c0tag)
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{doc}}
{{doc}}
<includeonly><onlyinclude>{{#vardefine:c#|c{{#ifeq:{{{c1tag}}}|{{{1}}}|1|{{#ifeq:{{{c2tag}}}|{{{1}}}|2|{{#ifeq:{{{c3tag}}}|{{{1}}}|3|{{#ifeq:{{{c4tag}}}|{{{1}}}|4|{{#ifeq:{{{c5tag}}}|{{{1}}}|5|{{#ifeq:{{{c6tag}}}|{{{1}}}|6|{{#ifeq:{{{c7tag}}}|{{{1}}}|7|{{#ifeq:{{{c8tag}}}|{{{1}}}|8|{{#ifeq:{{{c9tag}}}|{{{1}}}|9|{{#ifeq:{{{c10tag}}}|{{{1}}}|10|{{#ifeq:{{{c11tag}}}|{{{1}}}|11|{{#ifeq:{{{c12tag}}}|{{{1}}}|12|{{#ifeq:{{{c13tag}}}|{{{1}}}|13|{{#ifeq:{{{c14tag}}}|{{{1}}}|14|{{#ifeq:{{{c15tag}}}|{{{1}}}|15|{{#ifeq:{{{c16tag}}}|{{{1}}}|16|{{#ifeq:{{{c17tag}}}|{{{1}}}|17|{{#ifeq:{{{c18tag}}}|{{{1}}}|18|{{#ifeq:{{{c19tag}}}|{{{1}}}|19}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
<includeonly><onlyinclude>{{#vardefine:c#|c{{#ifeq:{{{c0tag}}}|{{{1}}}|0|{{#ifeq:{{{c1tag}}}|{{{1}}}|1|{{#ifeq:{{{c2tag}}}|{{{1}}}|2|{{#ifeq:{{{c3tag}}}|{{{1}}}|3|{{#ifeq:{{{c4tag}}}|{{{1}}}|4|{{#ifeq:{{{c5tag}}}|{{{1}}}|5|{{#ifeq:{{{c6tag}}}|{{{1}}}|6|{{#ifeq:{{{c7tag}}}|{{{1}}}|7|{{#ifeq:{{{c8tag}}}|{{{1}}}|8|{{#ifeq:{{{c9tag}}}|{{{1}}}|9|{{#ifeq:{{{c10tag}}}|{{{1}}}|10|{{#ifeq:{{{c11tag}}}|{{{1}}}|11|{{#ifeq:{{{c12tag}}}|{{{1}}}|12|{{#ifeq:{{{c13tag}}}|{{{1}}}|13|{{#ifeq:{{{c14tag}}}|{{{1}}}|14|{{#ifeq:{{{c15tag}}}|{{{1}}}|15|{{#ifeq:{{{c16tag}}}|{{{1}}}|16|{{#ifeq:{{{c17tag}}}|{{{1}}}|17|{{#ifeq:{{{c18tag}}}|{{{1}}}|18|{{#ifeq:{{{c19tag}}}|{{{1}}}|19}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
| {{#cargo_query:table=Items|fields=_pageName,identifier,name,icon|where=identifier{{=}}"{{{item}}}"|format=template|template=HyperlinkCargo|named args=yes|default=[[{{{item}}}]]}}
| {{#cargo_query:table=Items|fields=_pageName,identifier,name,icon|where=identifier{{=}}"{{{item}}}"|format=template|template=HyperlinkCargo{{!}}32|named args=yes|default=[[{{{item}}}]]}}
| align=center | {{#ifeq:{{{ {{#var:c#}}notcampaign}}}|1|No|Yes}}
| align=center | [[File:Checkmark {{#ifexpr:{{#ifeq:{{{ {{#var:c#}}notcampaign}}}|1|0|1}}and(({{{ {{#var:c#}}amount}}} > 0)or({{{ {{#var:c#}}maxamount}}} > 0))|True|False}}.png|32px]]
| align=center | {{#ifeq:{{{ {{#var:c#}}amount|}}}|0|{{#ifexpr:{{{ {{#var:c#}}minamount}}}+{{{ {{#var:c#}}maxamount}}}>0}}|{{#ifeq:{{{ {{#var:c#}}minamount}}}|{{{ {{#var:c#}}maxamount}}}|{{{ {{#var:c#}}minamount|}}}|{{{ {{#var:c#}}minamount}}}-{{{ {{#var:c#}}maxamount}}}}}|{{{ {{#var:c#}}amount|}}}}}
| align=center |
| align=center | {{#ifexpr:({{#if:{{{ {{#var:c#}}minamount|}}}|{{{ {{#var:c#}}minamount}}}|0}}+{{#if:{{{ {{#var:c#}}maxamount|}}}|{{{ {{#var:c#}}maxamount}}}|0}}+{{#if:{{{ {{#var:c#}}amount|}}}|{{{ {{#var:c#}}amount}}}|0}})>0|{{#switch:{{{ {{#var:c#}}spawnprobability|}}}|NULL|0=<span style="color:#808080">Cleanup only</span>|{{#expr:{{{ {{#var:c#}}spawnprobability}}}*100}}%|100%}}}}</onlyinclude></includeonly><noinclude><!--
{{#ifeq:{{{ {{#var:c#}}amount|}}}|0
|{{#ifexpr:{{{ {{#var:c#}}minamount}}}+{{{ {{#var:c#}}maxamount}}}>0
    |{{#ifeq:{{{ {{#var:c#}}minamount}}}|{{{ {{#var:c#}}maxamount}}}
            |{{#ifeq:{{{ {{#var:c#}}minamount|}}}|0
            |<span style="color:#808080">0</span>
                |{{{ {{#var:c#}}minamount|}}}
}}
|{{{ {{#var:c#}}minamount}}}-{{{ {{#var:c#}}maxamount}}}
}}
|<span style="color:#808080">0</span>
}}
|{{{ {{#var:c#}}amount|}}}
}}
| align=center | {{#ifexpr:({{#if:{{{ {{#var:c#}}minamount|}}}|{{{ {{#var:c#}}minamount}}}|0}}+{{#if:{{{ {{#var:c#}}maxamount|}}}|{{{ {{#var:c#}}maxamount}}}|0}}+{{#if:{{{ {{#var:c#}}amount|}}}|{{{ {{#var:c#}}amount}}}|0}})>0|{{#ifeq:{{{ {{#var:c#}}spawnprobability|}}}|0|<span style="color:#808080">Cleanup only</span>|{{#expr:{{{ {{#var:c#}}spawnprobability}}}*100}}%|100%}}|<span style="color:#808080">Cleanup only</span>}}</onlyinclude></includeonly><noinclude><!--


This is what we want:
This is what we want:
Line 17: Line 30:
if amount defined and >0: amount=amount
if amount defined and >0: amount=amount
if amount undefined and minamount/maxamount defined: amount=minamount-maxamount
if amount undefined and minamount/maxamount defined: amount=minamount-maxamount
     if min==max: amount=minamount
     if min==max: amount=minamount--></noinclude>
 
 
{{#ifexpr:{{{ {{#var:c#}}minamount|0}}}+{{{ {{#var:c#}}maxamount|0}}}+{{{ {{#var:c#}}amount|0}}}>0|{{#ifeq:{{{ {{#var:c#}}minamount|0}}}|1|{{#ifeq:{{{ {{#var:c#}}maxamount|0}}}|1|1|{{#ifexpr:{{{ {{#var:c#}}amount|0}}}>0|{{{ {{#var:c#}}amount}}}|{{{ {{#var:c#}}minamount}}}-{{{ {{#var:c#}}maxamount}}}}}}}|{{#ifexpr:{{{ {{#var:c#}}amount|0}}}>0|{{{ {{#var:c#}}amount}}}|{{{ {{#var:c#}}minamount}}}-{{{ {{#var:c#}}maxamount}}}}}}}|0}}
 
 
 
{{#ifexpr:{{{ {{#var:c#}}minamount}}}+{{{ {{#var:c#}}maxamount}}}+{{{ {{#var:c#}}amount}}}>0<!-- if min+max+amount>0 then--
|{{#ifeq:{{{ {{#var:c#}}minamount}}}|1<!--ifexpr1 true: ifeq1--
|{{#ifeq:{{{ {{#var:c#}}maxamount}}}|1<!--ifeq1 true: ifeq2--
|1<!--ifeq2 true | if min and max = 1 then 1 --
|{{#ifexpr:{{{ {{#var:c#}}amount}}}>0<!--ifeq2 false: ifexpr2 | if min=1 and max=/=1 then--
|{{{ {{#var:c#}}amount}}}<!--ifexpr2 true | if amount>0 then amount--
|{{{ {{#var:c#}}minamount}}}-{{{ {{#var:c#}}maxamount}}}<!--ifexpr2 false | if amount=NULL then min - max --
}}<!--//ifexpr2--
}}<!--//ifeq2--
|{{#ifexpr:{{{ {{#var:c#}}amount}}}>0<!--ifeq1 false: ifexpr3 | if min and max =/= 1 then--
|{{{ {{#var:c#}}amount}}}<!--ifexpr3 true | if amount>0 then amount--
|{{{ {{#var:c#}}minamount}}}-{{{ {{#var:c#}}maxamount}}}<!--ifexpr3 false | if amount=NULL then min - max --
}}<!--//ifexpr3--
}}<!--//ifeq1--
|0<!--ifexpr1 false | if min+max+amount=0 then 0--
}}<!--//ifexpr1
 
--></noinclude>

Latest revision as of 16:03, 24 April 2024

Documentation

engcab

Item Campaign Spawn Amount Probability
Abs Component

1

Cleanup only
Acos Component

1

Cleanup only
Adder Component

1

Cleanup only
Alarm Buzzer

1

Cleanup only
???

1

Cleanup only
And Component

1

Cleanup only
Artifact Transport Case

1

Cleanup only
Asin Component

1

Cleanup only
Atan Component

1

Cleanup only
Backpack

1

Cleanup only
Black Wire

1

100%
Blue Wire

1

100%
Brown Wire

1

100%
Button

1

Cleanup only
Ceil Component

1

Cleanup only
Circuit Box

1

Cleanup only
Color Component

1

Cleanup only
Concatenation Component

1

Cleanup only
Cos Component

1

Cleanup only
Crowbar

1

Cleanup only
Dementonite Crowbar

1

Cleanup only
Hardened Crowbar

1

Cleanup only
Delay Component

1

Cleanup only
Divide Component

1

Cleanup only
Electrician's Goggles

1

Cleanup only
Emergency Siren

1

Cleanup only
Equals Component

1

Cleanup only
Fire Extinguisher

1

Cleanup only
Factorial Component

1

Cleanup only
Fixfoam Grenade

1

Cleanup only
Floor Component

1

Cleanup only
FPGA Circuit

1

Cleanup only
Fulgurium Battery Cell

1

Cleanup only
Greater Component

1

Cleanup only
Green Wire

1

100%
Handheld Electrical Monitor

1

Cleanup only
Logbook

1

Cleanup only
Heavy Wrench

1

Cleanup only
Incendium Fuel Tank

1

Cleanup only
Lever

1

Cleanup only
Light Component Light Component

1

Cleanup only
Light Component

1

Cleanup only
lightcomponentround

1

Cleanup only
Memory Component

1

Cleanup only
Modulo Component

1

Cleanup only
Motion Detector

1

Cleanup only
Multiply Component

1

Cleanup only
Not Component

1

Cleanup only
Orange Wire

1

100%
Or Component

1

Cleanup only
Oscillator Component

1

Cleanup only
Oxygen Detector

1

Cleanup only
Plasma Cutter

1

Cleanup only
Portable Pump

1

Cleanup only
Exponentiation Component

1

Cleanup only
Radio Jammer

1

Cleanup only
Reactor PDA

1

Cleanup only
Red Wire

1

100%
RegEx Find Component

1

Cleanup only
Relay Component

1

Cleanup only
Repair Pack

1

Cleanup only
Round Component

1

Cleanup only
Safety Harness

1

Cleanup only
Screwdriver

1

Cleanup only
Dementonite Screwdriver

1

Cleanup only
Hardened Screwdriver

1

Cleanup only
Signal Check Component

1

Cleanup only
Sin Component

1

Cleanup only
Smoke Detector

1

Cleanup only
Sprayer

1

Cleanup only
Square Root Component

1

Cleanup only
Subtract Component

1

Cleanup only
Switch

1

Cleanup only
Tan Component

1

Cleanup only
Terminal

1

Cleanup only
Text Display

1

Cleanup only
Thermal Goggles

1

Cleanup only
Toolbelt

1

Cleanup only
Water Detector

1

Cleanup only
Welding Fuel Tank

4-6

100%
Welding Tool

1

100%
Wifi Component

1

Cleanup only
Wire

1

Cleanup only
Wrench

1

Cleanup only
Dementonite Wrench

1

Cleanup only
Hardened Wrench

1

Cleanup only
Xor Component

1

Cleanup only