-
Notifications
You must be signed in to change notification settings - Fork 516
Adding Maps
All maps must get their own folder in /maps
. The map's folder name should be lowercase and not have spaces; this will be the name that the map will be referred to by in the server config. Your DMM files should go directly inside this folder; all DMMs found will be loaded, regardless of name. Maps will be loaded in alphabetical order (A->Z, Z1->...), similar to BYOND. Inside this folder you should create a code
folder for your map datum and any other map-specific code you may need. Do not include the maps, though you probably want to include your code.
Once you have your file structure setup, you need to define a map datum. The map datum is what allows the server to find your map, as well as contains metadata about your map. Generally the map datum should go in a file of the same name as the map in maps/[your map path]/code/
.
Example:
/datum/map/awesome_map
name = "Awesome Map" // A short name of your map for debug purposes. Technically optional, but a good idea to set.
full_name = "NSS Awesome Map" // The full name of the map. This will show in the status panel.
path = "awesome_map" // This must be the same as your map folder's name. If they differ, the map will not load. This is also the name that the config will use to refer to your map.
station_levels = list(1, 2) // Zlevels that are part of the main station.
admin_levels = list(3) // Zlevels reserved for admin/event use. These aren't normally reachable. Omit for none.
contact_levels = list(1, 2) // Zlevels that alerts like red alert should reach.
player_levels = list(1, 2, 3, 4, 5) // Zlevels that players can normally reach during play.
sealed_levels = list(5) // Zlevels that cannot be left by hitting the edge, nor can be drifted into. Optional.
accessible_z_levels = list("8" = 5, "4" = 20) // Zlevels reachable by drifting through space. Key is Zlevel, value is chance to reach.
base_turf_by_z = list("1" = /turf/simulated/open) // Defines the default turf for a Zlevel. Optional, not all Zlevels need this defined.
// Station naming vars. You probably want to define these, but you technically don't need them.
station_name = "NSS Awesome" // Your station's official name.
station_short = "Awesome" // Your station's colloquial or short name.
dock_name = "NTCC Odin" // The name of the place where the emergency/CT shuttles dock.
dock_short = "Odin" // A short/colloquial version of the above.
boss_name = "Central Command" // The name of central command.
boss_short = "Centcom" // Same as above, but short/colloquial.
company_name = "NanoTrasen" // The station's operating/directing company.
company_short = "NT" // Same as above, but short/colloquial.
system_name = "Tau Ceti" // The general location of the station.
// CT/Emergency shuttle messages; technically optional, but you probably want to define them.
shuttle_docked_message = "" // The message shown when the CT shuttle docks with the station. Available blanks: %dock% (replaced with dock_name), %ETA% (replaced with time until launch).
shuttle_leaving_dock = "" // The message shown when the CT shuttle leaves the station. Available blanks: %dock%, %ETA%.
shuttle_called_message = "" // The message shown when the CT shuttle departs the dock for the station. Available blanks: %dock%, %ETA%.
shuttle_recall_message = "" // The message shown when the CT shuttle is recalled. No blanks.
emergency_shuttle_docked_message = "" // The message shown when the emergency shuttle docks. Available blanks: %ETD% (replaced with time until launch)
emergency_shuttle_leaving_dock = "" // The message shown when the emergency shuttle leaves the station. Available blanks: %ETA% (replaced with time until arrival), %dock% (replaced with dock_name).
emergency_shuttle_recall_message = "" // The message shown when the emergency shuttle is recalled. No blanks.
emergency_shuttle_called_message = "" // The message shown when the emergency shuttle is called. Available blanks: %ETA%
If your map has asteroid or extra generation steps, they go in generate_asteroid()
or finalize_load()
. Former is only called if asteroid generation is enabled in the server configuration, latter is always called. These run after the map has fully loaded, but before atoms initialize.
Once these files are created & the map datum is included, you should be able to load your map by adding FORCE_MAP yourmappath
in config/config.txt
. If you want your map to be testable with Travis, add a file in _maps
containing: #define DEFAULT_MAP "yourmappath"
and update the Travis config.
A collection of standards and guidelines applied to the codebase.
Documentation regarding common APIs which speed up feature implementation and should be known by all coders.
- Atom Initialization
- Garbage, Queued Deletion, and Destroy
- Callbacks
- Timers
- Lazy Lists
- Overlays
- Processing APIs
- Common Helpers
- Global Listeners
- Singletons
Documentation for less used APIs that are not often needed.
Documentation regarding our implementation of StonedMC (SMC).
Decrepit or unused systems.
- Dynamic Maps (Not to be confused with the newer away mission implementation.)