La FactorY
Script documentation

YF-Filtrer: documentation

YF-Filtrer is the premium add-on for YF-Kush. It adds two products, 3x sifted hash and frozen sift, made by hand from the freezer to the capsule: every step has its own gestures, 3D props and screens.

v1.0.0YF-Kush add-onox_inventoryox_target

YF-Filtrer – 42 €

Overview

  • 3x sifted: the YF-Kush pollen goes through the sieve twice more, then to the press.
  • Frozen sift: freezing the buds, washing in a filter bag, drying on a rack, scraping, then the press.
  • Cutting and capsule filling shared by both products, played by hand.
  • Placeable freezer and drying rack with screens, running in real time even when the player is offline.
  • Each station sits on a storage cabinet.
  • The equipment is added to the YF-Kush vendor.
  • French and English included.
YF-Kush is required

YF-Filtrer does not work on its own: it plugs into the sieve, press, tables and vendor of YF-Kush, version 1.1.0 or later.

Requirements

ResourceRole
YF-Kush 1.1.0+Sieve, press, cutting tables and vendor.
ox_libMenus, inputs, notifications.
ox_inventoryItems, cabinet storage, images.
ox_targetInteractions with the stations and tables.
oxmysqlSaves the placed freezers and racks.

OneSync enabled and game build 2545 or higher, as for YF-Kush.

Installation

Seven steps, in this order.

  1. Install YF-Kush 1.1.0

    If you have 1.0.0, update it first: see the YF-Kush documentation.

  2. Add the resource

    Get YF-Filtrer from the Cfx.re portal (see Getting your purchases). Copy the YF-Filtrer folder into your resources, without renaming it, and start it after YF-Kush.

    server.cfg
    ensure ox_lib
    ensure oxmysql
    ensure ox_inventory
    ensure ox_target
    ensure YF-Kush
    ensure YF-Filtrer
  3. Create the SQL table

    Run install/install.sql on your database. It creates yf_filtrer_stations and is safe to run again.

  4. Declare the items

    Paste the content of install/items_en.lua (English labels) or install/items.lua (French) at the end of ox_inventory/data/items.lua, before the last closing brace.

  5. Copy the images

    Copy the 45 yf_*.png images from install/images into ox_inventory/web/images.

  6. Adjust the config

    Open shared/config.lua: language, durations, yields, equipment prices. Details in Configuration.

  7. Restart the server

    A full restart is needed the first time. The console shows 12 passe(s) enregistree(s) and 6 article(s) chez le vendeur: the products are plugged into YF-Kush.

Items

50 items: the equipment, then every step of both chains for the four YF-Kush strains. The full block is provided in install/items_en.lua.

ItemRoleWeight
Freezer
yf_congelateur
Placeable station: freezing25,000 g
Drying Rack
yf_claie
Placeable station: drying8,000 g
Filter Bag
yf_sac_filtrant
Washing on a YF-Kush table, wears out300 g
Dry Ice Pack
yf_glace_carbo
2 per freezing cycle1,000 g
Ice Water
yf_eau_glacee
1 per 20 frozen weed washed1,000 g
Empty Capsule
yf_capsule_vide
One per filled capsule2 g
2x Sifted Pollen [strain]
yf_pollen_x2_<strain>
3x: 2nd pass through the sieve50 g
3x Sifted Pollen [strain]
yf_pollen_x3_<strain>
3x: 3rd pass, goes to the press50 g
3x Sifted Hash Slab [strain]
yf_plaque_x3_<strain>
Comes out of the press100 g
Frozen Weed [strain]
yf_weed_glacee_<strain>
Comes out of the freezer, thaws in 30 min2 g
Ice-o-lator [strain]
yf_iceolator_<strain>
Comes out of the filter bag50 g
Frozen Sift [strain]
yf_frozen_sift_<strain>
Comes out of the rack, goes to the press50 g
Frozen Sift Slab [strain]
yf_plaque_frozen_<strain>
Comes out of the press100 g
Piece [strain]
yf_morceau_x3_<strain> · yf_morceau_frozen_<strain>
20 per slab5 g
Capsule [strain]
yf_capsule_x3_<strain> · yf_capsule_frozen_<strain>
Final product, ready to sell7 g

Configuration

shared/config.lua is the only file to edit. Gestures, positions and animations are fixed in the script.

SettingDefaultEffect
Config.locale'fr'Language of the texts: 'fr' or 'en'.
Config.filtrage10 · 2 · 5For each 3x pass: pollen to load into the sieve, pollen used per sifted pollen, stick strikes per sifted pollen.
Config.congelateur100 · 2 · 15Maximum buds per load, dry ice packs to start, duration in minutes.
Config.claie10Drying time, in minutes.
Config.sacFiltrant40 · 20 · 3 · 10Frozen weed per ice-o-lator, frozen weed per ice water, maximum ice-o-lator per wash, bag wear in % per wash.
Config.meubles20 · 50 kgSlots and weight of each cabinet.
Config.shopEquipment added to the YF-Kush vendor: see The equipment.
Config.valuesSuggested resale prices: see Selling.
Config.maxPlaced60Maximum freezers and racks placed, of each type.
Config.maxDistance5.0Maximum distance between the player and a station, in metres.
shared/config.lua
Config.locale = 'en'

Config.filtrage = {
    x2 = { capacity = 10, perPollen = 2, clicks = 5 },
    x3 = { capacity = 10, perPollen = 2, clicks = 5 },
}

Config.congelateur = { capacity = 100, glace = 2, minutes = 15 }

Config.claie = { minutes = 10 }

Config.sacFiltrant = { perOutput = 40, perWater = 20, lots = 3, wear = 10 }

Config.meubles = { slots = 20, weight = 50000 }

The production chains

Both products start from 80 buds and end as 20 capsules of 5 g. The rates are the same for all four strains.

3x sifted

80budsYF-Kush sieve10 buds → 1 pollen
8pollensieve, 2nd pass2 → 1 2x pollen
42x pollensieve, 3rd pass2 → 1 3x pollen
23x pollenYF-Kush press2 → 1 slab
1slabYF-Kush table→ 20 pieces
20capsules1 piece + 1 empty capsule7 g each

Frozen sift

80budsfreezer+ 2 dry ice packs
80frozen weedfilter bag40 → 1 ice-o-lator
2ice-o-latordrying rack1 → 1 frozen sift
2frozen siftYF-Kush press2 → 1 slab
1slabYF-Kush table→ 20 pieces
20capsules1 piece + 1 empty capsule7 g each

The stations

The freezer and the drying rack are placed from the inventory, like the YF-Kush stations. They come on a cabinet whose storage ("Open the cabinet") can hold your goods, and stay in place after a restart. A station can only be picked up when it is empty and its cabinet too.

yf_congelateur · yf_glace_carbo

Freezer

  • "Load the freezer": you need 2 dry ice packs and 1 to 100 buds of one strain.
  • The glass door opens: drag the ice and the buds from the trays to their spots, then close it.
  • The screen shows the temperature dropping and the time left: 15 min, in real time.
  • "Collect": take the frozen buds out onto the tray.
  • Frozen weed thaws after 30 min: after that, it can no longer be washed.
yf_sac_filtrant · yf_eau_glacee

Filter bag

  • Played on a YF-Kush table: "Wash in the filter bag".
  • By batches of 40 frozen weed, 3 batches at most; 1 ice water per 20.
  • Bag into the bucket, frozen buds, ice water, then stirring: circle the cursor around the bucket at a steady pace.
  • Move the bucket aside and pour the ice-o-lator onto the tray.
  • The bag loses 10% per wash. Esc abandons without using anything.
yf_claie

Drying rack

  • "Load": up to 20 ice-o-lator, on 4 trays slid one by one into the rails.
  • The fan spins; the screen shows temperature, humidity and time left: 10 min.
  • "Collect": take the trays out, scrape the crust and slide the frozen sift into the bowl.
yf_capsule_vide

Cutting and capsules

  • On a YF-Kush table: "Cut premium hash".
  • Bring the blade onto each line and hold it: 1 slab → 20 pieces.
  • "Fill capsules": piece on the scale, capsule in the middle, piece inside, lid, then screw it shut by circling the cursor.
  • Backspace stops: what is done is kept, the rest stays in the inventory.

The equipment

The equipment is added to the YF-Kush vendor, in its currency and opening hours. Prices and stock are set in YF-Filtrer's Config.shop.

Item soldDefault price
Freezer
yf_congelateur
$20,000
Drying Rack
yf_claie
$6,000
Filter Bag
yf_sac_filtrant
$2,500
Dry Ice Pack
yf_glace_carbo
$150
Ice Water
yf_eau_glacee
$20
Empty Capsule
yf_capsule_vide
$5

Selling

Like the YF-Kush bags, capsules are not bought back by the script: plug them into your dealing script. Suggested price of one capsule, balanced with YF-Kush:

CapsuleOG Kush · Purple HazeWhite Widow · Blue Dream
3x sifted
yf_capsule_x3_*
$115$230
Frozen sift
yf_capsule_frozen_*
$175$315

Languages

Every text is in locales/. To add a language, copy locales/en.lua, replace Locales['en'] with the language code, translate while keeping the %d and %s, then set Config.locale. Item names are translated in items.lua.

Troubleshooting

The pollen or frozen sift does not show up at the sieve or press

Check that YF-Kush is version 1.1.0 and started before YF-Filtrer, and that the items are declared in ox_inventory. At startup, the console should show 12 passe(s) enregistree(s).

YF-Filtrer stopped after restarting YF-Kush

YF-Filtrer depends on YF-Kush: start it again with ensure YF-Filtrer after restart YF-Kush.

Frozen weed can no longer be washed

It has thawed: frozen weed only stays cold for 30 minutes after leaving the freezer.

The freezer or rack cannot be picked up

The station must be empty (nothing running, nothing to collect) and so must its cabinet. You also need room in your inventory.

The equipment is not at the vendor

The YF-Kush vendor must be enabled (Config.shop.enabled in YF-Kush) and the items declared in ox_inventory.

Items have no image in the inventory

Check that the 45 yf_*.png files are in ox_inventory/web/images, then clear the FiveM cache.

Editable files

The script is protected by the Cfx.re escrow. These stay readable and editable: shared/config.lua, the locales/ folder and the install/ folder.

Other guides

All documentation

  1. Join the La FactorY Discord.
  2. Open a ticket naming the product.
  3. The team gets back to you quickly to complete the purchase.
Open Discord