Template:ShipInfobox: Difference between revisions
Updated template as per sandbox proposal of Clockpuncher |
Infobox updated using the portable infobox migration tool |
||
| Line 1: | Line 1: | ||
< | <infobox theme="portInfobox"> | ||
{{ | <title><default>{{PAGENAME}}</default></title> | ||
<image source="image"><default>Placeholder.png</default></image> | |||
<group> | |||
<header>Faction Specific</header> | |||
<data source="factionreq"><label>Faction</label><format>[[{{{factionreq}}}]]</format></data> | |||
<data source="factionrank"> | |||
<label>Rank Required</label> | |||
<format>{{#if: {{{factionreq|}}} | {{{factionrank}}} }}</format> | |||
</data> | |||
</group> | |||
<group> | |||
<header>Default version</header> | |||
<data source="manufacturer"><label>Manufacturer</label><format>[[{{{manufacturer}}}]]</format><default>---</default></data> | |||
<data source="dimensions"><label>Dimensions</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(',','')) | |||
--> | |||
<default>---</default> | |||
</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="topspeed"><label>Top Speed</label><format>{{{topspeed}}} m/s</format><default>---</default></data> | |||
<data source="boostspeed"><label>Boost Speed</label><format>{{{boostspeed}}} m/s</format><default>---</default></data> | |||
<data source="manoeuvrability"><label>Manoeuvrability</label><default>---</default></data> | |||
<data source="shields"><label>Shields</label><format>{{{shields}}} MJ</format><default>---</default> | |||
<!-- | |||
TODO: strip commas in {{{cost}}} and reformat to use commas. | |||
FormatNum.commavalue(field.Value:gsub(',','')) | |||
--> | |||
</data> | |||
| | <data source="armour"><label>Armour</label><default>---</default></data> | ||
<data source="hullmass"><label>Hull Mass</label><format>{{{hullmass}}} t</format><default>---</default></data> | |||
<data source="cargocapacity"><label>Cargo Capacity</label><format>{{{cargocapacity}}} t</format><default>---</default></data> | |||
<data source="fuelcapacity"><label>Fuel Capacity</label><format>{{{fuelcapacity}}} t</format><default>---</default></data> | |||
<data source="jumprange"><label>Unladen Jump Range</label><format>{{{jumprange}}} ly</format><default>x</default></data> | |||
<data source="landingpad"><label>Landing Pad Size</label><default>---</default></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/Upgraded versions</header> | |||
<data source="maxjumprange"><label>Jump Range</label><format>{{{maxjumprange}}} ly</format></data> | |||
<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="maxcargocapacity"><label>Cargo Capacity</label><format>{{{maxcargocapacity}}} t</format><!-- TODO: Lua Function --></data> | |||
</group> | |||
<group> | |||
<header>Ship values</header> | |||
<data source="masslock"><label>Mass lock factor</label></data> | |||
</group> | |||
</infobox><noinclude> | |||
For the default version: | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
<noinclude> | |||
<pre style="width: 300px"> | <pre style="width: 300px"> | ||
{{ShipInfobox | {{ShipInfobox | ||
| image = | | image = | ||
| manufacturer = | | manufacturer = | ||
| | | dimensions = | ||
| type = | | type = | ||
| cost = | | cost = | ||
| topspeed = | | topspeed = | ||
| boostspeed = | | boostspeed = | ||
| | | manoeuvrability = | ||
| shields = | |||
| armour = | |||
| hullmass = | |||
| cargocapacity = | | cargocapacity = | ||
| fuelcapacity = | | fuelcapacity = | ||
| jumprange = | |||
| landingpad = | |||
| utility = | | utility = | ||
| small = | | small = | ||
| Line 239: | Line 94: | ||
| size7 = | | size7 = | ||
| size8 = | | size8 = | ||
}} | |||
</pre> | |||
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 = | | reservedic = | ||
</pre> | |||
:;Format: #x Size ? Module | |||
:;Example: 1x Size 6 Cargo Rack | |||
Maximum/Upgraded version | |||
<pre style="width: 300px"> | |||
| maxjumprange = | |||
| maxtopspeed = | | maxtopspeed = | ||
| maxboostspeed = | | maxboostspeed = | ||
| maxjumprange | | 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 | |||
Mass lock factor | |||
<pre style="width: 300px"> | |||
| masslock = | |||
</pre> | </pre> | ||
:;masslock: The mass lock factor of the ship, useful in combat | |||
</noinclude> | </noinclude> | ||