Difference between revisions of "Ship DNA"
m (Protected "Ship DNA" [edit=sysop:move=sysop]) |
|
(No difference)
|
Revision as of 12:06, 19 September 2010
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.
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.