mapping_warpers

This is an old revision of the document!


Guide to Mapping - Warpers

city_warpers.dm as viewed in Notepad++

Warpers are invisible tiles which cause a player to be transported from one location to another. The most obvious example of this would be a door on the overworld which takes the player to the interior of a building once it is stepped on. For newcomers to the mapping process these can seem rather intimidating to implement as they do require the mapper to actually write code, but the code in question is actually very simple and easily learned.

The code for warpers is located in trace-alter-map/assets/code/objects/warpers/, wherein it is split across a number of different folders and files related to different areas. For the majority of projects, the relevant warper code is located within the /districts/ folder separated into different files for each district (e.g: the warper code for any caves and buildings located in District 12 is located within the file district_12_warpers.dm). Some districts may be referred to via older development titles (e.g: The Historic District is referred to as “City”, Downtown is “Inner City/Skyscrapers”, and the Outskirts are “Country”) but by taking a glance at the code within and reading the names of certain warpers or by comparing them to the names of warpers placed in the world via the map tool you can deduce what the name of any location you're uncertain about it called.

These files can be edited with BYOND DreamMaker which will likely be the default program set by Windows, however the use of a text editor designed for programming such as Notepad++ is often preferable for readability and ease of use. It is important you do not use a word processor such as Microsoft Office or LibreOffice when editing code as these programs insert a large amount of invisible special characters for their formatting which will break the code entirely.

Variables used by Warpers

warpTo - This specifies what other warper tile the character will be sent to once they step on the warper. Generally warpers work in pairs, with entrance tiles using the exit tiles as their destination and vice versa. Usage example: warpTo = /obj/warpers/city_warpers/bar/leave_bar_1

displayText - This specifies where the warper says it leads when the player moves their cursor over it and also what the game displays at the top left of the screen once they enter it. This should only be used for interiors however; if the warper leads back to the overworld then it should use the isExit variable instead. Usage example: displayText = “Ascension Group HQ”

isExit - This specifies that this warper leads back to the Overworld. Usage example: isExit = true

bound_height - This specifies the height of the warper in pixels from the bottom. If not set, this will default to 32, which is the height of a single tile in Byond. Generally this is only used to create half-sized warpers positioned on the southern edge of tiles. Usage Example: bound_height = 16

stepDir - This specifies the direction the player will be facing when they reappear at the destination. By default it will be whatever direction they were facing when they stepped on the warper, but this can be good for making sure players are facing the direction you feel they should if it's possible they can step on your warper from an odd angle or if your warpers connect in an odd way. Usage example: stepDir = NORTH

An example of how to create a new warper

For the sake of demonstrating how to create a new warper, let's say we want to create a warper between a building door on the Outskirts part of the overworld and a building interior we have just created depicting a small cafe.

The first step is to open the warper file for the region we are working with, in this case it would be country_warpers.dm. Within country_warpers.dm you will see a bunch of existing entities all arranged in a nested fashion in which every entry which is nested one step further inwards is said to belong to a group defined by the above entry. At the very start of the file, we see obj/warpers is the first entry which simply states that everything that follows is a warper object, then country_warpers which is the category for Outskirts warpers, then a bunch of entries for individual buildings which all contain definitions for entrances and exits.

To add our new building, we'll want to create a new line at the end of the document and indent it to align with the other declarations of buildings. In keeping with the format, we would title it “small_cafe”. Next, we want to define the entrance and exit for that building, so we'll indent one notch further as these will belong to the small_cafe entry. Now, as mapped, the exterior of the cafe only has a single tile wide door which serves as the entrance, but the interior has a 2 tile wide doormat which serves as the exit, so we are going to need 3 warper tiles total.

WORK IN PROGRESS

  • mapping_warpers.1749680591.txt.gz
  • Last modified: 2025/06/11 22:23
  • by valkyrieskies