Custom Labs
origen_ilegalv2 ships a generic Lab Process Runner that handles all the boilerplate for a production lab: interaction points, markers, progress bars, animations, server-side validation, item consumpt
How it works
Side
File
Responsibility
origen_gang:labs:{labType}:stage_{stageId}Minimum viable lab
1. Create the config file
Config.LabHeroin = {
Enabled = true,
-- Ordered production stages
Stages = {
{ id = 'mix', label_key = 'mixing', help_key = 'mix', done_key = 'mix_done', timer = 10000 },
{ id = 'filter', label_key = 'filtering', help_key = 'filter', done_key = 'filter_done', timer = 8000 },
{ id = 'bag', label_key = 'bagging', help_key = 'bag', done_key = 'bag_done', timer = 6000 },
},
ProductionCooldown = 600000, -- 10 minutes between full cycles (ms)
Interactions = {
PointDistance = 40.0, -- lib.points render radius
DrawDistance = 8.0, -- marker draw distance
InteractDistance = 1.8, -- HelpText / [E] distance
},
-- World coords for each stage (interior coords inside the lab bucket)
Coords = {
mix = vector3(1006.09, -3200.59, -38.52),
filter = vector3(1007.89, -3201.17, -38.99),
bag = vector3(1014.25, -3194.93, -38.99),
},
-- Progress bar durations per stage (ms)
Timers = {
mix = 10000,
filter = 8000,
bag = 6000,
},
-- Items consumed/delivered per stage
-- inputs: consumed when the stage starts
-- outputs: delivered when the stage completes
-- requires: validated but NOT consumed (tools)
Recipe = {
mix = {
inputs = {
{ item = 'opium_raw', amount = 2 },
{ item = 'acetic_acid', amount = 1 },
},
},
bag = {
inputs = { { item = 'empty_bag', amount = 3 } },
outputs = { { item = 'heroin_bag', amount = 3 } },
},
},
}2. Register on the server
3. Register on the client
4. Add the lab type to Config.LabTypes
Config.LabTypes5. Add to fxmanifest.lua
fxmanifest.lua6. Add locale keys
Full config reference
Stages array
Stages arrayField
Type
Required
Description
Recipe table
Recipe tableField
Type
Description
Markers table
Markers tableAnimations table
Animations tableRequiresUpgrade flag
RequiresUpgrade flagMaxDistPerStage
MaxDistPerStageUpgrade modifiers
Modifier
Effect
Stacking
Weed lab: special flow
Step
Action
Items
Last updated