add server-side player

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Thiske
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Nov 21, 2020 11:53 am
Contact:

add server-side player

Post by Thiske »

There is currently no way to add extra players using mods.
I would like a way of adding extra players to the game witch are server-side, this means that they don't have a link to a real player and IP but for the rest they just behave like normal ones.
This would be extremely helpful for creating a multiplayer tas, so It can be ran without having to connect multiple real clients to the server.

ptx0
Filter Inserter
Filter Inserter
Posts: 497
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: add server-side player

Post by ptx0 »

Thiske wrote:
Sat Nov 21, 2020 12:15 pm
There is currently no way to add extra players using mods.
I would like a way of adding extra players to the game witch are server-side, this means that they don't have a link to a real player and IP but for the rest they just behave like normal ones.
This would be extremely helpful for creating a multiplayer tas, so It can be ran without having to connect multiple real clients to the server.
i know it's not what you're asking for but in the meanwhile you can disable authentication on the server and run multiple local clients to connect, and after that you can close them because the players are already created in the game save for you.

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

Re: add server-side player

Post by Rseding91 »

Any reason you wouldn't just use create-entity and create a character entity to control directly through script?
If you want to get ahold of me I'm almost always on Discord.

Thiske
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Nov 21, 2020 11:53 am
Contact:

Re: add server-side player

Post by Thiske »

Rseding91 wrote:
Sat Nov 21, 2020 5:09 pm
Any reason you wouldn't just use create-entity and create a character entity to control directly through script?
That would work but then I have to recreate the spawning algorithm of players in multiplayer.
How does that work?

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

Re: add server-side player

Post by Rseding91 »

Thiske wrote:
Sat Nov 21, 2020 5:30 pm
Rseding91 wrote:
Sat Nov 21, 2020 5:09 pm
Any reason you wouldn't just use create-entity and create a character entity to control directly through script?
That would work but then I have to recreate the spawning algorithm of players in multiplayer.
How does that work?
They spawn at the player forces spawn position https://lua-api.factorio.com/latest/Lua ... n_position
If you want to get ahold of me I'm almost always on Discord.

Thiske
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Nov 21, 2020 11:53 am
Contact:

Re: add server-side player

Post by Thiske »

I have tested it but created the entity on top of my character and not next to it like in multiplayer.
Also this would mean I have to recreate Luacontrol completely.
Where is this class stored in memory so I can copy most of the code?

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

Re: add server-side player

Post by Rseding91 »

Thiske wrote:
Sun Nov 22, 2020 5:49 pm
I have tested it but created the entity on top of my character and not next to it like in multiplayer.
Also this would mean I have to recreate Luacontrol completely.
Where is this class stored in memory so I can copy most of the code?
Uhhh; that's not something you can do. Also you don't need to since LuaEntity (which a character is) also uses LuaControl.

Also also; find-non-colliding-position (on LuaSurface) will get you a position that isn't on top of an existing player.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users