Guide to mapping/Exploration ruins: Difference between revisions

From BeeStation Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
== Mapping Randomly Generated Rooms==
== Mapping Randomly Generated Rooms==
===Dimensions===
===Dimensions===
The room must have the dimensions 4a+1 by 4b+1, where a and b are positive integers (5, 9, 13, 17, 21 etc.). Note that the width and height of the rooms do not have to be the same, so rooms of size 5x17 would be accepted.
The room must have the dimensions 4a+1 by 4b+1, where a and b are positive integers (5, 9, 13, 17, 21 etc.). Note that the width and height of the rooms do not have to be the same, so rooms of size 5x17 would be accepted.
[[File:Exploration mapping helper.png|thumb|420x420px|A visual representation of the map sizes and door positions. This can scale larger than 9x9, this is just a small example.]]
=== Connections===
=== Connections===
The room must also have at least 1 connection point. There are 2 type of connection points: hallways and doors.
The room must also have at least 1 connection point. There are 2 type of connection points: hallways and doors.
Line 28: Line 31:


- loot_room: This should be set to 'TRUE' for any maps that have decent loot in it. This marks the room as a loot room, of which only 1 can spawn per ruin.  
- loot_room: This should be set to 'TRUE' for any maps that have decent loot in it. This marks the room as a loot room, of which only 1 can spawn per ruin.  
 
Example: <syntaxhighlight>
Example: <syntaxhighlight>
/datum/map_template/ruin_part/chapel
/datum/map_template/ruin_part/chapel
Line 44: Line 47:
weight = 3
weight = 3
</syntaxhighlight>Currently, all ruin map templates are stored in code/modules/shuttle/super_cruise/orbital_poi_generator/ruin_generator/ruin_part_types.dm
</syntaxhighlight>Currently, all ruin map templates are stored in code/modules/shuttle/super_cruise/orbital_poi_generator/ruin_generator/ruin_part_types.dm
[[Category:Guides]]  
[[Category:Guides]]
[[Category:Game Resources]]
[[Category:Game Resources]]
{{Contribution guides}}
{{Contribution guides}}

Latest revision as of 18:27, 29 May 2022

Mapping Randomly Generated Rooms

Dimensions

The room must have the dimensions 4a+1 by 4b+1, where a and b are positive integers (5, 9, 13, 17, 21 etc.). Note that the width and height of the rooms do not have to be the same, so rooms of size 5x17 would be accepted.

A visual representation of the map sizes and door positions. This can scale larger than 9x9, this is just a small example.

Connections

The room must also have at least 1 connection point. There are 2 type of connection points: hallways and doors.

These connection points must be placed on the border of the map at intervals of 4n + 3 (3, 7, 11, 15 etc.) so that the connections are in the center of a hallway / doorway point.

Additionally, the connection points must be pointing towards the edge of the map, if a connection point is placed on the north wall, the arrow indicator in the map editor should point north towards the void above.

Hallways (//TODO ADD THE MARKER TYPEPATH)

Hallway connection points indicate that the connection space is a 3-wide hallway. These will connect to other hallway connection points and will not have anything placed where the marker is.

Rooms / Doorways (//TODO ADD THE MARKER TYPEPATH)

Doorway connection points are placed in a 1 wide space at the edge of the room. These will connect to other doorway connection points, and will have doors and firelocks automatically placed at the marker.

Mapping Requirements

The edge of the room must contain no structures / items, only turfs and connection points. (Do not put windows on the edge of rooms, as they could overlay with walls and other windows causing strange looking ruins).

//TODO ADD EXAMPLE IMAGES

Adding the ruin in code

To add your ruin room into the code, you need to create a room template datum. This is an object that holds important metadata about your room, allowing it to be spawned in game.

Create a new datum. The datum must start with /datum/map_template/ruin_part and then have a unique name on the end. For example

/datum/map_template/ruin_part/new_room

You can now override the following variables on the room:

- file_name (Required): Specifies the name of your map file. This must be exactly the same as whatever you called the map file, without the .dmm on the end. Exaple: "5x5_0_hallwaycross"

- weight (Required): The weight of your room. The higher this value, the more chance your room has of spawning. For best results, hallways should have a low value of around 1, while rooms should have a higher value between 2-4. If your room is somewhat special or contains good items, then it is better to put it with a lower weight.

- max_occurances: An optional variable that allows you to specify how any times the roo can appear at most.

- loot_room: This should be set to 'TRUE' for any maps that have decent loot in it. This marks the room as a loot room, of which only 1 can spawn per ruin.

Example:

/datum/map_template/ruin_part/chapel
	file_name = "13x17_chapel"
	weight = 3
	max_occurances = 1 //Multiple Nar'sie worshipping chaplain incidents would be wacky on one station.
/datum/map_template/ruin_part/corgasteroid
	file_name = "41x41_corgasteroid"
	weight = 1
	max_occurances = 1
/datum/map_template/ruin_part/medstorage
	file_name = "9x13_medstorage"
	weight = 3

Currently, all ruin map templates are stored in code/modules/shuttle/super_cruise/orbital_poi_generator/ruin_generator/ruin_part_types.dm

Contribution guides
General Development, Downloading the source code / hosting a server, Guide to git, Game resources category, Guide to changelogs
Database (MySQL) Setting up the database, MySQL
Coding Understanding SS13 code, SS13 for experienced programmers, Binary flags‎, Text Formatting, Guide to signals
Mapping Guide to mapping, Map merger, Exploration Ruins
Spriting Guide to spriting
Wiki Guide to contributing to the wiki, Wikicode