Setting functions

class SettingFunctions

Public Static Functions

static void SetDifficulty(unsigned short pid, int difficulty)

Set the difficulty for a player.

This changes the difficulty for that player in the server memory, but does not by itself send a packet.

Parameters
  • pid – The player ID.

  • difficulty – The difficulty.

Returns

void

static void SetEnforcedLogLevel(unsigned short pid, int enforcedLogLevel)

Set the client log level enforced for a player.

This changes the enforced log level for that player in the server memory, but does not by itself send a packet.

Enforcing a certain log level is necessary to prevent players from learning information from their console window that they are otherwise unable to obtain, such as the locations of other players.

If you do not wish to enforce a log level, simply set enforcedLogLevel to -1

Parameters
  • pid – The player ID.

  • enforcedLogLevel – The enforced log level.

Returns

void

static void SetPhysicsFramerate(unsigned short pid, double physicsFramerate)

Set the physics framerate for a player.

This changes the physics framerate for that player in the server memory, but does not by itself send a packet.

Parameters
  • pid – The player ID.

  • physicsFramerate – The physics framerate.

Returns

void

static void SetConsoleAllowed(unsigned short pid, bool state)

Set whether the console is allowed for a player.

This changes the console permission for that player in the server memory, but does not by itself send a packet.

Parameters
  • pid – The player ID.

  • state – The console permission state.

Returns

void

static void SetBedRestAllowed(unsigned short pid, bool state)

Set whether resting in beds is allowed for a player.

This changes the resting permission for that player in the server memory, but does not by itself send a packet.

Parameters
  • pid – The player ID.

  • state – The resting permission state.

Returns

void

static void SetWildernessRestAllowed(unsigned short pid, bool state)

Set whether resting in the wilderness is allowed for a player.

This changes the resting permission for that player in the server memory, but does not by itself send a packet.

Parameters
  • pid – The player ID.

  • state – The resting permission state.

Returns

void

static void SetWaitAllowed(unsigned short pid, bool state)

Set whether waiting is allowed for a player.

This changes the waiting permission for that player in the server memory, but does not by itself send a packet.

Parameters
  • pid – The player ID.

  • state – The waiting permission state.

Returns

void

static void SetGameSettingValue(unsigned short pid, const char *setting, const char *value)

Set value for a game setting.

This overrides the setting value set in OpenMW Launcher. Only applies to the Game category.

Parameters
  • pid – The player ID.

  • setting – Name of a setting in the Game category

  • value – Value of the setting (as a string)

Returns

void

static void ClearGameSettingValues(unsigned short pid)

Clear the Game setting values stored for a player.

Clear any changes done by SetGameSettingValue()

Parameters

pid – The player ID.

Returns

void

static void SetVRSettingValue(unsigned short pid, const char *setting, const char *value)

Set value for a VR setting.

This overrides the setting value set in OpenMW Launcher. Only applies to the VR category.

Parameters
  • pid – The player ID.

  • setting – Name of a setting in the VR category

  • value – Value of the setting (as a string)

Returns

void

static void ClearVRSettingValues(unsigned short pid)

Clear the VR setting values stored for a player.

Clear any changes done by SetVRSettingValue()

Parameters

pid – The player ID.

Returns

void

static void SendSettings(unsigned short pid, bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a PlayerSettings packet to the player affected by it.

Parameters

pid – The player ID to send it to.

Returns

void