Data Types

AssetID
Asset ID is a type derived from uint32 (EvilEngine) or uint64 (GoodEngine). It is considered its own type due to how the game uses Asset IDs to uniquely identify an asset and manage communication between them.

EvilEngine
To calculate the asset ID for the original game's assets, the game runs the BKDR hash algorithm on the asset's name converted to upper case. This is specially important to know when editing RWTX assets; to be able to refer to them from MODL, BSP and JSP assets, the game calculates the hash at runtime and finds the textures based on that.

This is HipHopTool's implementation of the algorithm in C#:

public static uint BKDRHash(string str) {       str = str.ToUpper; uint seed = 131; uint hash = 0; int length = str.Length; if (length > 31) length = 31; for (int i = 0; i < length; i++) hash = (hash * seed) + str[i]; return hash; }

Vector2
Vector2 is a set of 2 floats, which usually represent a 2D vector on the world; it is used mostly for texture coordinates.

Vector3
Vector3 is a set of 3 floats, which usually represent a 3D vector on the world, be it position, rotation or scale.

Vector4
Vector4 is a set of 4 floats. They can represent a vector in 4D space, and also a color with R, G, B, A components ranging from 0 to 1.

Color
Color is a set of 4 bytes, which represent a 32 bit color with red, blue, green and alpha components.

Motion
Motion is a 0x30-byte structure (0x3C in TSSM) used in several asset types (PLAT and BUTN) which contains some settings defining how the object should move.