Server-side only things

Place to get help with not working mods / modding interface.
Post Reply
Northsoft
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 31, 2021 11:20 am
Contact:

Server-side only things

Post 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.


Northsoft
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 31, 2021 11:20 am
Contact:

Re: Server-side only things

Post by Northsoft »

Thanks, is there a way to add a date and time to output string?

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Server-side only things

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Northsoft
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon May 31, 2021 11:20 am
Contact:

Re: Server-side only things

Post 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!

Post Reply

Return to “Modding help”