Guide to Mapping

From Eclipse-station Wiki
Jump to: navigation, search

This article or section is from the Baystation 12 wiki.

This article or section is directly taken from the Baystation 12 wiki, and should not be fully relied on for Eclipse. You can help by updating it.

This article or section is from the /tg/ station 13 wiki.

This article or section is directly taken from the /tg/ station 13 wiki, and should not be fully relied on for Eclipse. You can help by updating it.


This is an attempt to detail and explain the process behind mapping in SS13. A PoI section is coming soon, but for now here are the basics. If you have any questions about mapping, forward them to the maintainer of the current map.

Other related guides: Understanding SS13 code and SS13 for experienced programmers

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 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 "eclipsestation.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 one of the Southern Cross map files, or whichever map you prefer. You'll then get something looking a bit like this:


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 visibility 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 simple click lets you place one item per tile from each category, while Ctrl-click stacks it on top of all previous ones and Shift-click deletes the topmost item. You can have multiple maps open at once - I usually have the default 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.

If you want to add some chips to your new den but are unhappy of how they neatly stack on top of eachother, you can change their "pixel_x" and "pixel_y" values in the "edit" rmb-menu to arrange them as you want! (Remember to start and end the value with doublequotes! Also, all custom values are bold so it's easier to identify them.) In fact, most wall-mounted machines on stations are shifted like this, and while they APPEAR to be on a wall, they are actually on the tile in front of it. Just don't go overboard with this, as every new instance of an object is added as its own entry in the menu, and when there are dozens of them it can get hard to remember which one you wanted. Once you've made your room you'll want to put lights in.

File:Mystery pipe.png
There is one uninvited guest here!
Important: While building your station you might find yourself in need of an object with a specific alignment (windows, pipes, cables etc) that does not appear in your menu. This is because BYOND does not simulate instances of an object other than its base state unless they are present on the map. You can generate them by right clicking an object and selecting "generate instance from state/direction". This function has an unwanted feature in which a generated object sometimes has a tag added automatically. These tags can cause error with certain features of the game during a round, and need to be removed. To check for it, right click an item on the map or in the menu, select "edit" and scroll to the "tag" line, which should be empty save for two doublequotes (""). If it's not (which is easy to tell since the tag is massive and bold, impossible to miss even scrolling at lightspeed), change it. Well maintained maps don't usually contain these, so you should be safe to copy-paste to your heart's content. As a tip, remember that all non-standard objects have their own entry in the menu, and having a tag is not standard at all for most object!
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 or spawn one yourself, then rename its "name" variable through "edit" to something appropriate. If you copied your APC from another map, chances are that cell type and dir are both in bold. Cell type defines how much power the APC can hold, and for your first map 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.

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.


Important Note: 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 "AEIOUstation.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 "AEIOUstation.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.

Pre-commit checks

- Are all the floors with or without air, as they should be? (regular or airless)
- Does the area have an APC?
- Does the area have an Air Alarm?
- Does the area have a Request Console?
- Does the area have lights?
- Does the area have a light switch?
- Does the area have enough intercoms?
- Does the area have enough security cameras? (Use the verbs under Mapping for help)
- Is the area connected to the scrubbers air loop?
- Is the area connected to the vent air loop? (vent pumps)
- Is everything wired properly?
- Does the area have a fire alarm and firedoors?
- Do all pod doors work properly?
- Are accesses set properly on doors, pod buttons, etc.
- 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?
- Check for any misplaced or stacked piece of pipe (air and disposal)
- 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
- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.

General Station-wide Mapping Guidelines

Atmospherics

  • Each area should have EXACTLY one air alarm (Exceptions are only possible if a room has scrubbers or vent pumps on different frequencies)
  • Each ROOM (Walled off space) should have at least one vent pump and scrubber, which is properly connected to it's respective loop
  • The air supply loop's pipes should be colored blue
  • The scrubbers loop's pipes should be colored red

Power

  • Each area (which requires power) should have exactly one APC

Atmospherics

Pipes and manifolds

Atmospherics releases its cocktail of gases into the air supply loop (blue pipes). The station is also equipped with a scrubber loop, which filters unwanted gases and sends them back to atmospherics via the scrubber loop (red pipes).

If you're expanding the air supply loop (blue pipes) use the objects in /obj/machinery/atmospherics/pipe/simple/supply/visible or ../hidden depending on if you want it to show above floors or below them. For manifolds use the objects in /obj/machinery/atmospherics/pipe/manifold/supply/visible and ../hidden.

If you are expanding the scrubber loop (red pipes) use the objects in /obj/machinery/atmospherics/pipe/simple/scrubbers/visible or ../hidden depending on if you want it to show above floors or below them. For manifolds use the objects in /obj/machinery/atmospherics/pipe/manifold/scrubbers/visible and ../hidden.

If you are however building a pipe network which has nothing to do with the air supply or scrubbers loop, you should use the objects in /obj/machinery/atmospherics/pipe/simple/general/visible or ../hidden. For manifolds use the objects in /obj/machinery/atmospherics/pipe/manifold/general/visible and ../hidden. To manually set these ones up you will need to set the following parameters (Assuming you are properly using the visible/hidden categories)

 color = ""  // select from "" for gray or "red", "blue", "cyan", "green" or "yellow"
 icon_state = "intact" //The color of pipes is set to what the color variable says at round 
 start irrespective of this, however to make mapping easier, please set the icon_state variable 
 to the correct one here too. Please refer to the table below for icon_states for different colors. 
Color Visibility icon_state (pipe) icon_state (manifold)
Gray Visible intact manifold
Gray Hidden intact-f manifold-f
Red Visible intact-r manifold-r
Red Hidden intact-r-f manifold-r-f
Blue Visible intact-b manifold-b
Blue Hidden intact-b-f manifold-b-f
Cyan Visible intact-c manifold-c
Cyan Hidden intact-c-f manifold-c-f
Green Visible intact-g manifold-g
Green Hidden intact-g-f manifold-g-f
Yellow Visible intact-y manifold-y-f
Yellow Hidden intact-y-f manifold-y-f

Air Alarm

Every single area (with scrubbers and/or vent pumps) should have exactly one air alarm. More than one should be placed if vent pumps or scrubbers use different radio frequencies than the default one (1439).

Scrubbers (Station air supply)

Every room (ie. walled off space) except for maintenance hallways should have at least one scrubber.

The vars you need to set for this one specifically are:

 on = 1
 scrubbing = 1
 scrub_co2 = 1
 scrub_toxins = 0
 scrub_n2o = 0
 volume_rate = 120
 panic = 0
 frequency = 1439

And make sure the id_tag is the default one (null)

Also ensure the scrubber is connected to the scrubber loop!!

Vent Pumps (Station air supply)

Every room (ie. walled off space) except for maintenance hallways should have at least one vent pump.

The vars you need to set for this one specifically are:

 on = 1
 pump_direction = 1
 pressure_checks = 1
 frequency = 1439

And make sure the id_tag is the default one (null)

Also ensure the vent pump is connected to the air supply loop!!

Disposals

Disposals is something that you will probably wind up having to play with atleast once.

Disposals operates in a loop, starting and ending at the Cargo Office. From here it rotates around the station and eventually returns. There are branches off this main loop. "Trash" branches which join the main branch with a junction. And "Mail" branches which use a sortjunction. The important thing to remember when adding new branches is you do not mix mail branches with trash branches.

Trash Branches

Example of Junctions.
Junction.png

Trash branches can have sub branches to other disposal cans as long as their junctions all "point" towards the main loop, and when it gets to the main loop has a junction that points in the direction the main loop is going (usually clockwise) in the direction of the main loop.


The junction is /obj/structure/disposalpipe/junction.

When placing the junction don't worry about how it's rotated, we'll get to that. Worry about which pipe the arrow is pointed and we'll rotate it once it's placed. Place it and then we need to realize which cardinal direction the arrow should point. Edit the variables of the junction and look for "dir". Use that link to set the value the "exit" end should point towards. So if we want the arrow to point north we would set it to 1, south 2, and so on.

That's it. If you are editing a link in the main loop make sure it's going with the flow, don't have two junctions that point back at each other it will cause an infinite loop and that's bad.

Mail branches

Sortjunction.png

Mail branches use a sorting junction (/obj/structure/disposalpipe/sortjunction) to go from the main loop to the destination, it should not branch off further or have trash boxes branched into it as well, it will cause problems. sorting junctions are placed in the same way regular junctions are. sort junctions should only be on the main loop, do not use them elsewhere. What sort junctions do is look for a tag from a package, if it matches the ID of the office it is checking for it redirects the package to it's "Sort Direction" Sort junctions either sort to the left or the right, their dir variable will decide which direction the "Default" is (not sort direction, our picture example's dir value is to the east so it's 4). Luckily there are plenty of icons for this item so you can choose which one works and can probably find the correct directions. If not you can either edit iconstate "pipe-j1s" vs "pipe-j2s" (changes which side the sort side is on of the pipe and set dir until you get it the way you want it. Once you have it placed you need to look up the number you will be placing in it's sortType variable, this can be determined by a list in code/setup.dm and counting through the list for your destination if you need to make new destinations you need to edit that list.

var/list/TAGGERLOCATIONS

At the time of this writeup that list is:

  1. Disposals
  2. Cargo Bay
  3. QM Office
  4. Engineering
  5. CE Office
  6. Atmospherics
  7. Security
  8. HoS Office
  9. Medbay
  10. CMO Office
  11. Chemistry
  12. Research
  13. RD Office
  14. Robotics
  15. HoP Office
  16. Library
  17. Chapel
  18. Theater
  19. Bar
  20. Kitchen
  21. Hydroponics
  22. Janitor
  23. Genetics

Last steps

Click out your pipes and when you get to where the disposal unit goes place it with /obj/machinery/disposal and a pipe leading up to it on the same tile that is /obj/structure/disposalpipe/trunk

and you are done!

Power

APC

Each new room needs at least one, this will provide all the power for the room (magically). Any room that is very equipment heavy may need another APC to split the load and prevent early black outs.

Wiring

Make sure the wires lead from the main power grid, and to the APC(s) of your area. If any equipment in your new area requires a wire under it, line it up, connected to the main power grid, and under the machinery. Wires are also helpful when making electrical grills (just dot wire under a grill), make sure the wires touch the main power grid (or they won't shock people).

Equipment

Lights

Lights take up a lot of power, don't use too many! Make sure to put in just enough so the room is fully lit, but not so many that the equipment will go out in ten minutes of the round starting.

Light switch

For mood lighting, or to show the room is currently not in use by the primary occupant. These disable the lighting equipment (and power drain associated) in the area, but not desk lamps. Place these on walls, usually by a door.

Request Console

If a certain room has no need for materials, or produces no materials, do not give it a Request Console. If it does (for either case or both) make sure it has at least one, that is in a place where some one will see it.

Intercoms

At least every room should have one of these. They should be set to 145.9, and be speaker ON Microphone OFF. This is so radio signals can reach people even without head sets on. Larger room will require more than one at a time.

Security Cameras

Most areas should have these, enough to see the general area from a Human point of view, but, not bunched together for the AI's sake. Larger rooms may require more than one.

Room Structure

Access

Here are the various door access.

access_security = 1

access_brig = 2

access_armory = 3

access_forensics_lockers= 4

access_medical = 5

access_morgue = 6

access_tox = 7

access_tox_storage = 8

access_genetics = 9

access_engine = 10

access_engine_equip= 11

access_maint_tunnels = 12

access_external_airlocks = 13

access_emergency_storage = 14

access_change_ids = 15

access_ai_upload = 16

access_teleporter = 17

access_eva = 18

access_heads = 19

access_captain = 20

access_all_personal_lockers = 21

access_chapel_office = 22

access_tech_storage = 23

access_atmospherics = 24

access_bar = 25

access_janitor = 26

access_crematorium = 27

access_kitchen = 28

access_robotics = 29

access_rd = 30

access_cargo = 31

access_construction = 32

access_chemistry = 33

access_cargo_bot = 34

access_hydroponics = 35

access_manufacturing = 36

access_library = 37

access_lawyer = 38

access_virology = 39

access_cmo = 40

access_qm = 41

access_court = 42

access_clown = 43

access_mime = 44

access_surgery = 45

access_theatre = 46

access_research = 47

access_mining = 48

access_mining_office = 49 - not in use

access_mailsorting = 50

access_mint = 51

access_mint_vault = 52

access_heads_vault = 53

access_mining_station = 54

access_xenobiology = 55

access_ce = 56

access_hop = 57

access_hos = 58

access_RC_announce = 59 - Request console announcements

access_keycard_auth = 60 - Used for events which require at least two people to confirm them

access_tcomsat = 61 - has access to the entire telecomms satellite / machinery

CentCom Access

Mostly for admin use.

access_cent_general = 101 - General facilities.

access_cent_thunder = 102 - Thunderdome.

access_cent_specops = 103 - Special Ops.

access_cent_medical = 104 - Medical/Research

access_cent_living = 105 - Living quarters.

access_cent_storage = 106 - Generic storage areas.

access_cent_teleporter = 107 - Teleporter.

access_cent_creed = 108 - Creed's office.

access_cent_captain = 109 - Captain's office/ID comp/AI.

Misc Access

access_syndicate = 150 - General Syndicate Access

access_crate_cash = 200 - Money Crates?

Airless Floors

Ideal for rooms or chambers that mix gas, and for tiles exposed to space. Not ideal for areas that humans will cross in frequency.

Use these on external tiles (to prevent lag when the game starts) and chambers that will require gas mixing (toxins mix chamber/ furnace). Double check these to make sure you don't suffocate mobs in the new rooms.

Fire Alarms and Fire Doors

Make sure to put these INSIDE of the boundary of the area, so there is a lock down. Any spot that gets hot as a normal function should not have a fire Alarm right next to the heat source (toxin mix chamber). Make sure there is a fully sealed area (with the exception of maintenance doors for people to escape fires) that can't be open by normal civilians.

Weak Points

Judge how high security the room will be, if it is high security, reinforced walls and electrified grill windows may be in order. Areas that do not need a lot of security can use basic walls, and windows to your liking (though normal glass windows break very very easy). Each room should have one place that's weaker than the rest (like a back door, side entrance, or a window), just because the main entrance might be out of commission (and realistically, for traitors to break into).

Item and Machinery Distribution

Be smart about what will go in an area, keep a fine balance between the size of the room and amount of equipment. Large rooms may require multiple APCs to prevent power outages early in game. Second, make sure to place equipment that make sense for the area (security computer in a security area/ Medical vendor in a medical area).

Balance

Item contents

The harder the room is to enter, the more goodies or sensitive equipment there is inside. Make sure to keep this in mind (and don't make an empty room that's covered in blast doors, electrified grills, reinforced walls, and captain level doors).

Room security

A room is only as secure as its necessity. Public rooms should not have many security functions (other than a fire alarm), but private work space must be more secure (based on job). The bartenders do not need reinforced walls around their storage, but engineers do.

The highest security rooms should utilize the highest security measures. The lowest security rooms should utilize the cheapest security measures.

Step_x, step_y and the broken movement syndrome

So you compiled the map and suddenly whenever you move you no longer get the animation of moving but just 'appear' on the next tile?

So a while back step_x and step_y were introduced to allow pixel based movement. SS13 does not utilize this. Step_x and step_y are variables that each atom has. The way they work is that as soon as you set any object on the map to use one of these variables, the game interprets that you overrode all default movement code and wrote your own - but you didn't (The code that makes the animation from tile to tile).

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 the development IRC if you need more help.

Contribution Guides & Game Resources
General Guide to Setting Up a Server, Downloading the Source Code, Guide to Contributing to the Game, Game Resources category
Coding Basics of Coding in BYOND, SS13 for Experienced Programmers, Binary flags‎, NanoUI
Mapping Guide to Mapping
Spriting Guide to Spriting
Wiki Guide to Contributing to the Wiki, Style Guide