Difference between revisions of "Object System"
(→Example) |
(→Object Inheritance) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{PageHeader|General Documentation|SWG Object System}} | ||
===Description=== | ===Description=== | ||
Line 48: | Line 49: | ||
|- align="center" | |- align="center" | ||
||'''PACKET_TYPE'''||'''*.iff Filepath''' | ||'''PACKET_TYPE'''||'''*.iff Filepath''' | ||
− | |- | + | |- |
||TANGIBLE||object/building/base/shared_base_building.iff | ||TANGIBLE||object/building/base/shared_base_building.iff | ||
− | |- | + | |- |
||INTANGIBLE||object/cell/base/shared_base_cell.iff | ||INTANGIBLE||object/cell/base/shared_base_cell.iff | ||
− | |- | + | |- |
||CREATURE||object/creature/base/shared_base_creature.iff | ||CREATURE||object/creature/base/shared_base_creature.iff | ||
− | |- | + | |- |
||??||object/draft_schematic/base/shared_base_draft_schematic.iff | ||??||object/draft_schematic/base/shared_base_draft_schematic.iff | ||
− | |- | + | |- |
||TANGIBLE||object/factory/base/shared_base_factory.iff | ||TANGIBLE||object/factory/base/shared_base_factory.iff | ||
− | |- | + | |- |
||GROUP||object/group/base/shared_base_group.iff | ||GROUP||object/group/base/shared_base_group.iff | ||
− | |- | + | |- |
||GUILD||object/guild/base/shared_base_guild.iff | ||GUILD||object/guild/base/shared_base_guild.iff | ||
− | |- | + | |- |
||INSTALLATION||object/installation/base/shared_installation_base.iff | ||INSTALLATION||object/installation/base/shared_installation_base.iff | ||
− | |- | + | |- |
||INTANGIBLE||object/intangible/base/shared_base_intangible.iff | ||INTANGIBLE||object/intangible/base/shared_base_intangible.iff | ||
− | |- | + | |- |
||MANUFACTURE_SCHEMATIC||object/manufacture_schematic/base/shared_base_manufacture_schematic.iff | ||MANUFACTURE_SCHEMATIC||object/manufacture_schematic/base/shared_base_manufacture_schematic.iff | ||
− | |- | + | |- |
||MISSION||object/mission/base/shared_base_mission.iff | ||MISSION||object/mission/base/shared_base_mission.iff | ||
− | |- | + | |- |
||??||object/object/base/shared_base_object.iff | ||??||object/object/base/shared_base_object.iff | ||
− | |- | + | |- |
||TANGIBLE||object/path_waypoint/base/shared_path_waypoint_base.iff | ||TANGIBLE||object/path_waypoint/base/shared_path_waypoint_base.iff | ||
− | |- | + | |- |
||PLAYER||object/player/base/shared_base_player.iff | ||PLAYER||object/player/base/shared_base_player.iff | ||
− | |- | + | |- |
||RESOURCE_CONTAINER||object/resource_container/base/shared_base_resource_container.iff | ||RESOURCE_CONTAINER||object/resource_container/base/shared_base_resource_container.iff | ||
− | |- | + | |- |
||SHIP||object/ship/base/shared_ship_base.iff | ||SHIP||object/ship/base/shared_ship_base.iff | ||
− | |- | + | |- |
||??||object/soundobject/base/shared_soundobject_base.iff | ||??||object/soundobject/base/shared_soundobject_base.iff | ||
− | |- | + | |- |
||STATIC||object/static/base/shared_static_base.iff | ||STATIC||object/static/base/shared_static_base.iff | ||
− | |- | + | |- |
||TANGIBLE||object/tangible/base/shared_tangible_base.iff | ||TANGIBLE||object/tangible/base/shared_tangible_base.iff | ||
− | |- | + | |- |
||WAYPOINT||object/waypoint/base/shared_base_waypoint.iff | ||WAYPOINT||object/waypoint/base/shared_base_waypoint.iff | ||
− | |- | + | |- |
||TANGIBLE||object/weapon/base/shared_base_weapon.iff | ||TANGIBLE||object/weapon/base/shared_base_weapon.iff | ||
− | |- | + | |- |
|} | |} | ||
+ | |||
+ | <pre> | ||
*these seem to be deprecated.. as they would not create through packets* | *these seem to be deprecated.. as they would not create through packets* | ||
?? object/construction_contract/base/shared_base_construction_contract.iff | ?? object/construction_contract/base/shared_base_construction_contract.iff | ||
Line 97: | Line 100: | ||
?? object/universe/base/shared_base_universe.iff | ?? object/universe/base/shared_base_universe.iff | ||
?? object/token/base/shared_base_token.iff | ?? object/token/base/shared_base_token.iff | ||
+ | </pre> | ||
===Object Inheritance=== | ===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. | 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 | + | {| class="wikitable" |
− | SOUNDOBJECT OBJECT->SOUNDOBJECT ?? | + | |- align="center" |
− | STATIC OBJECT->STATIC static,non-interactive game objects | + | ||'''OBJECT_TYPE'''||'''PACKET_INHERITANCE'''||'''POST_INHERITANCE''' |
− | UNIVERSE OBJECT->UNIVERSE inherited into systems that universally track data | + | |- |
− | GROUP OBJECT->UNIVERSE->GROUP groups | + | ||BASE_OBJECT||OBJECT||inherited into all other objects.. pretty much |
− | GUILD OBJECT->UNIVERSE->GUILD the guild list | + | |- |
− | INTANGIBLE OBJECT->INTANGIBLE inherited in cells, datapads, and other intangible objects | + | ||SOUNDOBJECT||OBJECT->SOUNDOBJECT||?? |
− | TOKEN OBJECT->INTANGIBLE->TOKEN unknown.. | + | |- |
− | WAYPOINT OBJECT->INTANGIBLE->WAYPOINT waypoints | + | ||STATIC||OBJECT->STATIC||static,non-interactive game objects |
− | DRAFT_SCHEMATIC OBJECT->INTANGIBLE->DRAFT_SCHEMATIC all draft schematics for crafting | + | |- |
− | MANUFACTURE_SCHEMATIC OBJECT->INTANGIBLE->MANUFACTURE_SCHEMATIC used in the crafting process | + | ||UNIVERSE||OBJECT->UNIVERSE||inherited into systems that universally track data |
− | MISSION OBJECT->INTANGIBLE->MISSION used to store missions in terminals and datapad | + | |- |
− | PLAYER OBJECT->INTANGIBLE->PLAYER stores player specific data | + | ||GROUP||OBJECT->UNIVERSE->GROUP||groups |
− | CELL OBJECT->INTANGIBLE->CELL All Internal Room Cells | + | |- |
− | CONSTRUCTION_CONTRACT OBJECT->INTANGIBLE->CONSTRUCTION_CONTRACT unknown.. | + | ||GUILD||OBJECT->UNIVERSE->GUILD||the guild list |
− | TANGIBLE OBJECT->TANGIBLE all game items, also gets inherited into other objects | + | |- |
− | BUILDING OBJECT->TANGIBLE->BUILDING Cities,Player Houses,Bases, All Buildings | + | ||INTANGIBLE||OBJECT->INTANGIBLE||inherited in cells, datapads, and other intangible objects |
− | CREATURE OBJECT->TANGIBLE->CREATURE mobile, vehicles, NPCs, players, mobs | + | |- |
− | FACTORY_CRATE OBJECT->TANGIBLE->FACTORY_CRATE factory crates and manufactured goods | + | ||TOKEN||OBJECT->INTANGIBLE->TOKEN||unknown.. |
− | INSTALLATION OBJECT->TANGIBLE->INSTALLATION harvestors and factory structures | + | |- |
− | PATH_WAYPOINT OBJECT->TANGIBLE->PATH_WAYPOINT used to do path markers | + | ||WAYPOINT||OBJECT->INTANGIBLE->WAYPOINT||waypoints |
− | RESOURCE_CONTAINER OBJECT->TANGIBLE->RESOURCE_CONTAINER resources | + | |- |
− | SHIP OBJECT->TANGIBLE->SHIP ships | + | ||DRAFT_SCHEMATIC||OBJECT->INTANGIBLE->DRAFT_SCHEMATIC||all draft schematics for crafting |
− | WEAPON OBJECT->TANGIBLE->WEAPON all game weapon items | + | |- |
− | COUNTING OBJECT->TANGIBLE->COUNTING unknown.. | + | ||MANUFACTURE_SCHEMATIC||OBJECT->INTANGIBLE->MANUFACTURE_SCHEMATIC||used in the crafting process |
− | Object Packet Members | + | |- |
+ | ||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. | 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. | + | '''Notice''': Objects that define no new members are not listed. Only specifically variating structs are listed. |
− | Parsing Types (Actual STRUCT Variation) | + | |
− | + | ||
− | + | Parsing Types (Actual STRUCT Variation) | |
− | + | ||
− | + | =SWG Protocol Baselines= | |
− | + | {{PacketBaselines}} | |
− | + | ||
− | + | =SWG Protocol Deltas= | |
− | + | {{PacketDeltas}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 23:39, 27 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)