Skip to content

Product Data

Chuck McKnight edited this page Nov 15, 2021 · 14 revisions

Product Data

Product Data File Storage

Products in the CSC are categorized and stored in individual files in their respective category directories. The base data directory is __data/products and underneath the products directory are the product category directories:

src/_data
└── products
    ├── ammunition
    ├── armor
    ├── automatons
    ├── blades
    ├── breathing-apparatus
    ├── communications-gear
    ├── computer-accessories
    ├── computers
    ├── construction-equipment
    ├── construction-materials
    ├── containers
    ├── cyberware
    ├── designators
    ├── detectors
    ├── dress
    ├── drones
    ├── emitters
    ├── explosives
    ├── food-and-drinks
    ├── handguns
    ├── heavy-weapons
    ├── launchers
    ├── long-guns
    ├── machineguns
    ├── medical-drugs
    ├── melee-weapons
    ├── non-breathing-gases
    ├── power-supplies
    ├── projectors
    ├── robots
    ├── shotguns
    ├── small-craft
    ├── spacecraft
    ├── strangeforms
    ├── structures-shelters
    ├── suits
    ├── surface-gear
    ├── survival-gear
    ├── toolkits
    ├── uniques-valuata
    ├── units
    ├── vehicles
    └── weapon-accessories

Each product in the CSC is stored as a JSON object (see Product Data Structure) in its own file under the appropriate category.

Product Data Structure

Each product in the Central Supply Catalog is represented as a JSON object in the following format:

  {
    "sku": "",
    "type": "",
    "subtype": "",
    "name": "",
    "mfr": "",
    "cost": ,
    "mass": ,
    "size": "",
    "techLevel": ,
    "qrebs": "",
    "damage": "",
    "image": "",
    "description": "",
    "stats": [],
    "accessories": [],
    "categories": [],
    "sources": [],
    "tags": []
  }

sku

The sku (Stock Keeping Unit) provides a unique identifier for each product. The sku has the following format:

ddd-sss-nnnnn

where:

ddd - type id
sss - sub-type id nnnnn - product number

Although the majority of the products will have a type and no subtype, certain categories, such as robotics or weapons, require a finer degree of categorization. Where these situations exist, you will see the same type id with an enumerated subtype id, e.g., 140-001 indicates that the product is in the Robotics category (140) but is of a particular type, in this case, Automatons (001).

Also note that a product file with a product number of 00000 is a sentinel file to indicate that there are no products in this category.

The product number of the sku is assigned by the catalog team to ensure there are no duplicate entries.

The current set of department/sub-department codes are:

Type / SubType Description   Type / SubType Description
010-000 Breathing Apparatus   140-002 Drones
020-000 Communication Gear   140-003 Strangeforms
030-000 Computers   145-000 Structures, Shelters
030-001 Computer Accessories   160-000 Surface Gear
040-000 Construction Equipment   170-000 Toolkits
040-001 Construction Materials   180-000 Vehicles
050-000 Containers   180-001 Small Craft
060-000 Detectors   180-002 Space Craft
070-000 Emitters   190-000 Uniques & Valuata
080-000 Explosives   200-000 Melee Weapons
090-000 Food & Drinks   200-001 Blades
100-000 Medical, Drugs   200-002 Handguns
110-000 Non-Breathing Gases   200-003 Shotguns
120-000 Power Supplies   200-004 Machineguns
130-000 Armor   200-005 Long Guns
130-001 Dress   200-006 Heavy Weapons
130-002 Suits   200-007 Launchers
130-003 Units   200-008 Projectors
130-004 Cyberware   200-009 Designators
130-005 Survival Items   200-010 Ammunition
140-000 Robots   200-011 Weapon Accessories
140-001 Automatons  

These departments loosely correspond to the categories listed in Traveller 5.10 Book 3[1].

type / subtype

Product Category Type Subtypes
Breathing Apparatus "breathing apparatus" none
Communications Gear "communications gear" none
Computers "computer equipment" "computers"
Computer Accessories "computer equipment" "computer accessories"
Construction Equipment "construction" "construction equipment"
Construction Materials "construction" "construction materials"
Containers "containers" none
Detectors "detectors" none
Emitters "emitters" none
Explosives "explosives" none
Food and Drinks "food drink" none
Medical, Drugs "medical drugs none
Non-Breathing Gases "non-breathing gases" none
Power Supplies "power supplies" none
Armor "protections" "armor"
Cyberware "protections" "cyberware"
Dress "protections" "dress"
Suits "protections" "suits"
Units "protections" "units"
Survival Gear "protections" "survival gear"
Automatons "robotics" "automatons"
Drones "robotics" "drones"
Robots "robotics" "robots"
Strangeforms "robotics" "strangeforms"
Structures, Shelters "structures" none
Surface Gear "surface gear" none
Toolkits "toolkits" none
Vehicles "transportation" "vehicles"
Small Craft "transportation" "small craft"
Space Craft "transportation" "space craft"
Uniques & Valuata "uniques" "none"
Melee Weapons "weapons" "melee"
Blades "weapons" "blades"
Handguns "weapons" "handguns"
Shotguns "weapons" "shotguns"
Long Guns "weapons" "long guns"
Heavy Weapons "weapons" "heavy weapons"
Launchers "weapons" "launchers"
Projectors "weapons" "projectors"
Designators "weapons" "designators"
Ammunition "weapons" "ammunition"
Weapon Accessories "weapons" "weapon accessories

name

The name of the product.

mfr

The manufacturer id for the product is drawn from the progdata/manufacturers.json file. The objects in that file include a name and a link to the appropriate page on the Traveller Wiki. This attribute is optional and may be omitted if there is not a stated manufacturer.

Mfr Id Manufacturer Mfr Id Manufacturer
000 Generic* 009 Sharushid
001 Delgado Trading 010 Sternmetal Horizons
002 GSbAG 011 SuSAG
003 General Products 012 Tukera Lines
004 Hortalez et Cie 013 Zirunkariish
005 Instellarms 014 Dover-Gabe
006 Ling-Standard Products 015 ICAM Technology
007 Makhidkarun 016 Star Servants
008 Naasirka

* Using the Generic code suppresses the display of the manufacturer on the page.

cost

The cost represents the price of the item in Imperial credits. Large values will be converted for display to KCr, MCr, BCr, and TCr.

mass

The mass represents the mass of the item in kilograms. This attribute is optional and may be omitted if the value is not available.

The mass attribute is displayed in the product details portion of the page.

size

The size represents the relative size of the item. This attribute is optional and may be omitted if the value is not available.

The size attribute is displayed in the product details portion of the page.

techLevel

The techLevel is a numeric value representing the technology level of the item. Generally speaking it is the first technology level where the item appears. The values are converted to hexadecimal-esque values per the Traveller 5.10 convention [2].

Dec Hex   Dec Hex   Dec Hex   Dec Hex
0 0   9 9   18 J   27 T
1 1   10 A   19 K   28 U
2 2   11 B   20 L   29 V
3 3   12 C   21 M   30 W
4 4   13 D   22 N   31 X
5 5   14 E   23 P   32 Y
6 6   15 F   24 Q   33 Z
7 7   16 G   25 R  
8 8   17 H   26 S  

The techLevel attribute is displayed in the product details portion of the page.

qrebs

The qrebs string represents the Quality, Reliability, Ease of Use, Burden, and Safety values for the product. _This is an optional field and may be omitted if the data is not available_. Typical values would be represented as a comma-separated string, e.g., "R=3, Q=2, E=2".

The qrebs attribute is displayed in the product details portion of the page.

armorValue

The armorValue attribute contains the protection value for the item as a string. When there is more than one value due to a difference in the rule set being used (e.g., Mongoose Traveller vs. Traveller 5), the rule set should be noted in parentheses. The attribute is a string that contains comma-separated values. This is an optional attribute and may be omitted if the value(s) are not available.

The example below illustrates a product that has an armor value of 10 per Traveller 5 and a value of 5 per Mongoose Traveller.

        "armorValue" : "10 (T5), 5 (MgT)"

The armorValue attribute is displayed in the product details portion of the page.

damage

The damage attribute is a string that contains the damage types. Multiple types are separated by commas. An example would be:

        "damage": "Bullet-2, Frag-2"

The damage attribute is displayed in the product details portion of the page.

image

The image attribute specifies the image to be displayed on the department, product, and search results pages. The images are stored in the src/img directory and the assumed base directory is /img so the string should specify the name of the file with the extension and any subdirectories that the file may reside in. This is an optional attribute and a default No Image Available image will be displayed if this attribute is omitted.

Images should be in the Portable Network Graphics (PNG) format and no larger than 400px x 400px. These images will be dynamically resized for thumbnails and will be resized for the upcoming rollover feature on the product pages.

variants

This attribute contains an array of objects that are used to create button-like links on the product page for different versions of the product. An example of the variants attribute is:

  "variants": [
    { "sku": "200-010-00002", "label": "1D Damage"}, 
    { "sku": "200-010-00003", "label": "2D Damage"}, 
    { "sku": "200-010-00004", "label": "3D Damage"}, 
    { "sku": "200-010-00005", "label": "4D Damage"}, 
    { "sku": "200-010-00006", "label": "5D Damage"}, 
    { "sku": "200-010-00007", "label": "6D Damage"}, 
    { "sku": "200-010-00008", "label": "7D Damage"}, 
    { "sku": "200-010-00009", "label": "8D Damage"}, 
    { "sku": "200-010-00010", "label": "9D Damage"}, 
    { "sku": "200-010-00011", "label": "10D Damage"}
  ],

description

This attribute contains the product description. The sentence used in the summary that appears on the department and search results pages should be delimited through the use of the / markers. The text can contain embedded HTML to allow the content to be as rich as the author desires.

stats

The stats attribute is an array of objects that consist of a label and a value. These objects will be displayed in a two-column table after the description. An example of the stats attribute for a vehicle:

    "stats": [
      { "label": "Speed",      "value": 5 },
      { "label": "Load",       "value": 1 },
      { "label": "Armor",      "value": 0 },
      { "label": "Cage",       "value": 0 },
      { "label": "FlashProof", "value": 0 },
      { "label": "RadProof",   "value": 3 },
      { "label": "SoundProof", "value": 3 },
      { "label": "PsiShield",  "value": 0 },
      { "label": "Insulated",  "value": 3 },
      { "label": "Sealed",     "value": 3 }
    ],

The stats attribute is an optional field and may be omitted if unneeded.

accessories

The accessories attribute is an array of strings that contain the skus of any related accessories. This is an optional attribute and may be omitted if there are no accessories associated with the product.

categories

The categories attribute is used by the search filters and allows the product to be associated with multiple categories. At a minimum, this attribute should have all of the types, subtypes for the product. The attribute is an array of strings.

sources

The sources attribute is an array of objects that allow the product to be properly attributed. The format for a source object is:

{
  "publication": "",
  "authors": [],
  "publisher": {
    "name": "",
    "url": ""
  }
}
  • publication - title of the article, document, etc.
  • authors - Names of authors (e.g., "Miller, Marc") in a comma-separated list
  • publisher - object containing the name of the publisher and an optional URL to the publisher's web site

tags

The tags attribute is used internally by Eleventy to automatically create collections based on the strings in the tags attribute. At a minimum this attribute should contain the "products" tag and the type tag (and subtype if available).


"Traveller 5.10 Core Rules Book 3 : Worlds and Adventures", p. 172, Marc Miller, Far Future Enterprises

"Traveller 5.10 Core Rules Book 3 : Worlds and Adventures", p. 172, Marc Miller, Far Future Enterprises

Clone this wiki locally