About Portals
From Factorio Mod PortalAdds combustible lemons, a portal gun and portals. Each player has their own set of portals that can be used by all players.
Adds portals that can teleport players (and only players!). Build the portals using the portal gun: Left click for the orange portal, SHIFT+ Left click (ghost build) for the blue portal. Every player can have one set of portals which can be distinguished using the number next to the portal. Adds combustible lemons that work similiar to cluster grenades, just with fire. This mod can also be found on the forums.
Custom events
on_player_teleported_event:
- When a player teleports using a portal.
- Contains:
- player_index = Index of the player that is teleporting
- entrance_portal = LuaEntity, the portal the player is teleporting from
- target_portal = LuaEntity, the portal the player is teleporting to
on_player_placed_portal_event:
- When a player places a portal using the portal gun.
- Contains:
- portal = LuaEntity, the portal that was placed
- player_index = Index of the player that placed the portal, which is the player the portal belongs to
Example usage
script.on_load(function() script.on_event(remote.call("portals", "get_on_player_teleported_event"), function(event) game.print("Woosh!") game.print(game.players[event.player_index].name .. " teleported from " .. serpent.line(event.entrance_portal.position) .. " to " .. serpent.line(event.target_portal.position)) end)
script.on_event(remote.call("portals", "get_on_player_placed_portal_event"), function(event) game.print(game.players[event.player_index].name .. " created " .. event.portal.name .. " at " .. serpent.line(event.portal.position)) end) end)
script.on_init(function() script.on_event(remote.call("portals", "get_on_player_teleported_event"), function(event) game.print("Woosh!") game.print(game.players[event.player_index].name .. " teleported from " .. serpent.line(event.entrance_portal.position) .. " to " .. serpent.line(event.target_portal.position)) end)
script.on_event(remote.call("portals", "get_on_player_placed_portal_event"), function(event) game.print(game.players[event.player_index].name .. " created " .. event.portal.name .. " at " .. serpent.line(event.portal.position)) end) end)
Remote functions
build_portal_a: function(player, surface, position)
- Build an orange portal.
- Parameters:
- position: Position of the new portal
- surface: LuaSurface, the surface of the new portal
- player: LuaPlayer that the portal belongs to. This player can't have more than one pair, build_portal will delete any excess portals
build_portal_b: function(player, surface, position)
- Build a blue portal.
- Parameters:
- position: Position of the new portal
- surface: LuaSurface, the surface of the new portal
- player: LuaPlayer that the portal belongs to. This player can't have more than one pair, build_portal will delete any excess portals
destroy_portal: function(entity)
- Destroy the given entity if it is a portal (also destroys label + animation).
- Parameter:
- entity: LuaEntity, the portal to destroy
disable_long_distance_placing: function(bool)
- Change whether the blue portal can be placed from a long distance.
- Parameter:
- bool: Boolean, if this is true the player can never place from a long distance, if it is false, the player can place from a long distance depending on the mod option
Example usage in the console
/c remote.call("portals", "build_portal_b", game.player, game.player.surface, game.player.position) --place at current player position /c remote.call("portals", "destroy_portal", game.player.selected) --destroy currently selected portal /c remote.call("portals", "disable_long_distance_placing", true) --disable long distance placing
Highlights
From source dataGame versions
Built for Factorio 1.1.
Footprint
Rated a light load on a server.
License
Published under MIT.
Portals on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Factorio servers. We download it from Factorio Mod Portal, place it, and restart the server.
- Server side
- Required on the server
- Server load
- light
- Smallest plan we suggest
- Factorio — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 0.7.1, released 2022-01-27
Run Portals on a Factorio server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogWeapons, items & crafting
New weapons, gear, items and the recipes to make them.
Runs on your server
From source side supportFactorio Mod Portal lists Portals as required on the server. Check its Factorio Mod Portal page to see whether players need it too.
Compatibility
- Game
- Factorio
- Runs on
- Serverrequired on the server
- Game versions
- 1.1
Verified at the source
- ✓Factorio Mod PortalOfficial listing, checked 2026-10-08Open ↗
- ✓AuthorBilka, as published on Factorio Mod Portal
- ✓LicenseMITFree
