diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/ai.md b/docs/zengin/scripts/extenders/zparserextender/externals/ai.md index 7c193b377a..af3cb5f55f 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/ai.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/ai.md @@ -4,176 +4,189 @@ title: AI functions # AI - functions for working with AI Functions to work with the new [`C_Trigger`](../classes/c_trigger.md) class and NPC's AI queue. - -## AI_CallScript -Adds a `funcName` function call to the AI queue - -```dae -func void AI_CallScript(var string funcName, - var C_NPC slf, - var C_NPC oth) {}; -``` - -- `funcName` - name of the function to be called -- `slf` - will be inserted into global `self` instance -- `oth` - will be inserted into global `other` instance - -## AI_startTriggerScript -Creates a trigger script that calls function `funcName` once every `interval` in milliseconds - -```dae -func C_Trigger AI_startTriggerScript(var string funcName, var int interval) {}; -``` - -- `funcName` - name of the function to be called -- `interval` - call period in milliseconds -- `return` - created C_Trigger instance - -## AI_startTriggerScriptEx -Extended version call - Creates a trigger script, that calls function `funcName` once every `interval` in milliseconds also updates the `self`, `other` and `victim` global instances based on `slf`, `oth` and `vct` parameters respectively - -```dae -func C_Trigger AI_startTriggerScriptEx( var string funcName, - var int interval, - var C_NPC slf, - var C_NPC oth, - var C_NPC vct) {}; -``` - -- `funcName` - name of the function to be called -- `interval` - call period in milliseconds -- `slf` - will be inserted into global `self` instance -- `oth` - will be inserted into global `other` instance -- `vct` - will be inserted into global `victim` instance -- `return` - created C_Trigger instance - -## AI_GetTriggerByID -Returns a C_Trigger instance from the array of active triggers by the array index `ID` - -```dae -func C_Trigger AI_GetTriggerByID(var int ID) {}; -``` - -- `ID` - array id -- `return` - active C_Trigger instance - -## AI_GetTriggersNum -Returns the number of active C_Trigger scripts - -```dae -func int AI_GetTriggersNum() {}; -``` - -- `return` - number of active C_Trigger scripts - -## AI_GetTriggerNPC -Returns the npc associated with the C_Trigger script based on the ID -selfID = 0; -otherID = 1; -victimID = 2; - -```dae -func C_NPC AI_GetTriggerNPC(var C_Trigger trigger, var int npcID) {}; -``` - -- `trigger` - C_Trigger script -- `npcID` - NPC id -- `return` - active C_Trigger instance - -## AI_GetTriggerFunc -Returns the function associated with the specified C_Trigger - -```dae -func func AI_GetTriggerFunc(var C_Trigger trigger) {}; -``` - -- `trigger` - C_Trigger script -- `return` - trigger function - -## AI_GetTriggerFuncName -Returns the function name of a function associated with the specified C_Trigger - -```dae -func string AI_GetTriggerFuncName(var C_Trigger trigger) {}; -``` - -- `trigger` - C_Trigger script -- `return` - active C_Trigger instance - -## Ai_GetNextTriggerByFunc -Returns the next trigger in the active trigger array based on the trigger function, -starting on the `startTrigger` trigger - -```dae -func C_Trigger Ai_GetNextTriggerByFunc(var C_Trigger startTrigger, var func function) {}; -``` - -- `startTrigger` - C_Trigger script to start the search from -- `function` - function to be matched -- `return` - C_Trigger instance - -## Ai_GetNextTriggerByFuncName -Returns the next trigger in the active trigger array based on the trigger function -name, starting on the `startTrigger` trigger - -```dae -func C_Trigger Ai_GetNextTriggerByFuncName(var C_Trigger startTrigger, var string functionName) {}; -``` - -- `startTrigger` - C_Trigger script to start the search from -- `functionName` - name of a function to be matched -- `return` - C_Trigger instance - -## Ai_GetNextTriggerBySelf -Returns the next trigger in the active trigger array based on the `self` trigger -parameter, starting on the `startTrigger` instance set in the trigger - -```dae -func C_Trigger Ai_GetNextTriggerBySelf(var C_Trigger startTrigger, var C_NPC self) {}; -``` - -- `startTrigger` - C_Trigger script to start the search from -- `self` - C_NPC instance -- `return` - C_Trigger instance - -## Ai_GetNextTriggerByOther -Returns the next trigger in the active trigger array based on the `other` trigger -parameter, starting on the `startTrigger` instance set in the trigger - -```dae -func C_Trigger Ai_GetNextTriggerByOther(var C_Trigger startTrigger, var C_NPC other) {}; -``` - -- `startTrigger` - C_Trigger script to start the search from -- `other` - C_NPC instance -- `return` - C_Trigger instance - -## Ai_GetNextTriggerByVictim -Returns the next trigger in the active trigger array based on the `victim` trigger -parameter, starting on the `startTrigger` instance set in the trigger - -```dae -func C_Trigger Ai_GetNextTriggerByVictim( var C_Trigger startTrigger, var C_NPC victim ) {}; -``` - -- `startTrigger` - C_Trigger script to start the search from -- `victim` - C_NPC instance -- `return` - C_Trigger instance - -## Ai_GetNextTriggerByNPCs -Returns the next trigger in the active trigger array based on all the NPCs -set in the trigger script `self`, `other` and `victim`, -starting on the `startTrigger` instance set in the trigger - -```dae -func c_trigger Ai_GetNextTriggerByNPCs( var C_Trigger startTrigger, - var C_NPC self, - var C_NPC other, - var C_NPC victim) {}; -``` - -- `startTrigger` - C_Trigger script to start the search from -- `self` - self C_NPC instance -- `other` - other C_NPC instance -- `victim` - victim C_NPC instance -- `return` - C_Trigger instance +## `AI_CallScript` +!!! function "`AI_CallScript`" + Adds a `funcName` function call to the AI queue + + ```dae + func void AI_CallScript(var string funcName, + var C_NPC slf, + var C_NPC oth) {}; + ``` + + - `funcName` - name of the function to be called + - `slf` - will be inserted into global `self` instance + - `oth` - will be inserted into global `other` instance + +## `AI_startTriggerScript` +!!! function "`AI_startTriggerScript`" + Creates a trigger script that calls function `funcName` once every `interval` in milliseconds + + ```dae + func C_Trigger AI_startTriggerScript(var string funcName, var int interval) {}; + ``` + + - `funcName` - name of the function to be called + - `interval` - call period in milliseconds + - `return` - created C_Trigger instance + +## `AI_startTriggerScriptEx` +!!! function "`AI_startTriggerScriptEx`" + Extended version call - Creates a trigger script, that calls function `funcName` once every `interval` in milliseconds also updates the `self`, `other` and `victim` global instances based on `slf`, `oth` and `vct` parameters respectively + + ```dae + func C_Trigger AI_startTriggerScriptEx( var string funcName, + var int interval, + var C_NPC slf, + var C_NPC oth, + var C_NPC vct) {}; + ``` + + - `funcName` - name of the function to be called + - `interval` - call period in milliseconds + - `slf` - will be inserted into global `self` instance + - `oth` - will be inserted into global `other` instance + - `vct` - will be inserted into global `victim` instance + - `return` - created C_Trigger instance + +## `AI_GetTriggerByID` +!!! function "`AI_GetTriggerByID`" + Returns a C_Trigger instance from the array of active triggers by the array index `ID` + + ```dae + func C_Trigger AI_GetTriggerByID(var int ID) {}; + ``` + + - `ID` - array id + - `return` - active C_Trigger instance + +## `AI_GetTriggersNum` +!!! function "`AI_GetTriggersNum`" + Returns the number of active C_Trigger scripts + + ```dae + func int AI_GetTriggersNum() {}; + ``` + + - `return` - number of active C_Trigger scripts + +## `AI_GetTriggerNPC` +!!! function "`AI_GetTriggerNPC`" + Returns the npc associated with the C_Trigger script based on the ID + selfID = 0; + otherID = 1; + victimID = 2; + + ```dae + func C_NPC AI_GetTriggerNPC(var C_Trigger trigger, var int npcID) {}; + ``` + + - `trigger` - C_Trigger script + - `npcID` - NPC id + - `return` - active C_Trigger instance + +## `AI_GetTriggerFunc` +!!! function "`AI_GetTriggerFunc`" + Returns the function associated with the specified C_Trigger + + ```dae + func func AI_GetTriggerFunc(var C_Trigger trigger) {}; + ``` + + - `trigger` - C_Trigger script + - `return` - trigger function + +## `AI_GetTriggerFuncName` +!!! function "`AI_GetTriggerFuncName`" + Returns the function name of a function associated with the specified C_Trigger + + ```dae + func string AI_GetTriggerFuncName(var C_Trigger trigger) {}; + ``` + + - `trigger` - C_Trigger script + - `return` - active C_Trigger instance + +## `Ai_GetNextTriggerByFunc` +!!! function "`Ai_GetNextTriggerByFunc`" + Returns the next trigger in the active trigger array based on the trigger function, + starting on the `startTrigger` trigger + + ```dae + func C_Trigger Ai_GetNextTriggerByFunc(var C_Trigger startTrigger, var func function) {}; + ``` + + - `startTrigger` - C_Trigger script to start the search from + - `function` - function to be matched + - `return` - C_Trigger instance + +## `Ai_GetNextTriggerByFuncName` +!!! function "`Ai_GetNextTriggerByFuncName`" + Returns the next trigger in the active trigger array based on the trigger function + name, starting on the `startTrigger` trigger + + ```dae + func C_Trigger Ai_GetNextTriggerByFuncName(var C_Trigger startTrigger, var string functionName) {}; + ``` + + - `startTrigger` - C_Trigger script to start the search from + - `functionName` - name of a function to be matched + - `return` - C_Trigger instance + +## `Ai_GetNextTriggerBySelf` +!!! function "`Ai_GetNextTriggerBySelf`" + Returns the next trigger in the active trigger array based on the `self` trigger + parameter, starting on the `startTrigger` instance set in the trigger + + ```dae + func C_Trigger Ai_GetNextTriggerBySelf(var C_Trigger startTrigger, var C_NPC self) {}; + ``` + + - `startTrigger` - C_Trigger script to start the search from + - `self` - C_NPC instance + - `return` - C_Trigger instance + +## `Ai_GetNextTriggerByOther` +!!! function "`Ai_GetNextTriggerByOther`" + Returns the next trigger in the active trigger array based on the `other` trigger + parameter, starting on the `startTrigger` instance set in the trigger + + ```dae + func C_Trigger Ai_GetNextTriggerByOther(var C_Trigger startTrigger, var C_NPC other) {}; + ``` + + - `startTrigger` - C_Trigger script to start the search from + - `other` - C_NPC instance + - `return` - C_Trigger instance + +## `Ai_GetNextTriggerByVictim` +!!! function "`Ai_GetNextTriggerByVictim`" + Returns the next trigger in the active trigger array based on the `victim` trigger + parameter, starting on the `startTrigger` instance set in the trigger + + ```dae + func C_Trigger Ai_GetNextTriggerByVictim( var C_Trigger startTrigger, var C_NPC victim ) {}; + ``` + + - `startTrigger` - C_Trigger script to start the search from + - `victim` - C_NPC instance + - `return` - C_Trigger instance + +## `Ai_GetNextTriggerByNPCs` +!!! function "`Ai_GetNextTriggerByNPCs`" + Returns the next trigger in the active trigger array based on all the NPCs + set in the trigger script `self`, `other` and `victim`, + starting on the `startTrigger` instance set in the trigger + + ```dae + func c_trigger Ai_GetNextTriggerByNPCs( var C_Trigger startTrigger, + var C_NPC self, + var C_NPC other, + var C_NPC victim) {}; + ``` + + - `startTrigger` - C_Trigger script to start the search from + - `self` - self C_NPC instance + - `other` - other C_NPC instance + - `victim` - victim C_NPC instance + - `return` - C_Trigger instance diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/cast.md b/docs/zengin/scripts/extenders/zparserextender/externals/cast.md index 33bb6d3738..06a35cf067 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/cast.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/cast.md @@ -4,113 +4,124 @@ title: CAST functions # CAST - data type conversion functions External functions for data type conversion and pointer casting. -## Cast_PointerToInstance -Converts memory address (pointer) to an instance +## `Cast_PointerToInstance` +!!! function "`Cast_PointerToInstance`" + Converts memory address (pointer) to an instance -```dae -func instance Cast_PointerToInstance(var int address) {}; -``` + ```dae + func instance Cast_PointerToInstance(var int address) {}; + ``` -- `address` - object pointer -- `return` - instance of the object + - `address` - object pointer + - `return` - instance of the object -## Cast_InstanceToPointer -Converts instance to a memory address (pointer) +## `Cast_InstanceToPointer` +!!! function "`Cast_InstanceToPointer`" + Converts instance to a memory address (pointer) -```dae -func int Cast_InstanceToPointer( var instance object) {}; -``` + ```dae + func int Cast_InstanceToPointer( var instance object) {}; + ``` -- `object` - object instance -- `return` - memory address (pointer) of the object + - `object` - object instance + - `return` - memory address (pointer) of the object -## Cast_PointerToNpc -Casts memory address (pointer) to an NPC +## `Cast_PointerToNpc` +!!! function "`Cast_PointerToNpc`" + Casts memory address (pointer) to an NPC -```dae -func C_NPC Cast_PointerToNpc( var int address) {}; -``` + ```dae + func C_NPC Cast_PointerToNpc( var int address) {}; + ``` -- `address` - npc pointer -- `return` - NPC instance + - `address` - npc pointer + - `return` - NPC instance -## Cast_PointerToItem -Casts memory address (pointer) to an Item +## `Cast_PointerToItem` +!!! function "`Cast_PointerToItem`" + Casts memory address (pointer) to an Item -```dae -func C_ITEM Cast_PointerToItem( var int address) {}; -``` + ```dae + func C_ITEM Cast_PointerToItem( var int address) {}; + ``` -- `address` - item pointer -- `return` - Item instance + - `address` - item pointer + - `return` - Item instance -## Cast_InstanceIsNpc -Checks whether object is an NPC +## `Cast_InstanceIsNpc` +!!! function "`Cast_InstanceIsNpc`" + Checks whether object is an NPC -```dae -func int Cast_InstanceIsNpc( var instance object) {}; -``` + ```dae + func int Cast_InstanceIsNpc( var instance object) {}; + ``` -- `object` - object to check -- `return` - `TRUE` or `FALSE` + - `object` - object to check + - `return` - `TRUE` or `FALSE` -## Cast_InstanceIsItem -Checks whether object is an Item +## `Cast_InstanceIsItem` +!!! function "`Cast_InstanceIsItem`" + Checks whether object is an Item -```dae -func int Cast_InstanceIsItem( var instance object) {}; -``` + ```dae + func int Cast_InstanceIsItem( var instance object) {}; + ``` -- `object` - object to check -- `return` - `TRUE` or `FALSE` + - `object` - object to check + - `return` - `TRUE` or `FALSE` -## Cast_InstanceIsMob -Checks whether object is an MOB +## `Cast_InstanceIsMob` +!!! function "`Cast_InstanceIsMob`" + Checks whether object is an MOB -```dae -func int Cast_InstanceIsMob( var instance object) {}; -``` + ```dae + func int Cast_InstanceIsMob( var instance object) {}; + ``` -- `object` - object to check -- `return` - `TRUE` or `FALSE` + - `object` - object to check + - `return` - `TRUE` or `FALSE` -## Cast_GetInstanceIndex -Returns symbolID of the object, returns -1 when not found +## `Cast_GetInstanceIndex` +!!! function "`Cast_GetInstanceIndex`" + Returns symbolID of the object, returns -1 when not found -```dae -func int Cast_GetInstanceIndex( var instance object) {}; -``` + ```dae + func int Cast_GetInstanceIndex( var instance object) {}; + ``` -- `object` - instance of an object -- `return` - symbol table index, -1 when not found + - `object` - instance of an object + - `return` - symbol table index, -1 when not found -## Cast_GetClassID -Returns the class identifier of a class by its name +## `Cast_GetClassID` +!!! function "`Cast_GetClassID`" + Returns the class identifier of a class by its name -```dae -func int Cast_GetClassID( var string className ) {}; -``` + ```dae + func int Cast_GetClassID( var string className ) {}; + ``` -- `className` - name of the class -- `return` - class identifier + - `className` - name of the class + - `return` - class identifier -## Cast_GetVobClassID -Returns class identifier of the zCObject vob class +## `Cast_GetVobClassID` +!!! function "`Cast_GetVobClassID`" + Returns class identifier of the zCObject vob class -```dae -func int Cast_GetVobClassID( var instance object ) {}; -``` + ```dae + func int Cast_GetVobClassID( var instance object ) {}; + ``` -- `object` - object instance -- `return` - class zCObject identifier + - `object` - object instance + - `return` - class zCObject identifier -## Cast_CheckVobClassID -Checks if the classId class is the parent class of the object +## `Cast_CheckVobClassID` +!!! function "`Cast_CheckVobClassID`" + Checks if the classId class is the parent class of the object -```dae -func int Cast_CheckVobClassID( var int classId, var instance object ) {}; -``` + ```dae + func int Cast_CheckVobClassID( var int classId, var instance object ) {}; + ``` -- `classId` - class identifier, from Cast_GetClassID function -- `object` - object instance -- `return` - class zCObject identifier \ No newline at end of file + - `classId` - class identifier, from Cast_GetClassID function + - `object` - object instance + - `return` - class zCObject identifier diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/hlp.md b/docs/zengin/scripts/extenders/zparserextender/externals/hlp.md index cb7337851c..979aa4dd18 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/hlp.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/hlp.md @@ -4,255 +4,275 @@ title: HLP functions # HLP - help functions Helper functions generally used for safety checks, to get specific information from the engine or to interface with the configuration `.ini` files. -## Hlp_HasFocusVob -Returns `TRUE`, if a specified NPC has a Vob in focus +## `Hlp_HasFocusVob` +!!! function "`Hlp_HasFocusVob`" + Returns `TRUE`, if a specified NPC has a Vob in focus -```dae -func int Hlp_HasFocusVob( var C_NPC npc ) {}; -``` + ```dae + func int Hlp_HasFocusVob( var C_NPC npc ) {}; + ``` -- `npc` - NPC -- `return` - `TRUE` if npc has a focus Vob, `FALSE` if it does not + - `npc` - NPC + - `return` - `TRUE` if npc has a focus Vob, `FALSE` if it does not -## Hlp_GetFocusVob -Returns NPC's focus Vob +## `Hlp_GetFocusVob` +!!! function "`Hlp_GetFocusVob`" + Returns NPC's focus Vob -```dae -func instance Hlp_GetFocusVob( var C_NPC npc ) {}; -``` + ```dae + func instance Hlp_GetFocusVob( var C_NPC npc ) {}; + ``` -- `npc` - NPC -- `return` - focus vob + - `npc` - NPC + - `return` - focus vob -## Hlp_GetFocusVobName -Returns the name of NPC's focus vob +## `Hlp_GetFocusVobName` +!!! function "`Hlp_GetFocusVobName`" + Returns the name of NPC's focus vob -```dae -func string Hlp_GetFocusVobName( var C_NPC npc ) {}; -``` + ```dae + func string Hlp_GetFocusVobName( var C_NPC npc ) {}; + ``` -- `npc` - NPC -- `return` - focus vob name + - `npc` - NPC + - `return` - focus vob name -## Hlp_GetStringLength -Returns the length of a specified string +## `Hlp_GetStringLength` +!!! function "`Hlp_GetStringLength`" + Returns the length of a specified string -```dae -func int Hlp_GetStringLength( var string str ) {}; -``` + ```dae + func int Hlp_GetStringLength( var string str ) {}; + ``` -- `return` - length of `str` + - `return` - length of `str` -## IsNAN -Checks whether floating point number is valid +## `IsNAN` +!!! function "`IsNAN`" + Checks whether floating point number is valid -```dae -func int IsNAN( var float value ) {}; -``` + ```dae + func int IsNAN( var float value ) {}; + ``` -- `return` - `TRUE` if `value` is NaN, `FALSE` if `value` is a valid floating point number + - `return` - `TRUE` if `value` is NaN, `FALSE` if `value` is a valid floating point number -## Hlp_KeyToggled -Checks whether `key` is toggled +## `Hlp_KeyToggled` +!!! function "`Hlp_KeyToggled`" + Checks whether `key` is toggled -```dae -func int Hlp_KeyToggled( var int key ) {}; -``` + ```dae + func int Hlp_KeyToggled( var int key ) {}; + ``` -- `key` - key code -- `return` - `TRUE` if key is toggled, `FALSE` if key is not toggled + - `key` - key code + - `return` - `TRUE` if key is toggled, `FALSE` if key is not toggled -## Hlp_KeyPressed -Checks whether `key` is pressed +## `Hlp_KeyPressed` +!!! function "`Hlp_KeyPressed`" + Checks whether `key` is pressed -```dae -func int Hlp_KeyPressed( var int key ) {}; -``` + ```dae + func int Hlp_KeyPressed( var int key ) {}; + ``` -- `key` - key code -- `return` - `TRUE` if key is pressed, `FALSE` if key is not pressed + - `key` - key code + - `return` - `TRUE` if key is pressed, `FALSE` if key is not pressed -## Hlp_LogicalKeyToggled -Checks whether logical `key` is toggled +## `Hlp_LogicalKeyToggled` +!!! function "`Hlp_LogicalKeyToggled`" + Checks whether logical `key` is toggled -```dae -func int Hlp_LogicalKeyToggled( var int key ) {}; -``` + ```dae + func int Hlp_LogicalKeyToggled( var int key ) {}; + ``` -- `key` - key code -- `return` - `TRUE` if key is toggled, `FALSE` if key is not toggled + - `key` - key code + - `return` - `TRUE` if key is toggled, `FALSE` if key is not toggled -## Hlp_GameOnPause -Checks whether the game is paused +## `Hlp_GameOnPause` +!!! function "`Hlp_GameOnPause`" + Checks whether the game is paused -```dae -func int Hlp_GameOnPause() {}; -``` + ```dae + func int Hlp_GameOnPause() {}; + ``` -- `return` - `TRUE` if the game is paused, `FALSE` if the game is not paused + - `return` - `TRUE` if the game is paused, `FALSE` if the game is not paused -## Hlp_MessageBox -Opens a message box with a specified message +## `Hlp_MessageBox` +!!! function "`Hlp_MessageBox`" + Opens a message box with a specified message -```dae -func void Hlp_MessageBox( var string message ) {}; -``` + ```dae + func void Hlp_MessageBox( var string message ) {}; + ``` -- `message` - message to be printed + - `message` - message to be printed -## Hlp_PrintConsole -Prints a message to the Union debug console +## `Hlp_PrintConsole` +!!! function "`Hlp_PrintConsole`" + Prints a message to the Union debug console -```dae -func void Hlp_PrintConsole(var string message) {}; -``` + ```dae + func void Hlp_PrintConsole(var string message) {}; + ``` -- `message` - message to be printed + - `message` - message to be printed -## Hlp_OptionIsExists -Checks whether the `entry` in `section` in `.ini` file `optName` exists +## `Hlp_OptionIsExists` +!!! function "`Hlp_OptionIsExists`" + Checks whether the `entry` in `section` in `.ini` file `optName` exists -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func int Hlp_OptionIsExists(var string optName, var string section, var string entry) {}; -``` + ```dae + func int Hlp_OptionIsExists(var string optName, var string section, var string entry) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[GAME]` -- `entry` - one setting entry like `playLogoVideos` -- `return` - `TRUE` if the option exists, `FALSE` if the option does not exist + - `optName` - the `.ini` file + - `section` - settings section like `[GAME]` + - `entry` - one setting entry like `playLogoVideos` + - `return` - `TRUE` if the option exists, `FALSE` if the option does not exist -## Hlp_ReadOptionInt -Read an integer value from specified `.ini` file, section and entry. +## `Hlp_ReadOptionInt` +!!! function "`Hlp_ReadOptionInt`" + Read an integer value from specified `.ini` file, section and entry. -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func int Hlp_ReadOptionInt(var string optName, var string section, var string entry, var int default) {}; -``` + ```dae + func int Hlp_ReadOptionInt(var string optName, var string section, var string entry, var int default) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[GAME]` -- `entry` - one setting entry like `playLogoVideos` -- `default` - default value - if the value is empty -- `return` - the option value + - `optName` - the `.ini` file + - `section` - settings section like `[GAME]` + - `entry` - one setting entry like `playLogoVideos` + - `default` - default value - if the value is empty + - `return` - the option value -## Hlp_ReadOptionFloat -Read a floating point value from specified `.ini` file, section and entry. +## `Hlp_ReadOptionFloat` + !!! function "`Hlp_ReadOptionFloat`" + Read a floating point value from specified `.ini` file, section and entry. -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func float Hlp_ReadOptionFloat(var string optName, var string section, var string entry, var float default) {}; -``` + ```dae + func float Hlp_ReadOptionFloat(var string optName, var string section, var string entry, var float default) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[INTERFACE]` -- `entry` - one setting entry like `scale` -- `default` - default value - if the value is empty -- `return` - the option value + - `optName` - the `.ini` file + - `section` - settings section like `[INTERFACE]` + - `entry` - one setting entry like `scale` + - `default` - default value - if the value is empty + - `return` - the option value -## Hlp_ReadOptionString -Read a string value from specified `.ini` file, section and entry. +## `Hlp_ReadOptionString` +!!! function "`Hlp_ReadOptionString`" + Read a string value from specified `.ini` file, section and entry. -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func string Hlp_ReadOptionString(var string optName, var string section, var string entry, var string default) {}; -``` + ```dae + func string Hlp_ReadOptionString(var string optName, var string section, var string entry, var string default) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[INTERFACE]` -- `entry` - one setting entry like `scale` -- `default` - default value - if the value is empty -- `return` - the option value + - `optName` - the `.ini` file + - `section` - settings section like `[INTERFACE]` + - `entry` - one setting entry like `scale` + - `default` - default value - if the value is empty + - `return` - the option value -## Hlp_WriteOptionInt -Writes an integer value to specified `.ini` file, section and entry. +## `Hlp_WriteOptionInt` +!!! function "`Hlp_WriteOptionInt`" + Writes an integer value to specified `.ini` file, section and entry. -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func void Hlp_WriteOptionInt(var string optName, var string section, var string entry, var int value) {}; -``` + ```dae + func void Hlp_WriteOptionInt(var string optName, var string section, var string entry, var int value) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[INTERFACE]` -- `entry` - one setting entry like `scale` -- `value` - value to be written + - `optName` - the `.ini` file + - `section` - settings section like `[INTERFACE]` + - `entry` - one setting entry like `scale` + - `value` - value to be written -## Hlp_WriteOptionFloat -Writes a floating point value to specified `.ini` file, section and entry. +## `Hlp_WriteOptionFloat` +!!! function "`Hlp_WriteOptionFloat`" + Writes a floating point value to specified `.ini` file, section and entry. -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func void Hlp_WriteOptionFloat(var string optName, var string section, var string entry, var float value) {}; -``` + ```dae + func void Hlp_WriteOptionFloat(var string optName, var string section, var string entry, var float value) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[INTERFACE]` -- `entry` - one setting entry like `scale` -- `value` - value to be written + - `optName` - the `.ini` file + - `section` - settings section like `[INTERFACE]` + - `entry` - one setting entry like `scale` + - `value` - value to be written -## Hlp_WriteOptionString -Writes a string value to specified `.ini` file, section and entry. +## `Hlp_WriteOptionString` +!!! function "`Hlp_WriteOptionString`" + Writes a string value to specified `.ini` file, section and entry. -`optName` values + `optName` values -- `#!dae "Gothic"` -- `#!dae "Mod"` -- `#!dae "SystemPack"` + - `#!dae "Gothic"` + - `#!dae "Mod"` + - `#!dae "SystemPack"` -```dae -func void Hlp_WriteOptionString(var string optName, var string section, var string entry, var string value) {}; -``` + ```dae + func void Hlp_WriteOptionString(var string optName, var string section, var string entry, var string value) {}; + ``` -- `optName` - the `.ini` file -- `section` - settings section like `[INTERFACE]` -- `entry` - one setting entry like `scale` -- `value` - value to be written + - `optName` - the `.ini` file + - `section` - settings section like `[INTERFACE]` + - `entry` - one setting entry like `scale` + - `value` - value to be written -## Hlp_GetSteamPersonalName -Returns the name of the current Steam user -Returns empty string when not run with Steam +## `Hlp_GetSteamPersonalName` +!!! function "`Hlp_GetSteamPersonalName`" + Returns the name of the current Steam user + Returns empty string when not run with Steam -```dae -func string Hlp_GetSteamPersonalName() {}; -``` + ```dae + func string Hlp_GetSteamPersonalName() {}; + ``` -- `return` - string containing the Steam username, or an empty string + - `return` - string containing the Steam username, or an empty string -## Hlp_DoEvent -Calls every event function with the name `funcName`. +## `Hlp_DoEvent` +!!! function "`Hlp_DoEvent`" + Calls every event function with the name `funcName`. -```dae -func void Hlp_DoEvent(var string funcName) {}; -``` + ```dae + func void Hlp_DoEvent(var string funcName) {}; + ``` -- `funcName` - name of the [event](../syntax_extensions/events.md) function to be called (all of them). + - `funcName` - name of the [event](../syntax_extensions/events.md) function to be called (all of them). diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/log.md b/docs/zengin/scripts/extenders/zparserextender/externals/log.md index 867f6dd2af..e17f812bad 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/log.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/log.md @@ -1,34 +1,36 @@ # Log functions As discussed on [Inside Gothic](https://ataulien.github.io/Inside-Gothic/QuestLog/), vanilla Gothic has no way of getting the status of a quest. These functions implement that functionality. -## Log_GetTopicStatus -Returns the status of diary topic - -- `-1` - Not found -- `0` - Free -- `1` - Running -- `2` - Success -- `3` - Failure -- `4` - Obsolete - -```dae -func int Log_GetTopicStatus(var string topic) {}; -``` - -- `topic` - name of the topic -- `return` - topic status - -## Log_GetTopicSection -Returns the topic the diary topic is in - -- `-1` - Not found -- `0` - Missions -- `1` - Notes -- `2` - All - -```dae -func int Log_GetTopicSection(var string topic) {}; -``` - -- `topic` - name of the topic -- `return` - topic section \ No newline at end of file +## `Log_GetTopicStatus` +!!! function "`Log_GetTopicStatus`" + Returns the status of diary topic + + - `-1` - Not found + - `0` - Free + - `1` - Running + - `2` - Success + - `3` - Failure + - `4` - Obsolete + + ```dae + func int Log_GetTopicStatus(var string topic) {}; + ``` + + - `topic` - name of the topic + - `return` - topic status + +## `Log_GetTopicSection` +!!! function "`Log_GetTopicSection`" + Returns the topic the diary topic is in + + - `-1` - Not found + - `0` - Missions + - `1` - Notes + - `2` - All + + ```dae + func int Log_GetTopicSection(var string topic) {}; + ``` + + - `topic` - name of the topic + - `return` - topic section diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/mdl.md b/docs/zengin/scripts/extenders/zparserextender/externals/mdl.md index 48343c677d..0b4b727179 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/mdl.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/mdl.md @@ -4,125 +4,137 @@ title: MDL functions # MDL - model functions Functions to tweak animation and other model related settings. -## Mdl_GetAnimationIndex -Returns animation's index for specified NPC based on animation's name +## `Mdl_GetAnimationIndex` +!!! function "`Mdl_GetAnimationIndex`" + Returns animation's index for specified NPC based on animation's name -```dae -func int Mdl_GetAnimationIndex( var C_NPC npc, var string ani_name ) {}; -``` + ```dae + func int Mdl_GetAnimationIndex( var C_NPC npc, var string ani_name ) {}; + ``` -- `npc` - NPC with the animation -- `ani_name` - name of the animation in uppercase -- `return` - animation index + - `npc` - NPC with the animation + - `ani_name` - name of the animation in uppercase + - `return` - animation index -## Mdl_GetAnimationName -Returns animation's name for specified NPC based on animation's index +## `Mdl_GetAnimationName` +!!! function "`Mdl_GetAnimationName`" + Returns animation's name for specified NPC based on animation's index -```dae -func string Mdl_GetAnimationName( var C_NPC npc, var int ani_index ) {}; -``` + ```dae + func string Mdl_GetAnimationName( var C_NPC npc, var int ani_index ) {}; + ``` -- `npc` - NPC with the animation -- `ani_index` - animation index -- `return` - animation name + - `npc` - NPC with the animation + - `ani_index` - animation index + - `return` - animation name -## Mdl_AnimationIsExists -Checks whether animation exists +## `Mdl_AnimationIsExists` +!!! function "`Mdl_AnimationIsExists`" + Checks whether animation exists -```dae -func int Mdl_AnimationIsExists( var C_NPC npc, var int ani_index ) {}; -``` + ```dae + func int Mdl_AnimationIsExists( var C_NPC npc, var int ani_index ) {}; + ``` -- `npc` - NPC with the animation -- `ani_index` - animation index -- `return` - animation name + - `npc` - NPC with the animation + - `ani_index` - animation index + - `return` - animation name -## Mdl_AnimationIsActive -Checks whether animation is active (whether it is currently played) +## `Mdl_AnimationIsActive` +!!! function "`Mdl_AnimationIsActive`" + Checks whether animation is active (whether it is currently played) -```dae -func int Mdl_AnimationIsActive( var C_NPC npc, var int ani_index ) {}; -``` + ```dae + func int Mdl_AnimationIsActive( var C_NPC npc, var int ani_index ) {}; + ``` -- `npc` - NPC with the animation -- `ani_index` - animation index -- `return` - `TRUE` if the animation is playing, `FALSE` if it is not playing + - `npc` - NPC with the animation + - `ani_index` - animation index + - `return` - `TRUE` if the animation is playing, `FALSE` if it is not playing -## Mdl_SetAllAnimationsFPS -Set framerate for all animations +## `Mdl_SetAllAnimationsFPS` +!!! function "`Mdl_SetAllAnimationsFPS`" + Set framerate for all animations -```dae -func void Mdl_SetAllAnimationsFPS( var C_NPC npc, var float fps ) {}; -``` + ```dae + func void Mdl_SetAllAnimationsFPS( var C_NPC npc, var float fps ) {}; + ``` -- `npc` - NPC with the animation -- `fps` - framerate + - `npc` - NPC with the animation + - `fps` - framerate -## Mdl_ResetAllAnimationsFPS -Reset framerate for all animations to default value +## `Mdl_ResetAllAnimationsFPS` +!!! function "`Mdl_ResetAllAnimationsFPS`" + Reset framerate for all animations to default value -```dae -func void Mdl_ResetAllAnimationsFPS( var C_NPC npc ) {}; -``` + ```dae + func void Mdl_ResetAllAnimationsFPS( var C_NPC npc ) {}; + ``` -- `npc` - NPC with the animation + - `npc` - NPC with the animation -## Mdl_SetAnimationFPS -Set framerate for animation specified by animation index +## `Mdl_SetAnimationFPS` +!!! function "`Mdl_SetAnimationFPS`" + Set framerate for animation specified by animation index -```dae -func void Mdl_SetAnimationFPS( var C_NPC npc, var int ani_index, var float fps ) {}; -``` + ```dae + func void Mdl_SetAnimationFPS( var C_NPC npc, var int ani_index, var float fps ) {}; + ``` -- `npc` - NPC with the animation -- `ani_index` - animation index -- `fps` - framerate + - `npc` - NPC with the animation + - `ani_index` - animation index + - `fps` - framerate -## Mdl_ResetAnimationFPS -Reset framerate to default for animation specified by animation index +## `Mdl_ResetAnimationFPS` +!!! function "`Mdl_ResetAnimationFPS`" + Reset framerate to default for animation specified by animation index -```dae -func void Mdl_ResetAnimationFPS( var C_NPC npc, var int ani_index ) {}; -``` + ```dae + func void Mdl_ResetAnimationFPS( var C_NPC npc, var int ani_index ) {}; + ``` -- `npc` - NPC with the animation -- `ani_index` - animation index + - `npc` - NPC with the animation + - `ani_index` - animation index -## Mdl_SetVisible -Set NPCs visibility +## `Mdl_SetVisible` +!!! function "`Mdl_SetVisible`" + Set NPCs visibility -```dae -func void Mdl_SetVisible( var C_NPC npc, var int isVisible ) {}; -``` + ```dae + func void Mdl_SetVisible( var C_NPC npc, var int isVisible ) {}; + ``` -- `npc` - specified NPC -- `isVisible` - `TRUE` - visible, `FALSE` - invisible + - `npc` - specified NPC + - `isVisible` - `TRUE` - visible, `FALSE` - invisible -## Mdl_ApplyOverlayMds_AtFirst -Applies or moves existing overlay to the top of the list +## `Mdl_ApplyOverlayMds_AtFirst` +!!! function "`Mdl_ApplyOverlayMds_AtFirst`" + Applies or moves existing overlay to the top of the list -```dae -func void Mdl_ApplyOverlayMds_AtFirst( var string mdsName ) {}; -``` + ```dae + func void Mdl_ApplyOverlayMds_AtFirst( var string mdsName ) {}; + ``` -- `mdsName` - name of the overlay + - `mdsName` - name of the overlay -## Mdl_SetNpcSpeedMultiplier -Sets a multiplier for animation speed -1.0 = 100% speed (normal speed) +## `Mdl_SetNpcSpeedMultiplier` +!!! function "`Mdl_SetNpcSpeedMultiplier`" + Sets a multiplier for animation speed + 1.0 = 100% speed (normal speed) -```dae -func void Mdl_SetNpcSpeedMultiplier( var C_Npc npc, var float multiplier ) {}; -``` + ```dae + func void Mdl_SetNpcSpeedMultiplier( var C_Npc npc, var float multiplier ) {}; + ``` -- `npc` - npc to be affected -- `multiplier` - speed of the animation + - `npc` - npc to be affected + - `multiplier` - speed of the animation -## Mdl_ResetNpcSpeedMultiplier -Resets the animation speed of an NPC +## `Mdl_ResetNpcSpeedMultiplier` +!!! function "`Mdl_ResetNpcSpeedMultiplier`" + Resets the animation speed of an NPC -```dae -func void Mdl_ResetNpcSpeedMultiplier( var C_Npc npc ) {}; -``` + ```dae + func void Mdl_ResetNpcSpeedMultiplier( var C_Npc npc ) {}; + ``` -- `npc` - npc to be affected \ No newline at end of file + - `npc` - npc to be affected diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/menu.md b/docs/zengin/scripts/extenders/zparserextender/externals/menu.md index f00aa7d763..97ba966e42 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/menu.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/menu.md @@ -1,13 +1,14 @@ # Menu function -## Menu_SearchItems -Find all C_MenuItem object instances by the mask and automatically places them in the current menu instance +## `Menu_SearchItems` +!!! function "`Menu_SearchItems`" + Find all C_MenuItem object instances by the mask and automatically places them in the current menu instance -```dae -func void Menu_SearchItems( var string mask ) {}; -``` + ```dae + func void Menu_SearchItems( var string mask ) {}; + ``` -- `mask` - regex like mask for searching + - `mask` - regex like mask for searching ### Example This function is used in the Union Menu [API script](../daedalus_injection/index.md#api-script). diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/mob.md b/docs/zengin/scripts/extenders/zparserextender/externals/mob.md index 99f24fb07b..ee70843854 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/mob.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/mob.md @@ -4,113 +4,124 @@ title: MOB functions # MOB - interactive object functions Functions to manipulate interactive objects like destroying MOBs, setting lockpick combination and such. -## Mob_Destroy -Marks oCMOB as destroyed, changes the visual to visualDestroyed (if present). +## `Mob_Destroy` +!!! function "`Mob_Destroy`" + Marks oCMOB as destroyed, changes the visual to visualDestroyed (if present). -```dae -func void Mob_Destroy( var instance object ) {}; -``` + ```dae + func void Mob_Destroy( var instance object ) {}; + ``` -- `object` - oCMOB to be destroyed + - `object` - oCMOB to be destroyed -## Mob_RemoveItem -Removes an item from a oCMobContainer +## `Mob_RemoveItem` +!!! function "`Mob_RemoveItem`" + Removes an item from a oCMobContainer -```dae -func void Mob_RemoveItem( var instance object, var int item ) {}; -``` + ```dae + func void Mob_RemoveItem( var instance object, var int item ) {}; + ``` -- `object` - oCMobContainer object -- `item` - item to be removed + - `object` - oCMobContainer object + - `item` - item to be removed -## Mob_RemoveItems -Removes specified number of items from a oCMobContainer +## `Mob_RemoveItems` +!!! function "`Mob_RemoveItems`" + Removes specified number of items from a oCMobContainer -```dae -func void Mob_RemoveItems( var instance object, var int item, var int cnt ) {}; -``` + ```dae + func void Mob_RemoveItems( var instance object, var int item, var int cnt ) {}; + ``` -- `object` - oCMobContainer object -- `item` - item to be removed -- `cnt` - number of items to be removed + - `object` - oCMobContainer object + - `item` - item to be removed + - `cnt` - number of items to be removed -## Mob_InsertItem -Inserts an item into a oCMobContainer +## `Mob_InsertItem` +!!! function "`Mob_InsertItem`" + Inserts an item into a oCMobContainer -```dae -func void Mob_InsertItem( var instance object, var int item ) {}; -``` + ```dae + func void Mob_InsertItem( var instance object, var int item ) {}; + ``` -- `object` - oCMobContainer object -- `item` - item to be inserted + - `object` - oCMobContainer object + - `item` - item to be inserted -## Mob_InsertItems -Inserts specified number of items into a oCMobContainer +## `Mob_InsertItems` +!!! function "`Mob_InsertItems`" + Inserts specified number of items into a oCMobContainer -```dae -func void Mob_InsertItems( var instance object, var int item, var int cnt ) {}; -``` + ```dae + func void Mob_InsertItems( var instance object, var int item, var int cnt ) {}; + ``` -- `object` - oCMobContainer object -- `item` - item to be inserted -- `cnt` - number of items to be inserted + - `object` - oCMobContainer object + - `item` - item to be inserted + - `cnt` - number of items to be inserted -## Mob_GetLockCombination -Returns a lock combination of a oCMobContainer +## `Mob_GetLockCombination` +!!! function "`Mob_GetLockCombination`" + Returns a lock combination of a oCMobContainer -```dae -func string Mob_GetLockCombination( var instance object ) {}; -``` + ```dae + func string Mob_GetLockCombination( var instance object ) {}; + ``` -- `object` - oCMobContainer object -- `return` - lock combination + - `object` - oCMobContainer object + - `return` - lock combination -## Mob_SetLockCombination -Sets a lock combination to a oCMobContainer +## `Mob_SetLockCombination` +!!! function "`Mob_SetLockCombination`" + Sets a lock combination to a oCMobContainer -```dae -func void Mob_SetLockCombination( var instance object, var string comb ) {}; -``` + ```dae + func void Mob_SetLockCombination( var instance object, var string comb ) {}; + ``` -- `object` - oCMobContainer object -- `comb` - lock combination + - `object` - oCMobContainer object + - `comb` - lock combination -## Mob_IsLocked -Returns `TRUE` if the object is locked +## `Mob_IsLocked` +!!! function "`Mob_IsLocked`" + Returns `TRUE` if the object is locked -```dae -func int Mob_IsLocked( var instance object ) {}; -``` + ```dae + func int Mob_IsLocked( var instance object ) {}; + ``` -- `object` - oCMobLockable object -- `return` - `TRUE` if locked, `FALSE` if unlocked + - `object` - oCMobLockable object + - `return` - `TRUE` if locked, `FALSE` if unlocked -## Mob_SetLocked -Set the lock status of the object +## `Mob_SetLocked` +!!! function "`Mob_SetLocked`" + Set the lock status of the object -```dae -func void Mob_SetLocked( var instance object, var int locked ) {}; -``` + ```dae + func void Mob_SetLocked( var instance object, var int locked ) {}; + ``` -- `object` - oCMobLockable object -- `locked` - lock or unlock the object + - `object` - oCMobLockable object + - `locked` - lock or unlock the object -## Mob_GetKeyInstance -Returns the key instance, that unlocks the object +## `Mob_GetKeyInstance` +!!! function "`Mob_GetKeyInstance`" + Returns the key instance, that unlocks the object -```dae -func instance Mob_GetKeyInstance( var instance object ) {}; -``` + ```dae + func instance Mob_GetKeyInstance( var instance object ) {}; + ``` -- `object` - oCMobLockable object -- `return` - the key C_ITEM instance + - `object` - oCMobLockable object + - `return` - the key C_ITEM instance -## Mob_SetKeyInstance -Stets the key instance, that unlocks the object +## `Mob_SetKeyInstance` +!!! function "`Mob_SetKeyInstance`" + Stets the key instance, that unlocks the object -```dae -func void Mob_SetKeyInstance( var instance object, var int key ) {}; -``` + ```dae + func void Mob_SetKeyInstance( var instance object, var int key ) {}; + ``` -- `object` - oCMobLockable object -- `key` - the key C_ITEM instance \ No newline at end of file + - `object` - oCMobLockable object + - `key` - the key C_ITEM instance diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/npc.md b/docs/zengin/scripts/extenders/zparserextender/externals/npc.md index 05528ea0f3..4419d495d0 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/npc.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/npc.md @@ -4,94 +4,103 @@ title: NPC functions # NPC - character functions NPC related functions. -## Npc_SetAsHero -Changes players character to specified `npc` +## `Npc_SetAsHero` +!!! function "`Npc_SetAsHero`" + Changes players character to specified `npc` -```dae -func void Npc_SetAsHero( var C_NPC npc ) {}; -``` + ```dae + func void Npc_SetAsHero( var C_NPC npc ) {}; + ``` -- `npc` - NPC to be set as players character + - `npc` - NPC to be set as players character -## Npc_OpenInventory -Opens NPCs main inventory +## `Npc_OpenInventory` +!!! function "`Npc_OpenInventory`" + Opens NPCs main inventory -```dae -func void Npc_OpenInventory( var C_NPC npc ) {}; -``` + ```dae + func void Npc_OpenInventory( var C_NPC npc ) {}; + ``` -- `npc` - NPC + - `npc` - NPC -## Npc_OpenInventorySteal -Opens the steal inventory of `npc`'s focus NPC +## `Npc_OpenInventorySteal` +!!! function "`Npc_OpenInventorySteal`" + Opens the steal inventory of `npc`'s focus NPC -```dae -func void Npc_OpenInventorySteal( var C_NPC npc ) {}; -``` + ```dae + func void Npc_OpenInventorySteal( var C_NPC npc ) {}; + ``` -- `npc` - NPC + - `npc` - NPC -## Npc_OpenInventoryTrade -Start the trading dialogue with specified NPC +## `Npc_OpenInventoryTrade` +!!! function "`Npc_OpenInventoryTrade`" + Start the trading dialogue with specified NPC -```dae -func void Npc_OpenInventoryTrade( var C_NPC npc ) {}; -``` + ```dae + func void Npc_OpenInventoryTrade( var C_NPC npc ) {}; + ``` -- `npc` - NPC + - `npc` - NPC -## Npc_GetLeftHandItem -Returns an item in NPC's left hand slot +## `Npc_GetLeftHandItem` +!!! function "`Npc_GetLeftHandItem`" + Returns an item in NPC's left hand slot -```dae -func C_Item Npc_GetLeftHandItem( var C_Npc npc ) {}; -``` + ```dae + func C_Item Npc_GetLeftHandItem( var C_Npc npc ) {}; + ``` -- `npc` - npc to be affected -- `return` - found C_ITEM instance + - `npc` - npc to be affected + - `return` - found C_ITEM instance -## Npc_GetRightHandItem -Returns an item in NPC's right hand slot +## `Npc_GetRightHandItem` +!!! function "`Npc_GetRightHandItem`" + Returns an item in NPC's right hand slot -```dae -func C_Item Npc_GetRightHandItem( var C_Npc npc ) {}; -``` + ```dae + func C_Item Npc_GetRightHandItem( var C_Npc npc ) {}; + ``` -- `npc` - npc to be affected -- `return` - found C_ITEM instance + - `npc` - npc to be affected + - `return` - found C_ITEM instance -## Npc_GetSlotItem -Returns an item from a slot with the slotName +## `Npc_GetSlotItem` +!!! function "`Npc_GetSlotItem`" + Returns an item from a slot with the slotName -```dae -func C_Item Npc_GetSlotItem( var C_Npc npc, var string slotName ) {}; -``` + ```dae + func C_Item Npc_GetSlotItem( var C_Npc npc, var string slotName ) {}; + ``` -- `npc` - npc to be affected -- `slotName` - name of the slot -- `return` - found C_ITEM instance + - `npc` - npc to be affected + - `slotName` - name of the slot + - `return` - found C_ITEM instance -## Npc_PutInSlot -Places an instance of the oCVom class (including items and NPCs) object into the slotName of the NPC -The copyInInv parameter determines whether a copy of the object should remain in the character's inventory +## `Npc_PutInSlot` +!!! function "`Npc_PutInSlot`" + Places an instance of the oCVom class (including items and NPCs) object into the slotName of the NPC + The copyInInv parameter determines whether a copy of the object should remain in the character's inventory -```dae -func void Npc_PutInSlot(var C_Npc npc, var string slotName, var instance object, var int copyInInv) {}; -``` + ```dae + func void Npc_PutInSlot(var C_Npc npc, var string slotName, var instance object, var int copyInInv) {}; + ``` -- `npc` - npc to remove the item from -- `slotName` - name of the slot from which to remove the item -- `object` - object to be inserted into the slot -- `copyInInv` - should a copy of the object stay in character inventory + - `npc` - npc to remove the item from + - `slotName` - name of the slot from which to remove the item + - `object` - object to be inserted into the slot + - `copyInInv` - should a copy of the object stay in character inventory -## Npc_RemoveFromSlot -Removes an object from the slotName of the NPC. -The dropIt parameter in Gothic 2 defines, whether object should drop out of the slot. In Gothic 1, this parameter is reserved and must be 0. +## `Npc_RemoveFromSlot` +!!! function "`Npc_RemoveFromSlot`" + Removes an object from the slotName of the NPC. + The dropIt parameter in Gothic 2 defines, whether object should drop out of the slot. In Gothic 1, this parameter is reserved and must be 0. -```dae -func void Npc_RemoveFromSlot(var C_Npc npc, var string slotName, var int dropIt) {}; -``` + ```dae + func void Npc_RemoveFromSlot(var C_Npc npc, var string slotName, var int dropIt) {}; + ``` -- `npc` - npc to remove the item from -- `slotName` - name of the slot from which to remove the item -- `dropIt` - should the object be dropped \ No newline at end of file + - `npc` - npc to remove the item from + - `slotName` - name of the slot from which to remove the item + - `dropIt` - should the object be dropped diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/par.md b/docs/zengin/scripts/extenders/zparserextender/externals/par.md index 5a2aeca5be..b597dd0fc4 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/par.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/par.md @@ -4,204 +4,221 @@ title: PAR functions # PAR - functions for parser manipulation Parser functions are used to manipulate the parsers. Retrieve SymbolID, access arrays and such. -## Par_GetParserID -Returns a parser ID of the parser with a `parName` name +## `Par_GetParserID` +!!! function "`Par_GetParserID`" + Returns a parser ID of the parser with a `parName` name + + Parser names: -Parser names: + - `#!dae "Game"` + - `#!dae "SFX"` + - `#!dae "PFX"` + - `#!dae "VFX"` + - `#!dae "Camera"` + - `#!dae "Menu"` + - `#!dae "Music"` -- `#!dae "Game"` -- `#!dae "SFX"` -- `#!dae "PFX"` -- `#!dae "VFX"` -- `#!dae "Camera"` -- `#!dae "Menu"` -- `#!dae "Music"` + ```dae + func int Par_GetParserID(var string parName) {}; + ``` + + - `parName` - parser name + - `return` - parser ID + +## `Par_GetSymbolID` +!!! function "`Par_GetSymbolID`" + Returns symbol ID for the symbol specified by its name + + ```dae + func int Par_GetSymbolID(var int parId, var string symName) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `return` - symbol ID + +## `Par_GetSymbolLength` +!!! function "`Par_GetSymbolLength`" + Returns symbol length (number of elements) + + ```dae + func int Par_GetSymbolLength(var int parId, var int symId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `return` - symbol length + +## `Par_GetSymbolValueInt` +!!! function "`Par_GetSymbolValueInt`" + Returns the integer value of specified symbol + + ```dae + func int Par_GetSymbolValueInt(var int parId, var int symId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `return` - symbol value + +## `Par_GetSymbolValueFloat` +!!! function "`Par_GetSymbolValueFloat`" + Returns the float value of specified symbol + + ```dae + func float Par_GetSymbolValueFloat(var int parId, var int symId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `return` - symbol value + +## `Par_GetSymbolValueString` +!!! function "`Par_GetSymbolValueString`" + Returns the string value of specified symbol + + ```dae + func string Par_GetSymbolValueString(var int parId, var int symId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `return` - symbol value + +## `Par_GetSymbolValueInstance` +!!! function "`Par_GetSymbolValueInstance`" + Returns the instance value of specified symbol + + ```dae + func instance Par_GetSymbolValueInstance(var int parId, var int symId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `return` - symbol value + +## `Par_GetSymbolValueIntArray` +!!! function "`Par_GetSymbolValueIntArray`" + Returns the value of specified integer array at the `arrayID` index + + ```dae + func int Par_GetSymbolValueIntArray(var int parId, var int symId, var int arrayId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `arrayID` - array index + - `return` - value + +## `Par_GetSymbolValueFloatArray` +!!! function "`Par_GetSymbolValueFloatArray`" + Returns the value of specified float array at the `arrayID` index + + ```dae + func float Par_GetSymbolValueFloatArray(var int parId, var int symId, var int arrayId) {}; + ``` -```dae -func int Par_GetParserID(var string parName) {}; -``` - -- `parName` - parser name -- `return` - parser ID - -## Par_GetSymbolID -Returns symbol ID for the symbol specified by its name - -```dae -func int Par_GetSymbolID(var int parId, var string symName) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `return` - symbol ID - -## Par_GetSymbolLength -Returns symbol length (number of elements) - -```dae -func int Par_GetSymbolLength(var int parId, var int symId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `return` - symbol length - -## Par_GetSymbolValueInt -Returns the integer value of specified symbol - -```dae -func int Par_GetSymbolValueInt(var int parId, var int symId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `return` - symbol value - -## Par_GetSymbolValueFloat -Returns the float value of specified symbol - -```dae -func float Par_GetSymbolValueFloat(var int parId, var int symId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `return` - symbol value - -## Par_GetSymbolValueString -Returns the string value of specified symbol - -```dae -func string Par_GetSymbolValueString(var int parId, var int symId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `return` - symbol value - -## Par_GetSymbolValueInstance -Returns the instance value of specified symbol - -```dae -func instance Par_GetSymbolValueInstance(var int parId, var int symId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `return` - symbol value - -## Par_GetSymbolValueIntArray -Returns the value of specified integer array at the `arrayID` index - -```dae -func int Par_GetSymbolValueIntArray(var int parId, var int symId, var int arrayId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `arrayID` - array index -- `return` - value - -## Par_GetSymbolValueFloatArray -Returns the value of specified float array at the `arrayID` index - -```dae -func float Par_GetSymbolValueFloatArray(var int parId, var int symId, var int arrayId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `arrayID` - array index -- `return` - value - -## Par_GetSymbolValueStringArray -Returns the value of specified string array at the `arrayID` index - -```dae -func string Par_GetSymbolValueStringArray(var int parId, var int symId, var int arrayId) {}; -``` - -- `parID` - parser ID -- `symName` - symbol name -- `arrayID` - array index -- `return` - value - -## Par_SetSymbolValueInt -Sets a new integer value to specified symbol - -```dae -func void Par_SetSymbolValueInt(var int value, var int parId, var int symId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID - -## Par_SetSymbolValueFloat -Sets a new float value to specified symbol - -```dae -func void Par_SetSymbolValueFloat(var float value, var int parId, var int symId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID - -## Par_SetSymbolValueString -Sets a new string value to specified symbol - -```dae -func void Par_SetSymbolValueString(var string value, var int parId, var int symId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID - -## Par_SetSymbolValueInstance -Sets a new instance value to specified symbol - -```dae -func void Par_SetSymbolValueInstance(var instance value, var int parId, var int symId, var int arrayId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID - -## Par_SetSymbolValueIntArray -Sets a new integer value to specified integer array symbol - -```dae -func void Par_SetSymbolValueIntArray(var int value, var int parId, var int symId, var int arrayId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID -- `arrayId` - array index - -## Par_SetSymbolValueFloatArray -Sets a new float value to specified float array symbol - -```dae -func void Par_SetSymbolValueFloatArray(var float value, var int parId, var int symId, var int arrayId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID -- `arrayId` - array index - -## Par_SetSymbolValueStringArray -Sets a new string value to specified string array symbol - -```dae -func void Par_SetSymbolValueStringArray(var string value, var int parId, var int symId, var int arrayId) {}; -``` - -- `value` - value to be set -- `parID` - parser ID -- `symId` - symbol ID -- `arrayId` - array index \ No newline at end of file + - `parID` - parser ID + - `symName` - symbol name + - `arrayID` - array index + - `return` - value + +## `Par_GetSymbolValueStringArray` +!!! function "`Par_GetSymbolValueStringArray`" + Returns the value of specified string array at the `arrayID` index + + ```dae + func string Par_GetSymbolValueStringArray(var int parId, var int symId, var int arrayId) {}; + ``` + + - `parID` - parser ID + - `symName` - symbol name + - `arrayID` - array index + - `return` - value + +## `Par_SetSymbolValueInt` +!!! function "`Par_SetSymbolValueInt`" + Sets a new integer value to specified symbol + + ```dae + func void Par_SetSymbolValueInt(var int value, var int parId, var int symId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + +## `Par_SetSymbolValueFloat` +!!! function "`Par_SetSymbolValueFloat`" + Sets a new float value to specified symbol + + ```dae + func void Par_SetSymbolValueFloat(var float value, var int parId, var int symId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + +## `Par_SetSymbolValueString` +!!! function "`Par_SetSymbolValueString`" + Sets a new string value to specified symbol + + ```dae + func void Par_SetSymbolValueString(var string value, var int parId, var int symId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + +## `Par_SetSymbolValueInstance` +!!! function "`Par_SetSymbolValueInstance`" + Sets a new instance value to specified symbol + + ```dae + func void Par_SetSymbolValueInstance(var instance value, var int parId, var int symId, var int arrayId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + +## `Par_SetSymbolValueIntArray` +!!! function "`Par_SetSymbolValueIntArray`" + Sets a new integer value to specified integer array symbol + + ```dae + func void Par_SetSymbolValueIntArray(var int value, var int parId, var int symId, var int arrayId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + - `arrayId` - array index + +## `Par_SetSymbolValueFloatArray` +!!! function "`Par_SetSymbolValueFloatArray`" + Sets a new float value to specified float array symbol + + ```dae + func void Par_SetSymbolValueFloatArray(var float value, var int parId, var int symId, var int arrayId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + - `arrayId` - array index + +## `Par_SetSymbolValueStringArray` +!!! function "`Par_SetSymbolValueStringArray`" + Sets a new string value to specified string array symbol + + ```dae + func void Par_SetSymbolValueStringArray(var string value, var int parId, var int symId, var int arrayId) {}; + ``` + + - `value` - value to be set + - `parID` - parser ID + - `symId` - symbol ID + - `arrayId` - array index diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/string.md b/docs/zengin/scripts/extenders/zparserextender/externals/string.md index d1fc56cd92..3d63f3b25d 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/string.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/string.md @@ -1,119 +1,128 @@ # String functions Functions to manipulate and format strings. -## Str_Format -Returns formatted string using format specifiers - -Format specifiers: - -- `%s` - inserts a string -- `%i` - inserts an integer number -- `%x` - inserts an integer in hexadecimal -- `%f` - inserts a floating point number -- `%b` - inserts a logical expression -- `%p` - inserts a pointer - -```dae -func string Str_Format( var string format, ... ) {}; -``` - -- `return` - formatted string - -### Examples - -Very powerful function, can be used to streamline strings used in the scripts as well as optimize them for translations. - -Define constants containing the string with format specifiers. -```dae -const string MENU_SAVE = "Slot %i - press ENTER to save in this slot."; -const string MENU_LOAD = "Slot %i - press ENTER to load saved game."; -``` -Then define two format functions as such: -```dae -func string GetSaveSlotString (var int number) -{ - return Str_format(MENU_SAVE, number); -}; -``` -```dae -func string GetLoadSlotString (var int number) -{ - return Str_format(MENU_LOAD, number); -}; -``` -!!! Tip - Since the whole translatable string is saved in one constant, it is very easy for translators to change the word order. This was not possible to do without code change to the `ConcatStrings` function calls within the scripts. - With this simple change, translators have to translate only 2 strings instead of 30 (15 + 15 slots) and only 2 strings are compiled into the compiled `Menu.dat` file. - -## Str_GetLocalizedString -Returns a string in the current language, otherwise in English. -Arguments MUST be encoded in UTF-8! The result string will be converted to appropriate ANSI string. - - -```dae -func string Str_GetLocalizedString( var string russian, - var string english, - var string german, - var string polish ) {}; -``` - -- `russian` - Russian string -- `english` - English string -- `german` - German string -- `polish` - Polish string -- `return` - string in the current language - -## Str_GetLocalizedStringEx -Returns a string in the current language, otherwise in English. -Offers additional languages - - -```dae -func string Str_GetLocalizedStringEx( var string russian, +## `Str_Format` +!!! function "`Str_Format`" + Returns formatted string using format specifiers + + Format specifiers: + + - `%s` - inserts a string + - `%i` - inserts an integer number + - `%x` - inserts an integer in hexadecimal + - `%f` - inserts a floating point number + - `%b` - inserts a logical expression + - `%p` - inserts a pointer + + ```dae + func string Str_Format( var string format, ... ) {}; + ``` + + - `return` - formatted string + +### `Examples` +!!! function "`Examples`" + Very powerful function, can be used to streamline strings used in the scripts as well as optimize them for translations. + + Define constants containing the string with format specifiers. + + ```dae + const string MENU_SAVE = "Slot %i - press ENTER to save in this slot."; + const string MENU_LOAD = "Slot %i - press ENTER to load saved game."; + ``` + + Then define two format functions as such: + + ```dae + func string GetSaveSlotString (var int number) + { + return Str_format(MENU_SAVE, number); + }; + ``` + + ```dae + func string GetLoadSlotString (var int number) + { + return Str_format(MENU_LOAD, number); + }; + ``` + + !!! Tip + Since the whole translatable string is saved in one constant, it is very easy for translators to change the word order. This was not possible to do without code change to the `ConcatStrings` function calls within the scripts. + With this simple change, translators have to translate only 2 strings instead of 30 (15 + 15 slots) and only 2 strings are compiled into the compiled `Menu.dat` file. + +## `Str_GetLocalizedString` +!!! function "`Str_GetLocalizedString`" + Returns a string in the current language, otherwise in English. + Arguments MUST be encoded in UTF-8! The result string will be converted to appropriate ANSI string. + + ```dae + func string Str_GetLocalizedString( var string russian, var string english, var string german, - var string polish, - var string romanian, - var string italian, - var string czech, - var string spanish ) {}; -``` - -- `russian` - Russian string -- `english` - English string -- `german` - German string -- `polish` - Polish string -- `romanian` - Romanian string -- `italian` - Italian string -- `czech` - Czech string -- `spanish` - Spanish string -- `return` - string in the current language - -## Str_UTF8_to_ANSI -Converts UTF-8 string into an ANSI string with codePage - -```dae -func string Str_UTF8_to_ANSI( var string utf8, var int codePage ) {}; -``` - -- `utf8` - string encoded in UTF8 -- `codePage` - codePage id, can be obtained from Str_GetCurrentCP -- `return` - - -## Str_GetCurrentCP -Return the code page corresponding to the current language set in the Union System -```dae -func int Str_GetCurrentCP() {}; -``` - -- `return` - code page corresponding to the current language - -## Str_GetLength -Returns the length of a string - -```dae -func int Str_GetLength( var int str ) {}; -``` - -- `str` - string to be measured -- `return` - length of the string \ No newline at end of file + var string polish ) {}; + ``` + + - `russian` - Russian string + - `english` - English string + - `german` - German string + - `polish` - Polish string + - `return` - string in the current language + +## `Str_GetLocalizedStringEx` +!!! function "`Str_GetLocalizedStringEx`" + Returns a string in the current language, otherwise in English. + Offers additional languages + + ```dae + func string Str_GetLocalizedStringEx( var string russian, + var string english, + var string german, + var string polish, + var string romanian, + var string italian, + var string czech, + var string spanish ) {}; + ``` + + - `russian` - Russian string + - `english` - English string + - `german` - German string + - `polish` - Polish string + - `romanian` - Romanian string + - `italian` - Italian string + - `czech` - Czech string + - `spanish` - Spanish string + - `return` - string in the current language + +## `Str_UTF8_to_ANSI` +!!! function "`Str_UTF8_to_ANSI`" + Converts UTF-8 string into an ANSI string with codePage + + ```dae + func string Str_UTF8_to_ANSI( var string utf8, var int codePage ) {}; + ``` + + - `utf8` - string encoded in UTF8 + - `codePage` - codePage id, can be obtained from Str_GetCurrentCP + - `return` - + +## `Str_GetCurrentCP` +!!! function "`Str_GetCurrentCP`" + Return the code page corresponding to the current language set in the Union System + ```dae + func int Str_GetCurrentCP() {}; + ``` + + - `return` - code page corresponding to the current language + +## `Str_GetLength` +!!! function "`Str_GetLength`" + Returns the length of a string + + ```dae + func int Str_GetLength( var int str ) {}; + ``` + + - `str` - string to be measured + - `return` - length of the string diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/vob.md b/docs/zengin/scripts/extenders/zparserextender/externals/vob.md index b53e7c9de7..296578ccec 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/vob.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/vob.md @@ -4,157 +4,172 @@ title: VOB functions # VOB - functions for object manipulation VOB functions allow you to manipulate game world objects. -## Vob_GetVobPosition -Returns the current position of the object in the world +## `Vob_GetVobPosition` +!!! function "`Vob_GetVobPosition`" + Returns the current position of the object in the world -```dae -func C_Position Vob_GetVobPosition( var C_Vob vob ) {}; -``` + ```dae + func C_Position Vob_GetVobPosition( var C_Vob vob ) {}; + ``` -- `vob` - vob to ge the position of -- `return` - C_Position instance - position of the VOB + - `vob` - vob to ge the position of + - `return` - C_Position instance - position of the VOB -## Vob_SetVobPosition -Sets the current position of the object in the world +## `Vob_SetVobPosition` +!!! function "`Vob_SetVobPosition`" + Sets the current position of the object in the world -```dae -func void Vob_SetVobPosition( var C_Vob vob, var C_Position pos ) {}; -``` + ```dae + func void Vob_SetVobPosition( var C_Vob vob, var C_Position pos ) {}; + ``` -- `vob` - vob to get the position of -- `pos` - new position of the vob + - `vob` - vob to get the position of + - `pos` - new position of the vob -## Vob_GetVobData -Returns the universal data of the zCVob object +## `Vob_GetVobData` +!!! function "`Vob_GetVobData`" + Returns the universal data of the zCVob object -```dae -func C_Vob_Data Vob_GetVobData( var C_Vob vob ) {}; -``` + ```dae + func C_Vob_Data Vob_GetVobData( var C_Vob vob ) {}; + ``` -- `vob` - VOB to get the position of -- `return` - general vob data C_Vob_Data + - `vob` - VOB to get the position of + - `return` - general vob data C_Vob_Data -## Vob_SetVobData -Sets the universal data to a zCVob object +## `Vob_SetVobData` +!!! function "`Vob_SetVobData`" + Sets the universal data to a zCVob object -```dae -func void Vob_SetVobData( var C_Vob vob, var C_Vob_Data data ) {}; -``` + ```dae + func void Vob_SetVobData( var C_Vob vob, var C_Vob_Data data ) {}; + ``` -- `vob` - VOB to get the position of -- `data` - general vob data C_Vob_Data + - `vob` - VOB to get the position of + - `data` - general vob data C_Vob_Data -## Vob_GetLightData -Returns zCVobLight object data +## `Vob_GetLightData` +!!! function "`Vob_GetLightData`" + Returns zCVobLight object data -```dae -func C_Light_Data Vob_GetLightData( var C_Vob vobLight ) {}; -``` + ```dae + func C_Light_Data Vob_GetLightData( var C_Vob vobLight ) {}; + ``` -- `vobLight` - vobLight object -- `return` - C_Light_Data of the light + - `vobLight` - vobLight object + - `return` - C_Light_Data of the light -## Vob_SetLightData -Sets the data of a zCVobLight object +## `Vob_SetLightData` +!!! function "`Vob_SetLightData`" + Sets the data of a zCVobLight object -```dae -func void Vob_SetLightData( var C_Vob vobLight, var C_Light_Data data ) {}; -``` + ```dae + func void Vob_SetLightData( var C_Vob vobLight, var C_Light_Data data ) {}; + ``` -- `vobLight` - object to apply the light data to -- `data` - C_Light_Data light data to be set + - `vobLight` - object to apply the light data to + - `data` - C_Light_Data light data to be set -## Vob_ClearLightAniList -Clears the list of animation colours for the light source +## `Vob_ClearLightAniList` +!!! function "`Vob_ClearLightAniList`" + Clears the list of animation colours for the light source -```dae -func void Vob_ClearLightAniList( var C_Vob vobLight ) {}; -``` + ```dae + func void Vob_ClearLightAniList( var C_Vob vobLight ) {}; + ``` -- `vobLight` - light vob + - `vobLight` - light vob -## Vob_AddLightAniColor -Adds a color to the colour list +## `Vob_AddLightAniColor` +!!! function "`Vob_AddLightAniColor`" + Adds a color to the colour list -```dae -func void Vob_AddLightAniColor( var C_Vob vobLight, var C_Color col ) {}; -``` + ```dae + func void Vob_AddLightAniColor( var C_Vob vobLight, var C_Color col ) {}; + ``` -- `vobLight` - object to apply the colour to -- `col` - colour to be applied + - `vobLight` - object to apply the colour to + - `col` - colour to be applied -## Vob_AddLightAniColorRGB -Adds a color to the colour list +## `Vob_AddLightAniColorRGB` +!!! function "`Vob_AddLightAniColorRGB`" + Adds a color to the colour list -```dae -func void Vob_AddLightAniColorRGB( var C_Vob vobLight, - var int r, - var int g, - var int b ) {}; -``` + ```dae + func void Vob_AddLightAniColorRGB( var C_Vob vobLight, + var int r, + var int g, + var int b ) {}; + ``` -- `vobLight` - object to apply the colour to -- `r` - red colour channel -- `g` - green colour channel -- `b` - blue colour channel + - `vobLight` - object to apply the colour to + - `r` - red colour channel + - `g` - green colour channel + - `b` - blue colour channel -## Vob_GetMobData -Returns the data of the oCMOB object +## `Vob_GetMobData` +!!! function "`Vob_GetMobData`" + Returns the data of the oCMOB object -```dae -func C_Mob_Data Vob_GetMobData( var C_Vob mob ) {}; -``` + ```dae + func C_Mob_Data Vob_GetMobData( var C_Vob mob ) {}; + ``` -- `mob` - oCMOB object -- `return` - mob data + - `mob` - oCMOB object + - `return` - mob data -## Vob_SetMobData -Sets the data of the oCMOB object +## `Vob_SetMobData` +!!! function "`Vob_SetMobData`" + Sets the data of the oCMOB object -```dae -func void Vob_SetMobData( var C_Vob mob, var C_Mob_Data data ) {}; -``` + ```dae + func void Vob_SetMobData( var C_Vob mob, var C_Mob_Data data ) {}; + ``` -- `mob` - oCMOB object -- `data` - C_Mob_Data to be set + - `mob` - oCMOB object + - `data` - C_Mob_Data to be set -## Vob_GetMobInterData -Returns the data of the oCMobInter object +## `Vob_GetMobInterData` +!!! function "`Vob_GetMobInterData`" + Returns the data of the oCMobInter object -```dae -func MobInter_Data Vob_GetMobInterData( var C_Vob mobInter ) {}; -``` + ```dae + func MobInter_Data Vob_GetMobInterData( var C_Vob mobInter ) {}; + ``` -- `mobInter` - oCMobInter object -- `return` - MobInter_Data of the object + - `mobInter` - oCMobInter object + - `return` - MobInter_Data of the object -## Vob_SetMobInterData -Sets the data of the oCMobInter object +## `Vob_SetMobInterData` +!!! function "`Vob_SetMobInterData`" + Sets the data of the oCMobInter object -```dae -func void Vob_SetMobInterData( var C_Vob mobInter, var C_MobInter_Data data ) {}; -``` + ```dae + func void Vob_SetMobInterData( var C_Vob mobInter, var C_MobInter_Data data ) {}; + ``` -- `mobInter` - oCMobInter object -- `data` - MobInter_Data of the object + - `mobInter` - oCMobInter object + - `data` - MobInter_Data of the object -## Vob_GetMobInterData -Returns the data of the oCMobLockable object +## `Vob_GetMobInterData` +!!! function "`Vob_GetMobInterData`" + Returns the data of the oCMobLockable object -```dae -func C_MobLockable_Data Vob_GetMobInterData( var C_Vob mobLock ) {}; -``` + ```dae + func C_MobLockable_Data Vob_GetMobInterData( var C_Vob mobLock ) {}; + ``` -- `mobLock` - oCMobLockable object -- `data` - MobInter_Data of the object -- `return` - C_MobLockable_Data of the object + - `mobLock` - oCMobLockable object + - `data` - MobInter_Data of the object + - `return` - C_MobLockable_Data of the object -## Vob_SetMobInterData -Sets the data of the oCMobLockable object +## `Vob_SetMobInterData` +!!! function "`Vob_SetMobInterData`" + Sets the data of the oCMobLockable object -```dae -func void Vob_SetMobInterData( var C_Vob mobLock, var C_MobLockable_Data data ) {}; -``` + ```dae + func void Vob_SetMobInterData( var C_Vob mobLock, var C_MobLockable_Data data ) {}; + ``` -- `mobLock` - oCMobLockable object -- `data` - C_MobLockable_Data of the object + - `mobLock` - oCMobLockable object + - `data` - C_MobLockable_Data of the object diff --git a/docs/zengin/scripts/extenders/zparserextender/externals/wld.md b/docs/zengin/scripts/extenders/zparserextender/externals/wld.md index 7c4f383008..07582ee3fe 100644 --- a/docs/zengin/scripts/extenders/zparserextender/externals/wld.md +++ b/docs/zengin/scripts/extenders/zparserextender/externals/wld.md @@ -4,96 +4,103 @@ title: WLD functions # WLD - world manipulation functions Functions related to the world. -## Wld_ChangeLevel -Trigger level change. - -```dae -func void Wld_ChangeLevel( var string world, var string waypoint ) {}; -``` - -- `world` - name of the world -- `waypoint` - target waypoint - -## Wld_FindVob -Return the VOB instance based on its name. - -```dae -func instance Wld_FindVob( var string vobname ) {}; -``` - -- `vobname` - name of the vob -- `return` - zCVob pointer - -## Wld_PlayEffectVob -Play a visual effect at specified vob - -```dae -func void Wld_PlayEffectVob( var string effect, - var instance pvob, +## `Wld_ChangeLevel` +!!! function "`Wld_ChangeLevel`" + Trigger level change. + + ```dae + func void Wld_ChangeLevel( var string world, var string waypoint ) {}; + ``` + + - `world` - name of the world + - `waypoint` - target waypoint + +## `Wld_FindVob` +!!! function "`Wld_FindVob`" + Return the VOB instance based on its name. + + ```dae + func instance Wld_FindVob( var string vobname ) {}; + ``` + + - `vobname` - name of the vob + - `return` - zCVob pointer + +## `Wld_PlayEffectVob` +!!! function "`Wld_PlayEffectVob`" + Play a visual effect at specified vob + + ```dae + func void Wld_PlayEffectVob( var string effect, + var instance pvob, + var int level, + var int damage, + var int damage_type, + var int damage_speed ) {}; + ``` + + - `effect` - effect name + - `pvob` - zCVob to play the effect at + - `level` - effect level + - `damage` - damage amount + - `damage_type` - damage type + - `damage_speed` - damage interval + +## `Wld_PlayEffectAt` +!!! function "`Wld_PlayEffectAt`" + Play a visual effect at specified world coordinates + + ```dae + func void Wld_PlayEffectAt( var string effect, + var instance coord, var int level, var int damage, var int damage_type, var int damage_speed ) {}; -``` - -- `effect` - effect name -- `pvob` - zCVob to play the effect at -- `level` - effect level -- `damage` - damage amount -- `damage_type` - damage type -- `damage_speed` - damage interval - -## Wld_PlayEffectAt -Play a visual effect at specified world coordinates - -```dae -func void Wld_PlayEffectAt( var string effect, - var instance coord, - var int level, - var int damage, - var int damage_type, - var int damage_speed ) {}; -``` + ``` -- `effect` - effect name -- `coord` - world coordinates (`zVEC3`) to play the effect at -- `level` - effect level -- `damage` - damage amount -- `damage_type` - damage type -- `damage_speed` - damage interval + - `effect` - effect name + - `coord` - world coordinates (`zVEC3`) to play the effect at + - `level` - effect level + - `damage` - damage amount + - `damage_type` - damage type + - `damage_speed` - damage interval -## Wld_ToggleRain -Turns on the rain +## `Wld_ToggleRain` +!!! function "`Wld_ToggleRain`" + Turns on the rain -```dae -func void Wld_ToggleRain( var float weight, var float time ) {}; -``` + ```dae + func void Wld_ToggleRain( var float weight, var float time ) {}; + ``` -- `weight` - the strength of the rain -- `time` - rain duration + - `weight` - the strength of the rain + - `time` - rain duration -## Wld_SetWeatherType -Sets the weather type. -Types: +## `Wld_SetWeatherType` +!!! function "`Wld_SetWeatherType`" + Sets the weather type. + Types: -`0` - snow -`1` - rain + `0` - snow + `1` - rain -```dae -func void Wld_SetWeatherType( var int type ) {}; -``` + ```dae + func void Wld_SetWeatherType( var int type ) {}; + ``` -- `type` - weather type + - `type` - weather type -## Wld_GetWeatherType -Returns the weather type. -Types: +## `Wld_GetWeatherType` +!!! function "`Wld_GetWeatherType`" + Returns the weather type. + Types: -`0` - snow -`1` - rain + `0` - snow + `1` - rain -```dae -func int Wld_GetWeatherType() {}; -``` + ```dae + func int Wld_GetWeatherType() {}; + ``` -- `return` - weather type + - `return` - weather type