Template:ShipInfobox: Difference between revisions
Appearance
Conversion to portable infobox |
|||
| Line 1: | Line 1: | ||
< | <infobox theme="portInfobox"> | ||
{{ | <title><default>{{PAGENAME}}</default></title> | ||
<image source="image"><default>Placeholder.png</default></image> | |||
<group> | |||
<header>Overview</header> | |||
<data source="manufacturer"><label>Manufacturer</label><format>[[{{{manufacturer}}}]]</format></data> | |||
<data source="yearsproduced"><label>Years Produced</label></data> | |||
<data source="type"><label>Type</label></data> | |||
<data source="cost"> | |||
<label>Cost</label> | |||
<format>{{{cost}}} CR</format> | |||
<!-- | |||
TODO: strip commas in {{{cost}}} and reformat to use commas. | |||
FormatNum.commavalue(field.Value:gsub(',','')) | |||
--> | |||
</data> | |||
<data source="cost"> | |||
<label>Insurance</label> | |||
<format>{{formatnum: {{#expr: trunc({{formatnum: {{{cost|}}}|R}}*0.05)}} }} CR</format> | |||
<!-- 5% of cost integer --> | |||
</data> | |||
<data source="factionreq"><label>Faction</label><format>[[{{{factionreq}}}]]</format></data> | |||
<data source="factionrank"> | |||
<label>Faction Rank</label> | |||
<format>{{#if: {{{factionreq|}}} | {{{factionrank}}} }}</format> | |||
</data> | |||
<data source="expansionreq"><label>Expansion</label></data> | |||
</group> | |||
<group> | |||
| | <header>Default Specifications</header> | ||
<data source="landingpad"><label>Landing Pad Size</label></data> | |||
<data source="dimensions"><label>Dimensions</label></data> | |||
<data source="seats"><label>Pilot Seats</label></data> | |||
<data source="multicrew"><label>Multicrew</label></data> | |||
<data source="fighterhangar"><label>Fighter Hangar</label></data> | |||
<data source="hullmass"><label>Hull Mass</label><format>{{{hullmass}}} t</format></data> | |||
<data source="masslock"><label>Mass Lock Factor</label></data> | |||
<data source="armour"><label>Armour</label></data> | |||
<data source="armourhardness"><label>Armour Hardness</label></data> | |||
<data source="shields"><label>Shields</label><format>{{{shields}}} MJ</format> | |||
<!-- | |||
TODO: strip commas in {{{cost}}} and reformat to use commas. | |||
FormatNum.commavalue(field.Value:gsub(',','')) | |||
--> | |||
</data> | |||
<data source="manoeuvrability"><label>Manoeuvrability</label></data> | |||
<data source="topspeed"><label>Top Speed</label><format>{{{topspeed}}} m/s</format></data> | |||
<data source="boostspeed"><label>Boost Speed</label><format>{{{boostspeed}}} m/s</format></data> | |||
<data source="jumprange"><label>Unladen Jump Range</label><format>{{{jumprange}}} ly</format></data> | |||
<data source="cargocapacity"><label>Cargo Capacity</label><format>{{{cargocapacity}}} t</format></data> | |||
<data source="fuelcapacity"><label>Fuel Capacity</label><format>{{{fuelcapacity}}} t</format></data> | |||
<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><label>Internals</label><default>{{#if: {{{size1|}}} | {{{size1}}}× Size 1 {{plural: {{{size1}}} | Compartment | Compartments}} <br/> }}{{#if: {{{size2|}}} | {{{size2}}}× Size 2 {{plural: {{{size2}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size3|}}} | {{{size3}}}× Size 3 {{plural: {{{size3}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size4|}}} | {{{size4}}}× Size 4 {{plural: {{{size4}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size5|}}} | {{{size5}}}× Size 5 {{plural: {{{size5}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size6|}}} | {{{size6}}}× Size 6 {{plural: {{{size6}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size7|}}} | {{{size7}}}× Size 7 {{plural: {{{size7}}} | Compartment | Compartments }} <br/> }}{{#if: {{{size8|}}} | {{{size8}}}× Size 8 {{plural: {{{size8}}} | Compartment | Compartments }} <br/> }}{{#if: {{{reservedic|}}} | {{{reservedic}}} }}</default> | |||
</data> | |||
</group> | |||
<group> | |||
<header>Maximum Non-Engineered Specs</header> | |||
<data source="maxtopspeed"><label>Top Speed</label><format>{{{maxtopspeed}}} m/s</format></data> | |||
<data source="maxboostspeed"><label>Top Boost</label><format>{{{maxboostspeed}}} m/s</format></data> | |||
<data source="maxjumprange"><label>Unladen Jump Range</label><format>{{{maxjumprange}}} ly</format></data> | |||
<data source="maxcargocapacity"><label>Cargo Capacity</label><format>{{{maxcargocapacity}}} t</format><!-- TODO: Lua Function --></data> | |||
</group> | |||
</infobox><noinclude> | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
<noinclude> | |||
The blank version of this template is as follows: | The blank version of this template is as follows: | ||
<pre style="width: 300px"> | <pre style="width: 300px"> | ||
| Line 244: | Line 110: | ||
| maxjumprange = | | maxjumprange = | ||
}} | }} | ||
</pre> | </pre></noinclude> | ||
</noinclude> | |||
Revision as of 09:15, 30 August 2019
The blank version of this template is as follows:
{{ShipInfobox
| image =
| manufacturer =
| yearsproduced =
| type =
| cost =
| factionreq =
| factionrank =
| expansionreq =
| landingpad =
| dimensions =
| seats =
| multicrew =
| fighterhangar =
| hullmass =
| masslock =
| armour =
| armourhardness =
| shields =
| manoeuvrability =
| topspeed =
| boostspeed =
| jumprange =
| cargocapacity =
| fuelcapacity =
| utility =
| small =
| medium =
| large =
| huge =
| size1 =
| size2 =
| size3 =
| size4 =
| size5 =
| size6 =
| size7 =
| size8 =
| reservedic =
| maxtopspeed =
| maxboostspeed =
| maxjumprange =
}}