diff --git a/docs/zengin/scripts/classes/c_musictheme.md b/docs/zengin/scripts/classes/c_musictheme.md index 52f1d9e92e..ab04f13c8f 100644 --- a/docs/zengin/scripts/classes/c_musictheme.md +++ b/docs/zengin/scripts/classes/c_musictheme.md @@ -81,7 +81,7 @@ const INT TRANSITION_SUB_TYPE_MEASURE = 3; // Gradual transition ``` ## Name features -The musical themes of the game are played depending on the game situation. By default, the theme with the ending is played `_STD` (standard). In case of a threat, the theme will be played with the ending `_THR` (threat). Theme plays during combat `_FGT` (fight). +The musical themes of the game are played depending on the game situation. By default, the theme with the `_STD` (standard) suffix is played. In case of a threat, the `_THR` (threat) theme will be played. During the combat the `_FGT` (fight) theme plays. ```dae instance WOO_DAY_STD(C_MUSICTHEME_STANDARD) @@ -99,7 +99,7 @@ instance WOO_DAY_FGT(C_MUSICTHEME_FIGHT) file = "woo_dayfgt.sgt"; }; ``` -In addition, with the suffix `_DAY_` and `_NGT_` determined by day or night, the theme is played. +In addition, the suffix `_DAY_` and `_NGT_` determines whether the theme should be played on day or night. ```dae instance OWD_DAY_FGT(C_MUSICTHEME_FIGHT) { @@ -111,4 +111,5 @@ instance OWD_NGT_STD(C_MUSICTHEME_STANDARD) file = "owd_daystd.sgt"; }; ``` -Themes from prototypes are used by default `C_MUSICTHEME_STANDARD`, `C_MUSICTHEME_THREAT` and `C_MUSICTHEME_FIGHT`. \ No newline at end of file +!!! Tip + In G2 the `C_MUSICTHEME_STANDARD`, `C_MUSICTHEME_THREAT` and `C_MUSICTHEME_FIGHT` prototypes are used by default. \ No newline at end of file diff --git a/docs/zengin/scripts/extenders/ikarus/floats.md b/docs/zengin/scripts/extenders/ikarus/floats.md index 343a5dc451..c759530204 100644 --- a/docs/zengin/scripts/extenders/ikarus/floats.md +++ b/docs/zengin/scripts/extenders/ikarus/floats.md @@ -345,13 +345,13 @@ func void printf(var int x) ### Simple operations ```dae -var int float1 = mkf(5); // Create an Ikarus float with value 5 -var int float2 = mkf(2); // Create an Ikarus float with value 2 +var int float1; float1 = mkf(5); // Create an Ikarus float with value 5 +var int float2; float2 = mkf(2); // Create an Ikarus float with value 2 -var int addResult = addf(float1, float2); // Add float1 and float2 -var int subResult = subf(float1, float2); // Subtract float2 from float1 -var int mulResult = mulf(float1, float2); // Multiply float1 by float2 -var int divResult = divf(float1, float2); // Divide float1 by float2 +var int addResult; addResluts = addf(float1, float2); // Add float1 and float2 +var int subResult; subResults = subf(float1, float2); // Subtract float2 from float1 +var int mulResult; mulRelsults = mulf(float1, float2); // Multiply float1 by float2 +var int divResult; divResults = divf(float1, float2); // Divide float1 by float2 printf(addResult); // Output: 7 printf(subResult); // Output: 3 diff --git a/docs/zengin/scripts/extenders/ikarus/functions/asm.md b/docs/zengin/scripts/extenders/ikarus/functions/asm.md index 0f57c150a8..85bc1dd449 100644 --- a/docs/zengin/scripts/extenders/ikarus/functions/asm.md +++ b/docs/zengin/scripts/extenders/ikarus/functions/asm.md @@ -192,7 +192,7 @@ Executes the code dictated up to that point, similar to how an external function func void ASM_RunOnce() ``` -## Examples +## Example The following function sets the NPC passed as slf as the player, as if you had pressed **O** in Marvin mode with this NPC in focus. This is so short because there is already a function for this exact purpose, it's just not normally accessible from the scripts. It is therefore sufficient to write assembly code that pushes the parameter of the function (the `this` pointer) into the appropriate register and then calls the function. ```dae func void SetAsPlayer(var C_NPC slf) { /* Adresse der Funktion */ @@ -216,7 +216,7 @@ func void SetAsPlayer(var C_NPC slf) { /* Adresse der Funktion */ !!! Note Call targets are specified relative to the instruction that would have been executed after the actual call instruction. Therefore, both ASM_Here() and the subtraction of 4 in the call parameter are necessary. -The above example describes, among other things, [`CALL__thiscall`](#) function form the [CALL Package](#) that can be also used to implement `SetAsPlayer`. +The above example describes, among other things, [`CALL__thiscall`](#) function form the [CALL Package](call.md) that can be also used to implement `SetAsPlayer`. ```dae func void SetAsPlayer(var C_NPC slf) { const int oCNpc__SetAsPlayer = 7612064; diff --git a/docs/zengin/scripts/extenders/ikarus/functions/mem_access.md b/docs/zengin/scripts/extenders/ikarus/functions/mem_access.md index 81f4e34065..717703ee01 100644 --- a/docs/zengin/scripts/extenders/ikarus/functions/mem_access.md +++ b/docs/zengin/scripts/extenders/ikarus/functions/mem_access.md @@ -114,7 +114,7 @@ func void MEM_WriteInt(var int address, var int value) - `#!dae var int value` Integer value to write -??? abstract "Examples" +??? abstract "Example" An example of using this function is the following Ikarus function, which turns debugging messages on and off: ```dae func void MEM_SetShowDebug(var int on) diff --git a/docs/zengin/scripts/extenders/ikarus/setup.md b/docs/zengin/scripts/extenders/ikarus/setup.md index eb28d1e6b3..e2c139c371 100644 --- a/docs/zengin/scripts/extenders/ikarus/setup.md +++ b/docs/zengin/scripts/extenders/ikarus/setup.md @@ -16,7 +16,7 @@ Before unpacking the downloaded archive it's needed to create a dedicated folder ## Parsing Ikarus consists of three main parts, [constants](./constants.md), classes and the Ikarus core. It's essential to parse these in a specific order. Additionally, there is a [floats package](floats.md) which isn't essential, but it is highly recommended to parse it, especially if you are working with [LeGo](../lego/index.md) that depends on it. -The Ikarus Core is identical for both Gothic 1 and 2 and is contained in a single file, `Ikarus.d`. However, there are separate files for the constants and classes for each engine, and they must be parsed correctly. Ikarus uses a C_NPC and therefore has to be parsed after the C_NPC class (after the `classes.d` file). There are no other dependencies. +The Ikarus Core is identical for both Gothic 1 and 2 and is contained in a single file, [`Ikarus.d`](https://github.com/Lehona/Ikarus/blob/master/Ikarus.d). However, there are separate files for the constants and classes for each engine, and they must be parsed correctly. Ikarus uses a C_NPC and therefore has to be parsed after the C_NPC class (after the `classes.d` file). There are no other dependencies. Since Ikarus 1.2.1 there is additional `.src` file for each game engine, to simplify adding files to `Gothic.src` diff --git a/docs/zengin/scripts/extenders/index.md b/docs/zengin/scripts/extenders/index.md index 4b0d99633c..f841092f5e 100644 --- a/docs/zengin/scripts/extenders/index.md +++ b/docs/zengin/scripts/extenders/index.md @@ -1,4 +1,4 @@ # Daedalus extenders -The default scripting language Daedalus can be quite limiting. Over the years the community created quite a few extenders to, well, extend the functionality. Before Union came along, the standard to interface with the engine was the script library [Ikarus](ikarus/index.md) and a collection of packages [LeGo](lego/index.md) built on top of that. Not so recently, an additional script packet was made (and is actively being worked on) [AF Script Packet](afsp/index.md) that offers even more functionality and is built on tom of Ikarus & LeGo. +The default scripting language Daedalus can be quite limiting. Over the years the community created quite a few extenders to, well, extend the functionality. Before Union came along, the standard to interface with the engine was the script library [Ikarus](ikarus/index.md) and a collection of packages [LeGo](lego/index.md) built on top of that. Not so recently, an additional script packet was made (and is actively being worked on) [AF Script Packet](afsp/index.md) that offers even more functionality and is built on top of Ikarus & LeGo. With the adoption of Union and plugins the Union system can use a new extender emerged called [zParserExtender](zparserextender/index.md). Other Union plugins can, of course, implement their own external functions. A lot of scripts are also scattered on the Gothic forums, and documentation of some of them can be found in the [Standalone](standalone/index.md) section. \ No newline at end of file diff --git a/docs/zengin/scripts/extenders/lego/tools/permmem.md b/docs/zengin/scripts/extenders/lego/tools/permmem.md index 367e0fe487..96e31e52a7 100644 --- a/docs/zengin/scripts/extenders/lego/tools/permmem.md +++ b/docs/zengin/scripts/extenders/lego/tools/permmem.md @@ -153,7 +153,7 @@ func int numHandles() ``` ### `sizeof` -Returns Size of the instance's class in bytes +Gets the size of the given instance's class. ```dae func int sizeof(var int inst) ``` @@ -162,6 +162,10 @@ func int sizeof(var int inst) - `#!dae var int inst` Any instance +**Return value** + +The function returns the size of a given instance's class in bytes. + ### `Hlp_IsValidHandle` Indicates whether the handle exists and is managed by PermMem. ```dae @@ -242,6 +246,7 @@ func int PM_Exists(var string name) Name of the field **Return value** + The function returns `TRUE` if the field exists in the archive, `FALSE` is returned otherwise. ## Archiver diff --git a/docs/zengin/scripts/extenders/lego/tools/string_builder.md b/docs/zengin/scripts/extenders/lego/tools/string_builder.md index a4c5531b44..7734c54d5d 100644 --- a/docs/zengin/scripts/extenders/lego/tools/string_builder.md +++ b/docs/zengin/scripts/extenders/lego/tools/string_builder.md @@ -1,6 +1,6 @@ --- title: StringBuilder -description: LeGo package for working with the 2D interface +description: LeGo package for creating strings without using a 'ConcatStrings' function --- # StringBuilder The StringBuilder is a package, designed to easily concatenate multiple elements into a string (without `ConcatStrings` and `IntToString`). diff --git a/mkdocs.yml b/mkdocs.yml index 11f2357caa..e3e98cbbd3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -162,7 +162,7 @@ plugins: Functions: Funkcje General info: Informacje ogólne Home: Strona Główna - Plugins: Wtyczki + Plugins: Pluginy Scripts: Skrypty Sound: Dźwięk Standalone: Samodzielne