Script Commands

Post here if you need help setting up your server, etc.
Post Reply
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Script Commands

Post by LOVER$BOY »

Hey!

I was going through the updated settings_dedicated.cfg file and found this:

Code: Select all

############################################################################################
#
# Scripting
#
############################################################################################

# Scripts are fed the ladderlog on stdin (and need to read it) and their
# stdout output is interpreted as console input on the server. Environment
# variables are set so the script knows all about the server configuration at
# time of launch.

# SPAWN_SCRIPT         Spawns an external script from a scripts/ subdirectory on the data path.
# RESPAWN_SCRIPT       Spawns an external script from a scripts/ subdirectory on the data path if no already running instance is found.
# FORCE_RESPAWN_SCRIPT Spawns an external script from a scripts/ subdirectory on the data path after killing the other possibly running instance.
# KILL_SCRIPT          Kills a script. Argument must match the SPAWN_SCRIPT argument.

# Should safety checks be done on script commands? Very much recommended to leave this on.
CHECK_SCRIPT 1

LADDERLOG_GAME_TIME_INTERVAL -1     # write a line to ladderlog.txt indicating how "old" the current game is at most every n seconds. Negative values disable this feature.
WAIT_FOR_EXTERNAL_SCRIPT 0          # set to 1 if you want the server to sleep between rounds until it is set back to 0 or
WAIT_FOR_EXTERNAL_SCRIPT_TIMEOUT 3  # seconds
I tried to use those commands in the armagetronad_dedicated.exe but they seemed to not exist.

So is this future commands or just commands that will be implemented later?
Image
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Script Commands

Post by Z-Man »

They're only available on Unix. Windows lacks the mechanisms to implement them conveniently. I'll clarify that in the file.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Script Commands

Post by LOVER$BOY »

Oh ok.

Yes that would be helpful if you stated what OS they would work best in :)
Image
nelg

Re: Script Commands

Post by nelg »

ZMAN: whats unix? is it linux? The commands do work on linux so i assume so but i wanna be positive
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Script Commands

Post by Z-Man »

Oh god please do a little research before posting stupid things (it's nice that you're trying to be helpful in the other threads, but it sadly really stops at trying), especially before bumping month old threads. Yes, Linux is a kind of Unix. The source doesn't care much which kind of Unix it runs on, it also works on Solaris and the various BSDs, at least in theory.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Script Commands

Post by LOVER$BOY »

unix is a platform that once existed before linux did nelg.

Am I right Z-Man?

My knowledge about linux OS is kind of limited.
Image
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Script Commands

Post by Z-Man »

Yes. To elaborate: While originally, Unix was a single, unique OS, today it usually stands for a loose set of standards and design principles. We say Linux is (a) Unix(-like OS) because it complies with those. The original Unix OS technically still exists, of course, but it's practically not used any more.
Post Reply