entities - OpenPerpetuum/OPDB GitHub Wiki
Description
A global inventory of everything in the game, stored in every bot, container or station.
An 'entity' is essentially an inventory 'item', or stack of item.
Table Structure
ID | Type | Name | Description | Properties | Links |
---|---|---|---|---|---|
1 | Number | eid | An unique identifier for this particular entity. Should be generated with dbo.GetRandomEid() | PRIMARY | ??? |
2 | Number | defintion | The ID of the type of item. | entitydefaults.definition | |
3 | Number | owner | The owner of the entity. | characters.characterID ??? | |
4 | Number | parent | The eid (unique identifier) of the item that this item is a child of. |
entities.eid | |
5 | Float | health | The current health of the entity/damage | FOREIGN | |
6 | String | ename | The custom name for this entity, player-given. | ||
7 | Number | quantity | How many duplicates of this item exists in a stack (if stacked) | ||
8 | Boolean | Repackaged | Is the item repackaged | ||
9 | String | dynprop | GenXY string for dynamic properties. Examples tint/color, paint-wear, etc. |
Notes
quantity
Think of it as the stackables in Minecraft. How many Iron Ingots do you have in that one slot?
dynprop
Could be additional properties about the items stored in a non-serialized format.
For example, bots would have fittings, resources would be the rarity, etc.
Its format are dual-fields separated by hashtags (each entry) and equal signs (pairwise). In the second/value column, it always begin with a letter defining its data type.
An example is:
#armor=t0000803F#currentcore=t0000803F#tint=cff.ff.ff.ff
Data Types
Letter | Data Type | Example |
---|---|---|
t | Hexdecimal Value ??? | (Hex) ######## |
c | Color ??? | rr.gg.bb.aa |
Allowed Properties
Name | Description | Data Type |
---|---|---|
armor | Repair State or current health ??? | Hexdecimal Value (t) ??? ??? |
decay | Paint decay modifier. 1.0 = Factory New, 0.0 = Battle Scarred, for a CS:GO comparison. | Hexdecimal Value (t) ??? |
currentcore | ??? | Hexdecimal Value (t) ??? |
tint | The color of the entity's tint (visual). Transparency is ignored. | Color (c) |