Corresponds RCon to mod rather than server?

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Corresponds RCon to mod rather than server?

Post by yagaodirac »

I just learnt how Clusterio mod works. Thank the devs for help.
I found the Rcon protocol to be very helpful. I wondered how to call functions provided by other code(like cpp) from lua inside my mod, but it turned out Rcon is the better approach.
But the trouble is that, for the game atm, Rcon corresponds to server rather than mod. So, any game can handle only one mod taking use of Clusterio like io mechanism(game.write_file and rcon) at one time.

If the game doesn't provide this, then modders have to make it. For now, it's not a problem yet. But it could be an issue when more people learn how to do Clusterio like io.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2249
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Corresponds RCon to mod rather than server?

Post by boskid »

So.. what is this suggestion about?

I see here quite a lot of misunderstanding of how MP works.
1/ mods will never be able to provide a native code to run:
- not portable (windows/linux/mac)
- not safe
- would need to follow the whole determinism logic, so it would not be allowed to interact with anything outside or those interactions would have to be deterministic to give the same result on all clients. State of that would need to be save-loaded for the purpose of clients to join and for saving the game so not only those functions would have to be attached, but also a way to store custom data inside of the game state would have to be provided.

2/ Using Rcon means your external logic does not need to be running on all the clients at the same time to keep the game state consistent. Server (to which your rcon client is connected to) acts as yet another actor in the game and is able to inject its own input actions. When you send a console command using rcon, it is sent to all the connected clients (and recorded for replay if enabled) so their game state can be updated consistently and not desync.

3/ There should be no limitations for how many rcon clients connect to the single server. If they send multiple commands this will work just as expected if they do not interfere with each other.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Corresponds RCon to mod rather than server?

Post by Qon »

This should probably be in the modding help section, right?

But please clearly state what you need help with. Also please tell us what your mod is supposed to do, it makes it much easier to help you. If you had told us that earlier I could have pointed you to the rcon API earlier and you wouldn't have been asking for the wrong kind of mod support 3 times.

Koub
Global Moderator
Global Moderator
Posts: 7203
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Corresponds RCon to mod rather than server?

Post by Koub »

Qon wrote:
Tue Oct 20, 2020 9:37 am
This should probably be in the modding help section, right?
I'm admit I lack the understanding to decide if the thread should be left here, or moved to Modding help, or Requests for modding API (which was my first move).
Koub - Please consider English is not my native language.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Corresponds RCon to mod rather than server?

Post by posila »

Koub wrote:
Tue Oct 20, 2020 11:35 am
I'm admit I lack the understanding to decide if the thread should be left here, or moved to Modding help, or Requests for modding API (which was my first move).
RCon is a protocol for remote console control for game servers, it is completely unrelated to modding, so I'd say it doesn't quite belong to modding related categories, even though OP's suggestion is for purpose of modding.

Post Reply

Return to “Ideas and Suggestions”