Template:ShipInfobox: Difference between revisions

m Added tiny hardpoints
Changed label displayed for data source "fighterhangar" from "Fighter Hangar" to "Fighter Bay" per request.
 
(29 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<onlyinclude>
<infobox theme="portInfobox">
{{#infoboxbuilder:
<title><default>{{PAGENAME}}</default></title>
| 0:Theme = eInfobox | 0:CustomModule = Module:ShipInfobox
<image source="image"><default>Placeholder Ship.png</default></image>
| 1:Type  = Title | 1:Label = NULL | 1:Value = {{PAGENAME}}
<group>
| 2:Type  = MainImage | 2:Label = NULL| 2:Value = [[File:{{{image|Placeholder.png}}}|306px]]
    <header>Overview</header>
 
    <data source="manufacturer"><label>Manufacturer</label><format>[[{{{manufacturer}}}]]</format></data>
| 3:Type = Header | 3:Label = NULL | 3:Value = Faction Specific | 3:Requirement = {{{factionreq|}}} | 3:ValueMethod = Required
    <data source="yearsproduced"><label>Years Produced</label></data>
| 4:Type  = Line | 4:Label = Faction | 4:Value = {{{factionreq|}}} | 4:ValueMethod = Factionreq
    <data source="type"><label>Type</label></data>
| 5:Type = Line | 5:Label = Rank Required | 5:Value = {{{factionrank|}}} | 5:Requirement = {{{factionreq|}}} | 5:ValueMethod = Required
    <data source="cost">
 
        <label>Cost</label>
| 6:Type = Header | 6:Label = NULL | 6:Value = Default version
        <format>{{{cost}}} CR</format>
| 7:Type = Line | 7:Label = Manufacturer
    </data>
| 7:Value = {{#if:{{{manufacturer|}}}|[[{{{manufacturer|}}}]]|---}}
    <data source="arx">
| 8:Type = Line | 8:Label = Dimensions
        <label>ARX</label>
| 8:Value = {{{dimensions|}}}
        <format>{{{arx}}} ARX</format>
| 9:Type = Line | 9:Label = Type
    </data> 
| 9:Value = {{{type|}}}
    <data source="insurance">
| 10:Type = Line | 10:Label = Cost
        <label>Insurance</label>
| 10:ValueMethod = FormatCost | 10:Unit = CR | 10:Value = {{{cost|---}}}
        <format>{{{insurance}}} CR</format>
| 11:Type = Line | 11:Label = Insurance
        </data>
| 11:ValueMethod = Insurance | 11:Cost = {{{cost|}}} | 11:Value = NULL
    <data source="factionreq"><label>Faction</label><format>[[{{{factionreq}}}]]</format></data>
| 12:Type = Line | 12:Label = Top Speed
    <data source="factionrank">
| 12:ValueMethod = Quantify | 12:Unit = m/s | 12:Value = {{{topspeed|---}}}
        <label>Faction Rank</label>
| 13:Type = Line | 13:Label = Boost Speed
        <format>{{#if: {{{factionreq|}}} | {{{factionrank}}} }}</format>
| 13:ValueMethod = Quantify | 13:Unit = m/s | 13:Value = {{{boostspeed|---}}}
    </data>
| 14:Type = Line | 14:Label = Manoeuvrability | 14:Value = {{{manoeuvrability|---}}}
    <data source="expansionreq"><label>Expansion</label></data>
| 15:ValueMethod = FormatCost | 15:Unit = MJ
    </group>
| 15:Type = Line | 15:Label = Shields | 15:Value = {{{shields|---}}}
<group>
| 19:Type = Line | 19:Label = Armour | 19:Value = {{{armour|---}}}
    <header>Specifications</header>
| 20:Type = Line | 20:Label = Hull Mass
    <data source="landingpad"><label>Landing Pad Size</label></data>
| 20:ValueMethod = Quantify | 20:Unit = t | 20:Value = {{{hullmass|---}}}
    <data source="dimensions"><label>Dimensions</label></data>
| 21:Type = Line | 21:Label = Cargo Capacity
    <data source="seats"><label>Pilot Seats</label></data>
| 21:ValueMethod = Quantify | 21:Unit = t | 21:Value = {{{cargocapacity|---}}}
    <data source="multicrew"><label>Multicrew</label></data>
| 22:Type = Line | 22:Label = Fuel Capacity
    <data source="fighterhangar"><label>Fighter Bay</label></data>
| 22:ValueMethod = Quantify | 22:Unit = t | 22:Value = {{{fuelcapacity|---}}}
    <data source="hullmass"><label>Hull Mass</label><format>{{{hullmass}}} t</format></data>
| 23:Type = Line | 23:Label = Unladen Jump Range
    <data source="masslock"><label>Mass Lock Factor</label></data>
| 23:ValueMethod = Quantify | 23:Unit = ly | 23:Default = x
    <data source="armour"><label>Armour</label></data>
| 23:Value = {{{jumprange|x}}}
    <data source="armourhardness"><label>Armour Hardness</label></data>
| 24:Type = Line | 24:Label = Landing Pad Size | 24:Value = {{{landingpad|---}}}
    <data source="shields"><label>Shields</label><format>{{{shields}}} MJ</format></data>
| 25:Type = Line | 25:Label = Hardpoints | 25:ValueMethod = Hardpoints  
    <data source="heatcapacity"><label>Heat Capacity</label></data>
| 25:Utility = {{{utility|}}} | 25:T = {{{tiny|}}} | 25:S = {{{small|}}} | 25:M = {{{medium|}}}
    <data source="fuelcapacity"><label>Fuel Capacity</label><format>{{{fuelcapacity}}} t</format></data>
| 25:L = {{{large|}}} | 25:H = {{{huge|}}} | 25:Value = NULL
    <data source="scooptimised"><label>SCO Optimised</label></data>
| 26:Type = Line | 26:Label = Internals
    <data source="manoeuvrability"><label>Manoeuvr-<br/>ability</label></data>
| 26:ValueMethod = Internals | 26:S1 = {{{size1|}}} | 26:S2 = {{{size2|}}} | 26:S3 = {{{size3|}}} | 26:S4 = {{{size4|}}} | 26:S5 = {{{size5|}}} | 26:S6 = {{{size6|}}} | 26:S7 = {{{size7|}}} | 26:S8 = {{{size8|}}} | 26:Reserved = {{{reservedic|}}} | 26:Value = NULL
    <data>
 
        <label>Top Speed</label>
| 27:Type = Header | 27:Label = NULL | 27:Value = Maximum/Upgraded versions
        <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>
| 28:Type = Line  | 28:Label = Jump Range
    </data>
| 28:ValueMethod = Quantify | 28:Unit = ly
    <data>
| 28:Value = {{{maxjumprange|}}}
        <label>Boost Speed</label>
| 29:Type = Line  | 29:Label = Top Speed
        <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>
| 29:ValueMethod = Quantify | 29:Unit = m/s
    </data>
| 29:Value = {{{maxtopspeed|}}}
    <data>
| 30:Type = Line  | 30:Label = Top Boost
        <label>Unladen Jump Range</label>
| 30:ValueMethod = Quantify | 30:Unit = m/s
        <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>
| 30:Value = {{{maxboostspeed|}}}
    </data>
| 31:Type = Line  | 31:Label = Cargo Capacity
    <data>
| 31:ValueMethod = MaxCargo | 31:Unit = T | 31:Cargo = {{{maxcargocapacity|}}} | 31:S1 = {{{size1|}}} | 31:S2 = {{{size2|}}} | 31:S3 = {{{size3|}}} | 31:S4 = {{{size4|}}} | 31:S5 = {{{size5|}}} | 31:S6 = {{{size6|}}} | 31:S7 = {{{size7|}}} | 31:S8 = {{{size8|}}}
        <label>Cargo Capacity</label>
| 31:Value = {{{maxcargocapacity|}}}{{{size1|}}}{{{size2|}}}{{{size3|}}}{{{size4|}}}{{{size5|}}}{{{size6|}}}{{{size7|}}}{{{size8|}}}
        <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>
}}</onlyinclude>
    </data>
<noinclude>
    </group>
For the default version:
    <group>
<pre style="width: 300px">
        <header>Outfitting</header>
    <data>
        <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>
        </data>
    <data source="reservedhp"><label>Reserved Hardpoints</label>
    </data>
    <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>
    </data>
    <data source="reservedic"><label>Reserved Compartments</label>
    </data>
    </group>
</infobox><includeonly>{{#if: {{NAMESPACE}} || [[Category:Ships]]}}</includeonly><noinclude>
Example usage:<pre>
{{ShipInfobox
{{ShipInfobox
| image               =  
| image           =  
| manufacturer       =  
| manufacturer     =  
| dimensions          =  
| yearsproduced    =  
| type               =  
| type             =  
| cost               =  
| cost             =
| topspeed           =  
| arx              =
| boostspeed         =  
| insurance        =
| manoeuvrability     =  
| factionreq      =
| shields            =  
| factionrank      =  
| armour              =  
| expansionreq    =
| hullmass            =  
| landingpad      =
| cargocapacity       =  
| dimensions      =
| fuelcapacity       =  
| seats           =  
| jumprange          =  
| multicrew        =
| landingpad          =  
| fighterhangar    =
| utility             =  
| hullmass        =
| small               =  
| masslock        =
| medium             =  
| armour          =
| large               =  
| armourhardness  =
| huge               =  
| shields         =  
| size1               =  
| heatcapacity    =
| size2               =  
| fuelcapacity    =
| size3               =  
| scooptimised     =  
| size4               =  
| manoeuvrability  =  
| size5               =  
| topspeed        =  
| size6               =  
| maxtopspeed      =  
| size7               =  
| boostspeed       =  
| size8               =  
| 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
 
Maximum/Upgraded version
<pre style="width: 300px">
| maxjumprange        =
| maxtopspeed        =
| maxboostspeed      =
| maxcargocapacity    =
</pre>
 
:;maxjumprange: This is the lightest possible ship version with the highest Fuel Tank available
 
:;maxcargocapacity: This is completed automatically if there are internal compartments
 
</noinclude>
</noinclude>