Skip to content

Commit f71e37e

Browse files
committed
Add processing table page
1 parent 7a7ef32 commit f71e37e

File tree

3 files changed

+211
-0
lines changed

3 files changed

+211
-0
lines changed
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
---
2+
title: it-drugs - Processing Tables
3+
description: So let's start setting up the processing tables.
4+
---
5+
6+
import {Tabs} from 'nextra/components'
7+
import ExternLink from '@components/ExternLink'
8+
import Accordion from '@components/Accordion'
9+
import AccordionGroup from '@components/AccordionGroup'
10+
import { IconExternalLink } from '@tabler/icons-react'; // Importiere das Tabler-Icon
11+
12+
# ⚗️・Processing Tables
13+
So let's start setting up the processing tables.
14+
15+
To be able to use the processing tables, `Config.EnableProcessing` must be set to **true** in the Config!
16+
17+
## Config.ProccesingSkillCheck
18+
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.
19+
20+
The skill check can be customized with `Config.SkillCheck`.
21+
22+
If the skill check is deactivated, the player only has to wait a certain amount of time and then receives the item.
23+
24+
More information about the skill check can be found here:
25+
<ExternLink
26+
href="https://overextended.dev/ox_lib/Modules/Interface/Client/skillcheck"
27+
icon={IconExternalLink}
28+
/>
29+
30+
## Config.ProcessingTables
31+
The individual processing tables can now be configured here:
32+
33+
```lua
34+
['weed_processing_table'] = {
35+
type = 'weed',
36+
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
37+
recipes = {
38+
['joint'] = {
39+
label = 'Joint',
40+
showIngrediants = true,
41+
ingrediants = {
42+
['weed_lemonhaze'] = 3,
43+
['paper'] = 1
44+
},
45+
outputs = {
46+
['joint'] = 2
47+
},
48+
processTime = 5,
49+
failChance = 15,
50+
animation = {
51+
dict = 'anim@gangops@facility@servers@bodysearch@',
52+
anim = 'player_search',
53+
}
54+
},
55+
}
56+
}
57+
```
58+
59+
```lua
60+
['weed_processing_table']
61+
```
62+
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.
63+
64+
---
65+
```lua
66+
model = 'bkr_prop_weed_table_01a'
67+
```
68+
The model of the processing table here can theoretically be used with any Fivem model.
69+
70+
### Recipes
71+
Each table can theoretically have an infinite number of recipes, how exactly a recipe must look is explained here
72+
73+
```lua
74+
['joint'] = {
75+
label = 'Joint', -- name of the recipe in the menu
76+
showIngrediants = true,
77+
ingrediants = {
78+
['weed_lemonhaze'] = 3,
79+
['paper'] = 1
80+
},
81+
outputs = {
82+
['joint'] = 2
83+
},
84+
processTime = 5,
85+
failChance = 15,
86+
animation = {
87+
dict = 'anim@gangops@facility@servers@bodysearch@',
88+
anim = 'player_search',
89+
}
90+
},
91+
```
92+
93+
```lua
94+
['joint']
95+
```
96+
We start with the recipe id, this specifies the name of the recipe, the name is only relevant for the script.
97+
The recipe id must not contain any special characters or spaces and must be unique.
98+
99+
---
100+
101+
```lua
102+
showIngrediants = true,
103+
ingrediants = {
104+
['weed_lemonhaze'] = 3,
105+
['paper'] = 1
106+
},
107+
```
108+
For each recipe you can set whether the player should see which ingredients he needs for this recipe.
109+
<Tabs items={["showIngrediants = true", "showIngrediants = false"]}>
110+
<Tabs.Tab>
111+
![Docs Banner](/processing_table_show.png)
112+
</Tabs.Tab>
113+
<Tabs.Tab>
114+
![Docs Banner](/processing_table_hide.png)
115+
</Tabs.Tab>
116+
</Tabs>
117+
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:
118+
```lua copy
119+
['item_name'] = amount_you_need,
120+
```
121+
122+
---
123+
124+
```lua
125+
outputs = {
126+
['joint'] = 2
127+
},
128+
```
129+
The outputs of a recipe work in exactly the same way as the ingredients, and here too any number of items can be added.
130+
```lua copy
131+
['item_name'] = amount_you_get,
132+
```
133+
134+
---
135+
136+
```lua
137+
processTime = 5,
138+
```
139+
The processTime is the time in seconds it takes to process an item, this time is only used if `Config.ProcessingSkillCheck` is **false**.
140+
141+
---
142+
143+
```lua
144+
failChance = 15,
145+
```
146+
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.
147+
148+
---
149+
150+
```lua
151+
animation = {
152+
dict = 'anim@gangops@facility@servers@bodysearch@', -- Animation dict
153+
anim = 'player_search', -- Animation name
154+
}
155+
```
156+
Specifying an animation is optional if no animation is specified, the default animation of the script is used.
157+
So if you want, the complete animation part can be deleted from every recipe.
158+
159+
---
160+
161+
<AccordionGroup>
162+
<Accordion title="Processin table configuration template">
163+
```lua copy
164+
['uniqe_table_id'] = {
165+
type = 'weed',
166+
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
167+
recipes = {
168+
-- Here you can add as many recipes as you want
169+
}
170+
}
171+
```
172+
</Accordion>
173+
<Accordion title="Reciepe configuration template">
174+
**With Animation:**
175+
```lua copy
176+
['uniqe_recipe_id'] = {
177+
label = 'Recipe name', -- name of the recipe in the menu
178+
showIngrediants = true, -- true or false
179+
ingrediants = {
180+
['ingrediant_one'] = ingrediant_one_amount,
181+
['ingrediant_two'] = ingrediant_one_amount,
182+
},
183+
outputs = {
184+
['output_one'] = output_one_amount,
185+
},
186+
processTime = 5,
187+
failChance = 15,
188+
animation = { -- Optional you also can delete this
189+
dict = 'anim@gangops@facility@servers@bodysearch@',
190+
anim = 'player_search',
191+
}
192+
},
193+
```
194+
**Without Animation:**
195+
```lua copy
196+
['uniqe_recipe_id'] = {
197+
label = 'Recipe name', -- name of the recipe in the menu
198+
showIngrediants = true, -- true or false
199+
ingrediants = {
200+
['ingrediant_one'] = ingrediant_one_amount,
201+
['ingrediant_two'] = ingrediant_one_amount,
202+
},
203+
outputs = {
204+
['output_one'] = output_one_amount,
205+
},
206+
processTime = 5,
207+
failChance = 15,
208+
},
209+
```
210+
</Accordion>
211+
</AccordionGroup>

public/processing_table_hide.png

37.1 KB
Loading

public/processing_table_show.png

28.9 KB
Loading

0 commit comments

Comments
 (0)