Public Moongates
Moongate public moongates are a separate item flow from generic teleporters.
public_moongateopens a shared destination gump- destinations are authored once for the shard
- players double click the moongate and choose where to go
This is different from the existing moongate template, which is still used by spell-created moongates such as Gate Travel.
Authoring Model
The shared destination list lives in:
moongate_data/scripts/moongates/data.lua
That file returns grouped destinations. The shipped defaults mirror the classic ModernUO public network for Felucca and Ilshenar. For example:
local data = {}
function data.load()
return {
{
id = "felucca",
name = "Felucca",
destinations = {
{ id = "moonglow", name = "Moonglow", map = "felucca", x = 4467, y = 1283, z = 5 },
{ id = "britain", name = "Britain", map = "felucca", x = 1336, y = 1997, z = 5 }
}
}
}
end
return data
Each destination entry uses:
id: stable destination keyname: player-facing label in the gumpmap: map name or id-like value resolved through themapscript modulex,y,z: world coordinates
Item Template
The public gump flow uses the public_moongate template:
{
"id": "public_moongate",
"base_item": "teleporter",
"itemId": "0x0F6C",
"scriptId": "items.public_moongate"
}
Use this when you want a shard-wide moongate network.
Use teleporter or other single-destination teleporter templates when the item should go to exactly one configured location.
Runtime Behavior
On double click:
- the item validates that the player is next to the moongate
- the shared gump opens
- the player chooses a destination
- the selection is revalidated against the live item, player range, and current destination dataset
- the player teleports
The current V1 flow is intentionally simple:
- double click only
- no move-over activation
- no expansion-specific destination filtering
- no special criminal or young-player rules
Spawning the Network
To regenerate the full public network from the shared Lua dataset, use:
.spawn_public_moongates
This command:
- reads the current
moongate_data/scripts/moongates/data.lua - removes existing world
public_moongateitems - recreates one
public_moongateat every configured destination
This is the recommended way to refresh the network after editing the shared destination list.
Files Involved
moongate_data/scripts/items/public_moongate.luamoongate_data/scripts/gumps/moongates/public_moongate.luamoongate_data/scripts/gumps/moongates/constants.luamoongate_data/scripts/gumps/moongates/state.luamoongate_data/scripts/gumps/moongates/ui.luamoongate_data/scripts/gumps/moongates/render.luamoongate_data/scripts/moongates/data.lua
Recommended Workflow
When you change the shared destinations:
- update
moongate_data/scripts/moongates/data.lua - run
.spawn_public_moongates - verify the gump still opens and the destinations still travel correctly