Skip to content

HLP – help functions

Option functions accept "Gothic" (main game options) or "Mod" (mod options), without regard to case. Other level names are unsupported.

zDExt_Hlp_GetItem

Finds an item object by its instance name.

func C_Item zDExt_Hlp_GetItem(var int itemInstance) {};
  • itemInstance – instance name of the item
  • return – link to item object
Example usage
var C_Item torch; torch = zDExt_Hlp_GetItem(ItLsTorch);

zDExt_Hlp_IsValidVob

Checks if vob is in the game world.

func int zDExt_Hlp_IsValidVob(var string vobName) {};
  • vobName – name of the vob in the game world
  • return – TRUE or FALSE

zDExt_Hlp_GetNpcPlunderedByPlayer

Gets the NPC currently being plundered by the player. Returns a null instance when the game is not in plunder mode.

func C_NPC zDExt_Hlp_GetNpcPlunderedByPlayer() {};
  • return – instance of the NPC

zDExt_Hlp_IsOptionExists

Checks whether a specific option entry exists in the given options level.

func int zDExt_Hlp_IsOptionExists(var string level, var string section, var string option) {};
  • level – options level name (e.g. Gothic level)
  • section – section name inside the options file
  • option – option entry name
  • return – TRUE if the option entry exists, FALSE otherwise
Example usage
1
2
3
4
5
// Check if a specific option exists
if (zDExt_Hlp_IsOptionExists("Gothic", "ENGINE", "ZMAXFPS"))
{
    // Option exists
};

zDExt_Hlp_GetOptionIntValue

Reads an integer option value from the specified options level.

func int zDExt_Hlp_GetOptionIntValue(var string level, var string section, var string option, var int defaultValue) {};
  • level – options level name
  • section – section name
  • option – option name
  • defaultValue – value returned when option is missing
  • return – integer value of the option
Example usage
var int val; val = zDExt_Hlp_GetOptionIntValue("Gothic", "ENGINE", "ZMAXFPS", 60);

zDExt_Hlp_GetOptionFloatValue

Reads a floating-point option value from the specified options level.

func float zDExt_Hlp_GetOptionFloatValue(var string level, var string section, var string option, var float defaultValue) {};
  • level – options level name
  • section – section name
  • option – option name
  • defaultValue – value returned when option is missing
  • return – float value of the option
Example usage
var float val; val = zDExt_Hlp_GetOptionFloatValue("Gothic", "ENGINE", "zWindAngleVelo", 9.0);

zDExt_Hlp_GetOptionStringValue

Reads a string option value from the specified options level.

func string zDExt_Hlp_GetOptionStringValue(var string level, var string section, var string option, var string defaultValue) {};
  • level – options level name
  • section – section name
  • option – option name
  • defaultValue – value returned when option is missing
  • return – string value of the option
Example usage
var string str; str = zDExt_Hlp_GetOptionStringValue("Gothic", "ZMULTILOGUE", "LoggerLevelUnion", "INFO");

zDExt_Hlp_SetOptionIntValue

Writes an integer option value to the specified options level.

func void zDExt_Hlp_SetOptionIntValue(var string level, var string section, var string option, var int value) {};
  • level – options level name
  • section – section name
  • option – option name
  • value – integer value to write
Example usage
zDExt_Hlp_SetOptionIntValue("Gothic", "ENGINE", "ZMAXFPS", 60);

zDExt_Hlp_SetOptionFloatValue

Writes a floating-point option value to the specified options level.

func void zDExt_Hlp_SetOptionFloatValue(var string level, var string section, var string option, var float value) {};
  • level – options level name
  • section – section name
  • option – option name
  • value – float value to write
Example usage
zDExt_Hlp_SetOptionFloatValue("Gothic", "ENGINE", "zWindAngleVelo", 9.0);

zDExt_Hlp_SetOptionStringValue

Writes a string option value to the specified options level.

func void zDExt_Hlp_SetOptionStringValue(var string level, var string section, var string option, var string value) {};
  • level – options level name
  • section – section name
  • option – option name
  • value – string value to write
Example usage
zDExt_Hlp_SetOptionStringValue("Gothic", "ZMULTILOGUE", "LoggerLevelUnion", "WARN");

zDExt_Hlp_IsTestMode

Returns whether the game is currently running in developer/test mode.

func int zDExt_Hlp_IsTestMode() {};
  • return – TRUE if developer/test mode is active, FALSE otherwise
Example usage
1
2
3
4
if (zDExt_Hlp_IsTestMode())
{
    Print("Dev mode active");
};

zDExt_Hlp_StrCmp

Compares two strings without regard to case. This external is registered in the menu parser; use the engine Hlp_StrCmp function in Content scripts.

func int zDExt_Hlp_StrCmp(var string str1, var string str2) {};
  • str1, str2 – strings to compare
  • return – TRUE when the strings match after conversion to uppercase; otherwise FALSE
Example usage
1
2
3
4
if (zDExt_Hlp_StrCmp("Hero", "HERO"))
{
    zDExt_Menu_SetItemText("MENU_ITEM_PLAYERGUILD", "Necromancer", 0, TRUE);
};

zDExt_Hlp_GetPlayerStatus

Returns the current player status reported by the engine through GetHeroStatus(). Available on all four engines.

func int zDExt_Hlp_GetPlayerStatus() {};
  • return – integer value of the engine oHEROSTATUS enumeration
Example usage
var int playerStatus;
playerStatus = zDExt_Hlp_GetPlayerStatus();