Template:ShipInfobox: Difference between revisions

No edit summary
Converting to portable infobox format
Line 1: Line 1:
<onlyinclude>
<infobox theme="portInfobox">
{{#infoboxbuilder:
<title><default>{{PAGENAME}}</default></title>
| 0:Theme = eInfobox
<image source="image"><default>Placeholder.png</default></image>
| 0:CustomModule = Module:ShipInfobox
<group>
 
    <header>Overview</header>
| 1:Type = Title
    <data source="manufacturer"><label>Manufacturer</label><format>[[{{{manufacturer}}}]]</format></data>
| 1:Label = NULL
    <data source="yearsproduced"><label>Years Produced</label></data>
| 1:Value = {{PAGENAME}}
    <data source="type"><label>Type</label></data>
 
    <data source="cost">
| 2:Type = MainImage
        <label>Cost</label>
| 2:Label = NULL
        <format>{{{cost}}} CR</format>
| 2:Value = [[File:{{{image|Placeholder.png}}}|306px]]
    </data>
 
    <data source="cost">
| 3:Type = Header
        <label>Insurance</label>
| 3:Label = NULL
        <format>{{formatnum: {{#expr: trunc({{formatnum: {{{cost|}}}|R}}*0.05)}} }} CR</format>
| 3:Value = Overview
        </data>
 
    <data source="factionreq"><label>Faction</label><format>[[{{{factionreq}}}]]</format></data>
| 4:Type = Line
    <data source="factionrank">
| 4:Label = Manufacturer
        <label>Faction Rank</label>
| 4:Value = {{#if:{{{manufacturer|}}}|[[{{{manufacturer|}}}]]|}}
        <format>{{#if: {{{factionreq|}}} | {{{factionrank}}} }}</format>
 
    </data>
| 5:Type = Line
    <data source="expansionreq"><label>Expansion</label></data>
| 5:Label = Years Produced
    </group>
| 5:Value = {{{yearsproduced|}}}
<group>
 
    <header>Specifications</header>
| 6:Type = Line
    <data source="landingpad"><label>Landing Pad Size</label></data>
| 6:Label = Type
    <data source="dimensions"><label>Dimensions</label></data>
| 6:Value = {{{type|}}}
    <data source="seats"><label>Pilot Seats</label></data>
 
    <data source="multicrew"><label>Multicrew</label></data>
| 7:Type = Line
    <data source="fighterhangar"><label>Fighter Hangar</label></data>
| 7:Label = Cost
    <data source="hullmass"><label>Hull Mass</label><format>{{{hullmass}}} t</format></data>
| 7:ValueMethod = FormatCost
    <data source="masslock"><label>Mass Lock Factor</label></data>
| 7:Unit = CR
    <data source="armour"><label>Armour</label></data>
| 7:Value = {{{cost|}}}
    <data source="armourhardness"><label>Armour Hardness</label></data>
 
    <data source="shields"><label>Shields</label><format>{{{shields}}} MJ</format></data>
| 8:Type = Line
    <data source="heatcapacity"><label>Heat Capacity</label></data>
| 8:Label = Insurance
    <data source="fuelcapacity"><label>Fuel Capacity</label><format>{{{fuelcapacity}}} t</format></data>
| 8:ValueMethod = Insurance
    <data source="manoeuvrability"><label>Manoeuvrability</label></data>
| 8:Cost = {{{cost|}}}
    <data>
| 8:Value = NULL
        <label>Top Speed</label>
 
        <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>
| 9:Type  = Line
    </data>
| 9:Label = Faction
    <data>
| 9:Value = {{{factionreq|}}}
        <label>Boost Speed</label>
| 9:ValueMethod = Factionreq
        <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>
 
    </data>
| 10:Type = Line
    <data>
| 10:Label = Faction Rank
        <label>Unladen Jump Range</label>
| 10:Value = {{{factionrank|}}}
        <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>
| 10:Requirement = {{{factionreq|}}}
    </data>
 
    <data>
| 11:Type  = Line
        <label>Cargo Capacity</label>
| 11:Label = Expansion
        <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>
| 11:Value = {{{expansionreq|}}}
    </data>
 
    </group>
| 12:Type = Header
    <group>
| 12:Label = NULL
        <header>Outfitting</header>
| 12:Value = Default Specifications
    <data>
 
        <label>Hardpoints</label>
| 13:Type = Line
        <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>
| 13:Label = Landing Pad Size
        </data>
| 13:Value = {{{landingpad|}}}
    <data><label>Internal Compartments</label>
 
        <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>
| 14:Type = Line
    </data>
| 14:Label = Dimensions
    <data source="reservedic"><label>Reserved Compartments</label>
| 14:Value = {{{dimensions|}}}
    </data>
 
    </group>
| 15:Type = Line
</infobox><includeonly>{{#if: {{NAMESPACE}} || [[Category:Ships]]}}</includeonly><noinclude>
| 15:Label = Pilot Seats
Example usage:<pre>
| 15:Value = {{{seats|}}}
 
| 16:Type = Line
| 16:Label = Multicrew
| 16:Value = {{{multicrew|}}}
 
| 17:Type = Line
| 17:Label = Fighter Hangar
| 17:Value = {{{fighterhangar|}}}
 
| 18:Type = Line
| 18:Label = Hull Mass
| 18:ValueMethod = Quantify
| 18:Unit = t
| 18:Value = {{{hullmass|}}}
 
| 19:Type = Line
| 19:Label = Mass Lock Factor
| 19:Value = {{{masslock|}}}
 
| 20:Type = Line
| 20:Label = Armour
| 20:Value = {{{armour|}}}
 
| 21:Type = Line
| 21:Label = Armour Hardness
| 21:Value = {{{armourhardness|}}}
 
| 22:ValueMethod = FormatCost
| 22:Unit = MJ
| 22:Type = Line
| 22:Label = Shields
| 22:Value = {{{shields|}}}
 
| 23:Type = Line
| 23:Label = Manoeuvrability
| 23:Value = {{{manoeuvrability|}}}
 
| 24:Type = Line
| 24:Label = Top Speed
| 24:ValueMethod = Quantify
| 24:Unit = m/s
| 24:Value = {{{topspeed|}}}
 
| 25:Type = Line
| 25:Label = Boost Speed
| 25:ValueMethod = Quantify
| 25:Unit = m/s
| 25:Value = {{{boostspeed|}}}
 
| 26:Type = Line
| 26:Label = Unladen Jump Range
| 26:ValueMethod = Quantify
| 26:Unit = ly
| 26:Default = x
| 26:Value = {{{jumprange|}}}
 
| 27:Type = Line
| 27:Label = Cargo Capacity
| 27:ValueMethod = Quantify
| 27:Unit = t
| 27:Value = {{{cargocapacity|}}}
 
| 28:Type = Line
| 28:Label = Fuel Capacity
| 28:ValueMethod = Quantify
| 28:Unit = t
| 28:Value = {{{fuelcapacity|}}}
 
| 29:Type = Line
| 29:Label = Hardpoints
| 29:ValueMethod = Hardpoints
| 29:Utility = {{{utility|}}}
| 29:S = {{{small|}}}
| 29:M = {{{medium|}}}
| 29:L = {{{large|}}}
| 29:H = {{{huge|}}}
| 29:Value = NULL
 
| 30:Type = Line
| 30:Label = Internals
| 30:ValueMethod = Internals
| 30:S1 = {{{size1|}}}
| 30:S2 = {{{size2|}}}
| 30:S3 = {{{size3|}}}
| 30:S4 = {{{size4|}}}
| 30:S5 = {{{size5|}}}
| 30:S6 = {{{size6|}}}
| 30:S7 = {{{size7|}}}
| 30:S8 = {{{size8|}}}
| 30:Reserved = {{{reservedic|}}}
| 30:Value = NULL
 
| 31:Type = Header
| 31:Label = NULL
| 31:Value = Maximum Non-Engineered Specs
 
| 32:Type = Line
| 32:Label = Top Speed
| 32:ValueMethod = Quantify
| 32:Unit = m/s
| 32:Value = {{{maxtopspeed|}}}
 
| 33:Type = Line
| 33:Label = Boost Speed
| 33:ValueMethod = Quantify
| 33:Unit = m/s
| 33:Value = {{{maxboostspeed|}}}
 
| 34:Type = Line
| 34:Label = Unladen Jump Range
| 34:ValueMethod = Quantify
| 34:Unit = ly
| 34:Value = {{{maxjumprange|}}}
 
| 35:Type = Line
| 35:Label = Cargo Capacity
| 35:ValueMethod = MaxCargo
| 35:Unit = t
| 35:Cargo = {{{maxcargocapacity|}}}
| 35:S1 = {{{size1|}}}
| 35:S2 = {{{size2|}}}
| 35:S3 = {{{size3|}}}
| 35:S4 = {{{size4|}}}
| 35:S5 = {{{size5|}}}
| 35:S6 = {{{size6|}}}
| 35:S7 = {{{size7|}}}
| 35:S8 = {{{size8|}}}
| 35:Value = {{{maxcargocapacity|}}}{{{size1|}}}{{{size2|}}}{{{size3|}}}{{{size4|}}}{{{size5|}}}{{{size6|}}}{{{size7|}}}{{{size8|}}}
}}</onlyinclude>
<noinclude>
The blank version of this template is as follows:
<pre style="width: 300px">
{{ShipInfobox
{{ShipInfobox
| image               =  
| image           =  
| manufacturer       =  
| manufacturer     =  
| yearsproduced       =  
| yearsproduced   =  
| type               =  
| type             =  
| cost               =
| cost             =  
| insurance          =  
| factionreq       =  
| factionreq         =  
| factionrank     =  
| factionrank         =  
| expansionreq     =  
| expansionreq       =  
| landingpad       =  
| landingpad         =  
| dimensions       =  
| dimensions         =  
| seats           =  
| seats               =  
| multicrew       =  
| multicrew           =  
| fighterhangar   =  
| fighterhangar       =  
| hullmass         =  
| hullmass           =  
| masslock         =  
| masslock           =  
| armour           =  
| armour             =  
| armourhardness   =  
| armourhardness     =  
| shields         =
| shields             =  
| heatcapacity    =
| manoeuvrability     =  
| fuelcapacity    =  
| topspeed           =  
| manoeuvrability =  
| boostspeed         =  
| topspeed         =
| jumprange           =  
| maxtopspeed      =  
| cargocapacity       =  
| boostspeed       =
| fuelcapacity        =  
| maxboostspeed    =  
| utility             =  
| jumprange       =
| small               =  
| maxjumprange    =  
| medium             =  
| cargocapacity   =  
| large               =  
| maxcargocapacity =  
| huge               =  
| utility         =  
| size1               =  
| small           =  
| size2               =  
| medium           =  
| size3               =  
| large           =  
| size4               =  
| huge             =  
| size5               =  
| size1           =  
| size6               =  
| size2           =  
| size7               =  
| size3           =  
| size8               =  
| size4           =  
| reservedic         =
| size5           =  
| maxtopspeed        =
| size6           =  
| maxboostspeed       =
| size7           =  
| maxjumprange        =
| size8           =  
| maxcargocapacity    =  
| reservedic      =  
}}
}}
</pre>
</pre>[[Category:Infobox templates|{{PAGENAME}}]]
</noinclude>
</noinclude>