Guide to mapping: Difference between revisions

Jump to navigation Jump to search
12,429 bytes added ,  11:20, 28 July 2015
imported>Errorage
imported>MrStonedOne
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Other related guides: [[Understanding SS13 code]] and [[SS13 for experienced programmers]]
Other related guides: [[Understanding SS13 code]], [[SS13 for experienced programmers]] and [[Map Merger]]
== Map Merger ==
== Map Merger ==
It is important that you use the [[Map Merger]] tools before commiting any changes to a map. See [[Map_Merger|here]] for how.
It is important that you use the [[Map Merger]] tools before commiting any changes to a map. See [[Map_Merger|here]] for how.
== Meta's Guide to Enthusiast Mapping ==
'''Written for those with any or no idea of how to use the map-maker.'''
I have no idea how experienced anyone reading this is, so I'll start from the top and try to assume little. First, you need to get yourself a copy of all the files for editing. To do this, go [https://github.com/tgstation/-tg-station here] and click the ZIP button next to clone this in windows. You won't be able to push to the GitHub repo or anything, but that's complicated and something you can get round to later. Once the .zip downloads, extract it wherever.
So now you have your folder with the latest code in, and a zip backup to go back to if you break everything. In the master folder, you'll see "tgstation.dme". You want to open this with Dream Maker a program that'll be in your BYOND folder. Set Dream Maker as the default program for opening .dme files, if it isn't already. When you open it, you'll see a two tabs on the left: file, and object. In the file tab, open '''maps''', and then open 'tgstation.2.1.2.dmm', or whatever the current map version is called. You'll then get something looking a bit like this:
[[File:Dreammakermap.png|thumb|left|400px]]
<br><br><br><br><br><br><br>
Switch from the '''files''' tab to the '''objects''' tab, and you'll see '''area''', '''mob''', '''objects''', and '''turf'''. These are the four primary 'layers' that you can see in the editor. You can toggle their visability and interactivity on and off using the '''layers '''dropdown. I'd advise copying this map, and renaming it to, say, teststation.dmm.  Perhaps delete most or all of the default station, and build on the now-empty z-level, wherever you like. To build stuff, use the object tree on the left of the UI to select things, then click to place them. A handy tip is that control-clicking places an object on top of others, instead of replacing them. You can have multiple maps open at once - I usually have the default /tg/station map and mine open, and can then shamelessly copy-paste things far more easily. Also, finding stuff in the object tree can be tedious as hell - right click something you see and you can see its path in the tree - obj/structure/closet/etc. This will help you find things. From this point on, really, you can begin mapping proper.
You can select areas to copy/paste/delete, or enter add or fill mode when placing objects. Basically just click around all the menus and you'll work out how they work, more or less. '''Options>Zoom''' allows you to zoom out to 50% to see more stuff. Use layers to select which of area, objects and turf you want to edit. If you actually want to be able to see anything, I'd deselect area, and tick 'only show selectable layers'.
The first step, then, is to be able to create your first few rooms. Select a turf (floor) from the generic simulated floors. These will start with the right make-up and pressure of air on them, which is how you'll want it. Surround these floors with walls, and hey presto you have a room. Try sticking some tables in there, perhaps a vending machine or two.  One you've made your room you'll want to put lights in. To get these to work, however, they need power.
So now we get to the basics of making a functioning room. First of all, you'll need to re-enable the area layer. Pick some area from the object tree, and cover your room in it. You can rename this area if you want, we'll do that later. Make sure the area isn't used anywhere else on the map. Each area should have one APC or Area Power Controller in it. Copy one in from the default map.
To rename an area or APC, you need to right click it, and select EDIT. This will give you a menu showing you all of its changeable variables. Name is what you'll want to change. You'll see a hell of a lot of other things you can change, too. Any that aren't defaults are in BOLD. The menu will look something like this:
[[File:Editinstance.png|thumb|left|200px]]
<br><br><br><br><br><br><br>
As you can see, cell type and dir are both in bold. Cell type defines how much power the APC can hold, you'll want to set this nice and high as you don't have any sort of generator yet - 10,000 ought to do. Dir defines the direction the APC is in with regards to the cell it occupies. Basically, 1 means it is above the cell you place it in, 2 is below, 4 is to the right and 8 to the left:
[[File:Directions.png|thumb|left|200px]]
<br><br><br><br><br><br><br><br>
Note that with APCs, '''dir ''' is the only variable controlling their position. Other objects have their positions defined by '''pixel_x '''and '''pixel_y''' - this changes where APCs appear in the editor, but once ingame they snap to whatever the '''dir''' variable says. Other things, like signs on walls, will only take notice of the pixel variables and not necessarily dir. In a normal power system, you'd connect the APC up to all the others and the station's generator via SMES cells, but we'll do that later. For now you have a basic room that is powered and starts with enough air to breathe happily. You can put an air canister in if you think you'll consume all the oxygen, or somesuch.
'''<u>Important Note:</u>''' There are '''nudge_x '''and '''nudge_y''' variables in the editor, as well as various z-axis variables. Don't ever change these, they're not used in SS13 and break things.
To be able to actually spawn into a room, you'll want to place spawners. You'll see these as the big red X symbols on the default map, for each role. There are also blue Xs for xeno spawn locations and the spawns for all latecomers on the arrival shuttle. Stick in a spawn_late somewhere in your room for now.
To actually play your map and be able to screw around in it as an admin, you'll have to compile it. First, make sure the file tree (on the left like the object tree, click the file tab) is open, and go to maps. Make sure the only one ticked is your own. Then click Build>Compile from the top, and wait for it to finish. This will give you a something like "tgstation.dmb" in the folder containing bot, code, config, maps, etc. Whilst here, quickly go into config, and open 'admins.txt'. Replace everything in there with:
"<yourbyondname> = Game Master", filling in your BYOND name.
This will make you an admin, which is very helpful for tinkering ingame. Now to actually boot up a server so you can run your map! Find 'Dream Daemon' (has a big green icon) in your BYOND folder, and click the 'File' dropdown at the bottom. Select your "tgstation.dmb". Select a port if you want, put security on safe, and visibility to invisible, for now. Click start to start the server, which will take a little while. You can then connect to it through BYOND by putting in either your external IP, shown in Dream Daemon, if that port is correctly forwarded. Otherwise use your internal IP, 192.168.x.x, where x is whatever. If you don't know this, ask and I can help. Once in, go to the admin tab and click 'start game'. By joining after the start, you'll spawn at the late spawn you made, and, being an admin, will be able to make stuff, delete stuff, and other handy admin things (like causing massive explosions).
From there on, you can make whatever you like, really. Copying the default map and working out how everything works isn't too hard and is fairly rewarding. You could just tweak the default one for a bit if you like. The first thing I made was a small shuttle - you can see this at the bottom. Just tweak it and add stuff and you'll work out how almost everything works fairly easily. For explanations of wiring, piping, and atmos, ask away on here. I'll add an atmos guide later on, as well as a power generation and wiring guide. If you're a good engineer in-game, it'll help a lot as a mapper.
If you've managed to get all the way to the end of this before I've added more, fine effort on your part. Have fun screwing around with stuff, and feel free to ask anything you like. I'll add more stuff here soon.


== Pre-commit checks ==
== Pre-commit checks ==


- Are all the floors with or without air, as they should be? (regular or airless)<br>
*Are floors with or without air, as they should be? (regular or airless)
- Does the area have an APC?<br>
*Does the area have an APC?
- Does the area have an Air Alarm?<br>
*Does the area have an Air Alarm?
- Does the area have a Request Console?<br>
*Does the area have a Request Console?
- Does the area have lights?<br>
*Does the area have lights?
- Does the area have a light switch?<br>
*Does the area have a light switch?
- Does the area have enough intercoms?<br>
*Does the area have enough intercoms?
- Does the area have enough security cameras? (Use the verbs under Mapping for help)<br>
*Does the area have enough security cameras? (Use the verbs under Mapping for help)
- Is the area connected to the scrubbers air loop?<br>
*Is the area connected to the scrubbers air loop?
- Is the area connected to the vent air loop? (vent pumps)<br>
*Is the area connected to the vent air loop? (vent pumps)
- Is everything wired properly?<br>
*Is everything wired properly?
- Does the area have a fire alarm and firedoors?<br>
*Does the area have a fire alarm and firedoors?
- Do all pod doors work properly?<br>
*Do all pod doors work properly?
- Are accesses set properly on doors, pod buttons, etc.<br>
*Are accesses set properly on doors, pod buttons, etc.
- Are all items placed properly? (not below vents, scrubbers, tables)<br>
*Are all items placed properly? (not below vents, scrubbers, tables)
- Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room?<br>
*Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room?
- Check for any misplaced or stacked piece of pipe (air and disposal)<br>
*Check for any misplaced or stacked piece of pipe (air and disposal)
- Check for any misplaced or stacked piece of wire<br>
*Check for any misplaced or stacked piece of wire
- Identify how hard it is to break into the area and where the weak points are<br>
*Identify how hard it is to break into the area and where the weak points are, and balance the area accordingly (eg. the Vault should be made of reinforced structures and electrified windows, the Kitchen should not)
- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.<br>
*Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels
- Are there any [[guide_to_mapping#Room Structure|unsimulated floors]] where they shouldn't be?<br>
*Are there any [[guide_to_mapping#Room Structure|unsimulated floors]] where they shouldn't be?


== General Station-wide Mapping Guidelines ==
== General Station-wide Mapping Guidelines ==
Line 189: Line 234:
=== Access ===
=== Access ===


==== Door access ====
Access to doors is handled by req_access values. There are four when editing a door - req_access, req_access_txt, req_one_access, and req_one_access_txt. The one's we're concerned with are '''req_access_txt''' and '''req_one_access_txt'''.


==== Airlocks ====
[[File:DoorAccessImage1.png|thumb|left|300px]] This image shows a door on the Arrivals shuttle - since it's a public door, the access is set to "0", as everyone should be able to open it. If we look at the Brig front door, we would set the access to 63, because that's the value for Security front doors - accessible by Security positions, but no one else.


==== Pod Doors ====
Multiple accesses to doors are handled by adding a semicolon (with no spaces) between access values (eg. "28;31" is for Kitchen and Cargo access). This might seem worthless, but it's useful for small maps, where jobs might need to share access due to cramped spaces.
 
There's an important difference between the two that you need to pay attention to - req_access_txt requires '''ALL LISTED ACCESSES''' to open the door, while req_one_access_txt lets anyone with '''ONE OF THE LISTED ACCESSES''' open the door. For example - say you want your Brig to be openable by the Detective and Security Officers, we would put "63;4" in '''req_one_access_txt''', because we want the Detective '''AND''' Security to have access. If we used req_access_txt, you would need '''BOTH''' accesses to open the door, meaning neither the Detective or Security could open it.
 
You can view all of the access values in the code/game/jobs/access.dm file. (Most should be self explanatory or have a label, but if you really aren't sure, you can take a look at Boxstation's map file and check the value on the door you're looking for).


=== Airless Floors ===
=== Airless Floors ===
Line 231: Line 280:
To fix this problem you need to close dream maker (save the project first, obviously). Open your map (.dmm) file in a text editor, such as notepad or notepad++. Search (ctrl+f) through the file for step_x and step_y and remove any reference to it. Once no more step_x or step_y -es are found in the file, save it and open it in dream maker once again. Compile the code and movement should work fine once more. Go to [[Community|the development IRC]] if you need more help.
To fix this problem you need to close dream maker (save the project first, obviously). Open your map (.dmm) file in a text editor, such as notepad or notepad++. Search (ctrl+f) through the file for step_x and step_y and remove any reference to it. Once no more step_x or step_y -es are found in the file, save it and open it in dream maker once again. Compile the code and movement should work fine once more. Go to [[Community|the development IRC]] if you need more help.


==Shuttles==
Basically there's 3 types of shuttle dock stationary, transit and mobile
*stationary == places where the shuttle can dock
*transit == shuttle as it moves
*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)
The shuttle docks are grouped 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
You should also ensure the directions face the shuttle or face away from the thing the shuttle docks with.
If a shuttle's mobile docking port direction is different then the stationary docking port's direction, the shuttle and all items on it will be rotated accordingly. (Try it, it works properly for just about everything)
'''Warning the bounding box for the mobile dock must fit inside of the stationary dock (after any rotation)''' Or the shuttle will refuse to move.
If the shuttle's mobile docking port is in an area that is a subtype of /area/shuttle, Only turfs in the bounding box in that same area are moved. Otherwise it moves all turfs in the bounding box. This can be used for odd shaped shuttles. (the area will be transfer over as well)
Also note that the emergency shuttle and cargo shuttle need special subtypes of the dock type eg so /obj/docking_port/mobile/emergency
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.
===Dwidth and Dheight in more depth===
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
'''Note: We count step 0 as a tile, so a height and width of 9 is actually 10 tiles (tile 0 to tile 9)'''
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]]
[[Category:Guides]] [[Category:Game Resources]]
[[Category:Guides]] [[Category:Game Resources]]
{{Contribution guides}}
{{Contribution guides}}
Anonymous user

Navigation menu