> For the complete documentation index, see [llms.txt](https://gocomedyfunstoredocs.gitbook.io/gocomedyfun-store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gocomedyfunstoredocs.gitbook.io/gocomedyfun-store/scripts-free/package-fun/english/configuration/fabrications-paquets.md).

# Fabrications paquets

## **Package Manufacturing Configuration**

The parameter **Config.Fabrications\_paquets** defines all the packages that players will be able to craft.\
Each entry represents a complete recipe including:

* the required items
* the required quantities
* the final item obtained
* the quantity produced
* the displayed label
* indicative action section
* and the same system can be used in reverse to **unpack** a package (the package becomes the required item, and the components become the result)

***

### **Example Configuration**

```lua
Config.Fabrications_paquets = {
    {
        Requis = { "farine", "sachet_plastique", "balance_precision" },
        Quantite_Requis = { 1, 1, 1 },
        Resultat_Item = "paquet_farinee",
        Quantite_Resultat = 1,
        Resultat_Etiquette = "Paquet Fariné",
        Action_Type = "boulanger"
    }
}
```

***

### **1. Locate the Parameter**

Open your **config.lua** and find the section:

```lua
Config.Fabrications_paquets = {
```

This is where all crafting and unpacking recipes are defined.

***

### **2. Understanding the Structure of a Recipe**

Each recipe follows this structure:

* **`Requis`**: list of items required for crafting
* **`Quantite_Requis`**: quantities for each item (same order as Requis)
* **`Resultat_Item`**: the final item generated
* **`Quantite_Resultat`**: amount of the final item obtained
* **`Resultat_Etiquette`**: text displayed when the item is created
* `Action_Type` : indicative text section

#### **Empty template:**

```lua
{
    Requis = { },
    Quantite_Requis = { },
    Resultat_Item = "",
    Quantite_Resultat = 1,
    Resultat_Etiquette = "",
    Action_Type = ""
}
```

***

### **3. Adding Your Own Recipes**

You can add as many recipe blocks as you want.

#### **Example with two different packages:**

```lua
Config.Fabrications_paquets = {
    {
        Requis = { "herbe", "grinder" },
        Quantite_Requis = { 5, 1 },
        Resultat_Item = "paquet_herbe",
        Quantite_Resultat = 1,
        Resultat_Etiquette = "Paquet d'Herbe",
        Action_Type = "boulanger"
    },

    {
        Requis = { "cafe", "filtre_cafe", "eau_pure" },
        Quantite_Requis = { 2, 1, 1 },
        Resultat_Item = "paquet_cafe",
        Quantite_Resultat = 1,
        Resultat_Etiquette = "Sachet de Café",
        Action_Type = "cafeteria"
    }
}
```

***

### **4. Customize According to Your Needs**

You are free to:

* change required items
* adjust quantities
* rename the final item

Every package can be fully customized to fit your gameplay.

***

### **5. Configure Unpacking (Reverse Crafting)**

To allow players to **unpack** a package, simply create a reverse recipe:

* the package becomes the required item in `Requis`
* `Quantite_Requis` indicates how many packages must be unpacked
* `Resultat_Item` becomes the item or resources you want to return
* `Quantite_Resultat` is the amount returned
* `Resultat_Etiquette` can clearly indicate that the package is unpacked
* `Action_Type` may indicate indicative text section

#### **Simple Example: Unpacking a herb package back into raw herb**

```lua
Config.Fabrications_paquets = {
    -- Crafting the package
    {
        Requis = { "herbe" },
        Quantite_Requis = { 10 },
        Resultat_Item = "paquet_herbe",
        Quantite_Resultat = 1,
        Resultat_Etiquette = "Herb Package",
        Action_Type = "espace_vert"
    },

    -- Unpacking the package
    {
        Requis = { "paquet_herbe" },
        Quantite_Requis = { 1 },
        Resultat_Item = "herbe",
        Quantite_Resultat = 10,
        Resultat_Etiquette = "Unpacked Herb",
        Action_Type = "espace_vert"
    }
}
```

The logic is always the same:\
**one recipe to pack, another recipe to unpack.**

***

### **6. Save & Restart**

Save your **config.lua**, then restart the resource:

```
restart Package Fun
```

***

### **7. Test In-Game**

All changes will take effect immediately in-game for:

* crafting packages
* unpacking packages
