gta6/prompts
crafting
Vaultintermediatecrafting

Smelting & Foundry Refining

Generic-framework foundry station that smelts raw ore into refined bars using fuel and a server-gated melt timer.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~63 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A foundry station that smelts raw ore into refined bars for roleplay servers running mining and manufacturing economies. It consumes ore plus coal fuel and runs a melt timer, sitting between the gather loop and downstream crafting. The version that validates the recipe, fuel and station proximity server-side outsells the client-trusting clones that let players mint bars from nothing.

Prompt Template

You are writing a FiveM resource for a generic roleplay framework accessed via…

🔒 Eyes-only — locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth — both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access — pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts — the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates — new niches as the market moves
Get the Vault — $199

$49 for 60 · $199 for all 510 + intelligence — one-time, no subscription.

Expected Output

The reference Lua at content/expected-outputs/crafting/26-smelting-foundry-refining.lua checks foundry proximity and plays the melt anim client-side, then a server handler that validates ore and coal…

🔒 Eyes-only — locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth — both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access — pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts — the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates — new niches as the market moves
Get the Vault — $199

$49 for 60 · $199 for all 510 + intelligence — one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Client-granted bars — if the client grants the bar after the timer, a cheat mints bars without inputs; grant only after the server consumes ore and fuel.
  • Trusted distance — relying on a client-sent distance lets players smelt from anywhere; re-check proximity (or gate the station) server-side where possible.
  • Unloaded animTaskPlayAnim without a RequestAnimDict + HasAnimDictLoaded wait no-ops; load the dict first.

Corrective re-prompt: "Grant the bar only inside the server handler after confirming and removing both the ore and the coal via exports['gen_core']; never grant on the client. Load the hammering dict with RequestAnimDict and a HasAnimDictLoaded wait loop before playing the melt anim."

Framework Integration

ESX: swap exports['gen_core']:getObject() for exports['es_extended']:getSharedObject() and use xPlayer.getInventoryItem(...).count to gate, xPlayer.removeInventoryItem / addInventoryItem to refine. QBCore: use exports['qb-core']:GetCoreObject() with Player.Functions.GetItemByName, RemoveItem and AddItem. QBox: use exports.qbx_core plus exports.ox_inventory:GetItemCount / RemoveItem / AddItem.

Profit Potential

$150–$2000/mo on Tebex (expected ~$500). [INFERRED] priced inside the $50-389 standalone-script band against the signal-scraper corpus (tebex_snapshot n=100, median seller $11.85K/mo) for a stable refining niche.

Trend Signal

stable — inferred: [INFERRED] ore→bar smelting is an established, steady gather-process loop; broad legacy demand, low novelty.

Sales Angle

Positioned as the refining bridge between mining gather scripts and manufacturing crafts, with fuel cost and melt timing as the realism differentiator. Recommended Tebex price: $35.

Difficulty & Ship Time

intermediate · ships in 2-4h.