Free scripts
Poggy Crafting
Crafting benches, campfire cooking and a recipe browser that shows each recipe's full chain, where every ingredient comes from, a shopping list and an on-screen gathering tracker. Free and open source (GPL v2).
Overview#
Benches, campfires and the world's own ovens and forges open a recipe browser. It shows the whole tree behind an item: what it takes, what makes those ingredients, what it is used in, and where in the world each ingredient comes from.
- A recipe browser. Categories down the side, a search over recipe names, ingredients and rewards, and two filters: what you can make right now, and only what your job can reach. Locked recipes still show, greyed out, with the reason on a badge.
- Recipe chains. Open a recipe and see each ingredient, whether it can itself be crafted, and how far you are from having enough. Used In shows the other way.
- Where do I get this? Hover an ingredient for a card saying how it is obtained.
- Shopping list and gathering tracker. Add a recipe's ingredients to a per-character list, or pin it to a small window that fills in as items land in your inventory.
- Optional skillchecks, with partial rewards, bonus rewards, and recipes that explode or set you alight on a miss.
- Job and place locks on categories, recipes and benches, plus
jobSkillcheckto let anyone attempt a job recipe on a hard skillcheck. - Alternative ingredients ("any fish") and money in or out of a recipe.
- A placeable campfire item.
Poggy Crafting is a fork of VORP's vorp_crafting and, like the original, is open source under the GNU General Public License v2. The whole script ships readable.
Requirements#
| Needs | Why |
|---|---|
| poggy_core 0.16.0 or newer | The framework layer and the prompts. 0.18.0 or newer adds the in-game settings editor. |
| oxmysql | The shopping list. |
| VORP Core, RSG Core or QBCore RedM | Through poggy_core. |
| Poggy Skillcheck (optional, free) | Only for recipes that use skillcheck or jobSkillcheck. |
No progress bar, prompt or menu resource is needed: the script draws its own.
Installation#
- Download Poggy Crafting and put the
poggy_craftingfolder in your resources folder. - Add it to
server.cfg, after poggy_core and oxmysql (and poggy_skillcheck, if you use it):ensure oxmysql ensure poggy_core ensure poggy_skillcheck ensure poggy_crafting - Copy
docs/item_images/campfire.pnginto your inventory's item image folder. - Restart the server, then write your recipes.
There is no SQL to import. The shopping-list table is created automatically the first time the script starts, and on VORP the campfire item is added too. On RSG and QBCore RedM, whose items live in a Lua file, add a campfire item yourself, or set Config.CampfireItem = false.
The thirteen recipes, three benches and four categories that ship are examples, each showing one feature with stock item names. Delete them and write your own.
Configuration#
Every setting can be changed in game: type /poggy, open Poggy Crafting, save, and restart the script (needs poggy_core 0.18.0 or newer). You can also edit the files by hand:
| File | What is in it |
|---|---|
config/config.lua | Benches, world props, campfires, timing, categories, animations, skillcheck difficulty, the progress bar. |
config/recipes.lua | Every recipe, with a full field reference at the top. |
config/item_sources.lua | The "where do I get this?" card for each ingredient. |
translations.lua | Every string a player can see, including the browser. |
General
| Setting | Default | What it does |
|---|---|---|
Config.CraftTime | 5000 | How long a craft takes, in milliseconds. A recipe can override it. |
Config.ProgressBar | on, 'bottom' | The script's own progress bar, at the bottom or top. |
Config.PromptControl | G | The key that opens a bench or campfire. |
Config.ShoppingList.enabled | true | The shopping list and gathering tracker. Off hides both. |
Config.ShoppingList.maxItems | 60 | Entries per character, across all recipes. |
Config.ItemLabelOverrides | empty | Names shown in the browser for items whose inventory label is missing or unclear. |
Config.KneelingAnimation | true | Kneel while the browser is open. |
Config.Webhook | '' | Discord webhook for a log of every craft. Blank means no log. |
Config.WebhookLogCrafts | true | Log every craft to that webhook. Busy servers may want this off. |
Where people craft
Three things open the browser, and a recipe can require any of them:
- Benches (
Config.Locations, Locations → Benches): a fixed point with anid, aname, an optional blip, an optional job lock, and the categories it offers (0for all). - World props (
Config.CraftingProps): every campfire, oven and forge the game already places. The group's title in lower case (campfire,oven,forge) is its place id. - A placed campfire: the
campfireitem, used from the inventory.
| Setting | Default | What it does |
|---|---|---|
Config.CraftingPropsEnabled | true | Craft at world props. The prop scan is the most expensive thing the script does: turn it off if you only use benches. |
Config.CampfireJobLock | 0 | Restricts every prop and campfire to these jobs. 0 is anyone. |
Config.CampfireItem | 'campfire' | The usable item that places a campfire. false for none. |
Config.PlaceableCampfire | 'p_campfire05x' | The prop the item places. |
Config.Distances | campfire 1.0, benches 0.75 | How close a player must be, in metres. |
Categories
Every recipe names a category (Config.Categories). Each has an ident, the text players read, and a Job and Location lock (0 for anyone / anywhere). A category the player cannot reach still shows, greyed out under Requires Access.
Recipes
Recipes live in config/recipes.lua (the Recipes tab). The smallest one:
{
Text = 'Bread Bait',
Items = { { name = 'bread', count = 1 } },
Reward = { { name = 'bait_bread', count = 5 } },
Type = 'item',
Category = 'supplies',
Job = 0,
Location = 0,
},
| Field | What it does |
|---|---|
Text | The recipe's name and its id. Must be unique; renaming it removes it from shopping lists. |
SubText, Desc | The short line and the long description in the browser. |
Items | What one craft uses. take = false keeps an item, like a tool (needed once, however many are crafted). AltNames lets other items fill the slot. canUseDecay sets a minimum item condition (VORP only). |
Reward | What one craft gives. |
AltRewards | A different reward depending on which alternative ingredient was used. |
Type | 'item', or 'weapon' for a real weapon with a serial. |
Category | A category ident. |
Job, Location | 0, or a list: { 'blacksmith' }, { 'campfire' }. |
Animation, CraftTime | An animation key (default 'craft') and a time override in milliseconds. |
UseCurrencyMode, CurrencyType | With currency mode on, a reward entry with no name is money: { count = -2 } charges $2, { count = 5 } pays $5. Type 0 cash, 1 gold, 2 role tokens. |
skillcheck, jobSkillcheck, useHardSkillcheck, explodeOnFail, catchFireOnFail | See Skillcheck recipes. |
Add each ingredient to config/item_sources.lua (Where items come from) with a short source badge and one line of description, and hovering it in the browser tells players where to find it.
Skillchecks
| Setting | Default | What it does |
|---|---|---|
Config.Skillcheck.enabled | true | false turns every skillcheck into a progress bar, and nobody needs poggy_skillcheck. jobSkillcheck recipes are then refused to players without the job. |
RepsPerExtra | 3 | One extra round for every this many items crafted at once. 0 never scales. |
GreatBonusPct | 0.25 | Reward bonus per hit in the bright band (+25% each). |
Normal, JobBypass, Hard | speed 3 / 4 / 4, band 2 / 4 / 4 | The three difficulty profiles (Normal, Untrained and Hard in /poggy): needle speed and band size from 1 easy to 5 hard, shake, and time between rounds. |
Config.CraftingFire.FireDuration | 10000 | How long a crafter burns after a miss on a catchFireOnFail recipe, in milliseconds. |
Hiding recipes with no item icon
| Setting | Default | What it does |
|---|---|---|
Config.HideRecipesWithoutIcons | false | When the server starts it checks every item each recipe uses, and hides (and refuses) recipes whose items have no icon, so the browser never shows placeholders. |
Config.HideBrokenChains | true | With the above on, also hides recipes that can no longer be made because every recipe for one of their ingredients is hidden. Raw materials never cause this. |
Config.IconResource, Config.IconPath | unset | Only if your item icons live in another resource. Otherwise poggy_core finds them for your framework. |
In /poggy each hidden recipe is marked with the reason and the exact icon file to add. Add the PNG and restart the server, and it comes back.
Commands#
| Command | Who | What it does |
|---|---|---|
/craft | Everyone | Opens the browser anywhere. Recipes that need a bench or prop stay out of reach. |
/gt | Everyone | Gives the mouse to the gathering tracker so you can drag it. |
/gthide | Everyone | Hides or shows the gathering tracker. |
/extinguish | Everyone | Puts out the campfire you placed. |
/campfire | Admins | Places a campfire without the item, for testing. Off by default: give Config.Commands.campfire a name to turn it on. |
poggycrafting_icons | Server console | Runs the hidden-recipe check again and prints how many recipes are hidden. |
| G | Everyone | Opens a bench, campfire or crafting prop you are standing at. |
Player command names are set in Config.Commands. Set one to false to remove it.
Permissions#
There are no ACEs. /campfire (off by default) is for admins as poggy_core defines them. Everything else is decided by jobs and places:
| Lock | Effect |
|---|---|
Category → Job | Only these jobs can craft in it. Others see it under Requires Access. |
Category → Location | Every recipe in it only works at these benches or props. |
Recipe → Job | Only these jobs can craft it, unless it has a jobSkillcheck. |
Recipe → Location | Only at these benches or props. |
Bench → Job / Categories | Who gets the bench's prompt, and what it offers. |
Config.CampfireJobLock | Who may craft at props and campfires. |
A recipe's own locks are checked as well as its category's, so a recipe can be stricter than its category, never looser. The server checks every lock itself on every craft, not just the menu, and checks the player is really at the bench they crafted at.
Using it in game#
For players
- Walk up to a bench, campfire, oven or forge and press G, or type
/craft. - Pick a category or search. A greyed-out recipe shows why on its badge: Requires: a job, or Craft at: the places where it works.
- Open a recipe to see its chain, then craft. One craft makes at most 100 at once.
- Add the ingredients to your shopping list, and pin it as a tracker while you gather. Use
/gtto move it and/gthideto hide it. - Use the
campfireitem to build a campfire in front of you;/extinguishputs it out.
Adding a bench
- Stand at the spot. Open
/poggy→ Poggy Crafting → Locations → Benches and click Add bench. - Give it a unique ID (recipes use it) and a Name, and use Use my position for X, Y, Z.
- Choose its Categories (every category, or only some) and Jobs (anyone, or only some), and an optional map blip.
- Save and restart the script.
To make a category or recipe work only there, set its Where to Only at these places and add the bench. Never reuse or rename a bench ID: recipes and categories that name it stop matching.
Skillcheck recipes
These need Poggy Skillcheck running. The ingredients are taken before the rounds start, so a miss costs them.
| Recipe field | What happens |
|---|---|
skillcheck = 3 | Three rounds at Normal difficulty. |
skillcheck = 2 and useHardSkillcheck = true | Two rounds at Hard difficulty. |
jobSkillcheck = 4 | Players with the recipe's job craft normally. Players without it may still try, on four rounds at Untrained difficulty. |
explodeOnFail = true | A missed round causes an explosion on the crafter. |
catchFireOnFail = true | A missed round sets the crafter alight. |
Pass every round for the full reward; pass some for that share (at least 1); pass none and you get nothing. Each hit in the bright band adds the great-hit bonus. With explodeOnFail or catchFireOnFail, one miss ends the craft with nothing.
Troubleshooting#
- "That recipe needs poggy_skillcheck"
- Start poggy_skillcheck, or set
Config.Skillcheck.enabled = false. - No prompt at a campfire
- Check
Config.CraftingPropsEnabledis on, the prop is inConfig.CraftingProps, andConfig.CampfireJobLockallows your job. - A recipe is greyed out
- Read the badge. Requires: means the job does not match: check the exact spelling and case. Craft at: means the wrong place;
/craftcounts as nowhere, so go to a bench or prop it names. Unavailable means a lock holds a number: pick Anyone or Only these in/poggy. - The console prints
Job = 8 matches nothing - A
Job,LocationorCategoriesfield holds a number other than 0. It must be0or a list of names. - An ingredient shows its raw name
- The item has no label in your inventory. Add it to
Config.ItemLabelOverrides. - An ingredient says "Unknown"
- Add it to
config/item_sources.lua. - Shopping list entries vanished
- A recipe's
Textwas renamed.Textis the recipe's id. - A recipe is missing from the browser
Config.HideRecipesWithoutIconsis on and one of its items has no icon./poggynames the item and the file, or runpoggycrafting_iconsin the console.- Two recipes with the same name
- Recipes with the same name in different categories both work. The server warns at start when two share both a name and a category, since only the first can be crafted.
- A config change did nothing
- Restart
poggy_crafting.
Updating#
Poggy Crafting updates through poggy_core's updater (see Updates). All four config and translation files are merged forward: your values and recipes survive an update, and new settings appear alongside them with their defaults.