Guide to mapping: Difference between revisions

332 bytes removed ,  00:16, 7 January 2015
rewrite guide from info dump
imported>Oranges
imported>Oranges
(rewrite guide from info dump)
Line 276: Line 276:


==Shuttles==
==Shuttles==
  12:20 <%tkdrg> basically there's 3 types of shuttle dock
Basically there's 3 types of shuttle dock stationary, transit and mobile
  12:21 <%tkdrg> stationary, transit and mobile
*stationary == places where the shuttle can dock
  12:21 <%tkdrg> stationary == places where the shuttle can dock
*transit == shuttle as it moves
  12:21 <%tkdrg> transit == transit
*mobile == the place with the actual shuttle
  12:21 <%tkdrg> mobile == the place with the actual shuttle
so you'd have a transit dock in the transit area and 2 stationary docks, one in centcomm and the other one in the station and 1 mobile dock, in centcomm for most shuttles (apart from mining)
  12:21 <%tkdrg> so you'd have a transit dock in the transit area
 
  12:21 <%tkdrg> 2 stationary docks, one in centcomm and the other one in the station
The shuttle docks are grouped by id eg id = "cargo_away" id = "cargo_transit"
  12:21 <%tkdrg> and 1 mobile dock, in centcomm for most shuttles (apart from mining)
 
  12:22 <%tkdrg> these are selected by ID eg id = "cargo_away" id = "cargo_transit"
You need to add the dock types to the map and edit the bounding boxes via varediting the dock, you need to varedit height, width, dheight and dwidth at minimum. These are offset by the dir so do keep that in mind, eg if dir == 2 then width goes from EAST to WEST, if dir == 4 then width goes from NORTH to SOUTH and dwidth/dheight are offsets from the lower-left corner of the plane switched to the dock's dir
  12:22 <%tkdrg> basically you need to create those docks
 
  12:22 <%tkdrg> and set their bounding boxes
The new shuttle controller will only move shuttle tiles so make sure to create shuttle plating under the engine and turn all existing plating to shuttle plating
  12:22 <%tkdrg> the bounding boxes can be set with varediting on the docks
 
  12:23 <%tkdrg> you need to varedit height, width, dheight and dwidth
Also note that the emergency shuttle and cargo shuttle need special subtypes of the dock type eg so /obj/docking_port/mobile/emergency
  12:23 <%tkdrg> these are offset by the dir so do keep that in mind, eg if dir == 2 then width goes from EAST to WEST
 
  12:23 <%tkdrg> if dir == 4 then width goes from NORTH to SOUTH and dwidth/dheight are offsets from the lower-left corner of the plane switched to the dock's dir
The other variables of note is traveldir, which defines if the shuttle rotates on transit, it's an angle in degrees (just imagine the shuttle is inside a circle . For example, if you want the shuttle going right to left set it to 270 degrees.
  12:24 <%tkdrg> so basically you just need to set those 5 vars and done
 
  12:24 <%tkdrg> also create shuttle plating under the engine and turn all existing plating to shuttle plating
  12:24 <%tkdrg> the new shuttle controller will only move shuttle tiles
  12:28 <%tkdrg> oh also i forgot to say
  12:28 <%tkdrg> emergency shuttle and cargo shuttle need special dock children docks
  12:29 <%tkdrg> so /obj/docking_port/mobile/emergency
  12:29 <%tkdrg> it's important to remember to use stuff like /obj/docking_port/mobile/emergency and the cargo one whose path i forget
===Dwidth and Dheight in more depth===
===Dwidth and Dheight in more depth===
  12:48 <%tkdrg> oranges: dwidth/dheight is the offset of the docking_port obj from the (0,0) bounding box corner
dwidth/dheight is the offset of the docking_port obj from the (0,0) bounding box corner. In dir == 1 (north) 0,0 is the bottom left corner? This changes for each direction, For example when dir is 2 it's the upper right corner. so dwidth and dheight identify where the bounding box starts relative to the docking port obj whereaswidth and height determine the actual width and height of the bounding box
  12:49 < quiltyquilty> is 0,0 the bottom left corner?
 
  12:49 <%tkdrg> not always
'''Note: We count step 0 as a tile, so a height and width of 9 is actually 10 tiles (tile 0 to tile 9)'''
  12:49 <%tkdrg> on dir = 1 it is
  12:49 <%tkdrg> on dir 2 it's the upper right corner
  12:49 < Editor> and so on for each direction
  12:49 < oranges> so dwidth and dheight identify where the bounding box starts relative to the docking port obj
  12:49 < oranges> width and height determine the actual width and height of the bounding box
  12:49 < Editor> Note we also count 0 as a tile, so a width of 9 is 0-9 (width of 10 tiles)


Here is an example for the north facing shuttle dock direction
Here is an example for the north facing shuttle dock direction - you can rotate this image to determine where the offset is for each other cardinal direction
[[File:ShuttleBox.png]]
[[File:ShuttleBox.png]]
[[Category:Guides]] [[Category:Game Resources]]
[[Category:Guides]] [[Category:Game Resources]]
{{Contribution guides}}
{{Contribution guides}}
Anonymous user