-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a7ef32
commit f71e37e
Showing
3 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
--- | ||
title: it-drugs - Processing Tables | ||
description: So let's start setting up the processing tables. | ||
--- | ||
|
||
import {Tabs} from 'nextra/components' | ||
import ExternLink from '@components/ExternLink' | ||
import Accordion from '@components/Accordion' | ||
import AccordionGroup from '@components/AccordionGroup' | ||
import { IconExternalLink } from '@tabler/icons-react'; // Importiere das Tabler-Icon | ||
|
||
# ⚗️・Processing Tables | ||
So let's start setting up the processing tables. | ||
|
||
To be able to use the processing tables, `Config.EnableProcessing` must be set to **true** in the Config! | ||
|
||
## Config.ProccesingSkillCheck | ||
It is possible to activate a skill check. If `Config.ProccesingSkillCheck` is set to **true**, the player must pass a skill check to be able to craft an item. | ||
|
||
The skill check can be customized with `Config.SkillCheck`. | ||
|
||
If the skill check is deactivated, the player only has to wait a certain amount of time and then receives the item. | ||
|
||
More information about the skill check can be found here: | ||
<ExternLink | ||
href="https://overextended.dev/ox_lib/Modules/Interface/Client/skillcheck" | ||
icon={IconExternalLink} | ||
/> | ||
|
||
## Config.ProcessingTables | ||
The individual processing tables can now be configured here: | ||
|
||
```lua | ||
['weed_processing_table'] = { | ||
type = 'weed', | ||
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a | ||
recipes = { | ||
['joint'] = { | ||
label = 'Joint', | ||
showIngrediants = true, | ||
ingrediants = { | ||
['weed_lemonhaze'] = 3, | ||
['paper'] = 1 | ||
}, | ||
outputs = { | ||
['joint'] = 2 | ||
}, | ||
processTime = 5, | ||
failChance = 15, | ||
animation = { | ||
dict = 'anim@gangops@facility@servers@bodysearch@', | ||
anim = 'player_search', | ||
} | ||
}, | ||
} | ||
} | ||
``` | ||
|
||
```lua | ||
['weed_processing_table'] | ||
``` | ||
This is the name of the item to which this configuration is bound. The item can now be used to set up a table in the game. | ||
|
||
--- | ||
```lua | ||
model = 'bkr_prop_weed_table_01a' | ||
``` | ||
The model of the processing table here can theoretically be used with any Fivem model. | ||
|
||
### Recipes | ||
Each table can theoretically have an infinite number of recipes, how exactly a recipe must look is explained here | ||
|
||
```lua | ||
['joint'] = { | ||
label = 'Joint', -- name of the recipe in the menu | ||
showIngrediants = true, | ||
ingrediants = { | ||
['weed_lemonhaze'] = 3, | ||
['paper'] = 1 | ||
}, | ||
outputs = { | ||
['joint'] = 2 | ||
}, | ||
processTime = 5, | ||
failChance = 15, | ||
animation = { | ||
dict = 'anim@gangops@facility@servers@bodysearch@', | ||
anim = 'player_search', | ||
} | ||
}, | ||
``` | ||
|
||
```lua | ||
['joint'] | ||
``` | ||
We start with the recipe id, this specifies the name of the recipe, the name is only relevant for the script. | ||
The recipe id must not contain any special characters or spaces and must be unique. | ||
|
||
--- | ||
|
||
```lua | ||
showIngrediants = true, | ||
ingrediants = { | ||
['weed_lemonhaze'] = 3, | ||
['paper'] = 1 | ||
}, | ||
``` | ||
For each recipe you can set whether the player should see which ingredients he needs for this recipe. | ||
<Tabs items={["showIngrediants = true", "showIngrediants = false"]}> | ||
<Tabs.Tab> | ||
![Docs Banner](/processing_table_show.png) | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
![Docs Banner](/processing_table_hide.png) | ||
</Tabs.Tab> | ||
</Tabs> | ||
In addition, as many ingredients can be added for each recipe as you like. simply add them to the ingrediants list according to the following scheme: | ||
```lua copy | ||
['item_name'] = amount_you_need, | ||
``` | ||
|
||
--- | ||
|
||
```lua | ||
outputs = { | ||
['joint'] = 2 | ||
}, | ||
``` | ||
The outputs of a recipe work in exactly the same way as the ingredients, and here too any number of items can be added. | ||
```lua copy | ||
['item_name'] = amount_you_get, | ||
``` | ||
|
||
--- | ||
|
||
```lua | ||
processTime = 5, | ||
``` | ||
The processTime is the time in seconds it takes to process an item, this time is only used if `Config.ProcessingSkillCheck` is **false**. | ||
|
||
--- | ||
|
||
```lua | ||
failChance = 15, | ||
``` | ||
The chance in percent that the production of an item can go wrong, which means that with `failChance = 15` there is a 15% chance that the player will not get any output when producing an item. | ||
|
||
--- | ||
|
||
```lua | ||
animation = { | ||
dict = 'anim@gangops@facility@servers@bodysearch@', -- Animation dict | ||
anim = 'player_search', -- Animation name | ||
} | ||
``` | ||
Specifying an animation is optional if no animation is specified, the default animation of the script is used. | ||
So if you want, the complete animation part can be deleted from every recipe. | ||
|
||
--- | ||
|
||
<AccordionGroup> | ||
<Accordion title="Processin table configuration template"> | ||
```lua copy | ||
['uniqe_table_id'] = { | ||
type = 'weed', | ||
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a | ||
recipes = { | ||
-- Here you can add as many recipes as you want | ||
} | ||
} | ||
``` | ||
</Accordion> | ||
<Accordion title="Reciepe configuration template"> | ||
**With Animation:** | ||
```lua copy | ||
['uniqe_recipe_id'] = { | ||
label = 'Recipe name', -- name of the recipe in the menu | ||
showIngrediants = true, -- true or false | ||
ingrediants = { | ||
['ingrediant_one'] = ingrediant_one_amount, | ||
['ingrediant_two'] = ingrediant_one_amount, | ||
}, | ||
outputs = { | ||
['output_one'] = output_one_amount, | ||
}, | ||
processTime = 5, | ||
failChance = 15, | ||
animation = { -- Optional you also can delete this | ||
dict = 'anim@gangops@facility@servers@bodysearch@', | ||
anim = 'player_search', | ||
} | ||
}, | ||
``` | ||
**Without Animation:** | ||
```lua copy | ||
['uniqe_recipe_id'] = { | ||
label = 'Recipe name', -- name of the recipe in the menu | ||
showIngrediants = true, -- true or false | ||
ingrediants = { | ||
['ingrediant_one'] = ingrediant_one_amount, | ||
['ingrediant_two'] = ingrediant_one_amount, | ||
}, | ||
outputs = { | ||
['output_one'] = output_one_amount, | ||
}, | ||
processTime = 5, | ||
failChance = 15, | ||
}, | ||
``` | ||
</Accordion> | ||
</AccordionGroup> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.