Scripts 2026-04-11

Agency-Minerjob: How a Job Script Should Actually Work

TDYSKY

TDYSKY

Founder & Lead Developer at Agency Scripts

Why Jobs Usually Feel Flat

Most FiveM job scripts are a grind loop: go to X, press E, wait, sell at Y. Players do it once for money, never engage with it as RP, and move on. Agency-Minerjob was designed to make a single job worth engaging with for dozens of hours through progression, social depth, and variable output.

Skill Progression That Means Something

Miners level from novice to master over approximately 30 hours of play. Each tier unlocks new mining locations, better tools, rarer ore types, and faster extraction. Progression isn't just a multiplier on earnings — it unlocks genuinely different gameplay at each stage.

Environmental Mechanics

Mining output depends on location quality, time of day, weather, and tool condition. The gold mine at night in clear weather with a maintained pickaxe yields differently from the coal seam in rain with a worn tool. These variables aren't obvious to new players but experienced miners learn to optimize around them — which is exactly the kind of emergent mastery that keeps jobs interesting long-term.

Social Depth

Mining supports parties of 2-6 players with shared XP pools and bonus multipliers. Larger parties earn more but are higher-profile targets for hijacking. This creates real social gameplay where coordination matters and trust between players becomes an in-game currency.

The Economy Hook

Raw ores feed into refinement chains that the rest of the server economy relies on. Weapon crafters need metals. Builders need construction materials. Agency-Minerjob isn't a grind loop in isolation — it's a supplier role in a broader economic system. That's what makes a job actually matter to the server.

Installation & Setup

Agency-Minerjob requires oxmysql for player progression data and ore yield tracking. Import minerjob.sql, drop the resource folder, and add ensure agency-minerjob to server.cfg. Mining location coordinates, ore type definitions, and refinement chain items are all defined in config.lua — the default config ships with eight mining locations across the default GTA V map.

Ore items and refined material items need to exist in your framework's item registry. The config includes full item definitions for QBCore and ESX. Standalone setups handle item give/remove through config hooks.

Configuration Options

The config.lua provides deep control over job mechanics:

  • Location quality — each mining site has a base yield modifier. Higher-quality sites yield more per action but may require higher skill level to access.
  • Skill tier thresholds — define XP required for each tier and what unlocks at each (locations, tools, ore types).
  • Environmental modifiers — enable/disable weather and time-of-day yield effects and set the multiplier range.
  • Tool durability — how many mining actions a tool lasts before needing repair. Disable for simpler gameplay.
  • Party bonus — XP and yield multiplier per additional party member, and the max party size cap.
  • Hijack system — enable hostile NPC or player ambush events at configurable party size thresholds.
  • Refinement chain — define which raw ores refine into which materials at what ratio and time cost.

Framework Compatibility

Full QBCore and ESX adapters ship in the package. For standalone, implement five config functions: item give/remove, money add, job check (for mining area access), and XP storage. The skill progression engine, party system, environmental mechanics, and refinement chain are all framework-agnostic.

Why This Matters for Roleplay

A job that exists purely as a money source will always feel hollow. Agency-Minerjob treats the mining job as a profession with actual depth — a character who mines for 30 hours has genuinely developed something: knowledge of locations, skill with tools, a network of party members, relationships with refiners and buyers. That accumulated character capital is what makes job RP sustainable.

The party system in particular creates social RP that most job scripts miss entirely. Two players mining together aren't just doubling output — they're having a conversation, building trust, deciding whether to invite a third person they don't fully know yet. The hijack risk at larger party sizes forces those trust evaluations: is this stranger worth bringing if they make us a bigger target?

The supply chain integration is the feature that elevates Agency-Minerjob from "mining script" to "server economy layer." When weapon crafters, builders, and repair kit manufacturers all need materials that come from mining, the miner job has permanent relevance. Miners don't grind alone — they supply other players and have relationships with their buyers.

Frequently Asked Questions

Can I add mining to custom map locations from a DLC or MLO?

Yes. Mining locations are coordinate + radius definitions in config.lua. Add your MLO interior coordinates with an interior flag and Agency-Minerjob handles the interior entry detection automatically. Custom ore types at custom locations are equally straightforward.

How does the skill progression save across restarts?

Skill data is stored in oxmysql, keyed to player identifier. Progression persists across restarts, framework changes, and character swaps (with multi-character systems). The only time progress resets is if you manually run the wipe SQL or the player's identifier changes.

Can I disable the environmental mechanics for a simpler server?

Yes. Set Config.UseEnvironmentalModifiers = false in config.lua. Yield then depends only on skill tier, tool quality, and location quality — a simpler but still tiered system. You can re-enable environmental mechanics later; existing player progression carries over seamlessly.

Is Agency-Minerjob balanced for servers where it's the primary income source vs. one of many jobs?

The base config assumes mining is one of several job options. If it's your primary income source, increase the yield rates by 40-60% across the board — there's a Config.GlobalYieldMultiplier for this exact purpose. Don't adjust individual location rates to compensate; use the global multiplier to keep relative balance intact.

Requirements

  • FiveM server (QBCore, ESX, or standalone)
  • oxmysql
  • cfx.re account with valid Agency-Minerjob license
  • Optional: Agency-Repairkit (for crafting integration)
  • Optional: Agency-Blackmarket (for ore sale economy connection)

Running a Mining Company as a Business

Agency-Minerjob's party system and progression tracking make it possible to run actual mining companies as server businesses rather than just individual grinding. Here's what a mining company operation looks like in practice:

The company owner character recruits workers (other players), assigns them to mining locations based on their skill tier, and arranges bulk sales of refined materials to weapon crafters, builders, or the blackmarket. The logistics of coordinating multiple miners, managing tool supplies (ensuring everyone has good tools), and protecting large ore shipments from hijacking creates genuine organizational complexity.

The party bonus multiplier creates an economic incentive to coordinate that wasn't artificial designed in — it emerged from the mechanics. Five coordinated miners earn significantly more per hour than five solo miners doing the same thing, which means the labor of coordination has measurable economic payoff. That's the design condition that makes business organizations sustainable: the organizational form must be economically superior to going solo, or players won't bother with the overhead of coordination.

Share this article

Ready to upgrade your server?

Check out our premium FiveM scripts in the Agency Scripts store or join our Discord community for support and updates.