Template:ShipInfobox: Difference between revisions

m Test 2
Changed label displayed for data source "fighterhangar" from "Fighter Hangar" to "Fighter Bay" per request.
 
(47 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<onlyinclude>
<infobox theme="portInfobox">
{{#infoboxbuilder:
<title><default>{{PAGENAME}}</default></title>
| 0:Theme = eInfobox
<image source="image"><default>Placeholder Ship.png</default></image>
 
<group>
| 1:Type  = Title
    <header>Overview</header>
| 1:Value = {{PAGENAME}}
    <data source="manufacturer"><label>Manufacturer</label><format>[[{{{manufacturer}}}]]</format></data>
 
    <data source="yearsproduced"><label>Years Produced</label></data>
| 2:Type  = MainImage
    <data source="type"><label>Type</label></data>
| 2:Value = {{#if:{{{image|}}}|[[File:{{{image}}}|292px|100%]]|[[File:Placeholder.png|292px|100%]]}}
    <data source="cost">
 
        <label>Cost</label>
| 3:Type  = Header
        <format>{{{cost}}} CR</format>
| 3:Value = {{#if:{{{factionreq|}}}|Requires {{{factionreq|}}} rank of {{{factionrank|}}} or higher|}}
    </data>
 
    <data source="arx">
| 4:Type = Line
        <label>ARX</label>
| 4:Label = Manufacturer
        <format>{{{arx}}} ARX</format>
| 4:Value = {{#if:{{{manufacturer|}}}|[[{{{manufacturer|}}}]]|---}}
    </data> 
 
    <data source="insurance">
| 5:Type = Line
        <label>Insurance</label>
| 5:Label = Cost
        <format>{{{insurance}}} CR</format>
| 5:Value = {{#if:{{{cost|}}}|{{{cost|?}}} CR|---}}
        </data>
 
    <data source="factionreq"><label>Faction</label><format>[[{{{factionreq}}}]]</format></data>
| 6:Type = Line
    <data source="factionrank">
| 6:Label = Insurance
        <label>Faction Rank</label>
| 6:Value = {{#if:{{{cost|}}}|{{formatnum:{{#expr:trunc({{formatnum:{{{cost|}}}|R}}*0.05)}}}} CR|}}
        <format>{{#if: {{{factionreq|}}} | {{{factionrank}}} }}</format>
 
    </data>
| 7:Type = Line
    <data source="expansionreq"><label>Expansion</label></data>
| 7:Label = Top Speed
    </group>
| 7:Value = {{#if:{{{topspeed|}}}|{{{topspeed|?}}} m/s|---}}
<group>
 
    <header>Specifications</header>
| 8:Type = Line
    <data source="landingpad"><label>Landing Pad Size</label></data>
| 8:Label = Boost Speed
    <data source="dimensions"><label>Dimensions</label></data>
| 8:Value = {{#if:{{{boostspeed|}}}|{{{boostspeed|?}}} m/s|---}}
    <data source="seats"><label>Pilot Seats</label></data>
 
    <data source="multicrew"><label>Multicrew</label></data>
| 9:Type = Line
    <data source="fighterhangar"><label>Fighter Bay</label></data>
| 9:Label = Manoeuvrability
    <data source="hullmass"><label>Hull Mass</label><format>{{{hullmass}}} t</format></data>
| 9:Value = {{#if:{{{manoeuvrability|}}}|{{{manoeuvrability|}}}|---}}
    <data source="masslock"><label>Mass Lock Factor</label></data>
 
    <data source="armour"><label>Armour</label></data>
| 10:Type = Line
    <data source="armourhardness"><label>Armour Hardness</label></data>
| 10:Label = Shields
    <data source="shields"><label>Shields</label><format>{{{shields}}} MJ</format></data>
| 10:Value = {{#if:{{{shields|}}}|{{{shields|?}}}|---}}
    <data source="heatcapacity"><label>Heat Capacity</label></data>
 
    <data source="fuelcapacity"><label>Fuel Capacity</label><format>{{{fuelcapacity}}} t</format></data>
| 11:Type = Line
    <data source="scooptimised"><label>SCO Optimised</label></data>
| 11:Label = Armour
    <data source="manoeuvrability"><label>Manoeuvr-<br/>ability</label></data>
| 11:Value = {{#if:{{{armour|}}}|{{{armour|?}}}|---}}
    <data>
 
        <label>Top Speed</label>
| 12:Type = Line
        <default>{{#if: {{{topspeed|}}} | {{{topspeed}}} m/s <abbr title="Default value of an unmodified ship">(''default'')</abbr> <br/> }}{{#if: {{{maxtopspeed|}}} | {{{maxtopspeed}}} m/s <abbr title="Maximum possible value before Engineering">(''upgraded'')</abbr> <br/> }}</default>
| 12:Label = Hull Mass
    </data>
| 12:Value = {{#if:{{{hullmass|}}}|{{{hullmass|?}}} T|---}}
    <data>
 
        <label>Boost Speed</label>
| 13:Type = Line
        <default>{{#if: {{{boostspeed|}}} | {{{boostspeed}}} m/s <abbr title="Default value of an unmodified ship">(''default'')</abbr> <br/> }}{{#if: {{{maxboostspeed|}}} | {{{maxboostspeed}}} m/s <abbr title="Maximum possible value before Engineering">(''upgraded'')</abbr> <br/> }}</default>
| 13:Label = Cargo Capacity
    </data>
| 13:Value = {{#if:{{{cargocapacity|}}}|{{{cargocapacity|?}}} T|---}}
    <data>
 
        <label>Unladen Jump Range</label>
| 14:Type = Line
        <default>{{#if: {{{jumprange|}}} | {{{jumprange}}} ly <abbr title="Default value of an unmodified ship">(''default'')</abbr> <br/> }}{{#if: {{{maxjumprange|}}} | {{{maxjumprange}}} ly <abbr title="Maximum possible value before Engineering and Guardian FSD Booster">(''upgraded'')</abbr> <br/> }}</default>
| 14:Label = Fuel Capacity
    </data>
| 14:Value = {{#if:{{{fuelcapacity|}}}|{{{fuelcapacity|?}}} T|---}}
    <data>
 
        <label>Cargo Capacity</label>
| 15:Type = Line
        <default>{{#if: {{{cargocapacity|}}} | {{{cargocapacity}}} t <abbr title="Default value of an unmodified ship">(''default'')</abbr> <br/> }}{{#if: {{{maxcargocapacity|}}} | {{{maxcargocapacity}}} t <abbr title="Maximum possible value">(''max'')</abbr> <br/> }}</default>
| 15:Label = Unladen Jump Range
    </data>
| 15:Value = {{#if:{{{jumprange|}}}|{{{jumprange|x}}} LY|---}}
    </group>
 
    <group>
| 16:Type = Line
        <header>Outfitting</header>
| 16:Label = Landing Pad Size
    <data>
| 16:Value = {{#if:{{{landingpad|}}}|{{{landingpad|?}}}|---}}
        <label>Hardpoints</label>
 
        <default>{{#if: {{{utility|}}} | {{{utility}}}× Utility {{plural: {{{utility}}} | Mount | Mounts}} <br/> }}{{#if: {{{small|}}} | {{{small}}}× Small {{plural: {{{small}}} | Hardpoint | Hardpoints}} <br/> }}{{#if: {{{medium|}}} | {{{medium}}}× Medium {{plural: {{{medium}}} | Hardpoint | Hardpoints}} <br/> }}{{#if: {{{large|}}} | {{{large}}}× Large {{plural: {{{large}}} | Hardpoint | Hardpoints}} <br/> }}{{#if: {{{huge|}}} | {{{huge}}}× Huge {{plural: {{{huge}}} | Hardpoint | Hardpoints}} <br/> }}</default>
| 17:Type = Line
        </data>
| 17:Label = Hardpoints
    <data source="reservedhp"><label>Reserved Hardpoints</label>
| 17:Value = {{#if:{{{utility|}}}|{{{utility}}}x Utility Mount{{#ifexpr:{{{utility|}}}>1|s}}}}{{#if:{{{small|}}}|{{#if:{{{utility|}}}|<br>}}{{{small|}}}x Small Hardpoint{{#ifexpr:{{{small|}}}>1|s}}}}{{#if:{{{medium|}}}|{{#if:{{{utility|}}}or{{{small|}}}|<br>}}{{{medium|}}}x Medium Hardpoint{{#ifexpr:{{{medium|}}}>1|s}}}}{{#if:{{{large|}}}|{{#if:{{{utility|}}}or{{{small|}}}or{{{medium|}}}|<br>}}{{{large|}}}x Large Hardpoint{{#ifexpr:{{{large|}}}>1|s}}}}{{#if:{{{huge|}}}|{{#if:{{{utility|}}}or{{{small|}}}or{{{medium|}}}or{{{large|}}}|<br>}}{{{huge|}}}x Huge Hardpoint{{#ifexpr:{{{huge|}}}>1|s}}}}
    </data>
 
    <data><label>Internal Compartments</label>
| 18:Type = Line
        <default>{{#if: {{{size1|}}} | {{{size1}}}× Class 1 {{plural: {{{size1}}} | Compartment | Compartments}} <br/> }}{{#if: {{{size2|}}} | {{{size2}}}× Class 2 {{plural: {{{size2}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size3|}}} | {{{size3}}}× Class 3 {{plural: {{{size3}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size4|}}} | {{{size4}}}× Class 4 {{plural: {{{size4}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size5|}}} | {{{size5}}}× Class 5 {{plural: {{{size5}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size6|}}} | {{{size6}}}× Class 6 {{plural: {{{size6}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size7|}}} | {{{size7}}}× Class 7 {{plural: {{{size7}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size8|}}} | {{{size8}}}× Class 8 {{plural: {{{size8}}} | Compartment | Compartments }} <br/> }}</default>
| 18:Label = Internals
    </data>
| 18:Value = {{#if:{{{size1|}}}|{{{size1|}}}x Size 1 Compartment{{#ifexpr:{{{size1|}}}>1|s}}}}{{#if:{{{size2|}}}|{{#if:{{{size1|}}}|<br>}}{{{size2|}}}x Size 2 Compartment{{#ifexpr:{{{size2|}}}>1|s}}}}{{#if:{{{size3|}}}|{{#if:{{{size1|}}}or{{{size2|}}}|<br>}}{{{size3|}}}x Size 3 Compartment{{#ifexpr:{{{size3|}}}>1|s}}}}{{#if:{{{size4|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}|<br>}}{{{size4|}}}x Size 4 Compartment{{#ifexpr:{{{size4|}}}>1|s}}}}{{#if:{{{size5|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}|<br>}}{{{size5|}}}x Size 5 Compartment{{#ifexpr:{{{size5|}}}>1|s}}}}{{#if:{{{size6|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}|<br>}}{{{size6|}}}x Size 6 Compartment{{#ifexpr:{{{size6|}}}>1|s}}}}{{#if:{{{size7|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}|<br>}}{{{size7|}}}x Size 7 Compartment{{#ifexpr:{{{size7|}}}>1|s}}}}{{#if:{{{size8|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}or{{{size7|}}}|<br>}}{{{size8|}}}x Size 8 Compartment{{#ifexpr:{{{size8|}}}>1|s}}}}{{#if:{{{reservedic|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}or{{{size7|}}}or{{{size8|}}}|<br>}}{{{reservedic|}}}}}
    <data source="reservedic"><label>Reserved Compartments</label>
 
    </data>
| 19:Type = Footer
    </group>
| 19:Value = *Information represents the default version of the ship.
</infobox><includeonly>{{#if: {{NAMESPACE}} || [[Category:Ships]]}}</includeonly><noinclude>
}}</onlyinclude>
Example usage:<pre>
<noinclude>
<pre style="width: 300px">
{{ShipInfobox
{{ShipInfobox
| image               =  
| image           =  
| manufacturer        =  
| manufacturer     =
| cost                =  
| yearsproduced    =
| topspeed           =  
| type            =
| boostspeed         =  
| cost            =
| manoeuvrability     =  
| arx              =
| shields            =  
| insurance       =  
| armour              =  
| factionreq      =
| hullmass            =  
| factionrank      =
| cargocapacity       =  
| expansionreq    =
| fuelcapacity       =  
| landingpad      =
| jumprange          =  
| dimensions      =  
| landingpad          =  
| seats           =  
| utility             =  
| multicrew        =
| small               =  
| fighterhangar    =
| medium             =  
| hullmass        =
| large               =  
| masslock        =
| huge               =  
| armour          =
| size1               =  
| armourhardness  =
| size2               =  
| shields         =  
| size3               =  
| heatcapacity    =
| size4               =  
| fuelcapacity    =
| size5               =  
| scooptimised     =  
| size6               =  
| manoeuvrability  =  
| size7               =  
| topspeed        =  
| size8               =  
| maxtopspeed      =  
| boostspeed       =  
| maxboostspeed    =
| jumprange       =  
| maxjumprange    =
| cargocapacity    =  
| maxcargocapacity =  
| utility         =  
| small           =  
| medium           =  
| large           =  
| huge             =
| reservedhp      =  
| size1           =  
| size2           =  
| size3           =  
| size4           =  
| size5           =  
| size6           =  
| size7           =  
| size8           =
| reservedic      =  
}}
}}
</pre>
</pre>[[Category:Infobox templates|{{PAGENAME}}]]
 
Add the following text for faction requirements:
<pre style="width: 300px">
| factionreq          =
| factionrank        =
</pre>
 
Add the following text for reserved Internal Compartments.  Please follow the format used by the other Internal Compartments (as shown below):
<pre style="width: 300px">
| reservedic          =
</pre>
 
:;Format: #x Size ? Module
 
:;Example: 1x Size 6 Cargo Rack
</noinclude>
</noinclude>