Page 1 of 1

Server-side only things

Posted: Sat Jun 05, 2021 3:25 am
by Northsoft
Hello, is there any way to limit some code to server-side only execution?
Examples:
— make a record to some server-side log file, with date and time if possible;
— store an object with server-side only storage, with some internal scores which shouldn't be disclosed to another players.

Re: Server-side only things

Posted: Sat Jun 05, 2021 4:26 am
by DaveMcW

Re: Server-side only things

Posted: Sat Jun 05, 2021 4:37 am
by Northsoft
Thanks, is there a way to add a date and time to output string?

Re: Server-side only things

Posted: Sat Jun 05, 2021 9:18 am
by eradicator
Northsoft wrote:
Sat Jun 05, 2021 4:37 am
Thanks, is there a way to add a date and time to output string?
Real time? Nope. Game.tick time is the only thing mods are allowed to know. You'd have to run a script on the server (outside factorio) that re-processes the output in real time.

Re: Server-side only things

Posted: Sat Jun 05, 2021 12:36 pm
by Northsoft
eradicator wrote:
Sat Jun 05, 2021 9:18 am
Real time? Nope. Game.tick time is the only thing mods are allowed to know. You'd have to run a script on the server (outside factorio) that re-processes the output in real time.
Thanks!