Welcome to the 4th chapter on dungeon making. If you've followed this guide from the start, you should have the basic blueprints ready. This chapter will focus on plugs and sockets. Those link your blueprints together.
When you enter the metaforge (/mf) and look at your building inventory, you will see the plugs and sockets pre-loaded.
As a general rule:
- Each blueprint can only have one plug, but it can have multiple sockets.
- Each used socket-type needs matching plugs in other blueprints.
- One never ever uses the red socket (socket 0).
- Sockets and plugs of the same color will occupy one voxel when the dungeon generates and result in an empty voxel.
To keep track of open sockets and closing plugs we will make a list. Its easier to keep track of them from the beginning, but feel free to skip the list.
|socket number||used||plug number||used|
|1: orange||1: orange|
|2: yellow||2: yellow|
|3: green||3: green|
|4: blue||4: blue|
|5: purple||5: purple|
|6: hot pink||6: hot pink|
|7: cyan||7: cyan|
|8: light green||8: light green|
|9: white||9: white|
|10: black||10: black|
|11: mustard||11: mustard|
|12: clay||12: clay|
|13: brown||13: brown|
|14: fuschia||14: fuschia|
|15: peach||15: peach|
|16: pink||16: pink|
In this chapter we are going to use a very simple house as an example for plugs and sockets.
The house consits of just 5 parts: Base (guidehouse_base), Blue wall (guidehouse_wall), Green wall with a door (guidehouse_door), Orange wall with windows (guidehouse_window) and Purple roof (guidehouse_roof).
It is important to make sure that no pieces share same name. It also helps to name pieces for what they are.
We have exported our house parts and qb files and converted them to blueprints. Now we are going to work with these blueprints.
The red plug functions as the connection to the generated land. Worlds of Trove generate Red sockets throughout the terrain for dungeons to plug in. Thus, your dungeon must have a red Plug to be able to spawn in the world.
Red plug must be located at ground level in the very center of your dungeons x and y axis. The height of the Red plug is the ground level.
In our tutorial house we are going to place a red plug on the Base. In a sample dungeon, we place the red plug in the base (
guidehouse_base.blueprint) of the building. Orientation of the red plug doesn't really matter, as the game will rotate Red Sockets in worlds by itself to randomize rotation of your dungeons.
Dont forget to use /save command in Metaforge to save changes you make to blueprints.
All the other pieces usually connect to the base of a dungeon, meaning the base piece is going to have a Red plug and a Socket or two of other colors. Keep in mind, a blueprint can have multiple Sockets but only one Plug!
In tutorial house we have 3 pieces that connect to the base:
guidehouse_roof.blueprint. This means that Base must contain sockets for each of them to plug in. For the tutorial purposes we are going to use Green, Blue and Orange sockets. We want a plain Blue wall to be able to spawn in two places, so we place two Blue sockets. However we only want one door and one window, so we place one Green and one Orange sockets.
Orientation of all plugs and sockets matters! On the base our sockets are facing outwards, which means plugs would be on the 'inner' side of the pieces we want to plug in.
When dungeon assembles, Plug and Socket of same collor connect and occupy same voxel! They also become invisible and players can pass right through them.
On the image above a Red voxel indicates a position of a plug and a socket, most right image shows how those two pieces would look when connected together.
Dont forget to save!
Each socket must have same colored plug to fill it. Else a dungeon will not assemble. There can be multiple blueprints that use same color plug, that would mean all of them would try to fill same socket. There can also be few of the same colored sockets that require a blueprint with that colored plug, that would mean a blueprint would need to spawn more than once to fill all of them.
Now that we have a base with sockets, we need to make sure we have blueprints with plugs of same colors.
We are going to add:
- Green Plug to the
- Blue Plug to the
- Orange Plug to the
Now all the sockets we have placed have plugs to fill them, hurray! But wait, we still have a roof to go :)
Repeat step 2 and step 3 until all blueprints are connected to each other. No placed socket should be left without a guaranteed plug!
guidehouse_roof.blueprint has to be connected to one of the walls. We pick the
guidehouse_door.blueprint and add a Purple socket for the roof to it, then we add a Purple plug to the roof.
And done! In the next chapter we will create a .dungeon file, that will assemble all our .blueprint pieces together!
Back in the day we only had 8 plugs and sockets to use, this has been expanded in a patch to 16. So, in theory, you should not be able to run out of plug and socket types. If you are still running out you have two options:
- Check if you really need all the plugs and sockets (if it doesn't add variation, you can just attach pieces together in one blueprint).
- Extend options with the use of blockers (Advanced topic, might be discussed in a different chapter. Greatly increases generation time, generally not advised).
Some common issues with plugs and sockets are placement related. Those will be made visible after the next chapters. Issues might be:
- Sockets or plugs placed in the wrong position making a room go out of boundaries upon attempted dungeon generation
- Some sockets or plugs miss matching socket or plug of the same color
Its usually a quick thing to fix these, but let's proceed to the next chapter first.
- 2018-09-25: Written
- 2019-03-05: Added images and published