OpenSimulator Internals/Databases: Difference between revisions
first |
added opensim |
||
| Line 114: | Line 114: | ||
|- | |- | ||
| serverURI || http://osimdev.org:9000/ | | serverURI || http://osimdev.org:9000/ | ||
|} | |} | ||
| Line 166: | Line 164: | ||
Attachment point numbers follow the SL/OpenSim standard: 2=chest, 5=left hand, 12=hair, 40=left foot, etc. Multi-attach points store comma-separated UUIDs. | Attachment point numbers follow the SL/OpenSim standard: 2=chest, 5=left hand, 12=hair, 40=left foot, etc. Multi-attach points store comma-separated UUIDs. | ||
Sample data (Jagga Meredith, 13 rows): | Sample data (Jagga Meredith, 13 rows): AvatarType=1 (mesh), AvatarHeight=1.6885326, 4 attachment points, 5 wearable layers (shape, skin, shirt, pants, physics). | ||
---- | ---- | ||
| Line 185: | Line 179: | ||
| HomeRegionID || char(36) || UUID of home region | | HomeRegionID || char(36) || UUID of home region | ||
|- | |- | ||
| HomePosition || varchar(64) || Vector3 in region-local metres | | HomePosition || varchar(64) || Vector3 in region-local metres | ||
|- | |- | ||
| HomeLookAt || varchar(64) || Vector3 look direction | | HomeLookAt || varchar(64) || Vector3 look direction | ||
| Line 244: | Line 238: | ||
|} | |} | ||
GRID SERVICES account has no auth row -- it cannot log in | GRID SERVICES account has no auth row -- it cannot log in. | ||
---- | ---- | ||
| Line 267: | Line 261: | ||
=== assets === | === assets === | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 277: | Line 269: | ||
| name || varchar(64) || Display name | | name || varchar(64) || Display name | ||
|- | |- | ||
| description || varchar(64) || Description | | description || varchar(64) || Description -- HG landmarks store grid URI here | ||
|- | |- | ||
| assetType || tinyint || Asset type number (see below) | | assetType || tinyint || Asset type number (see below) | ||
| Line 299: | Line 291: | ||
{| class="wikitable" | {| class="wikitable" | ||
! assetType !! Name | ! assetType !! Name | ||
|- | |- | ||
| 0 || Texture | | 0 || Texture | ||
|- | |- | ||
| 3 || Landmark | | 3 || Landmark -- HG landmarks store grid URI in description field | ||
|- | |- | ||
| 6 || Object | | 6 || Object -- serialized prim/linkset XML | ||
|- | |- | ||
| 7 || Notecard | | 7 || Notecard | ||
|- | |- | ||
| 10 || Script | | 10 || Script | ||
|- | |- | ||
| 20 || Animation | | 20 || Animation | ||
|} | |} | ||
Library/system assets | Library/system assets use non-random UUID patterns and CreatorID 11111111-1111-0000-0000-000100bba000. On osimdev after initial setup and one user session: 2602 total assets, 85 user-created (1 texture, 4 landmarks, 79 objects, 1 notecard). | ||
On osimdev after initial setup and one user session: 2602 total assets, 85 created | |||
---- | ---- | ||
| Line 392: | Line 382: | ||
|} | |} | ||
My Suitcase (type 100) is the HyperGrid suitcase -- items here travel with the avatar to foreign grids | My Suitcase (type 100) is the HyperGrid suitcase -- items here travel with the avatar to foreign grids. Firestorm creates system folders: #Firestorm (containing #AO, #LSL Bridge, #Wearable Favorites). | ||
---- | ---- | ||
=== inventoryitems === | === inventoryitems === | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 419: | Line 407: | ||
| parentFolderID || char(36) || Containing folder UUID | | parentFolderID || char(36) || Containing folder UUID | ||
|- | |- | ||
| creatorID || varchar(255) || Creator UUID or HyperGrid URI | | creatorID || varchar(255) || Creator UUID or HyperGrid URI | ||
|- | |- | ||
| inventoryBasePermissions || int unsigned || Base permission bitmask | | inventoryBasePermissions || int unsigned || Base permission bitmask | ||
| Line 444: | Line 432: | ||
|} | |} | ||
creatorID is varchar(255) to accommodate HyperGrid creator URIs | creatorID is varchar(255) to accommodate HyperGrid creator URIs. Item count on osimdev after initial session and AviWorlds visit: 380 items (171 objects, 75 animations, 34 links, 28 textures, 24 body parts, 21 clothing, 15 landmarks, 6 notecards, 3 scripts, 2 sounds, 1 mesh). | ||
Item count on osimdev after initial session and AviWorlds visit: 380 items | |||
---- | ---- | ||
| Line 469: | Line 455: | ||
Example: 5a365446-ad4f-4f7f-a843-563494b0e78b;http://login.aviworlds.com:8002/;Jagga Meredith;23cba5bc | Example: 5a365446-ad4f-4f7f-a843-563494b0e78b;http://login.aviworlds.com:8002/;Jagga Meredith;23cba5bc | ||
---- | ---- | ||
| Line 502: | Line 486: | ||
=== hg_traveling_data === | === hg_traveling_data === | ||
Tracks avatars currently traveling between grids via HyperGrid. One row per active HG session. Rows are deleted when the avatar returns home or logs out. | Tracks avatars currently traveling between grids via HyperGrid. One row per active HG session. Rows are deleted when the avatar returns home or logs out. Empty when no avatars are traveling. | ||
{| class="wikitable" | {| class="wikitable" | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| SessionID || varchar(36) || Primary key | | SessionID || varchar(36) || Primary key | ||
|- | |- | ||
| UserID || varchar(36) || Avatar UUID | | UserID || varchar(36) || Avatar UUID | ||
|- | |- | ||
| GridExternalName || varchar(255) || URI of the grid | | GridExternalName || varchar(255) || URI of the grid being visited | ||
|- | |- | ||
| ServiceToken || varchar(255) || Auth token for the foreign grid session | | ServiceToken || varchar(255) || Auth token for the foreign grid session | ||
| Line 521: | Line 505: | ||
| TMStamp || timestamp || Auto-updated -- used to detect stale travel records | | TMStamp || timestamp || Auto-updated -- used to detect stale travel records | ||
|} | |} | ||
---- | ---- | ||
== Region Database (osimdev_t1) == | == Region Database (osimdev_t1) == | ||
=== Table List === | === Table List === | ||
| Line 535: | Line 515: | ||
! Table !! Purpose | ! Table !! Purpose | ||
|- | |- | ||
| prims || Every prim/object in the region | | prims || Every prim/object in the region -- 103 fields | ||
|- | |- | ||
| primshapes || Shape and texture data for each prim | | primshapes || Shape, scale, and texture data for each prim | ||
|- | |- | ||
| primitems || Inventory items inside prim object contents | | primitems || Inventory items inside prim object contents | ||
|- | |- | ||
| terrain || Region heightmap | | terrain || Region heightmap -- one blob per region | ||
|- | |- | ||
| bakedterrain || Baked terrain data | | bakedterrain || Baked terrain data | ||
| Line 549: | Line 529: | ||
| landaccesslist || Per-parcel access lists | | landaccesslist || Per-parcel access lists | ||
|- | |- | ||
| regionsettings || Region-wide settings (gravity, water level, | | regionsettings || Region-wide settings (gravity, water level, sun, terrain textures) | ||
|- | |- | ||
| regionenvironment || Environment/windlight settings | | regionenvironment || Environment/windlight settings | ||
| Line 580: | Line 560: | ||
=== prims === | === prims === | ||
-- to | 103 fields. One row per prim. The root prim of a linked object has UUID = SceneGroupID. | ||
Key fields: | |||
{| class="wikitable" | |||
! Field !! Notes | |||
|- | |||
| UUID || Primary key -- prim UUID | |||
|- | |||
| SceneGroupID || UUID of the root prim of the linked object this prim belongs to | |||
|- | |||
| RegionUUID || Foreign key to regions table in osimdev_robust | |||
|- | |||
| Name || Prim name | |||
|- | |||
| OwnerID || Owner UUID | |||
|- | |||
| CreatorID || Creator UUID or HyperGrid URI (varchar 255) | |||
|- | |||
| LinkNumber || Position in linkset (1 = root, 2+ = children) | |||
|- | |||
| GroupPositionX/Y/Z || World position of the linkset root in region-local metres | |||
|- | |||
| PositionX/Y/Z || Position relative to the linkset root | |||
|- | |||
| RotationX/Y/Z/W || Quaternion rotation | |||
|- | |||
| ScaleX/Y/Z || Scale (in primshapes table) | |||
|- | |||
| ObjectFlags || Prim property flags bitmask | |||
|- | |||
| OwnerMask/NextOwnerMask/GroupMask/EveryoneMask/BaseMask || Permission bitmasks | |||
|- | |||
| Material || Material type (default 3 = wood) | |||
|- | |||
| PhysicsShapeType || Physics shape (0=prim, 1=none, 2=convex hull) | |||
|- | |||
| Density/Friction/Restitution/GravityModifier || Physics properties | |||
|- | |||
| SitTargetOffset/Orient || Sit target position and orientation | |||
|- | |||
| TextureAnimation || Blob -- animated texture data | |||
|- | |||
| ParticleSystem || Blob -- particle system data | |||
|- | |||
| KeyframeMotion || Blob -- keyframe animation path | |||
|- | |||
| Vehicle || Text -- vehicle parameters | |||
|- | |||
| DynAttrs || Text -- dynamic attributes (LSL) | |||
|- | |||
| sopanims || Blob -- object animation data | |||
|- | |||
| lnkstBinData || Blob -- linkset binary data | |||
|- | |||
| pseudocrc || Integer -- change detection checksum | |||
|} | |||
'''Important:''' When querying object names by SceneGroupID, use WHERE UUID = SceneGroupID to get the root prim name. Using MIN(Name) or similar aggregates will return a child prim name, not the object name. | |||
Sample objects on osimdev T1 (472 prims across 8 linksets): | |||
{| class="wikitable" | |||
! Name !! Prims !! World Position | |||
|- | |||
| Athena Mesh Body Skin Applier (HUD) || 193 || 178, 264, 26 | |||
|- | |||
| Brown House || 181 || 238, 255, 24 | |||
|- | |||
| 4 Chair Set || 54 || 244, 266, 25 | |||
|- | |||
| Athena Bento BoM Mesh Body 6.5 (worn attachment) || 36 || 181, 284, 24 | |||
|- | |||
| Brown House Sculpts || 5 || 252, 255, 26 | |||
|- | |||
| Sofa || 1 || 247, 272, 25 | |||
|- | |||
| Object (cube) || 1 || 188, 275, 24 | |||
|- | |||
| Box || 1 || 219, 281, 24 | |||
|} | |||
---- | ---- | ||
| Line 586: | Line 646: | ||
=== primshapes === | === primshapes === | ||
-- to | One row per prim. UUID is foreign key to prims.UUID. | ||
{| class="wikitable" | |||
! Field !! Notes | |||
|- | |||
| UUID || Primary key -- foreign key to prims.UUID | |||
|- | |||
| ScaleX/Y/Z || Prim dimensions in metres | |||
|- | |||
| PCode || Primitive code: 9=primitive, 95=grass, 111=tree, 255=avatar | |||
|- | |||
| Shape || Shape type: 0=box, 1=cylinder, 2=prism, 3=sphere, 4=torus, 5=tube, 6=ring, 7=sculpt/mesh | |||
|- | |||
| ProfileCurve || Profile shape: 1=square, 0=circle, 2=isometric triangle, 4=equilateral triangle | |||
|- | |||
| PathCurve || Path type: 16=straight, 32=circle, 17=flexible | |||
|- | |||
| PathBegin/End || Path cut start/end (0-50000 maps to 0.0-1.0) | |||
|- | |||
| ProfileBegin/End || Profile cut | |||
|- | |||
| ProfileHollow || Hollow amount | |||
|- | |||
| PathTwist/TwistBegin || Twist | |||
|- | |||
| PathTaperX/Y || Taper | |||
|- | |||
| PathShearX/Y || Shear (top shear) | |||
|- | |||
| PathSkew || Skew | |||
|- | |||
| PathRadiusOffset || Radius offset | |||
|- | |||
| PathRevolutions || Revolutions (torus) | |||
|- | |||
| Texture || Longblob -- serialized per-face texture data | |||
|- | |||
| ExtraParams || Longblob -- mesh/sculpt UUID and extra parameters | |||
|- | |||
| Media || Text -- media-on-a-prim settings | |||
|- | |||
| LastAttachPoint || Last attachment point if worn | |||
|- | |||
| MatOvrd || Blob -- material override data (PBR) | |||
|} | |||
Sample (cube): PCode=9, Shape=0, Scale=0.5x0.5x0.5, ProfileCurve=1 (square), PathCurve=16 (straight). | |||
---- | |||
=== primitems === | |||
Inventory items inside prim contents. One row per item. | |||
{| class="wikitable" | |||
! Field !! Notes | |||
|- | |||
| itemID || Primary key | |||
|- | |||
| primID || Foreign key to prims.UUID -- which prim contains this item | |||
|- | |||
| assetID || Foreign key to osimdev_robust.assets.id -- cross-database reference | |||
|- | |||
| assetType || Asset type | |||
|- | |||
| invType || Inventory type | |||
|- | |||
| name || Item name | |||
|- | |||
| CreatorID || varchar(255) -- accommodates HyperGrid URIs | |||
|- | |||
| ownerID || Owner UUID | |||
|- | |||
| parentFolderID || Folder UUID (within prim inventory) | |||
|- | |||
| nextPermissions/currentPermissions/basePermissions/everyonePermissions/groupPermissions || Permission bitmasks | |||
|- | |||
| salePrice/saleType || Sale settings | |||
|- | |||
| creationDate || Bigint Unix timestamp | |||
|} | |||
The assetID field in primitems references osimdev_robust.assets -- a cross-database foreign key. The asset data lives in the grid database; only the inventory record lives in the region database. | |||
Example: notecard "test note" (assetType 7) in the Box object, assetID 6f2d7ffb-99f4-431a-919e-eb8cd174a620 confirmed present in osimdev_robust.assets. | |||
---- | ---- | ||
| Line 592: | Line 736: | ||
=== terrain === | === terrain === | ||
-- | {| class="wikitable" | ||
! Field !! Notes | |||
|- | |||
| RegionUUID || varchar(255) -- region identifier | |||
|- | |||
| Revision || int -- incremented on each terrain save | |||
|- | |||
| Heightfield || longblob -- compressed binary heightmap | |||
|} | |||
One row per region. Heightfield is a compressed float array. For a 512x512 varregion: 262144 points, stored compressed. Export via simulator console: terrain save filename.r32. R32 format is a flat array of 32-bit IEEE floats, one per point, row by row SW to NE. Point at index N: X = N % width, Y = N / width, Z = elevation in metres. | |||
Sample (T1): Revision=23, Heightfield=27337 bytes compressed. | |||
---- | ---- | ||
| Line 598: | Line 754: | ||
=== regionsettings === | === regionsettings === | ||
-- | One row per region. 50 fields covering all region-wide configuration. | ||
Key fields: | |||
{| class="wikitable" | |||
! Field !! Default !! Notes | |||
|- | |||
| regionUUID || -- || Primary key | |||
|- | |||
| agent_limit || 40 || Maximum simultaneous avatars | |||
|- | |||
| water_height || 20 || Water level in metres | |||
|- | |||
| terrain_texture_1..4 || (library UUIDs) || Terrain textures for SW, NW, NE, SE corners | |||
|- | |||
| elevation_1/2_nw/ne/se/sw || 10/60 || Elevation blend thresholds per corner | |||
|- | |||
| terrain_raise/lower_limit || 100/-100 || Terraforming range in metres | |||
|- | |||
| maturity || 0 || 0=General, 1=Moderate, 2=Adult | |||
|- | |||
| disable_scripts || 0 || 1 = scripts disabled region-wide | |||
|- | |||
| disable_collisions || 0 || 1 = collisions disabled | |||
|- | |||
| disable_physics || 0 || 1 = physics disabled | |||
|- | |||
| block_terraform || 0 || 1 = terraforming blocked | |||
|- | |||
| block_fly || 0 || 1 = flying blocked | |||
|- | |||
| allow_damage || 0 || 1 = damage enabled | |||
|- | |||
| use_estate_sun || 1 || 1 = follow estate sun settings | |||
|- | |||
| fixed_sun || 0 || 1 = sun locked at sun_position | |||
|- | |||
| Sandbox || 0 || 1 = sandbox mode | |||
|- | |||
| covenant || NULL || UUID of covenant notecard asset | |||
|- | |||
| map_tile_ID || (UUID) || UUID of generated map tile image | |||
|- | |||
| TelehubObject || zero UUID || UUID of telehub object if set | |||
|- | |||
| TerrainPBR1..4 || (UUIDs) || PBR terrain textures -- same UUIDs as terrain_texture on osimdev | |||
|- | |||
| object_bonus || 1 || Prim bonus multiplier | |||
|} | |||
---- | ---- | ||
=== | === land === | ||
One row per parcel. Bitmap field stores the parcel shape as a compressed bit array. | |||
Key fields: | |||
{| class="wikitable" | |||
! Field !! Notes | |||
|- | |||
| UUID || Primary key -- parcel UUID | |||
|- | |||
| RegionUUID || Region this parcel belongs to | |||
|- | |||
| LocalLandID || Integer parcel ID within the region | |||
|- | |||
| Name || Parcel name | |||
|- | |||
| OwnerUUID || Owner UUID | |||
|- | |||
| Area || Parcel area in square metres | |||
|- | |||
| LandStatus || 0=owned, 1=for sale, 2=for sale to specific avatar | |||
|- | |||
| LandFlags || Bitmask of parcel permissions and settings | |||
|- | |||
| Bitmap || Longblob -- parcel shape bitmap | |||
|- | |||
| UserLocationX/Y/Z || Landing point position (0,0,0 = no landing point set) | |||
|- | |||
| water_height || Water level override | |||
|- | |||
| MusicURL || Parcel music stream URL | |||
|- | |||
| MediaURL || Parcel media URL | |||
|- | |||
| PassHours/PassPrice || Temporary pass settings | |||
|- | |||
| OtherCleanTime || Auto-return time in minutes (0 = disabled) | |||
|- | |||
| SeeAVs/AnyAVSounds/GroupAVSounds || Avatar and sound visibility settings | |||
|} | |||
Sample (T1): one parcel covering the entire 512x512 region (Area=262144), owned by Jagga, no landing point set. | |||
---- | ---- | ||
=== | === estate_settings === | ||
One row per estate. | |||
Key fields: | |||
-- to | {| class="wikitable" | ||
! Field !! Notes | |||
|- | |||
| EstateID || Integer ID (101 on osimdev -- system default is 1) | |||
|- | |||
| EstateName || Display name | |||
|- | |||
| EstateOwner || UUID of estate owner | |||
|- | |||
| ParentEstateID || 1 = top-level estate | |||
|- | |||
| PublicAccess || 1 = open to all | |||
|- | |||
| AllowDirectTeleport || 1 = no telehub routing required | |||
|- | |||
| AllowVoice || 1 = voice enabled | |||
|- | |||
| AllowLandmark || 1 = landmark creation permitted | |||
|- | |||
| AllowParcelChanges || 1 = parcel subdivision/join permitted | |||
|- | |||
| AllowSetHome || 1 = avatars can set home here | |||
|- | |||
| DenyMinors || 1 = block avatars under 18 | |||
|- | |||
| DenyAnonymous || 1 = block unverified accounts | |||
|- | |||
| UseGlobalTime || 1 = use grid-wide time | |||
|- | |||
| FixedSun || 1 = sun locked | |||
|- | |||
| SunPosition || Sun angle when FixedSun=1 | |||
|- | |||
| ResetHomeOnTeleport || 1 = reset home when teleporting out | |||
|- | |||
| EstateSkipScripts || 1 = scripts disabled estate-wide | |||
|- | |||
| AllowEnviromentOverride || 1 = parcels can override environment | |||
|} | |||
---- | ---- | ||
Revision as of 14:01, 24 June 2026
OpenSimulator Internals/Databases
Overview
OpenSimulator uses two categories of database:
- The grid database (osimdev_robust) -- owned by ROBUST, holds grid-wide data: user accounts, inventory, assets, presence, region registration, friends, avatar appearance
- Region databases (osimdev_t1, osimdev_t2, ...) -- owned by the simulator, one per region, holds in-world object and terrain data
Both databases run on the same MariaDB instance. ROBUST never touches region databases. Simulators connect to ROBUST services over HTTP for grid data, and directly to their own region database for local data.
See OpenSimulator Internals/GridService, OpenSimulator Internals/Asset Connector, and OpenSimulator Internals/ROBUST Services for the service layer above these tables.
Grid Database (osimdev_robust)
Table List
| Table | Purpose |
|---|---|
| regions | Region registration -- one row per online or recently-seen region |
| UserAccounts | User accounts including the internal GRID SERVICES account |
| Avatars | Avatar appearance: worn items, attachment points, visual params (key-value store) |
| GridUser | Home region, last region, last position, login/logout timestamps |
| Presence | Active sessions -- who is online right now and in which region |
| auth | Password hashes and authentication tokens |
| tokens | Session tokens for region-to-region and HyperGrid authentication |
| inventoryfolders | Inventory folder hierarchy |
| inventoryitems | Inventory item records |
| assets | Asset metadata and binary data |
| Friends | Friend relationships and permissions, including HyperGrid friends |
| AgentPrefs | Per-user preferences (hover height, language, default permissions) |
| hg_traveling_data | HyperGrid travel state for avatars currently visiting foreign grids |
| MuteList | Per-user mute lists |
| im_offline | Stored offline instant messages |
| migrations | Schema version tracking for each service |
regions
One row per registered region. Written on simulator startup (RegisterRegion), updated on shutdown (DeregisterRegion).
| Field | Type | Notes |
|---|---|---|
| uuid | varchar(36) | Primary key -- region UUID |
| regionHandle | bigint unsigned | locY |
| regionName | varchar(128) | Display name, max 128 chars |
| serverURI | varchar(255) | HTTP endpoint of the simulator e.g. http://osimdev.org:9000/ |
| locX | int unsigned | Region origin X in metres (region coord * 256) |
| locY | int unsigned | Region origin Y in metres (region coord * 256) |
| sizeX | int | Region width in metres (512 for a 2x2 varregion) |
| sizeY | int | Region height in metres |
| flags | int | Bitmask of RegionFlags (4 = RegionOnline) |
| last_seen | int | Unix timestamp of last registration or deregistration |
| owner_uuid | varchar(36) | Estate owner UUID |
| ScopeID | char(36) | Grid scope -- zero UUID for default scope |
| access | int unsigned | Parcel access level (1 = PG) |
| regionMapTexture | varchar(36) | UUID of map tile image asset |
| PrincipalID | char(36) | Used for reservation authentication |
| Token | varchar(255) | Authentication token for reserved regions |
Legacy fields present but unused in current code: regionRecvKey, regionSendKey, regionSecret, regionDataURI, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, serverRemotingPort, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle.
Sample row (T1 on osimdev):
| Field | Value |
|---|---|
| uuid | 6f0a42d1-3053-422d-9c26-13205c9c7723 |
| regionName | T1 |
| locX / locY | 256000 (= region coordinate 1000) |
| sizeX / sizeY | 512 |
| flags | 4 (RegionOnline) |
| serverURI | http://osimdev.org:9000/ |
UserAccounts
| Field | Type | Notes |
|---|---|---|
| PrincipalID | char(36) | UUID primary key |
| FirstName | varchar(64) | |
| LastName | varchar(64) | |
| varchar(64) | Login email | |
| UserLevel | int | 0 = normal user, 240 = god-level |
| UserFlags | int | Reserved |
| Created | int | Unix timestamp |
Two rows on a fresh grid: the admin avatar (UserLevel 0) and the internal GRID SERVICES account (UserLevel 240). The GRID SERVICES account has no auth record and never logs in -- it is used internally by OpenSim services.
Avatars
Key-value store. One row per attribute per avatar. PrincipalID + Name form the composite key.
| Name pattern | Value format | Notes |
|---|---|---|
| _ap_N | UUID or comma-separated UUIDs | Attachment point N -- asset UUID of worn item. Comma-separated for multi-attach points. |
| Wearable N:0 | inventoryUUID:assetUUID | Worn wearable layer N. 0=shape, 1=skin, 2=shirt, 3=pants, 13=physics, etc. |
| AvatarHeight | float | Avatar height in metres |
| AvatarType | int | 0 = classic system avatar, 1 = mesh avatar |
| VisualParams | comma-separated bytes | 253-element appearance slider array -- body shape, skin tone, hair color etc. |
| Serial | int | Appearance version serial number |
Attachment point numbers follow the SL/OpenSim standard: 2=chest, 5=left hand, 12=hair, 40=left foot, etc. Multi-attach points store comma-separated UUIDs.
Sample data (Jagga Meredith, 13 rows): AvatarType=1 (mesh), AvatarHeight=1.6885326, 4 attachment points, 5 wearable layers (shape, skin, shirt, pants, physics).
GridUser
One row per user. Written on first login, updated on every login, logout, and teleport.
| Field | Type | Notes |
|---|---|---|
| UserID | varchar(255) | UUID or HyperGrid URI -- primary key |
| HomeRegionID | char(36) | UUID of home region |
| HomePosition | varchar(64) | Vector3 in region-local metres |
| HomeLookAt | varchar(64) | Vector3 look direction |
| LastRegionID | char(36) | UUID of last visited region |
| LastPosition | varchar(64) | Vector3 in region-local metres |
| LastLookAt | varchar(64) | Vector3 look direction |
| Online | tinyint | 1 only while session is active |
| Login | int | Unix timestamp of last login |
| Logout | int | Unix timestamp of last logout |
UserID is varchar(255) not char(36) -- accommodates HyperGrid user URIs from foreign grids.
Presence
One row per active session. Empty when no users are logged in. Rows are created on login and deleted on logout.
| Field | Type | Notes |
|---|---|---|
| SessionID | char(36) | Primary key -- unique per login session |
| UserID | varchar(255) | UUID or HyperGrid URI |
| RegionID | char(36) | Current region UUID -- zero UUID if not yet in a region |
| SecureSessionID | char(36) | Secondary session token for viewer authentication |
| LastSeen | timestamp | Auto-updated on change -- used to detect stale sessions |
auth
One row per user account. Stores password credentials.
| Field | Type | Notes |
|---|---|---|
| UUID | char(36) | Primary key -- matches UserAccounts.PrincipalID |
| passwordHash | char(32) | MD5 hash of password |
| passwordSalt | char(32) | MD5 salt |
| webLoginKey | varchar(255) | UUID for web-based login -- zero UUID if not configured |
| accountType | varchar(32) | Default: UserAccount |
GRID SERVICES account has no auth row -- it cannot log in.
tokens
Short-lived session tokens used for region-to-region and HyperGrid authentication.
| Field | Type | Notes |
|---|---|---|
| UUID | char(36) | User UUID -- composite primary key with token |
| token | varchar(255) | UUID-format token |
| validity | datetime | Expiry datetime -- expired tokens remain until cleaned up |
Multiple tokens per user are normal -- one per teleport attempt. Expired tokens are not automatically deleted; they accumulate until a cleanup job runs.
assets
| Field | Type | Notes |
|---|---|---|
| id | char(36) | Primary key -- asset UUID |
| name | varchar(64) | Display name |
| description | varchar(64) | Description -- HG landmarks store grid URI here |
| assetType | tinyint | Asset type number (see below) |
| data | longblob | Raw binary asset data |
| local | tinyint(1) | 1 = local-only, not transferred to other grids |
| temporary | tinyint(1) | 1 = temporary, may be discarded |
| asset_flags | int | Bitmask of asset flags |
| CreatorID | varchar(128) | Creator UUID or HyperGrid URI |
| create_time | int | Unix timestamp of creation |
| access_time | int | Unix timestamp of last access |
Asset types observed on osimdev:
| assetType | Name |
|---|---|
| 0 | Texture |
| 3 | Landmark -- HG landmarks store grid URI in description field |
| 6 | Object -- serialized prim/linkset XML |
| 7 | Notecard |
| 10 | Script |
| 20 | Animation |
Library/system assets use non-random UUID patterns and CreatorID 11111111-1111-0000-0000-000100bba000. On osimdev after initial setup and one user session: 2602 total assets, 85 user-created (1 texture, 4 landmarks, 79 objects, 1 notecard).
inventoryfolders
| Field | Type | Notes |
|---|---|---|
| folderID | char(36) | Primary key |
| folderName | varchar(64) | Display name |
| type | smallint | Folder type (see below) |
| version | int | Incremented on folder contents change |
| agentID | char(36) | Owner UUID |
| parentFolderID | char(36) | Parent folder UUID -- zero UUID for root |
System folder types:
| type | Name |
|---|---|
| -1 | User-created folder |
| 0 | Textures |
| 1 | Sounds |
| 2 | Calling Cards |
| 3 | Landmarks |
| 5 | Clothing |
| 6 | Objects |
| 7 | Notecards |
| 8 | My Inventory (root) |
| 10 | Scripts |
| 13 | Body Parts |
| 14 | Trash |
| 15 | Photo Album |
| 16 | Lost And Found |
| 20 | Animations |
| 21 | Gestures |
| 23 | Favorites |
| 46 | Current Outfit |
| 47 | Outfit |
| 48 | My Outfits |
| 50 | Received Items |
| 56 | Settings |
| 57 | Materials |
| 100 | My Suitcase (HyperGrid) |
My Suitcase (type 100) is the HyperGrid suitcase -- items here travel with the avatar to foreign grids. Firestorm creates system folders: #Firestorm (containing #AO, #LSL Bridge, #Wearable Favorites).
inventoryitems
| Field | Type | Notes |
|---|---|---|
| inventoryID | char(36) | Primary key |
| assetID | varchar(36) | Foreign key to assets.id |
| assetType | int | Asset type |
| invType | int | Inventory type (can differ from assetType) |
| inventoryName | varchar(64) | Display name |
| inventoryDescription | varchar(128) | |
| avatarID | char(36) | Owner UUID |
| parentFolderID | char(36) | Containing folder UUID |
| creatorID | varchar(255) | Creator UUID or HyperGrid URI |
| inventoryBasePermissions | int unsigned | Base permission bitmask |
| inventoryCurrentPermissions | int unsigned | Current permission bitmask |
| inventoryNextPermissions | int unsigned | Next owner permission bitmask |
| inventoryEveryOnePermissions | int unsigned | Everyone permission bitmask |
| inventoryGroupPermissions | int unsigned | Group permission bitmask |
| groupID | varchar(36) | Associated group UUID |
| groupOwned | tinyint | 1 if group-owned |
| salePrice | int | Sale price in grid currency |
| saleType | tinyint | 0=not for sale, 1=original, 2=copy, 3=contents |
| creationDate | int | Unix timestamp |
| flags | int unsigned | Item flags |
creatorID is varchar(255) to accommodate HyperGrid creator URIs. Item count on osimdev after initial session and AviWorlds visit: 380 items (171 objects, 75 animations, 34 links, 28 textures, 24 body parts, 21 clothing, 15 landmarks, 6 notecards, 3 scripts, 2 sounds, 1 mesh).
Friends
One row per directional friendship. Friendships are stored as two rows (A->B and B->A).
| Field | Type | Notes |
|---|---|---|
| PrincipalID | varchar(255) | Owner UUID or HyperGrid URI -- composite primary key |
| Friend | varchar(255) | Friend UUID or HyperGrid compound string |
| Flags | varchar(16) | Permission flags (1 = accepted) |
| Offered | varchar(32) | Pending offer token |
For HyperGrid friends, Friend field format is: UUID;GridURI;DisplayName;token
Example: 5a365446-ad4f-4f7f-a843-563494b0e78b;http://login.aviworlds.com:8002/;Jagga Meredith;23cba5bc
AgentPrefs
One row per user. Written when user explicitly sets preferences in-world. Defaults apply if no row exists.
| Field | Type | Default | Notes |
|---|---|---|---|
| PrincipalID | char(36) | -- | Primary key |
| AccessPrefs | char(2) | M | Content rating: G, M, or A |
| HoverHeight | double | 0.0 | Avatar hover offset in metres |
| Language | char(5) | en-us | Viewer language preference |
| LanguageIsPublic | tinyint | 1 | Whether language preference is visible to others |
| PermEveryone | int | 0 | Default everyone permissions for new objects |
| PermGroup | int | 0 | Default group permissions for new objects |
| PermNextOwner | int | 532480 | Default next owner permissions for new objects |
hg_traveling_data
Tracks avatars currently traveling between grids via HyperGrid. One row per active HG session. Rows are deleted when the avatar returns home or logs out. Empty when no avatars are traveling.
| Field | Type | Notes |
|---|---|---|
| SessionID | varchar(36) | Primary key |
| UserID | varchar(36) | Avatar UUID |
| GridExternalName | varchar(255) | URI of the grid being visited |
| ServiceToken | varchar(255) | Auth token for the foreign grid session |
| ClientIPAddress | varchar(16) | Avatar's client IP on the foreign grid |
| MyIPAddress | varchar(16) | This grid's external IP as seen by the foreign grid |
| TMStamp | timestamp | Auto-updated -- used to detect stale travel records |
Region Database (osimdev_t1)
Table List
| Table | Purpose |
|---|---|
| prims | Every prim/object in the region -- 103 fields |
| primshapes | Shape, scale, and texture data for each prim |
| primitems | Inventory items inside prim object contents |
| terrain | Region heightmap -- one blob per region |
| bakedterrain | Baked terrain data |
| land | Parcel definitions |
| landaccesslist | Per-parcel access lists |
| regionsettings | Region-wide settings (gravity, water level, sun, terrain textures) |
| regionenvironment | Environment/windlight settings |
| regionwindlight | Legacy windlight settings |
| regionextra | Extra region key-value data |
| estate_settings | Estate configuration (name, owner, access flags) |
| estate_map | Maps regions to estates |
| estate_managers | Estate manager UUID list |
| estate_groups | Estate group access list |
| estate_users | Estate user access list |
| estateban | Estate ban list |
| regionban | Region-level ban list |
| spawn_points | Avatar spawn point locations |
| migrations | Schema version tracking |
prims
103 fields. One row per prim. The root prim of a linked object has UUID = SceneGroupID.
Key fields:
| Field | Notes |
|---|---|
| UUID | Primary key -- prim UUID |
| SceneGroupID | UUID of the root prim of the linked object this prim belongs to |
| RegionUUID | Foreign key to regions table in osimdev_robust |
| Name | Prim name |
| OwnerID | Owner UUID |
| CreatorID | Creator UUID or HyperGrid URI (varchar 255) |
| LinkNumber | Position in linkset (1 = root, 2+ = children) |
| GroupPositionX/Y/Z | World position of the linkset root in region-local metres |
| PositionX/Y/Z | Position relative to the linkset root |
| RotationX/Y/Z/W | Quaternion rotation |
| ScaleX/Y/Z | Scale (in primshapes table) |
| ObjectFlags | Prim property flags bitmask |
| OwnerMask/NextOwnerMask/GroupMask/EveryoneMask/BaseMask | Permission bitmasks |
| Material | Material type (default 3 = wood) |
| PhysicsShapeType | Physics shape (0=prim, 1=none, 2=convex hull) |
| Density/Friction/Restitution/GravityModifier | Physics properties |
| SitTargetOffset/Orient | Sit target position and orientation |
| TextureAnimation | Blob -- animated texture data |
| ParticleSystem | Blob -- particle system data |
| KeyframeMotion | Blob -- keyframe animation path |
| Vehicle | Text -- vehicle parameters |
| DynAttrs | Text -- dynamic attributes (LSL) |
| sopanims | Blob -- object animation data |
| lnkstBinData | Blob -- linkset binary data |
| pseudocrc | Integer -- change detection checksum |
Important: When querying object names by SceneGroupID, use WHERE UUID = SceneGroupID to get the root prim name. Using MIN(Name) or similar aggregates will return a child prim name, not the object name.
Sample objects on osimdev T1 (472 prims across 8 linksets):
| Name | Prims | World Position |
|---|---|---|
| Athena Mesh Body Skin Applier (HUD) | 193 | 178, 264, 26 |
| Brown House | 181 | 238, 255, 24 |
| 4 Chair Set | 54 | 244, 266, 25 |
| Athena Bento BoM Mesh Body 6.5 (worn attachment) | 36 | 181, 284, 24 |
| Brown House Sculpts | 5 | 252, 255, 26 |
| Sofa | 1 | 247, 272, 25 |
| Object (cube) | 1 | 188, 275, 24 |
| Box | 1 | 219, 281, 24 |
primshapes
One row per prim. UUID is foreign key to prims.UUID.
| Field | Notes |
|---|---|
| UUID | Primary key -- foreign key to prims.UUID |
| ScaleX/Y/Z | Prim dimensions in metres |
| PCode | Primitive code: 9=primitive, 95=grass, 111=tree, 255=avatar |
| Shape | Shape type: 0=box, 1=cylinder, 2=prism, 3=sphere, 4=torus, 5=tube, 6=ring, 7=sculpt/mesh |
| ProfileCurve | Profile shape: 1=square, 0=circle, 2=isometric triangle, 4=equilateral triangle |
| PathCurve | Path type: 16=straight, 32=circle, 17=flexible |
| PathBegin/End | Path cut start/end (0-50000 maps to 0.0-1.0) |
| ProfileBegin/End | Profile cut |
| ProfileHollow | Hollow amount |
| PathTwist/TwistBegin | Twist |
| PathTaperX/Y | Taper |
| PathShearX/Y | Shear (top shear) |
| PathSkew | Skew |
| PathRadiusOffset | Radius offset |
| PathRevolutions | Revolutions (torus) |
| Texture | Longblob -- serialized per-face texture data |
| ExtraParams | Longblob -- mesh/sculpt UUID and extra parameters |
| Media | Text -- media-on-a-prim settings |
| LastAttachPoint | Last attachment point if worn |
| MatOvrd | Blob -- material override data (PBR) |
Sample (cube): PCode=9, Shape=0, Scale=0.5x0.5x0.5, ProfileCurve=1 (square), PathCurve=16 (straight).
primitems
Inventory items inside prim contents. One row per item.
| Field | Notes |
|---|---|
| itemID | Primary key |
| primID | Foreign key to prims.UUID -- which prim contains this item |
| assetID | Foreign key to osimdev_robust.assets.id -- cross-database reference |
| assetType | Asset type |
| invType | Inventory type |
| name | Item name |
| CreatorID | varchar(255) -- accommodates HyperGrid URIs |
| ownerID | Owner UUID |
| parentFolderID | Folder UUID (within prim inventory) |
| nextPermissions/currentPermissions/basePermissions/everyonePermissions/groupPermissions | Permission bitmasks |
| salePrice/saleType | Sale settings |
| creationDate | Bigint Unix timestamp |
The assetID field in primitems references osimdev_robust.assets -- a cross-database foreign key. The asset data lives in the grid database; only the inventory record lives in the region database.
Example: notecard "test note" (assetType 7) in the Box object, assetID 6f2d7ffb-99f4-431a-919e-eb8cd174a620 confirmed present in osimdev_robust.assets.
terrain
| Field | Notes |
|---|---|
| RegionUUID | varchar(255) -- region identifier |
| Revision | int -- incremented on each terrain save |
| Heightfield | longblob -- compressed binary heightmap |
One row per region. Heightfield is a compressed float array. For a 512x512 varregion: 262144 points, stored compressed. Export via simulator console: terrain save filename.r32. R32 format is a flat array of 32-bit IEEE floats, one per point, row by row SW to NE. Point at index N: X = N % width, Y = N / width, Z = elevation in metres.
Sample (T1): Revision=23, Heightfield=27337 bytes compressed.
regionsettings
One row per region. 50 fields covering all region-wide configuration.
Key fields:
| Field | Default | Notes |
|---|---|---|
| regionUUID | -- | Primary key |
| agent_limit | 40 | Maximum simultaneous avatars |
| water_height | 20 | Water level in metres |
| terrain_texture_1..4 | (library UUIDs) | Terrain textures for SW, NW, NE, SE corners |
| elevation_1/2_nw/ne/se/sw | 10/60 | Elevation blend thresholds per corner |
| terrain_raise/lower_limit | 100/-100 | Terraforming range in metres |
| maturity | 0 | 0=General, 1=Moderate, 2=Adult |
| disable_scripts | 0 | 1 = scripts disabled region-wide |
| disable_collisions | 0 | 1 = collisions disabled |
| disable_physics | 0 | 1 = physics disabled |
| block_terraform | 0 | 1 = terraforming blocked |
| block_fly | 0 | 1 = flying blocked |
| allow_damage | 0 | 1 = damage enabled |
| use_estate_sun | 1 | 1 = follow estate sun settings |
| fixed_sun | 0 | 1 = sun locked at sun_position |
| Sandbox | 0 | 1 = sandbox mode |
| covenant | NULL | UUID of covenant notecard asset |
| map_tile_ID | (UUID) | UUID of generated map tile image |
| TelehubObject | zero UUID | UUID of telehub object if set |
| TerrainPBR1..4 | (UUIDs) | PBR terrain textures -- same UUIDs as terrain_texture on osimdev |
| object_bonus | 1 | Prim bonus multiplier |
land
One row per parcel. Bitmap field stores the parcel shape as a compressed bit array.
Key fields:
| Field | Notes |
|---|---|
| UUID | Primary key -- parcel UUID |
| RegionUUID | Region this parcel belongs to |
| LocalLandID | Integer parcel ID within the region |
| Name | Parcel name |
| OwnerUUID | Owner UUID |
| Area | Parcel area in square metres |
| LandStatus | 0=owned, 1=for sale, 2=for sale to specific avatar |
| LandFlags | Bitmask of parcel permissions and settings |
| Bitmap | Longblob -- parcel shape bitmap |
| UserLocationX/Y/Z | Landing point position (0,0,0 = no landing point set) |
| water_height | Water level override |
| MusicURL | Parcel music stream URL |
| MediaURL | Parcel media URL |
| PassHours/PassPrice | Temporary pass settings |
| OtherCleanTime | Auto-return time in minutes (0 = disabled) |
| SeeAVs/AnyAVSounds/GroupAVSounds | Avatar and sound visibility settings |
Sample (T1): one parcel covering the entire 512x512 region (Area=262144), owned by Jagga, no landing point set.
estate_settings
One row per estate.
Key fields:
| Field | Notes |
|---|---|
| EstateID | Integer ID (101 on osimdev -- system default is 1) |
| EstateName | Display name |
| EstateOwner | UUID of estate owner |
| ParentEstateID | 1 = top-level estate |
| PublicAccess | 1 = open to all |
| AllowDirectTeleport | 1 = no telehub routing required |
| AllowVoice | 1 = voice enabled |
| AllowLandmark | 1 = landmark creation permitted |
| AllowParcelChanges | 1 = parcel subdivision/join permitted |
| AllowSetHome | 1 = avatars can set home here |
| DenyMinors | 1 = block avatars under 18 |
| DenyAnonymous | 1 = block unverified accounts |
| UseGlobalTime | 1 = use grid-wide time |
| FixedSun | 1 = sun locked |
| SunPosition | Sun angle when FixedSun=1 |
| ResetHomeOnTeleport | 1 = reset home when teleporting out |
| EstateSkipScripts | 1 = scripts disabled estate-wide |
| AllowEnviromentOverride | 1 = parcels can override environment |