Difference between revisions of "Template:Ib"

From StarMade Wiki
m
m
 
(56 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if:{{{2|}}}| <!-- new line for clarity
+
{{#if:{{{1|}}}|{{#switch:{{padleft:|1|{{{1}}}}} <!-- Verify if version is requested by ~, then shift all parameters numbers -->
-->{{#if:{{{3|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{3}}}}} <!-- new line for clarity ---- check 3 only if 2 if true
+
|~ ={{#if:{{{2|}}}|{{#switch:{{{2|}}}<!--
-->{{#if:{{{4|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{4}}}}} <!-- new line for clarity ---- check 4 only if 3 if true
+
      -->|Ctrling|CtrlBy|Item= {{DbSub|{{{1}}}|{{{2}}}|{{{3}}}|0}}<!--
-->{{#if:{{{5|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{5}}}}} <!-- new line for clarity ---- ....
+
      -->|{{DbParser|{{{1}}}|{{{2}}}|{{{3}}}}}<!--
-->{{#if:{{{6|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{6}}}}} <!-- new line for clarity
+
      -->}}|[[File:{{Db|{{{1}}}|{{{2}}}|link}}.png|20px|link={{Db|{{{1}}}|{{{2}}}|link}}]][[{{Db|{{{1}}}|{{{2}}}|link}}|{{Db|{{{1}}}|{{{2}}}|link}}]]}}<!--
-->{{#if:{{{7|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{7}}}}} <!-- new line for clarity
+
-->|{{#if:{{{2|}}}|{{#switch: {{{2}}} <!-- no "~" it is a default version request
-->{{#if:{{{8|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{8}}}}} <!-- new line for clarity
+
      -->|Ctrling|CtrlBy|Item= {{DbSub|{{{1}}}|{{{2}}}|0}}<!--
-->{{#if:{{{9|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{9}}}}} <!-- new line for clarity
+
      -->|{{DbParser|{{{1}}}|{{{2}}}|{{{3}}}}}<!--
-->{{#if:{{{10|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{10}}}}} <!-- new line for clarity
+
      -->}}|[[File:{{Db|{{{1}}}|link}}.png|20px|link={{Db|{{{1}}}|link}}]][[{{Db|{{{1}}}|link}}|{{Db|{{{1}}}|link}}]]}}}}}}<!--
-->{{#if:{{{11|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{11}}}}} <!-- new line for clarity
+
--><noinclude>{{Documentation}}</noinclude>
-->{{#if:{{{12|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{12}}}}} <!-- new line for clarity
 
-->{{#if:{{{13|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{13}}}}} <!-- new line for clarity
 
-->{{#if:{{{14|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{14}}}}} <!-- new line for clarity
 
-->{{#if:{{{15|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{15}}}}} <!-- new line for clarity
 
-->{{#if:{{{16|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{16}}}}} <!-- new line for clarity
 
-->{{#if:{{{17|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{17}}}}} <!-- new line for clarity
 
-->{{#if:{{{18|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{18}}}}} <!-- new line for clarity
 
-->{{#if:{{{19|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{19}}}}} <!-- new line for clarity
 
-->{{#if:{{{20|}}}|{{Db/Version/0.200.335/Main|{{{1}}}|{{{20}}}}}}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity
 
-->}}<!-- new line for clarity -- else ( if no {{{2|}}} )then give default : link (name)
 
-->}}}}|{{Db/Version/0.200.335/Main|{{{1}}}|link}}}}
 

Latest revision as of 21:00, 27 July 2018

[view] [edit] [history] [[[:Template:Purge]]] 50px Template documentation

ib allow to get specific information of a block in database.

Usage

{{ib|Name}} 
or {{ib|Name|type}} 
or {{ib|Name|image|size(optional)}}

display an older version :
{{ib|~version|Name|type)}} (don't forget the "~" before the verrsion number)
ie : {{ib|~0.200.335|Teal Crystal Armor|Armor}}


'''Version :''' (optional) use "~" and the number of version (stored in database) ie : ~0.200.335
'''Name :''' In game block name
'''type :''' the value you query (Hp, armor, name, etc...)

No type return a link + icon of the block name

ie : for the block Ship Core if i use ib that display Ship Core.pngShip Core if i dont put any type


type return the value of block name

Ship core have 100hp, value of armor is Noand light color : 1.0,1.0,1.0,1.0

image size(optional) : number in pixel

...|image|40}}   = Ship Core.png               and without number, original       ....|image}}   = {{{3}}}px

badtype return a list of all type available

i. e : Unknow Badtype : link, Id, Factory, Animated, Armor, Ahp, Shp, Transparency, InShop, ReactorHp, Mass, Hp, Heat, Kinetic,EM, cat, cat2, cat3, cat4, Placable, BlockStyle, Light, Depreciated, LightColor, Item(table), CtrlBy(table), Ctrling(table), Shop(InShop+Price), Price, Desc, BlockResourceType, FactoryBakeTime, Chamber(table), Volume, InRecipe, MainCtrl, SupportCtrl, EffectCtrl, ExpAbsorb