Difference between revisions of "Object System"

From SWGANH Wiki
Jump to: navigation, search
(Object Inheritance)
 
Line 118: Line 118:
 
||UNIVERSE||OBJECT->UNIVERSE||inherited into systems that universally track data
 
||UNIVERSE||OBJECT->UNIVERSE||inherited into systems that universally track data
 
|-
 
|-
||GROUP||OBJECT->UNIVERSE->GROUP||groups.. lol
+
||GROUP||OBJECT->UNIVERSE->GROUP||groups
 
|-
 
|-
 
||GUILD||OBJECT->UNIVERSE->GUILD||the guild list
 
||GUILD||OBJECT->UNIVERSE->GUILD||the guild list

Latest revision as of 00:39, 28 August 2012

General Documentation - SWG Object System

SWGANH Wiki is a repository of Star Wars Galaxies Developer information. This site is only meant to be used by SWGANH Developer team.

Description

SWG uses an Object System to store, manipulate and create game data and events.

The packets used are as follows:

SceneCreateObjectByCrc - Create an Instance of an Object.

BaselinesMessage - Initialize the Data.

SceneEndBaselines - Finish Initialization.

DeltasMessage - Update Data Members of the Object.

SceneDestroyObject - Destroy the Object.

ObjControllerMessage - Manipulate the Object.

Baselines

Baselines are used to initialize an Object with data.

For Objects not in control by the client, Baselines 3 and 6 are used.

Other baselines contain data specifically for that client and should not go to other clients.

Deltas

Deltas are updates to specific members of an Object. They have similar headers to baselines but the body contains a variable that references which member to update. This goes in order with the members of that baseline counting from 0 up.

So to change the first member use 0, for the 2nd member use 1, etc.

Some changes also have subtypes such as add and remove, they are noted in the structs.

Object Types

By referencing the /object/ folder on the Client, one can see templates for all game objects.

There are also base templates that are inherited into other objects. This can be seen inside the members

of an object.

Example

Resource Containers inherit Tangible Objects, and in the baseline, they are identical until the end where Resource Container specific members appear after the Tangible Members.

This is true for the entire inheritance system.

Here are a list of Object Base Types:

PACKET_TYPE *.iff Filepath
TANGIBLE object/building/base/shared_base_building.iff
INTANGIBLE object/cell/base/shared_base_cell.iff
CREATURE object/creature/base/shared_base_creature.iff
?? object/draft_schematic/base/shared_base_draft_schematic.iff
TANGIBLE object/factory/base/shared_base_factory.iff
GROUP object/group/base/shared_base_group.iff
GUILD object/guild/base/shared_base_guild.iff
INSTALLATION object/installation/base/shared_installation_base.iff
INTANGIBLE object/intangible/base/shared_base_intangible.iff
MANUFACTURE_SCHEMATIC object/manufacture_schematic/base/shared_base_manufacture_schematic.iff
MISSION object/mission/base/shared_base_mission.iff
?? object/object/base/shared_base_object.iff
TANGIBLE object/path_waypoint/base/shared_path_waypoint_base.iff
PLAYER object/player/base/shared_base_player.iff
RESOURCE_CONTAINER object/resource_container/base/shared_base_resource_container.iff
SHIP object/ship/base/shared_ship_base.iff
?? object/soundobject/base/shared_soundobject_base.iff
STATIC object/static/base/shared_static_base.iff
TANGIBLE object/tangible/base/shared_tangible_base.iff
WAYPOINT object/waypoint/base/shared_base_waypoint.iff
TANGIBLE object/weapon/base/shared_base_weapon.iff
*these seem to be deprecated.. as they would not create through packets*
??	object/construction_contract/base/shared_base_construction_contract.iff
??	object/counting/base/shared_base_counting.iff
??	object/universe/base/shared_base_universe.iff
??	object/token/base/shared_base_token.iff

Object Inheritance

As you can see, some types share the same packet structures. That is because while they inherit that object, they do not define more members. Following the same table of objects, these are the following inheritance maps for the currently used object types.

OBJECT_TYPE PACKET_INHERITANCE POST_INHERITANCE
BASE_OBJECT OBJECT inherited into all other objects.. pretty much
SOUNDOBJECT OBJECT->SOUNDOBJECT ??
STATIC OBJECT->STATIC static,non-interactive game objects
UNIVERSE OBJECT->UNIVERSE inherited into systems that universally track data
GROUP OBJECT->UNIVERSE->GROUP groups
GUILD OBJECT->UNIVERSE->GUILD the guild list
INTANGIBLE OBJECT->INTANGIBLE inherited in cells, datapads, and other intangible objects
TOKEN OBJECT->INTANGIBLE->TOKEN unknown..
WAYPOINT OBJECT->INTANGIBLE->WAYPOINT waypoints
DRAFT_SCHEMATIC OBJECT->INTANGIBLE->DRAFT_SCHEMATIC all draft schematics for crafting
MANUFACTURE_SCHEMATIC OBJECT->INTANGIBLE->MANUFACTURE_SCHEMATIC used in the crafting process
MISSION OBJECT->INTANGIBLE->MISSION used to store missions in terminals and datapad
PLAYER OBJECT->INTANGIBLE->PLAYER stores player specific data
CELL OBJECT->INTANGIBLE->CELL All Internal Room Cells
CONSTRUCTION_CONTRACT OBJECT->INTANGIBLE->CONSTRUCTION_CONTRACT unknown..
TANGIBLE OBJECT->TANGIBLE all game items, also gets inherited into other objects
BUILDING OBJECT->TANGIBLE->BUILDING Cities,Player Houses,Bases, All Buildings
CREATURE OBJECT->TANGIBLE->CREATURE mobile, vehicles, NPCs, players, mobs
FACTORY_CRATE OBJECT->TANGIBLE->FACTORY_CRATE factory crates and manufactured goods
INSTALLATION OBJECT->TANGIBLE->INSTALLATION harvestors and factory structures
PATH_WAYPOINT OBJECT->TANGIBLE->PATH_WAYPOINT used to do path markers
RESOURCE_CONTAINER OBJECT->TANGIBLE->RESOURCE_CONTAINER resources
SHIP OBJECT->TANGIBLE->SHIP ships
WEAPON OBJECT->TANGIBLE->WEAPON all game weapon items
COUNTING OBJECT->TANGIBLE->COUNTING unknown..

Object Packet Members

Here is a table and links to individual Packet Structures for Objects that the server can send.

Notice: Objects that define no new members are not listed. Only specifically variating structs are listed.


Parsing Types (Actual STRUCT Variation)

SWG Protocol Baselines

NAME Name Type 01 Type 02 Type 03 Type 04 Type 05 Type 06 Type 07 Type 08 Type 09
BMRK Battlefield Marker BMRK03 BMRK06
BUIO Building Object BUIO03 BUIO06
CREO Creature Object CREO01 CREO03 CREO04 CREO06 CREO08 CREO09
FCYT Factory Crate FCYT03 FCYT06 FCYT08 FCYT09
GILD Guild Object GILD03 GILD06
GRUP Group Object GRUP03 GRUP06
HINO Harvester Installation Object HINO03 HINO06 HINO07
INSO Installation Object INSO03 INSO06 INSO07
ITNO Intangible Object ITNO03 ITNO06
MINO Manufacture Installation MINO03 MINO06
MISO Mission Object MISO03 MISO06 MISO08 MISO09
MSCO Manufacture Schematic Object MSCO03 MSCO06 MSCO07 MSCO08 MSCO09
PLAY Player Object PLAY03 PLAY06 PLAY08 PLAY09
RCNO Resource Container Object RCNO03 RCNO06 RCNO08 RCNO09
SCLT Cell Object SCLT03 SCLT06 SCLT08 SCLT09
STAO Static Object STAO03 STAO06
SHIP Ship Object SHIP01 SHIP03 SHIP04 SHIP06 SHIP08 SHIP09
TANO Tangible Object TANO03 TANO06 TANO07 TANO08 TANO09
WAYP Waypoint Object WAYP03 WAYP06
WEAO Wearable Object WEAO03 WEAO06 WEAO08 WEAO09

SWG Protocol Deltas

NAME Name Type 01 Type 02 Type 03 Type 04 Type 05 Type 06 Type 07 Type 08 Type 09
BMRK Battlefield Marker BMRK03 BMRK06
BUIO Building Object BUIO03 BUIO06
CREO Creature Object CREO01 CREO03 CREO04 CREO06 CREO08 CREO09
FCYT Factory Crate FCYT03 FCYT06 FCYT08 FCYT09
GILD Guild Object GILD03 GILD06
GRUP Group Object GRUP03 GRUP06
HINO Harvester Installation Object HINO03 HINO06 HINO07
INSO Installation Object INSO03 INSO06 INSO07
ITNO Intangible Object ITNO03 ITNO06 ITNO08 ITNO09
MINO Manufacture Installation MINO03 MINO06
MISO Mission Object MISO03 MISO06 MISO08 MISO09
MSCO Manufacture Schematic Object MSCO03 MSCO06 MSCO07 MSCO08 MSCO09
PLAY Player Object PLAY03 PLAY06 PLAY08 PLAY09
RCNO Resource Container Object RCNO03 RCNO06 RCNO08 RCNO09
SCLT Cell Object SCLT03 SCLT06 SCLT08 SCLT09
STAO Static Object STAO03 STAO06
SHIP Ship Object SHIP01 SHIP03 SHIP04 SHIP06 SHIP08 SHIP09
TANO Tangible Object TANO03 TANO06 TANO07 TANO08 TANO09
WAYP Waypoint Object WAYP01 WAYP03 WAYP06
WEAO Wearable Object WEAO03 WEAO06 WEAO08 WEAO09