Difference between revisions of "Ship DNA"

From Backstage Lore Wiki
Jump to: navigation, search
m (Protected "Ship DNA" [edit=sysop:move=sysop])
(No difference)

Revision as of 12:06, 19 September 2010


Please note: this needs confirmation as to the expected structure when used within the IGB javascript call Client.ShowFitting(FittingID)

Full Description

The Ship DNA format is a short hand notation to describe a ship and its fitting purely through the use of the type ids of the modules, items and the ship itself. It follows this basic format.

First in the format is the ship id. This is followed by a colon (:). If T3 then this is followed by a list of 5 subsystems seperated with colons. This is followed by a list of module ids and quantity with colons (:) separating them. Each module id/quantity is in the format of <moduleID>;<quantity> Charges and Drones can also be included by listing them in the same fashion as modules.

All modules are assumed to be fit, therefore only include modules that will fit in the ship itself.

DNA -> SHIP ':' HIGHS ':' MEDS ':' LOWS ':' RIGS ':' CHARGES
SHIP -> SHIP_TYPE_ID ( ':' SUBSYSTEM_ID ':' SUBSYSTEM_ID ':' SUBSYSTEM_ID ':' SUBSYSTEM_ID ':' SUBSYSTEM_ID )
HIGHS -> EMPTY | MODULE ( ':' MODULE )
MEDS -> EMPTY | MODULE ( ':' MODULE )
LOWS -> EMPTY | MODULE ( ':' MODULE )
RIGS -> EMPTY | MODULE ( ':' MODULE )
CHARGES -> EMPTY | CHARGE ( ':' CHARGE )
MODULE -> QUANTITY ';' MODULE_ID
CHARGE -> QUANTITY ';' CHARGE_ID
SHIP_TYPE_ID -> the typeID of a ship
SUBSYSTEM_ID -> the typeID of the fitted subsystems
MODULE_ID -> the typeID of the fitted module
CHARGE_ID -> the typeID of a charge or a drone
QUANTITY -> an integer quantity of the type.
Example: 597:25861;1:6673;3:439;1:4025;1:1183;1:1998;1:1236;1:11269;1::

This breaks down to:

  • ship type: 597 (Punisher)
  • Highs
    • one 25861 (Salvager I)
    • three 6673 (Medium Afocal Pulse Maser I)
  • Mids
    • one 439 (1MN Afterburner I)
    • one 4025 (X5 Prototype I Engine Enervator)
  • Lows
    • one 1183 (Small Armor Repairer II)
    • one 1998 (Tracking Enhancer I)
    • one 1236 (Overdrive Injector System II)
    • one 11269 (Energized Adaptive Nano Membrane II)
  • Rigs
    • (none)
  • Charges
    • (none)

Condensed Form

Ship:Subsystems(x5):Highs:Mediums:Lows:Rigs:Charges and Drones

Example PHP Usage

<?PHP
echo "<a href=\"javascript:CCPEVE.showFitting('597:25861;1:6673;3:439;1:4025;1:1183;1:1998;1:1236;1:11269;1::');\"'>Show Fitting</a>";
?>


Notes

Remember that the usage of showFitting('DNALINK'). Requires a lowercase 's' in showFitting. Also DNA Links needs to be a string variable.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools