Skip to content

ConstructionMaterial

joscha999 edited this page Jun 27, 2020 · 4 revisions

General

A construction material is something used to construct something else, like a floor.

Example and Notes

The most important variable on your construction material is the threadsafeName, it is used to identify it, set it wisely. Bitmasked sprites are only needed for materials that are used like walls where intersections can have different sprites, for floor like materials a single sprite is enough.

{
  "threadsafeName": "MyFloor", <-- Name that the material will be called by
  "cost": -50.0,
  "maxStackSize": 45, <-- The amount of materials that can fit in one construction box.
  "WalkBuffSpeed": 0.05,
  "ConstructionTime": 10,
  "renderLayer": 0, <-- What layer to render the texture on (0 = Under Pax, 5+ = Over Pax)
  "isIndoors": true,
  "isWalkable": true, <-- Do pax see this as a floor?
  "isWalkableSecureOutside": false, <-- Can this be used by pax outside when the sector is secure.
  "isUtilities": false,
  "canBeWarped": true,
  "Sprite": "Carpet_01C", 
  "BitmaskedSprites": [],
  "DisplayName": "White", <-- Display name, usually shown on the construction box at the deliveries zone.
  "i18nKey": "Olaf.customFloor.name"
}

BitmaskedSprites example

Bitmask notes

A table defining which sprite is used for a given intersection. The number is the index in the bitmasked array.

 0 = None
 1 = Top
 2 = Right
 3 = Right, Top
 4 = Bottom
 5 = Bottom, Top
 6 = Bottom, Right
 7 = Bottom, Right, Top
 8 = Left
 9 = Left, Top
10 = Left, Right
11 = Left, Right, Top
12 = Left, Bottom
13 = Left, Bottom, Top
14 = Left, Bottom, Right
15 = Left, Bottom, Right, Top

Example

  "BitmaskedSprites": [
    "Wall001_0",
    "Wall001_1",
    "Wall001_2",
    "Wall001_3",
    "Wall001_4",
    "Wall001_5",
    "Wall001_6",
    "Wall001_7",
    "Wall001_8",
    "Wall001_9",
    "Wall001_10",
    "Wall001_11",
    "Wall001_12",
    "Wall001_13",
    "Wall001_14",
    "Wall001_15"
  ]