Avatars


This mod allows players to create and remotely control Avatars. Avatars act like players, with a few minor exceptions. The mod also includes a few custom entities to control and create the Avatars.

7 months ago
0.13 - 1.1
11.8K

b Crash when controlling avatar that was disconnected while passing over a large geometric structure from Space Exploration

1 year, 9 months ago
(updated 1 year, 9 months ago)

To reproduce, control an avatar and disconnect while driving a spidertron and passing over a large structure found in another planet. When trying to control that avatar again this error will happen:

The mod Avatars (0.5.24) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Avatars::on_gui_click (ID 1)
LuaEntity belongs to surface Agneya (index 15) but a LuaEntity belonging to surface Vault 1176.14 (index 30) was expected.
stack traceback:
        [C]: in function '__newindex'
        __Avatars__/scripts/avatar_control.lua:76: in function 'bodySwap'
        __Avatars__/scripts/avatar_control.lua:140: in function 'gainAvatarControl'
        __Avatars__/control.lua:92: in function <__Avatars__/control.lua:65>
1 year, 9 months ago

Can you provide a save for this error? I'm not sure how to find a natural one of those structures in Space Exploration and spawning one in manually might not have the same effect.

This one doesn't make sense to me in this context, as that code should be teleporting the player to the "Vault" surface right before this line.

1 year, 9 months ago
(updated 1 year, 9 months ago)

Finding such structure is very easy in a sandbox, start a new game with Space Exploration and use /cheat twice, then use /se-launch-satellite twice to enable the universe explorer (keys are U and Y) and a couple more times to make planets or moons appear.

Generally the first planet closest to the star, or some moon of Nauvis, will have that structure and you should find it as soon as you view that surface.

When you walk over them they take you to the inside of the structure, that appears to be the reason for the crash after disconnecting while hovering over it, this mod must be remembering the first (upper) surface right before needing to operate on the character entity again but whose surface suddenly changed.

1 year, 9 months ago

Ok, thank you, I'll give that a try when I get a chance.

1 year, 8 months ago

Can you verify this is still a problem? I've been trying to reproduce and I more often get stuck in the middle of the structure or shunted to the outer edge, but never see this crash. When my avatar gets moved to the edge as soon as I move with it I get teleported inside, but never on it's own before I do anything.

You do mean the pyramid looking structure with biters and an "ancient container" inside, correct?

1 year, 3 months ago

Yes, that's the structure I am talking about.

I just tried and I can't get it to crash like before, must be due to some update of Space Exploration or Factorio itself, I can still make it fail in a different way.

If you try disconnecting when passing over the structure in such a way that it will leave you stuck when reconnecting, it will only reconnect if you are doing it from the same surface, when I try from a different planet I get:

Congratulations! You've done something I didn't think of. Sadly, you can't control this avatar, at this time.
9 months ago

Ok, been busy the last few months, but finally tracked this down and fixed it. It was due to SE interrupting my teleport across surfaces. This is fixed in 0.5.26, and should work with any previously bricked Avatars. Though, they may be stuck in the pyramid. If you have a jet pack or spidertron nearby then you can get out.

If you're curious for the why this was failing:

For Factorio engine reasons, I need to transfer the player to a temporary player, then teleport that across surfaces, then give them control of the Avatar. That teleport is to the same location as the Avatar, so SE's moves the temporary player into the pyramid before I finish my control change. That error message you saw was if the temporary player is still on the wrong surface (the pyramid internal in this case).

New response