Admin Command Auto Mod?

Hi all, its been some time since i works on any Ark mods.

But have a question that i thought about.
Its it possible to make a mod that automatic runs a Admin Console Command like “SetGlobalPause <IsPaused>” or “Slomo <SpeedMult>” event time there have not been any player activity on the server. Or if the chat or log has not been used for like an hour or something?

Disclaimer not a expert here so take what I’m saying here as only advice on what to look into. Perhaps someone else could elaborate more or give you a better idea.

Wouldn’t it be a bit redundant to run a console command if there is no one present to receive the command? You could just call a script that contains a function to do what you want, it wouldn’t need to be called via console as far as I am aware.

If you are still wanting to do a console command, perhaps for debug purposes, as far as the Unreal Engine 4 is concerned yes. Not sure if the ADK complicates that matter or not. If you are using a custom map you can make a BP with a customEvent node that can be called from console with “ce myCustomEvent” where “myCustomEvent” is the BP name.

Where it gets more complicated is if you are wanting to run it on the server since there wouldn’t be any players connected to run the command on.
Creating the BP or class would be trivial (there already is a setGamePaused node. You could even turn it into a function to call) the question is how do you interact with the server to run it.
I’m not experienced enough to tell you for certain how to do this, but I believe to get it to run via server automatically it would need to be part of the gameMode class. FYI different maps and modes use different gamemodes so it could get a bit complicated.

This documentation may be relevant:

Hi @Nanobot
Thx will look it ti what you linked to :slight_smile:

The thing is. There are no server option to pause game when no one is online. And can see on google alot of people have asked for it. As it is now most things go static and slow down if dinos ets. don’t move.
But things like spoil time and growth still run. So like to make a mod that slow it all down or pause it all when there is no activity on the server.
If that ca be done with a normal script. its even better?

Something I just found out - ARK already supports running custom scripts and commands. You can use the command “ScriptCommand <CommandString>” to call scripts or
“GameCommand <TheCommand>” to run commands. Not sure what the distinction is between scripts and any other commands. Both however need to be part of a custom game mode.
SoTF makes use of some additional commands so looking at the SoTF game mode might give you a clue as to how to go about implementing your own.