Creating a Map Mod

From SkyCorp Global
Jump to: navigation, search

Maps in The Underworld describe the rooms the player can explore. A room is considered to be each node the player visits on the map. It can be an actual indoor room, outdoor area, or anywhere the player can go to.

Map Modding was introduced for build r26.

Recommended Steps

Trizbort Editor

Maps are edited in a tool called Trizbort. It is a free, open source utility that allows you to create and edit maps in a nice WYSIWYG interface.

You can download the latest version of Trizbort here. It is only available for Windows platforms, but emulates nicely in Wine for Mac & Linux.

Trizbort Primer

  • Using Trizbort, you can create a new map
  • From there, press R to create your desired rooms
  • You can drag them around into position
  • Double clicking on a room will allow you to view its properties, including renaming it
  • You can link rooms to each other by:
    • Clicking in the blank space on the map to ensure nothing is selected
    • Then hover over the first room
    • Begin dragging on the exit point from the first room
    • Then drag to the entrance point of the desired room
      • Note that only the North, West, East, and South entrance/exit points are currently supported.
  • Save the file as a Trizbort file
  • Convert the Trizbort file to Base 64 format using Notepad++ or another utility (same technique as you would use for converting compiled lua in the Entity tutorial series), and use this base 64 string as 'map' parameter in your map json.

Supported Room Settings

The Underworld only supports a limited number of Trizbort's settings:

  • Name - Will be displayed as the name of the room.
  • Description - Will be displayed as the description of the room.
  • Dark - If set, will be considered a public space.
  • Objects - A list of entity IDs that should be spawned in this room when the player arrives. One per line. Both built-in entities and custom entities are supported.

Spawning Custom Entities

If you wish to spawn a custom entity, monster, or clothes inside a room, you should make sure to load its mod before visiting the room it is to be spawned in. Otherwise, it will not spawn.

Map Linking

It is possible to link a map to another map. To do this, drag a room connection as per normal, but don't connect it to another room. This creates a hanging link.

You can double click the link and give it a name. In order to link to another map, name it "<map name>:<room id>". Don't forget to add the link from the other map too, if you're linking to a custom map. (Otherwise it will be one-way, which can be fine for some situations)

See the examples before for common destinations:

  • default:401 is the connection to the mod control room in the debug area. Generally it makes sense for some room in your map (maybe the starting room) to link here so the player has a route back to the usual game world.