Add join/leave/... actions in game chat output

Suggestions that have been added to the game.

Moderator: ickputzdirwech

User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Add join/leave/... actions in game chat output

Post by mickael9 »

Currently, the game will issue lines on the standard output such as :

Code: Select all

[CHAT] mickael9: hello
It would be nice if other game-related actions were also added to the same ouptput, eg:

Code: Select all

[JOIN] mickael9 joined the game
[CHAT] mickael9: hello
[KICK] baduy was kicked by mickael
[DEATH] mickael9 died
[LEAVE] mickael9 left the game
Of course, the format is only a suggestion but having different tags for different actions makes the output easily parsable by an external program.
User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by mickael9 »

Please consider this, at least for the join/leave part, especially since the username info doesn't appear in the server logs anymore in 0.14
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by Bisa »

joining in chorus - while polling the /players command is possible it would still be nice to know exactly who and when someone joined based on the logs
Hosting a factorio server? Take a look at this || init script ||.
zopieux
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jul 11, 2016 4:41 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by zopieux »

Any update on this? Many community projects would rely on this feature if it was there!
Rseding91
Factorio Staff
Factorio Staff
Posts: 14286
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by Rseding91 »

But why? There's already the pause, the download bar on the top left, and the huge log file output when someone joins a game.
If you want to get ahold of me I'm almost always on Discord.
User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by mickael9 »

You can't infer from the logs, say, that "mickael9 joined the game" because the user name of the connecting player doesn't appear in them.
This used to be possible before the MP rewrite. All we need is a log line like "mickael9 connected with peer id 1" (anything works as long as it's parseable).
Polling the /players commands would work for that purpose but you couldn't reliably associate it to a peer id to detect other actions than join/leave if multiple players join between two polls

Nothing appears in the server log when a player dies (verbose mode enabled).

Kick appears as a disconnect in the log, no info on who issued the kick (or whether it's a kick and not a disconnect).

Readable output of those events (as described in my original post) could also be useful to, say, an admin running the game in a screen/tmux session to follow what is going on in the server

It would also be useful in logs as well (to audit a player's actions for instance), and by the way, chat output is written to stdout but not in the logs, I believe this should be logged too.

To sum it up, log contains basically nothing "useful" apart from "someone joined/left the game"
Standard output adds chat/commad output (that IMHO ought to be logged), and that's it
User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by mickael9 »

I'd also like to mention that having the chat output in log is more important that I anticipated because currently there is NO way to record it from the Windows build because its standard output is attached to the console and can't be redirected or piped.

Eg, if you run "Factorio.exe --start-server map.zip 2>nul >nul <nul" the output still shows up (and you can still interact with it).
You also can't even log the chat by doing ">logfile.txt" or have an external program read it. Basically you have a "view only" chat log.

How hard can it be to just write the chat in the log file (possibly with an option to do so) ?
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by Bisa »

mickael9 wrote:How hard can it be to just write the chat in the log file (possibly with an option to do so) ?
doubt it's a question of "difficulty", I suspect it's more of a priority thing - there's probably more stuff going on that are more important than this - bump nonetheless :)
Hosting a factorio server? Take a look at this || init script ||.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by Oxyd »

OK, I added [JOIN] and [LEAVE], and I added an option to log these types of messages – those that don't go to the main log – to a separate log file for your server automation pleasures.
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by Bisa »

cool, thnx m8
Hosting a factorio server? Take a look at this || init script ||.
User avatar
redlabel
Fast Inserter
Fast Inserter
Posts: 145
Joined: Mon Feb 06, 2017 8:50 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by redlabel »

Oxyd wrote:OK, I added [JOIN] and [LEAVE], and I added an option to log these types of messages – those that don't go to the main log – to a separate log file for your server automation pleasures.

Would it also be possible to have an option (perhaps advanced F4 options?) to view timestamps in chat messages?
✧COMFY FACTORIO✧ - Home of Biter Battles, Fish Defense, Chronotrain.. And More!
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by ssilk »

Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by noliVe »

Oxyd wrote:OK, I added [JOIN] and [LEAVE], and I added an option to log these types of messages – those that don't go to the main log – to a separate log file for your server automation pleasures.
LOVE YOU MAN!!!
User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by mickael9 »

I see JOIN, LEAVE, KICK, BAN, COMMAND and WARNING have been implemented in 0.15, thanks a lot! :D

Are there any others? The only thing missing would be a DEATH action then this would be perfect!

I also didn't see any way for mods to write stuff to the new console log, this would be a nice addition.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by ssilk »

All changes are in the Changelog. That is the reference. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: Add join/leave/... actions in game chat output

Post by mickael9 »

You're right, only JOIN and LEAVE were added, it looks like KICK, BAN, COMMAND and WARNING already exist in 0.14.23 (I wonder when those were first added)
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add join/leave/... actions in game chat output

Post by ssilk »

Version: 0.13.0
Date: 27. 06. 2016.
...
- Added /ban /kick /bans /admins and /admin commands.

And there is a help command:

Version: 0.14.13
Date: 05. 10. 2016
...
- Added tab-complete parameters logic to the commands: config, color, and help.....
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Post Reply

Return to “Implemented Suggestions”