Prefabs

Prefabs are useful to quickly throw maps together by copy-pasting pre-designed structures.

../../_images/capture_001.png

Things to keep in mind when using prefabs:

  1. You can only copy-paste in the same Eureka instance.
  2. You have to merge common vertices and sectors after pasting.

Exporting your prefab map to an unused slot in your game wad allows quicker switching.

Downloads

Use prefabs.wad as a base for adding your own designs.

../../_images/capture_0021.png

Merging Vertices

Copying a prefab into void space, like a door prefab, needs vertex merging.

Select the door prefab in sector mode, press control-c:

../../_images/capture_0031.png

Open the target map, position the mouse cursor where you want the prefab and paste with control-v:

../../_images/capture_0042.png

Enter vertex edit mode, use the RMB to link the room with the door vertices:

../../_images/capture_0052.png

If you optionally want to get rid of the extra sector in between, select the one room vertex, then the matching door vertex (this order matters) and merge them:

../../_images/capture_0062.png

Do the same for the other vertices (selecting the room vertex first):

../../_images/capture_0072.png

This completes your door:

../../_images/capture_0082.png

Merging Sectors

The process of pasting sectors into sectors requires another kind of merging. The stairs prefab is one such example.

Select the prefab sectors. You might need to use shift LMB to avoid dragging sectors during selection:

../../_images/capture_0092.png

Copy, open your map, and paste. Ensure your mouse cursor is positioned where you want the prefab pasted:

../../_images/capture_0102.png

Switching to 3D view shows us artefacts, the prefab needs merging first:

../../_images/capture_0112.png

To merge, deselect everything (`), hover to highlight the room sector and press space:

../../_images/capture_0122.png

The stairs prefab is now merged with your room sector:

../../_images/capture_013.png