LuaEntity teleport

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

LuaEntity teleport

Post by Simcra »

Currently, the LuaEntity teleport function only works for players when used to teleport an entity to another surface, the workaround is to create an entity of the same type on the other surface, copy data from the old entity and then delete the old entity. This creates a large portion of extra work that must be done for the entity to be "teleported". For example, each item in an inventory of an entity must be added to the teleported entity, the more items an entity contains, the more work that must be done for it to be "teleported". In addition to the extra work required, it is also entirely possible that some data may not be able to be copied at all or other mods break due to having stored references to the old entities which are destroyed.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13217
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity teleport

Post by Rseding91 »

Simcra wrote:This creates a large portion of extra work that must be done for the entity to be "teleported".
Yes, that's the same and more work we'd need to do to make teleporting all entities between surfaces work which is why I didn't do it when making just the player teleportable between surfaces. Some of that is planned but not for 0.13 because it would introduce so many bugs for the little gains.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: LuaEntity teleport

Post by darkfrei »

Rseding91 wrote:
Simcra wrote:This creates a large portion of extra work that must be done for the entity to be "teleported".
Yes, that's the same and more work we'd need to do to make teleporting all entities between surfaces work which is why I didn't do it when making just the player teleportable between surfaces. Some of that is planned but not for 0.13 because it would introduce so many bugs for the little gains.
But for 0.15?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13217
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity teleport

Post by Rseding91 »

darkfrei wrote:
Rseding91 wrote:
Simcra wrote:This creates a large portion of extra work that must be done for the entity to be "teleported".
Yes, that's the same and more work we'd need to do to make teleporting all entities between surfaces work which is why I didn't do it when making just the player teleportable between surfaces. Some of that is planned but not for 0.13 because it would introduce so many bugs for the little gains.
But for 0.15?
Do you have specific entities in mind? I could do a few but I'm not going to attempt to do them all as it would take too much time for very little gains.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: LuaEntity teleport

Post by Earendel »

+ Player/Character, Car, Unit, and the train sections.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13217
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity teleport

Post by Rseding91 »

Earendel wrote:+ Player/Character, Car, Unit, and the train sections.
The car sounds reasonable. The unit entity just isn't going to happen and trains can't be teleported anyway so between surfaces isn't going to happen.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: LuaEntity teleport

Post by darkfrei »

Rseding91 wrote:
Earendel wrote:+ Player/Character, Car, Unit, and the train sections.
The car sounds reasonable. The unit entity just isn't going to happen and trains can't be teleported anyway so between surfaces isn't going to happen.
It means, we can't build some "underground" railway stations like in factorissimo mod?

Post Reply

Return to “Modding interface requests”