Jump to content

Template:ShipInfobox: Difference between revisions

From Elite Dangerous Wiki
Moved much of the code to CSS
Changed label displayed for data source "fighterhangar" from "Fighter Hangar" to "Fighter Bay" per request.
 
(70 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<onlyinclude>{| class="eInfobox" style="background-color: #333300; font-size: 11px; border: thin solid orange; float: right; margin: 0 0 10px 10px; width: 280px;"
<infobox theme="portInfobox">
|-
<title><default>{{PAGENAME}}</default></title>
! colspan="2" style="font-size: 14px; text-align: center;" | {{PAGENAME}}
<image source="image"><default>Placeholder Ship.png</default></image>
|-
<group>
! colspan="2" style="padding: 1px; text-align: center;" | {{#if:{{{image|}}}|[[File:{{{image|Placeholder.png}}}|272px|link=]]|[[File:Placeholder.png|272px|link=]]}}
    <header>Overview</header>
|-
    <data source="manufacturer"><label>Manufacturer</label><format>[[{{{manufacturer}}}]]</format></data>
! style="width: 45%;" | Manufacturer
    <data source="yearsproduced"><label>Years Produced</label></data>
| style="width: 55%;" | {{#if:{{{manufacturer|}}}|[[{{{manufacturer|}}}]]|---}}
    <data source="type"><label>Type</label></data>
|-
    <data source="cost">
! Cost
        <label>Cost</label>
| {{#if:{{{cost|}}}|{{{cost|?}}} CR|---}}
        <format>{{{cost}}} CR</format>
|-
    </data>
! Top Speed
    <data source="arx">
| {{#if:{{{topspeed|}}}|{{{topspeed|?}}} m/s|---}}
        <label>ARX</label>
|-
        <format>{{{arx}}} ARX</format>
! Boost Speed
    </data> 
| {{#if:{{{boostspeed|}}}|{{{boostspeed|?}}} m/s|---}}
    <data source="insurance">
|-
        <label>Insurance</label>
! Maneuverability
        <format>{{{insurance}}} CR</format>
| {{#if:{{{maneuverability|}}}|{{{maneuverability|}}}|---}}
        </data>
|-
    <data source="factionreq"><label>Faction</label><format>[[{{{factionreq}}}]]</format></data>
! Shields
    <data source="factionrank">
| {{#if:{{{shields|}}}|{{{shields|?}}}|---}}
        <label>Faction Rank</label>
|-
        <format>{{#if: {{{factionreq|}}} | {{{factionrank}}} }}</format>
! Armour
    </data>
| {{#if:{{{armour|}}}|{{{armour|?}}}|---}}
    <data source="expansionreq"><label>Expansion</label></data>
|-
    </group>
! Hull Mass
<group>
| {{#if:{{{hullmass|}}}|{{{hullmass|?}}} T|---}}
    <header>Specifications</header>
|-
    <data source="landingpad"><label>Landing Pad Size</label></data>
! Cargo Capacity
    <data source="dimensions"><label>Dimensions</label></data>
| {{#if:{{{cargocapacity|}}}|{{{cargocapacity|?}}} T|---}}
    <data source="seats"><label>Pilot Seats</label></data>
|-
    <data source="multicrew"><label>Multicrew</label></data>
! Fuel Capacity
    <data source="fighterhangar"><label>Fighter Bay</label></data>
| {{#if:{{{fuelcapacity|}}}|{{{fuelcapacity|?}}} T|---}}
    <data source="hullmass"><label>Hull Mass</label><format>{{{hullmass}}} t</format></data>
|- {{#if:{{{jumprange|}}}||style="display: none;"}}
    <data source="masslock"><label>Mass Lock Factor</label></data>
! Jump Range (unladen)
    <data source="armour"><label>Armour</label></data>
| {{{jumprange|}}} LY
    <data source="armourhardness"><label>Armour Hardness</label></data>
|-
    <data source="shields"><label>Shields</label><format>{{{shields}}} MJ</format></data>
! Hardpoints
    <data source="heatcapacity"><label>Heat Capacity</label></data>
| {{#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 source="fuelcapacity"><label>Fuel Capacity</label><format>{{{fuelcapacity}}} t</format></data>
|-
    <data source="scooptimised"><label>SCO Optimised</label></data>
! Internals
    <data source="manoeuvrability"><label>Manoeuvr-<br/>ability</label></data>
| {{#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}}}}
    <data>
|- {{#if:{{{modules|}}}||style="display: none;"}}
        <label>Top Speed</label>
! Modules
        <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>
| {{{modules|}}}
    </data>
|-
    <data>
| colspan="2" style="font-size: 10px;" | *Information represents the default version of the ship.{{#if:{{{factionreq|}}}|<br><span style="color: red;">*Requires {{{factionreq|}}} rank of {{{factionrank|}}} or higher</span>}}
        <label>Boost Speed</label>
|-
        <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>
|}<includeonly>
    </data>
[[Category:Ships]]
    <data>
</includeonly></onlyinclude>
        <label>Unladen Jump Range</label>
<noinclude>
        <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>
<pre style="width: 300px">
    </data>
    <data>
        <label>Cargo Capacity</label>
        <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>
    </data>
    </group>
    <group>
        <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     =
| cost                =  
| yearsproduced    =
| topspeed           =  
| type            =
| boostspeed         =  
| cost            =
| maneuverability     =  
| arx              =
| shields            =  
| insurance       =  
| armour              =  
| factionreq      =
| hullmass            =  
| factionrank      =
| cargocapacity       =  
| expansionreq    =
| fuelcapacity       =  
| landingpad      =
| jumprange          =  
| dimensions      =  
| utility             =  
| seats           =  
| small               =  
| multicrew        =
| medium             =  
| fighterhangar    =
| large               =  
| hullmass        =
| huge               =  
| masslock        =
| size1               =  
| armour          =
| size2               =  
| armourhardness  =
| size3               =  
| shields         =  
| size4               =  
| heatcapacity    =
| size5               =  
| fuelcapacity     =  
| size6               =  
| scooptimised    =
| size7               =  
| manoeuvrability  =  
| size8               =  
| topspeed        =  
| 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 following text for faction requirements:
<pre style="width: 300px">
| factionreq          =
| factionrank        =
</pre>
</noinclude>
</noinclude>

Latest revision as of 02:42, 18 February 2026

Example usage:

{{ShipInfobox
| image            = 
| manufacturer     = 
| yearsproduced    = 
| type             = 
| cost             = 
| arx              =
| insurance        = 
| factionreq       = 
| factionrank      = 
| expansionreq     = 
| landingpad       = 
| dimensions       = 
| seats            = 
| multicrew        = 
| fighterhangar    = 
| hullmass         = 
| masslock         = 
| armour           = 
| armourhardness   = 
| shields          = 
| heatcapacity     = 
| fuelcapacity     = 
| scooptimised     = 
| manoeuvrability  = 
| topspeed         = 
| maxtopspeed      = 
| boostspeed       = 
| maxboostspeed    = 
| jumprange        = 
| maxjumprange     = 
| cargocapacity    = 
| maxcargocapacity = 
| utility          = 
| small            = 
| medium           = 
| large            = 
| huge             = 
| reservedhp       = 
| size1            = 
| size2            = 
| size3            = 
| size4            = 
| size5            = 
| size6            = 
| size7            = 
| size8            = 
| reservedic       = 
}}