styyx-util 1.0
Utility Header for SKSE Plugin development
Loading...
Searching...
No Matches
StyyxUtil::MiscUtil Struct Reference

#include <st-misc.h>

Static Public Member Functions

static RE::Setting * GetGameSetting (const char *a_setting)
 Helper function to get Game settings by name.
template<class T>
static void ChangeGameSetting (RE::Setting *setting, const T &value)
 Helper template to easily set a game setting to a value.
template<class T>
static void SetGMST (const char *gmst, const T &value)
 Set a game setting (by name) to a specific value.
static bool IsModLoaded (const std::string_view &mod_name)
 Check if a mod is loaded by its full file name.
static RE::TESObjectWEAP * GetUnarmedWeapon ()
 Get the unarmed weapon pointer.
static void RunConsoleCommandOnRef (RE::TESObjectREFR *a_target, const std::string_view a_command)
 Run console command on reference.
static const char * EntryPointToString (RE::BGSEntryPoint::ENTRY_POINT entryPoint)
 Get the entry point name.
static const char * WeaponTypeToString (const RE::WEAPON_TYPE a_type)
 Get the name of a weapon type.
static const char * AttackStateToString (RE::ATTACK_STATE_ENUM state)
 Get the name of a specified attack state.

Member Function Documentation

◆ ChangeGameSetting()

template<class T>
void StyyxUtil::MiscUtil::ChangeGameSetting ( RE::Setting * setting,
const T & value )
inlinestatic

Helper template to easily set a game setting to a value.

Template Parameters
Tcan be bool, int, float, uint, string
Parameters
settingThe setting you want to change
valueThe value you want to set the setting to
Here is the caller graph for this function:

◆ GetGameSetting()

RE::Setting * StyyxUtil::MiscUtil::GetGameSetting ( const char * a_setting)
inlinestatic

Helper function to get Game settings by name.

Parameters
a_settingGame setting name
Returns
The setting related to the setting name
Here is the caller graph for this function:

◆ GetUnarmedWeapon()

RE::TESObjectWEAP * StyyxUtil::MiscUtil::GetUnarmedWeapon ( )
inlinestatic

Get the unarmed weapon pointer.

Returns
The unarmed weapon the game uses

◆ IsModLoaded()

bool StyyxUtil::MiscUtil::IsModLoaded ( const std::string_view & mod_name)
inlinestatic

Check if a mod is loaded by its full file name.

Parameters
mod_nameThe full name of the mod including extension
Returns
true if the mod is loaded
Note
Pass the full filename including extension, e.g. "Skyrim.esm" not "Skyrim".
Works with .esl, .esp and .esm
Example
if (MiscUtil::IsModLoaded("Skyrim.esm")) { ... }
static bool IsModLoaded(const std::string_view &mod_name)
Check if a mod is loaded by its full file name.
Definition st-misc.h:94

◆ RunConsoleCommandOnRef()

void StyyxUtil::MiscUtil::RunConsoleCommandOnRef ( RE::TESObjectREFR * a_target,
const std::string_view a_command )
inlinestatic

Run console command on reference.

Parameters
a_targetThe reference to run the command on
a_commandThe command string
Here is the caller graph for this function:

◆ SetGMST()

template<class T>
void StyyxUtil::MiscUtil::SetGMST ( const char * gmst,
const T & value )
inlinestatic

Set a game setting (by name) to a specific value.

Template Parameters
Tcan be bool, int, float, uint or string
Parameters
gmstName of the game setting you want to change
valueValue to set the setting to
Example
MiscUtil::SetGMST("iAVDhmsLevelUp", 5);
static void SetGMST(const char *gmst, const T &value)
Set a game setting (by name) to a specific value.
Definition st-misc.h:81
Here is the call graph for this function:

The documentation for this struct was generated from the following file: