HLP – help functions¶
zDExt_Hlp_GetItem¶
Finds an item object by its instance name.
itemInstance– instance name of the itemreturn– link to item object
zDExt_Hlp_IsValidVob¶
Checks if vob is in the game world.
object– any instancereturn–TRUEorFALSE
zDExt_Hlp_GetNpcPlunderedByPlayer¶
Gets the NPC is currently plundered by the player.
return– instance of the NPC
zDExt_Hlp_IsOptionExists¶
Checks whether an options section or a specific option entry exists in a given options level.
level– options level name (e.g.Gothiclevel)section– section name inside the options fileoption– option name; if empty, the function checks for section existencereturn–TRUEif the section or option exists,FALSEotherwise
Example usage
// Check if a section exists
if (zDExt_Hlp_IsOptionExists("Gothic", "ENGINE", ""))
{
// Section exists
};
// 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 namesection– section nameoption– option namedefaultValue– value returned when option is missingreturn– integer value of the option
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 namesection– section nameoption– option namedefaultValue– value returned when option is missingreturn– 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 namesection– section nameoption– option namedefaultValue– value returned when option is missingreturn– 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 namesection– section nameoption– option namevalue– integer value to write
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 namesection– section nameoption– option namevalue– float value to write
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 namesection– section nameoption– option namevalue– string value to write
zDExt_Hlp_IsTestMode¶
Returns whether the game is currently running in developer/test mode.
return–TRUEif developer/test mode is active,FALSEotherwise