joray created page: Datatable_Coordinates

This commit is contained in:
Cekis
2015-12-17 16:38:58 -05:00
parent a0260098a1
commit 96a9ad0f1a

View File

@@ -11,10 +11,19 @@ In most of the datatables you'll see different types of spawning mechanisms. Th
Containers are just things like buildings or inventories. Basically, they hold other stuff. Buildings are geometric containers, or containers that have coordinate systems for layouts. Things like inventories ignore coordinates and just show what's in them. Containers have coordinates that define position within the container of Px, Py, Pz. Items may be placed within containers at a particular position that fits within a coordinate distance of 16000 wide (Px), 16000 tall (Py) and 16000 deep (z). Inventory containers ignore their coordinates.
### World Containers
World containers are the highest level of container. Each world (space regions are considered "world" regions) has an object ID of 0 since they are the highest level. The ground in a non-space world is planar (parallel) with the Px and Pz axis with Px pointing North/South and Pz pointing East/West. The Py axis is elevation from the ground. All coordinates for layout can be positive or negative. Additionally, items may be rotated within the world container (see "[Rotation](https://swgilluminati.com/staff/swg-main/wikis/Datatable_Coordinates#rotation)" below).
World containers are the highest level of container. Each world (space regions are considered "world" regions) has an object ID of 0 since they are the highest level. The ground in a non-space world is planar (parallel) with the Px and Pz axis with Px pointing North/South and Pz pointing East/West. The Py axis is elevation from the ground. All coordinates for layout can be positive or negative. Additionally, items may be rotated within the world container (see "[Rotation](https://swgilluminati.com/staff/swg-main/wikis/Datatable_Coordinates#rotation)" below). Each World container "shows" a space of 16000 wide by 16000 long, but that is just the graphical map size. The actual layout size does not consider a 320m "no travel" border that wraps around the entire map. In fact, the 0,0 point for layout consideration is actually at -7680, -7680 (lower left map corner). It's here that the layout TAB files also begin their own layouts.
#### TAB Map Grid
You'll notice that in the server buildout folders there are layout files that end with two numbers. These numbers correspond to their grid layout section on a planet map. The first "block" (or tab file) for layout is <planetname>_1_1.tab. This means it's the first block of the map starting from the lower left corner. <planetname>_8_1.tab is the lower right corner, <planetname>_8_8.tab is the upper right corner and <planetname>_1_8.tab is the upper left corner of the map.
#### TAB Layout Coordinates
Each TAB file has a coordinate system as well, but that coordinate system starts at 0,0. As the world coordinate system applies, the coordinates within the tab ADD to the world coordinates to determine where an object spawns in the world. For example, <planetname>_7_2.tab starts it's 0,0 location at 3840, -6080. For this grid location, the object must fall within the coordinate space of 3840, -5760 and 5760, -3840 (the 1920 x 1920 block). Which means, layout coordinates for planetary buildouts should always be positive and less than or equal to 1920.
### Building Containers
Buildings are placed in the World at a specific Px, Py and Pz location relative to the World container's coordinate system. Additionally, buildings can be rotated within the world container using a Qw, Qx, Qy, Qz rotation (see "[Rotation](https://swgilluminati.com/staff/swg-main/wikis/Datatable_Coordinates#rotation)" below. Now, buildings have their own coordinate system that totally ignores the world coordinate system. The coordinate system is the same, but it's relative to where the building is placed within the world and at what rotation it is placed in. The reason the building has its own coordinate system is to maintain the ability to keep item location integrity in place. For example, if you place a space terminal in a starport at position 100, 0, -100, you know that no matter what rotation or position the building has in the world, the items located within a building (i.e. our terminal in our starport) will stay in the right spot in the building.
Buildings are placed in the World at a specific Px, Py and Pz location relative to the World container's coordinate system. Additionally, buildings can be rotated within the world container using a Qw, Qx, Qy, Qz rotation (see "[Rotation](https://swgilluminati.com/staff/swg-main/wikis/Datatable_Coordinates#rotation)" below.
#### Tab Layout Coordinates
Buildings have their own coordinate system that totally ignores the world coordinate system. The coordinate system is the same, but it's relative to where the building is placed within the world and at what rotation it is placed in. The reason the building has its own coordinate system is to maintain the ability to keep item location integrity in place. For example, if you place a space terminal in a starport at position 100, 0, -100, you know that no matter what rotation or position the building has in the world, the items located within a building (i.e. our terminal in our starport) will stay in the right spot in the building. Coordinates are relative to their container with 0,0 starting at the location of the container within the building.
### Cell Containers
Cell containers are essentially the same as building containers. In fact, every container in game is considered a cell container - including buildings and most likely worlds as well. Cell containers allow the client to place items it knows about into the world. Cell containers also allow you to place items within a building's particular room or zone, but they also allow you to redefine a new coordinate system within a building allowing you to place items easier and with consistency (i.e. starports have space terminals, ticket terminals and GCW Network terminals all in the same locations - typically).