Skip to content

Commit

Permalink
[LeGo] Fixes, missing functions and social cards
Browse files Browse the repository at this point in the history
  • Loading branch information
muczc1wek committed Oct 28, 2023
1 parent 287e4bf commit 6db520b
Show file tree
Hide file tree
Showing 35 changed files with 1,169 additions and 823 deletions.
514 changes: 259 additions & 255 deletions docs/zengin/scripts/extenders/lego/applications/anim8.md

Large diffs are not rendered by default.

96 changes: 58 additions & 38 deletions docs/zengin/scripts/extenders/lego/applications/bloodsplats.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,58 @@
# Bloodsplats
If this package is activated, red blood splatters will appear on the screen when the hero takes damage. For this, the damage perception for the hero is redirected to `_B_HeroDamage()`. To use the Bloodsplats, the enclosed textures must be available. Also, the VFX "HERO_HURT" (also included) should be entered in the `VfxInst.d` to create an even better hit effect. All textures used here are from [CGTextures.com](http://CGTextures.com). If you use Bloodsplats in your modification, this site must be noted in the credits.

!!! Tip
See [user constants](../various/userconstants.md#bloodsplats) to edit behavior of this packet.

## Dependencies

- Floats
- View
- [Random](../tools/random.md)
- [Anim8](anim8.md)

## Initialization
Initialize with `LeGo_Bloodsplats` flag.
```dae
LeGo_Init(LeGo_Bloodsplats);
```
## Implementation
[:material-github: Bloodsplats.d on GitHub](https://github.com/Lehona/LeGo/blob/dev/Bloodsplats.d)

## Functions

### `Bloodsplat`
Puts a blood splatter on the screen.
```dae
func void Bloodsplat(var int damage)
```
**Parameters**

- `#!dae var int damage`
The damage (affects the size of the splatter)

### `Bloodsplats_Rage`
Pretty pointless feature that smears the entire screen.
```dae
func void Bloodsplats_Rage()
```
---
title: Bloodsplats
description: LeGo package for displaying bloodsplats on a screen when player is hit
---
# Bloodsplats
If this package is activated, red blood splatters will appear on the screen when the hero takes damage. For this, the damage perception for the hero is redirected to `_B_HeroDamage()`. To use the Bloodsplats, the enclosed textures must be available. Also, the VFX "HERO_HURT" (also included) should be entered in the `VfxInst.d` to create an even better hit effect. All textures used here are from [CGTextures.com](http://CGTextures.com). If you use Bloodsplats in your modification, this site must be noted in the credits.

!!! Tip
See [user constants](../various/userconstants.md#bloodsplats) to edit behavior of this packet.

## Dependencies

- [Floats](../../ikarus/floats.md)
- View
- [Random](../tools/random.md)
- [Anim8](anim8.md)

## Initialization
Initialize with `LeGo_Bloodsplats` flag.
```dae
LeGo_Init(LeGo_Bloodsplats);
```
## Implementation
[:material-github: Bloodsplats.d on GitHub](https://github.com/Lehona/LeGo/blob/dev/Bloodsplats.d)

## Functions

### `Bloodsplat`
Puts a blood splatter on the screen.
```dae
func void Bloodsplat(var int damage)
```
**Parameters**

- `#!dae var int damage`
The damage (affects the size of the splatter)

### `Bloodsplats_Rage`
Pretty pointless feature that smears the entire screen.
```dae
func void Bloodsplats_Rage()
```

### `Npc_GetPercFunc`
`oCNpc::GetPerceptionFunc` engine function wraper
```dae
func int Npc_GetPercFunc(var C_Npc npc, var int type)
```
**Parameters**

- `#!dae var C_NPC npc`
NPC whose percepcion is checked
- `#!dae var int type`
Checked perception type (form [`Constant.d`](https://github.com/VaanaCZ/gothic-2-addon-scripts/blob/Unified-EN/_work/Data/Scripts/Content/_intern/Constants.d#L213-L258))

**Return value**

The function returns the state of NPCs selected perception.
10 changes: 3 additions & 7 deletions docs/zengin/scripts/extenders/lego/applications/buffs.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func int Buff_Apply(var C_NPC npc, var int buff)
The function returns the handle of the buff, which was just generated.

### `Buff_ApplyUnique`
`Buff_Apply`, but nothing happens if a status effect of that kind is already on the NPC.
[`Buff_Apply`](#buff_apply), but nothing happens if a status effect of that kind is already on the NPC.
```dae
func int Buff_ApplyUnique(var C_NPC npc, var int buff)
```
Expand All @@ -56,7 +56,7 @@ func int Buff_ApplyUnique(var C_NPC npc, var int buff)
The function returns the handle of the buff, which was just generated or `0` if the buff is already applied on the NPC.

### `Buff_ApplyOrRefresh`
`Buff_Apply`, but if a status effect of this type is already affecting the NPC, the duration will be reset.
[`Buff_Apply`](#buff_apply), but if a status effect of this type is already affecting the NPC, the duration will be reset.
```dae
func int Buff_ApplyOrRefresh(var C_NPC n, var int buff)
```
Expand Down Expand Up @@ -84,8 +84,6 @@ func void Buff_Refresh(var int buffHandle)

### `Buff_Remove`
Removes the buff from the all NPCs.

[//]: # (TODO Needs to be checked)
```dae
func void Buff_Remove(var int buffHandle)
```
Expand All @@ -96,8 +94,6 @@ func void Buff_Remove(var int buffHandle)

### `Buff_RemoveAll`
Removes the buffs form the NPC.

[//]: # (TODO Needs to be checked)
```dae
func void Buff_RemoveAll(var C_NPC npc, var int buffInstance)
```
Expand Down Expand Up @@ -179,7 +175,7 @@ class lCBuff

## Examples

## Delayed poison
### Delayed poison
```dae
instance deadly_poison(lCBuff)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Polecenia konsoli
title: Console Commands
---
# Console Commands - polecenia konsoli
Ten Pakiet pozwala na tworzenie nowych poleceń konsoli dostępnej po naciśnięciu klawisza F2 w trybie marvin.
Expand Down
6 changes: 3 additions & 3 deletions docs/zengin/scripts/extenders/lego/applications/cursor.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ This package implements Gothic in-game mouse cursor support. To visually display

## Dependencies

- Floats
- [Floats](../../ikarus/floats.md)
- [FrameFunctions](../tools/frame_functions.md)
- View
- [View](../tools/view.md)

## Initialization
Initialize with `LeGo_Cursor` flag.
Expand Down Expand Up @@ -115,7 +115,7 @@ func void Button_Click()
};
```

This also can be done by the Buttons package instead of View.
This also can be done by the Buttons package instead of [View](../tools/view.md).

### Event handler
Since LeGo 2.2 there is also an event handler (`#!dae var int Cursor_Event`) in the cursor package. This example briefly explains how it works:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Dialoggestures
description: LeGo package for modifying the NPCs' gestures during dialogue
---
# Dialoggestures
This package can modify the NPCs' gestures during dialogue to better bring out emotions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LeGo_Init(LeGo_Focusnames);
[:material-github: Focusnames.d on GitHub](https://github.com/Lehona/LeGo/blob/dev/Focusnames.d)

## Usage
If you want to change colors for any behavior edit the following functions directly in `Focusnames.d` file.
If you want to change colors for any behavior edit the following functions directly in [`Focusnames.d`](https://github.com/Lehona/LeGo/blob/dev/Focusnames.d) file.

### `Focusnames_Color_Friendly`
```dae
Expand Down
4 changes: 4 additions & 0 deletions docs/zengin/scripts/extenders/lego/applications/gamestate.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Gamestate
description: LeGo package for calling functions during different game states
---
# Gamestate
Gamestate package allows to check for different game states (game start, game load or level change).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Stan gry
title: Gamestate
description: Pakiet LeGo do wywoływania funkcji podczas różnych stanów gry
---
# Gamestate - stan gry
Pakiet Gamestate pozwala sprawdzić stan gry (rozpoczęcie gry, ładowanie gry lub zmiana poziomu).
Expand Down
2 changes: 1 addition & 1 deletion docs/zengin/scripts/extenders/lego/applications/names.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Allows the user to change NPC name e.g. after he shows up.

## Dependencies
N/A
- [Talents](../tools/talents.md)

## Initialization
N/A
Expand Down
2 changes: 1 addition & 1 deletion docs/zengin/scripts/extenders/lego/applications/render.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
With this package items can be rendered on the screen. Since items are rendered independently of the normal views, textures that are 'below' the items must also be managed by this package, this behaviour is managed by the priority system. The view with the highest priority is always rendered first, so it is at the bottom. In theory, any .3DS model can be rendered if you just create a suitable item script.
## Dependencies

- List
- [List](../tools/list.md)
- View
- [PermMem](../tools/permmem.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/zengin/scripts/extenders/lego/applications/saves.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ LeGo_Init(LeGo_Saves);
## Functions

### `BW_Savegame`
Custom function. It creates a stream to its own memory file, this can be filled with the `BW_*` functions from the [BinaryMachines](../tools/binary_machines.md).
Custom function. It creates a stream to its own memory file, this can be filled with the `BW_*` functions from the [BinaryMachines](../tools/binary_machines.md#binarywriter).
```dae
func void BW_Savegame()
```

### `BR_Savegame`
Custom function. It opens a stream to a previously saved memory file, which can be read from the [BinaryMachines](../tools/binary_machines.md) using the `BR_*` functions.
Custom function. It opens a stream to a previously saved memory file, which can be read from the [BinaryMachines](../tools/binary_machines.md#binaryreader) using the `BR_*` functions.
```dae
func void BR_Savegame()
```
Expand Down
48 changes: 45 additions & 3 deletions docs/zengin/scripts/extenders/lego/applications/trialoge.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Trialoge
description: LeGo package implementing trialogues to gothic
---
# Trialoge
This package allows you to create conversations with any number of NPCs and control the camera during the dialog.

Expand All @@ -16,7 +20,7 @@ LeGo_Init(LeGo_Trialoge);
## Functions

### `EquipWeapon`
Sektenspinner's function. (Taken from the forum.)
Sektenspinner's function. Makes NPC equip a weapon.
```dae
func void EquipWeapon(var C_NPC slf, var int ItemInstance)
```
Expand All @@ -25,7 +29,16 @@ func void EquipWeapon(var C_NPC slf, var int ItemInstance)
- `#!dae var C_NPC slf`
NPC to have a weapon equipped
- `#!dae var int ItemInstance`
Weapon instance to be equipped
Weapon instance ID to be equipped

**Configuration**

`#!dae const int EquipWeapon_TogglesEquip = 1`

Above constant configures the behaviour of the function when trying to equip an already equipped weapon:

- `0` - `EquipWeapon` will do nothing
- `1` - `EquipWeapon` will unequip this weapon

### `Npc_GetArmor`
Returns NPC's equipped armor.
Expand Down Expand Up @@ -53,7 +66,36 @@ func int Npc_GetMeleeWeapon(var C_NPC slf)

**Return value**

The function returns instance of melee weapon equipped by the NPC.
The function returns instance ID of melee weapon equipped by the NPC.

### `Npc_GetRangedWeapon`
Returns NPC's equipped ranged weapon.
```dae
func int Npc_GetRangedWeapon(var c_npc slf)
```
**Parameters**

- `#!dae var C_NPC slf`
NPC to get the weapon from

**Return value**

The function returns instance ID of ranged weapon equipped by the NPC.

### `Npc_TradeItem`
Swaps NPCs equipped weapon.
```dae
func void Npc_TradeItem(var c_npc slf, var int itm0, var int itm1)
```
**Parameters**

- `#!dae var C_NPC slf`
NPC to perform operation on
- `#!dae var int itm0`
instance ID of item to remove
- `#!dae var int itm1`
instance ID of item to create and equip


### `DiaCAM_Update`
Sektenspinner's function that updates the dialogue camera. (Used internally.)
Expand Down
47 changes: 44 additions & 3 deletions docs/zengin/scripts/extenders/lego/applications/trialoge.pl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Trialoge
description: Pakiet LeGo implementujący trialogi w gothicu
---
# Trialogi
Ten pakiet pozwala na tworzenie rozmów z dowolną liczbą NPC i sterowanie kamerą podczas dialogu.

Expand All @@ -16,7 +20,7 @@ LeGo_Init(LeGo_Trialoge);
## Funkcje

### `EquipWeapon`
Funkcja Sektenspinnera. (wzięta z forum)
Funkcja Sektenspinnera. Sprawia, że NPC wyposaża broń.
```dae
func void EquipWeapon(var C_NPC slf, var int ItemInstance)
```
Expand All @@ -27,6 +31,15 @@ func void EquipWeapon(var C_NPC slf, var int ItemInstance)
- `#!dae var int ItemInstance`
Instancja broni do wyposażenia

**Konfigurcja**

`#!dae const int EquipWeapon_TogglesEquip = 1`

Powyższa stała ustala zachowanie funkcji podczas próby założenia już założonej bronii:

- `0` - `EquipWeapon` nic nie zrobi
- `1` - `EquipWeapon` zdejmie tą broń

### `Npc_GetArmor`
Pobiera pancerz wyposażony przez NPC.
```dae
Expand All @@ -39,7 +52,7 @@ func int Npc_GetArmor(var C_NPC slf)

**Zwracana wartość**

Funkcja zwraca instancje pancerza założonego przez NPC.
Funkcja zwraca ID instancji pancerza założonego przez NPC.

### `Npc_GetMeleeWeapon`
Pobiera wyposażoną przez NPC broń białą.
Expand All @@ -53,7 +66,35 @@ func int Npc_GetMeleeWeapon(var C_NPC slf)

**Zwracana wartość**

Funkcja zwraca instancje broni białej wyposażonej przez NPC.
Funkcja zwraca ID instancji broni białej wyposażonej przez NPC.

### `Npc_GetRangedWeapon`
Pobiera wyposażoną przez NPC broń dystansową.
```dae
func int Npc_GetRangedWeapon(var C_NPC slf)
```
**Parametry**

- `#!dae var C_NPC slf`
NPC którego broń jest pobierana

**Zwracana wartość**

Funkcja zwraca ID instancji broni dystansowej wyposażonej przez NPC.

### `Npc_TradeItem`
Podmienia broń założoną przez NPC.
```dae
func void Npc_TradeItem(var c_npc slf, var int itm0, var int itm1)
```
**Parameters**

- `#!dae var C_NPC slf`
NPC na którym wykonywana jest operacja
- `#!dae var int itm0`
ID instancji przedmiotu do usunięcia
- `#!dae var int itm1`
ID instancji przedmiotu do stworzenia i założenia

### `DiaCAM_Update`
Funkcja Sektenspinnera. Aktualizuje kamerę dialogową. (Używana wewnętrznie)
Expand Down
Loading

0 comments on commit 6db520b

Please sign in to comment.