[MOD 0.16 - 1.1] Portals

Topics and discussion about specific mods
Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[MOD 0.16 - 1.1] Portals

Post by Bilka »

Image
Description
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.

Details
  • Name: Portals
  • Version: 0.7.1
  • Factorio-Version: 0.16 to 1.1 (0.14 and 0.15 available on github)
  • Description: Adds combustible lemons, a portal gun and portals. Each player has their own set of portals that can be used by all players.
  • License: MIT
  • First release: 2017-03-26
  • Download: Mod portal
  • Dependencies: base
  • Category: Transportation
  • Tags: Transportation
  • Changelog: https://mods.factorio.com/mod/Portals/changelog
  • Author: Bilka
Pictures
Custom events
Remote functions
Last edited by Bilka on Fri Dec 29, 2017 11:07 am, edited 8 times in total.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

teenkertoy
Inserter
Inserter
Posts: 37
Joined: Fri Nov 11, 2016 5:03 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by teenkertoy »

How has nobody thanked you for this? Portals in Factorio was a small revolution for me. Awesome work.

Two requests:

Could you make the portals a little larger? They are sometimes hard to walk through when I'm using lots of exoskeleton because my ability to walk to such a precise target is difficult at high speed.

Also, since 0.15.12 updated today I have the following error upon loading the game:

Untitled.jpg
Untitled.jpg (32.81 KiB) Viewed 13043 times

teenkertoy
Inserter
Inserter
Posts: 37
Joined: Fri Nov 11, 2016 5:03 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by teenkertoy »

I'm not sure if this is a good fix or not, but poked around in the mod file entities.lua and replaced two instances of "effectivity = 0" with "effectivity = 1". It seems to work, I hope this help.

Also, I was able to get the functionality I wanted by changing some of the X and Y values in control.lua. Don't worry about making changes to the mod just for me since I am happy now.

Thank you again for your work on this!

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

Thanks for the bug report, I'll release a fix today. Darn devs didn't document the change....

I have had problems with getting into the portal before, though I thought it had to do with how often I check if someone is on a portal. I find that making the portal bigger would be kind of weird because it currently fits to the size of the player. So I can only tweak the values you mentioned by very small amounts without making people teleport while they are not *really* on the portal.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

Alright, I fixed the bug, the newest version is currently version 0.2.3.

Currently known issues: The portal shows the researched lab research speed bonus. This willl be fixed by a major overhaul that will also add better sounds, propulsion gel, and repulsion gel.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

teenkertoy
Inserter
Inserter
Posts: 37
Joined: Fri Nov 11, 2016 5:03 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by teenkertoy »

You know companion cubes look an awful lot like chests, and the talking turrets look a lot like turrets, and the Glados potato looks a lot like a combinator, and Glados might look like a radar if you quint your eyes a bit.

Just saying.....

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

Alright, version 0.2.5 is done. I was sadly unable to add the gels in a way that wasn't incredibly unintuitive. I was however able to add combustible lemons. So have fun with the lemons that life gives you :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

teenkertoy
Inserter
Inserter
Posts: 37
Joined: Fri Nov 11, 2016 5:03 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by teenkertoy »

Heh, thank you again for your work on this. I really enjoy using the portals and they seem to fit into the Factorio play style so cleanly despite being completely against the lore. It's very strange, but very fun.

User avatar
FerrariMAF
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Fri May 26, 2017 11:39 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by FerrariMAF »

Hi Bilka!
Thanks for your mod. I love Portal (who does not?), And I'm also developing a mod, MSI, which adds missions to the game. Recently it includes secondary missions, and one of them is to rescue Wheatley, who will help to build the gun portal of his mod. So the mods are integrated. If you want to check the mod, here it is: https://mods.factorio.com/mods/MFerrari ... Industries

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Sander_Bouwhuis »

This mod is indispensable in my rail world playthrough. A request though : could we possibly have more than 1 portal?

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

Sander_Bouwhuis wrote:could we possibly have more than 1 portal?
No, that would make the mod more than op. A tip though: You can place the blue portal from the map view :)

If you are looking to just instantly teleport everywhere, you might want to have a look at the teleportation mod.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
FerrariMAF
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Fri May 26, 2017 11:39 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by FerrariMAF »

Bilka wrote:
Sander_Bouwhuis wrote:could we possibly have more than 1 portal?
No, that would make the mod more than op. A tip though: You can place the blue portal from the map view :)

If you are looking to just instantly teleport everywhere, you might want to have a look at the teleportation mod.
Hi Bilka. some may think placing portal from map view too OP. Have you thought about making this feature an optional setting ?

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

FerrariMAF wrote:Hi Bilka. some may think placing portal from map view too OP. Have you thought about making this feature an optional setting ?
No, since I can't. It's not intended, it's just a side effect of how the portals are placed. But it works. If you don't want it to work, don't use it :P
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
FerrariMAF
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Fri May 26, 2017 11:39 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by FerrariMAF »

Bilka wrote:
FerrariMAF wrote:Hi Bilka. some may think placing portal from map view too OP. Have you thought about making this feature an optional setting ?
No, since I can't. It's not intended, it's just a side effect of how the portals are placed. But it works. If you don't want it to work, don't use it :P
Well...

script.on_event(defines.events.on_built_entity, function(event)
if event.created_entity.type == "entity-ghost" and event.created_entity.ghost_name == "portal" then --is portal ghost-placed?
local new_position = event.created_entity.position
local player = game.players[event.player_index]
local max_dist = player.character.build_distance
local X = new_position.x
local Y = new_position.y
local pY=player.character.position.y
local pX=player.character.position.x
event.created_entity.destroy() --destroy portal which is just a placeholder entitiy
if X>=pX-max_dist and X<=pX+max_dist and Y>=pY-max_dist and Y<=pY+max_dist then
player.surface.create_entity{name = "portalgun-shoot-b", position = new_position}
build_portal(player, "portal-b", "portal-animation-b", new_position, global.b_portals, event.player_index)
end
elseif event.created_entity.name == "portal" then --is portal normally placed?
local new_position = event.created_entity.position
local player = game.players[event.player_index]
event.created_entity.destroy() --destroy portal which is just a placeholder entity
player.cursor_stack.set_stack{name="portal-gun", count = 1} --make player hold one portal gun, does not care if player already holds portal guns
player.surface.create_entity{name = "portalgun-shoot-a", position = new_position}
build_portal(player, "portal-a", "portal-animation-a", new_position, global.a_portals, event.player_index)
end
end)

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

I guess I'll have to update it then... Here I am, trying to be lazy, and you ruin it :P
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
FerrariMAF
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Fri May 26, 2017 11:39 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by FerrariMAF »

Bilka wrote:I guess I'll have to update it then... Here I am, trying to be lazy, and you ruin it :P
Hahahaha :D

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Sander_Bouwhuis »

Please don't change it, or have it as an option.

Can I only place the blue portal, or both?

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

Only the blue one. And yes, it will be a mod option, no worries.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Bilka »

Version 0.2.7 is out.

- Added setting to disable the ability to place blue portals from long distances.
- Cleaned up entity code
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: [MOD 0.14 + 0.15] Portals

Post by Sander_Bouwhuis »

Thanks for this wonderful mod. I use the 'blue portal from map' mode and it works great!

Post Reply

Return to “Mods”