Skip to content

Custom Gates & Gatepacks

Pheotis edited this page Dec 30, 2023 · 11 revisions

Gatefiles

A gate format is a collection of blocks that, when built in-game, constitutes a valid portal frame.
You can create as many gate formats as you want; they are to be are stored in .gate files within your plugins/Stargate/gates/ folder.

.gate files must be laid out a specific way; the first lines are used for material information and the last lines are used for material layout.
There are four default files in the gates folder; each shows a particular aspect of the gate system, as will be explored below.

Basic Gates

This example uses nether.gate

# Gate Materials
portal-open=NETHER_PORTAL
portal-closed=AIR
X=OBSIDIAN
-=OBSIDIAN

# Gate Layout
 XX
X..X
-..-
X*.X
 XX

Gate Materials

Tip

A list of common traversable materials is maintained here.

The Gate Materials section accepts any entry from this list, and has four components:

  1. The portal-open material (aka the traversable material).
  2. The portal-closed material (aka the iris material).
  3. The X material (aka the frame material).
  4. The - material (aka the control surface material).

Note that:
The traversable material is shown (placed) whenever the gate is active (on).
The iris material is shown (placed) whenever the gate is inactive (off).

The X and material constitutes the gate's frame; the structure built by the player.
The - material is notable for being a control surface -- the location upon which a sign and/or button will be placed.
Note that all portals require a minimum of two control surfaces.

Gate Layout

The Gate Layout follows one line of blank space after the Gate Materials.
It represents the pattern that players will need to build to construct this portal.

Each character represents a block:
Gate layout visualisation.

Note the presence of two types of special blocks: . and *.
These blocks are contained within the portal's aperture (i.e. the space in the middle of the frame).
Depending on the portal's state, they will be replaced with either the iris (portal-closed) or traversable (portal-open) material.

A . is used to represent a normal aperture block; a * is used to represent the aperture block from which players will be teleported out from when they exit the portal.

Visualization

As such, per the above, a constructed nether.gate portal looks like this:
completed nether.gate

Underwater Gates

This example uses water.gate

portal-open=KELP_PLANT
portal-closed=WATER
X=SEA_LANTERN
-=SEA_LANTERN

 XX 
X..X
-..-
X*.X
 XX 

Water as an Iris Material

By default, portals do not function properly when waterlogged (built underwater)

Whenever the iris material (portal-closed) is WATER, the gate is treated as an Underwater gate.
Underwater gates are functionally similar to normal gates, but can only be constructed underwater.

Underwater portal activator materials (heretofore buttons) will be replaced with wall coral.
The activator's functionality remains the same insofar as it must be right-clicked to turn the portal on.

Visualization

Underwater Gate

Gate Shapes, Sizes, and Material Types

This example uses wool.gate

portal-open=WATER
portal-closed=AIR
X=#WOOL
-=#WOOL

XXXXX
X...X
-...-
X.*.X
XXXXX

Gate shapes and sizes.

Gates are not limited to the shape of a standard nether portal; in fact, they can be tens of thousands of blocks in size.
In this case, a simple 5x5 square has been used as a gate.

Tags as a material.

In addition to material enumerations (such as OBSIDIAN), SG can also handle tags (such as WOOL).
All tags must be prefaced with a hashtag (#), as in #WOOL.

Any block that is included within the tag can be used to construct the portal.
For example, see the visualization provided below:

Visualization

Wool Gate

Advanced Gates

This example uses end.gate

portal-open=END_GATEWAY
portal-closed=AIR
-=IRON_BLOCK,QUARTZ_PILLAR
S=QUARTZ_STAIRS
H=QUARTZ_SLAB
F=SMOOTH_QUARTZ,#WOOL

HFFH
S..S
-..-
S*.S
HFFH

Gate Frame Materials

Gates frames are not limited to the X character; in fact, any letter can be used to represent any block!
Furthermore, the control surface does not need to be the same as any of the frame materials.

Material Arrays

Valid materials and/or tags can be stringed together through the use of commas.
In such cases, any material included within the list (or within a tag included in the list) is considered valid.

For example, see the visualization provided below:

Visualization

Wool Gate

Gatepacks

On occasion, a server will publish their gate library for free as a gate-pack.

To install a gate pack, simply download the applicable zip from the list below and extract it into your gates folder.

Warning

The existing gatepack format is informal, poorly defined, and was inherited from legacy.
A complete overhaul is planned in the future, but until then, this feature may not be all that useful.

Name Publisher Link
SlabSuite The LockedCraft Legacy Organisation Link

Want to submit a gatepack to the community?
Upload your gates to a github repo, link to it on the stargate discord, and ping the core devs!