Difference between revisions of "ID System"

From SWGANH Wiki
Jump to: navigation, search
 
(50 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
All ids are 64bit values, first 4 bytes determine category, last 4 is the objects id
 
All ids are 64bit values, first 4 bytes determine category, last 4 is the objects id
 +
{| align="center"
 +
|-
 +
||
 +
{| class="wikitable" align="center"
 +
|+ '''Main Breakdown'''
 +
|- align="center" style="background-color:#ffffcc;"
 +
|width="140"|'''StartID (hex)'''||width="140"|'''StartID (Dec)'''||width="140"|'''End ID (hex)'''||width="140"|'''EndID (Dec)'''||width="200"|'''Class'''
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000000000000||0||0x00000000FFFFFFFF||4294967295||Static Objects
 +
|- align="center"
 +
||0x0000000100000000||4294967296||0x00000001FFFFFFFF||8589934591||Travel Terminals
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000200000000||8589934592||0x00000003FFFFFFFF||17179869183||Creatures (CREO)
 +
|- align="center"
 +
||0x0000000400000000||17179869184||0x00000004FFFFFFFF||21474836479||Players (PLAY)
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000700000000||30064771072||--||--||Player Mounts
 +
|- align="center"
 +
||0x0000000900000000||38654705664||--||--||Player Ships
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000B00000000||47244640256||--||--||Static NPCs
 +
|- align="center"
 +
||0x0000000C00000000||51539607552||--||--||Guilds
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000D00000000||55834574848||--||--||Mails
 +
|- align="center"
 +
||0x0000000F00000000||64424509440||--||--||Groups
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000001000000000||68719476736||0x0000001AFFFFFFFF||115964116991||Missions
 +
|- align="center"
 +
||0x0000001B00000000||115964116992||--||--||Quests
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000002000000000||137438953472||--||--||Waypoints
 +
|- align="center"
 +
||0x0000003000000000||206158430208||--||--||Auctions
 +
|- align="center"
 +
||0x0000100000000000||17592186044416||0x00001000FFFFFFFF||17596481011711||Lairs
 +
|- align="center"
 +
||0x0000100100000000||17596481011712||0x00001003FFFFFFFF||17609365913599||Dynamic NPCs
 +
|}
 +
|-
 +
|}
  
 
<pre>
 
<pre>
 
categories:
 
categories:
  
0x00000000 -        // static objects, currently used(buildings,cells,terminals,chairs,bazzar,..)
+
0x0000000000000000          // static objects, currently used(buildings,cells,terminals,chairs,bazzar,..)
0x00000000000C3500 // Additional Planets Static Buildings START
+
0x00000000000C3500           // Additional Planets Static Buildings START
0x00000001           // travel terminals and for future expansion (LAST ID USED --> 4294967567)
+
0x0000000100000000           // travel terminals and for future expansion (LAST ID USED --> 4294967567)
 
+
0x0000000200000000
 
   groups:
 
   groups:
  
 
   0x000000010xxxxxxx  // terminals
 
   0x000000010xxxxxxx  // terminals
 
   0x000000011xxxxxxx  // ticket collectors (DONE!)
 
   0x000000011xxxxxxx  // ticket collectors (DONE!)
   0x000000012xxxxxxx  // crafting stations
+
   0x000000012xxxxxxx  // crafting stations (Increments by 2 (HOPPER)) --> 4831838208
 +
  0x000000013xxxxxxx  // Start of City FlyBys
 +
  0x0000000130000FFF  // End of City FlyBys
 +
 
  
 
0x00000002 -        // characters, todo: see how much to reserve for each(increment)
 
0x00000002 -        // characters, todo: see how much to reserve for each(increment)
Line 76: Line 121:
 
0x000fffff
 
0x000fffff
  
  groups:
+
</pre>
  
  0x0001xxxxxxxxxxxx - 0x0002xxxxxxxxxxxx  // wearables
+
==Static Objects - Detailed ID Breakdown==
  0x0003xxxxxxxxxxxx - 0x0004xxxxxxxxxxxx  // foods
+
 
  0x0005xxxxxxxxxxxx - 0x0006xxxxxxxxxxxx  // furniture
+
{| align="center"
  0x00070xxxxxxxxxxx                      // tickets
+
|-
  0x00071xxxxxxxxxxx                      // crafting tools
+
||
  0x00072xxxxxxxxxxx                      // survey tools
+
{| class="wikitable" align="center"
 +
|+ '''Main Breakdown'''
 +
|- align="center" style="background-color:#ffffcc;"
 +
|width="140"|'''StartID (hex)'''||width="140"|'''StartID (Dec)'''||width="140"|'''End ID (hex)'''||width="140"|'''EndID (Dec)'''||width="200"|'''Class'''
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000000000000||1||0x00000000001000FFF||799999||Static Objects
 +
|- align="center"
 +
||0x00000000000C3500||800000|| - || - ||Static Objects (Extra Planets)
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0000000001000000||16777216||0x00000000001000FFF||16781311||City FlyBy-s
 +
|- align="center"
 +
||0x0000000100000000||4294967296||0x00000001FFFFFFFF||8589934591||Travel Terminals
 +
|}
 +
|-
 +
|}
 +
 
 +
==Tangible Objects==
 +
{| align="center"
 +
|-
 +
||
 +
{| class="wikitable" align="center"
 +
|+ '''Tangible Objects'''
 +
|- align="center" style="background-color:#ffffcc;"
 +
|width="140"|'''StartID (hex)'''||width="140"|'''StartID (Dec)'''||width="140"|'''End ID (hex)'''||width="140"|'''EndID (Dec)'''||width="100"|'''Class'''
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0001000000000000||281474976710656||0x00010FFFFFFFFFFF||299067162755071||Wearables
 +
|- align="center"
 +
||0x0001100000000000||299067162755072||0x00011FFFFFFFFFFF||316659348799487||Foods
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0001200000000000||316659348799488||0x00012FFFFFFFFFFF||334251534843903||Furniture
 +
|- align="center"
 +
||0x0001300000000000||334251534843904||0x00013FFFFFFFFFFF||351843720888319||Crafting Tools
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0001400000000000||351843720888320||0x00014FFFFFFFFFFF||369435906932735||Survey Tools
 +
|- align="center"
 +
||0x0001500000000000||369435906932736||0x00015FFFFFFFFFFF||387028092977151||Travel Tickets
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0001600000000000||387028092977152||0x00016FFFFFFFFFFF||404620279021567||Instruments
 +
|- align="center"
 +
||0x0001700000000000||404620279021568||0x00017FFFFFFFFFFF||422212465065983||Weapons
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0001800000000000||422212465065984||0x00018FFFFFFFFFFF||439804651110399||Medicine
 +
|- align="center"
 +
||0x0001900000000000||--||0x00019FFFFFFFFFFF||--||Free
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0001A00000000000||--||0x0001AFFFFFFFFFFF||--||Free
 +
|-
 +
|}
 +
|-
 +
|}
 +
 
 +
==ChatRoom Objects==
 +
{| align="center"
 +
|-
 +
||
 +
{| class="wikitable" align="center"
 +
|+ '''ChatRooms'''
 +
|- align="center" style="background-color:#ffffcc;"
 +
|width="140"|'''StartID (hex)'''||width="140"|'''StartID (Dec)'''||width="140"|'''End ID (hex)'''||width="140"|'''EndID (Dec)'''||width="200"|'''Class'''
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0010000000000000||4503599627370496||0x00100000FFFFFFFF||4503603922337791||Persistent ChatRooms
 +
|- align="center"
 +
||0x0010000100000000||4503603922337792||0x00100001FFFFFFFF||4503608217305087||Temporary ChatRooms
 +
|- align="center" style="background-color:#F1F1F1;"
 +
||0x0010000200000000||4503608217305088||0x00100002FFFFFFFF||4503612512272383||Guild ChatRooms
 +
|- align="center"
 +
||0x0010000300000000||4503612512272384||0x00100003FFFFFFFF||4503616807239679||Other User ChatRooms
 +
|-
 +
|}
 +
|-
 +
|}
 +
 
 +
==Next==
 +
 
 +
<pre>
  
0x00100000          // persistent chatrooms
 
0x00100001          // temporary chatrooms(groups)
 
0x00100002          // guild chatrooms
 
0x00100003          // other user chatrooms
 
  
 
0xXXXXXXXXXXXXXXXX    // draft schematics, first for byte of the id are the crc of the schematicobject, so they shouldnt be smaller than 0x0xxxxxxx
 
0xXXXXXXXXXXXXXXXX    // draft schematics, first for byte of the id are the crc of the schematicobject, so they shouldnt be smaller than 0x0xxxxxxx

Latest revision as of 18:37, 7 September 2012

All ids are 64bit values, first 4 bytes determine category, last 4 is the objects id

Main Breakdown
StartID (hex) StartID (Dec) End ID (hex) EndID (Dec) Class
0x0000000000000000 0 0x00000000FFFFFFFF 4294967295 Static Objects
0x0000000100000000 4294967296 0x00000001FFFFFFFF 8589934591 Travel Terminals
0x0000000200000000 8589934592 0x00000003FFFFFFFF 17179869183 Creatures (CREO)
0x0000000400000000 17179869184 0x00000004FFFFFFFF 21474836479 Players (PLAY)
0x0000000700000000 30064771072 -- -- Player Mounts
0x0000000900000000 38654705664 -- -- Player Ships
0x0000000B00000000 47244640256 -- -- Static NPCs
0x0000000C00000000 51539607552 -- -- Guilds
0x0000000D00000000 55834574848 -- -- Mails
0x0000000F00000000 64424509440 -- -- Groups
0x0000001000000000 68719476736 0x0000001AFFFFFFFF 115964116991 Missions
0x0000001B00000000 115964116992 -- -- Quests
0x0000002000000000 137438953472 -- -- Waypoints
0x0000003000000000 206158430208 -- -- Auctions
0x0000100000000000 17592186044416 0x00001000FFFFFFFF 17596481011711 Lairs
0x0000100100000000 17596481011712 0x00001003FFFFFFFF 17609365913599 Dynamic NPCs
categories:

0x0000000000000000           // static objects, currently used(buildings,cells,terminals,chairs,bazzar,..)
0x00000000000C3500           // Additional Planets Static Buildings START
0x0000000100000000           // travel terminals and for future expansion (LAST ID USED --> 4294967567)
0x0000000200000000
   groups:

   0x000000010xxxxxxx  // terminals
   0x000000011xxxxxxx  // ticket collectors (DONE!)
   0x000000012xxxxxxx  // crafting stations (Increments by 2 (HOPPER)) --> 4831838208
   0x000000013xxxxxxx  // Start of City FlyBys
   0x0000000130000FFF  // End of City FlyBys
   

0x00000002 -         // characters, todo: see how much to reserve for each(increment)
0x00000003

0x00000004 -         // player vendors
0x00000006

0x00000007 -         // player mounts
0x00000008

0x00000009 -         // player ships
0x0000000A

0x0000000B           // static npcs(trainers,junk vendors)

   groups:

   0x0000000B0xxxxxxx  // trainers, increment by  2(object,inventory)
   0x0000000B1xxxxxxx  // filler NPCs, increment by 2(object,inventory)
   0x0000000B2xxxxxxx  // shuttles, increment by 2(object,inventory)
   0x0000000B3xxxxxxx  // junk vendors, increment by 2(object,inventory)

0x0000000C           // guilds

0x0000000D -         // mails
0x0000000E

0x0000000F           // unused

0x00000010 -         // missions
0x0000001A

0x0000001b -         // quests, todo: check, probably those are fixed ids
0x0000001f

0x00000020 -         // waypoints
0x0000002f

0x00000030 -         // auctions
0x000000ff

0x00000100           // resource containers

0x00000200           // resources

0x00000201 -         // dynamic structures(buildings,cells)
0x00000fff
   
   groups:

   0x00000201xxxxxxxx    // tutorial stations

0x00001000           // lairs

0x00001001 -         // dynamic npc
0x00001fff

0x00002000 -         // space objects(jtl)
0x0000ffff

0x00010000 -         // tangible objects(items)
0x000fffff

Static Objects - Detailed ID Breakdown

Main Breakdown
StartID (hex) StartID (Dec) End ID (hex) EndID (Dec) Class
0x0000000000000000 1 0x00000000001000FFF 799999 Static Objects
0x00000000000C3500 800000 - - Static Objects (Extra Planets)
0x0000000001000000 16777216 0x00000000001000FFF 16781311 City FlyBy-s
0x0000000100000000 4294967296 0x00000001FFFFFFFF 8589934591 Travel Terminals

Tangible Objects

Tangible Objects
StartID (hex) StartID (Dec) End ID (hex) EndID (Dec) Class
0x0001000000000000 281474976710656 0x00010FFFFFFFFFFF 299067162755071 Wearables
0x0001100000000000 299067162755072 0x00011FFFFFFFFFFF 316659348799487 Foods
0x0001200000000000 316659348799488 0x00012FFFFFFFFFFF 334251534843903 Furniture
0x0001300000000000 334251534843904 0x00013FFFFFFFFFFF 351843720888319 Crafting Tools
0x0001400000000000 351843720888320 0x00014FFFFFFFFFFF 369435906932735 Survey Tools
0x0001500000000000 369435906932736 0x00015FFFFFFFFFFF 387028092977151 Travel Tickets
0x0001600000000000 387028092977152 0x00016FFFFFFFFFFF 404620279021567 Instruments
0x0001700000000000 404620279021568 0x00017FFFFFFFFFFF 422212465065983 Weapons
0x0001800000000000 422212465065984 0x00018FFFFFFFFFFF 439804651110399 Medicine
0x0001900000000000 -- 0x00019FFFFFFFFFFF -- Free
0x0001A00000000000 -- 0x0001AFFFFFFFFFFF -- Free

ChatRoom Objects

ChatRooms
StartID (hex) StartID (Dec) End ID (hex) EndID (Dec) Class
0x0010000000000000 4503599627370496 0x00100000FFFFFFFF 4503603922337791 Persistent ChatRooms
0x0010000100000000 4503603922337792 0x00100001FFFFFFFF 4503608217305087 Temporary ChatRooms
0x0010000200000000 4503608217305088 0x00100002FFFFFFFF 4503612512272383 Guild ChatRooms
0x0010000300000000 4503612512272384 0x00100003FFFFFFFF 4503616807239679 Other User ChatRooms

Next



0xXXXXXXXXXXXXXXXX    // draft schematics, first for byte of the id are the crc of the schematicobject, so they shouldnt be smaller than 0x0xxxxxxx
, last 4 byte represent the linked resourceweights batch

object ids:


on static objects:

category 0x00000000

- starts with 2
- inrement by 1, e.g. by 1 + cellcount for structures

Most are already ripped from the snapshots, you can find em in the static_objects tables.
So there are big holes, probably need to fill up that stuff with ids for chairs and other stuff from the ilf files.
Unfortunately those arent id'd and so can only be identified by their position.

category 0x00000001

- start with 1
- inrement by 1, e.g. by 1 + cellcount for structures


To sum it up.

Use linear id'ing for: static_objects,characters,vendors,trainers,mounts,ships,static npc,guilds,mails,
draft schematics,resources,skills,player structures,chatrooms

use random number id'ing for missions,auctions,lairs,dynamic npc,items,




On Character/NPC id'ing, from what i understand right now, plz correct me.

1. the character id would be the creature object id, so the main objects id, which we send with createobject().
2. with a containment msg this creature object is put into a player object, which id, lets say
   is a fixed offset from that creatureobject id
3. from there on we send updates to the client, creature specific(CREOs), referencing this creatureobject id and
   player specific(PLAYs), referencing the offset player id
4. procedure would be the same for npc
5. non npc -> creatures, dont need PLAY updates
6. we have an inventory object, which is set off from the creatureobject id
7. we have a mission_bag object, which is set off from the creatureobject id
8. we have a weaponslot object, which is set off from the creatureobject id
9. we have a hair object which is set off from the creatureobject id



On Object <-> cell linking

Currently it seems, we only need to send a containment msg when we want to load in to a cell.
The linked id would be the creatureobject id. Linktype would be 0xffffffff.
No containment msgs are sent, when entering/leaving a cell while in game
So this needs further testing..