HeroHunt App: Installation
Get the hero collecting app for lb-phone running on your server in a few minutes, with shared world spawns from the first start.
Before you start
Make sure OneSync is enabled and your server artifact is up to date. The script detects your framework on its own, creates its database tables on the first start and adds itself to lb-phone as a custom app.
Requirements
| Resource | Required | Notes |
|---|---|---|
| lb-phone | Yes | The app, its map and its notifications run inside the phone |
| ox_lib | Yes | Callbacks, commands and locales |
| oxmysql | Yes | Collections, spawns, tasks and Candy history are stored in SQL |
| OneSync | Yes | The server reads player positions to validate every catch |
| qbx_core / qb-core / es_extended | Optional | Picked automatically. Without one, the script runs standalone |
See Dependencies for download links and the start order.
Setup
Download the resource
Get the latest version from portal.cfx.re. See Download your purchase.
Keep the folder name
Keep the folder named hype-herohunt-app. The app loads its interface, hero images and events through this name.
Database
Nothing to do in most cases. On every start the script runs sql/install.sql and creates its tables if they do not
exist yet:
| Table | Content |
|---|---|
hero_player_data | Candy balance and totals of each collection |
hero_discoveries | The first catch of every hero, per collection |
hero_inventory | Copies, total catches and conversions per hero |
hero_world_spawns | Every world spawn with its position, region and status |
hero_tasks | Task definitions, synced from config/tasks.lua on every start |
hero_player_tasks | Task progress, completion and claim per period |
hero_transactions | Every catch, conversion and task reward, shown as Candy history |
If the console prints Database setup failed, the resource will not run, your database user may lack the CREATE
permission. Run sql/install.sql by hand once. MySQL 5.7+ or MariaDB 10.3+ is required.
Start the resource
Add it to server.cfg after oxmysql, ox_lib, your framework and lb-phone.
ensure oxmysql
ensure ox_lib
ensure qbx_core # or qb-core / es_extended, leave out for standalone
ensure lb-phone
# HypeScripts
ensure hype-herohunt-appSet the basics
Open config/config.lua and check at least Ownership, App, Discovery, Spawn and Rarities. Heroes live in
config/heroes.lua and tasks in config/tasks.lua. See Configuration for
every option.
Start order matters
With Framework = "auto", a framework that is not started yet is not detected. The script then runs standalone and
saves collections per Rockstar license instead of per character. Keep ensure hype-herohunt-app below your
framework. If lb-phone restarts later, the app is added to the phone again on its own.
Verify
Set Debug = true in the config and start the server. Look for these lines in the console:
[DEBUG:SERVER] [INFO] Framework detected: qbx_core
[DEBUG:SERVER] [INFO] Ownership: character
[DEBUG:SERVER] [INFO] 0 active spawn(s) restored
[hype-herohunt-app] Ready: 50 heroes, 26 tasks, 0 active spawns
[DEBUG:CLIENT] [SUCCESS] lb-phone app added (hype-herohunt)The Ready line is printed even without Debug.
Open the phone. Install HeroHunt from the App Store (or find it on the home screen with App.defaultApp = true)
and open the Map tab. A circle shows your discovery area.
Heroes spawn around you within Spawn.SpawnIntervalSeconds (default: 30 seconds). To test right away, run
/herospawn random 5 as an admin. See Commands.
Tap a hero inside the circle and press Catch. It is added to your collection and you get Candy. When everything
works, set Debug = false again.
How it works
- Shared spawns: heroes spawn on the server, at the same spot for every player, around players who have fewer
than
Spawn.TargetPerPlayerheroes nearby. Each spawn can be caught only once and disappears afterSpawn.DespawnAfterSeconds. Active spawns survive a resource restart. - Ground check: every spawn point is tested on a nearby player's game before it appears: ground height, navmesh, water, interiors, nearby vehicles and height limits. Points in a blacklisted zone are skipped.
- Discovery map: the Map tab shows the player and a circle of
Discovery.Radiusmeters. Heroes inside it can be caught. Heroes up toDiscovery.PreviewRadiusshow faded, so players know where to walk. Positions are only streamed while the app is open on screen. - Catching: the server checks the player's real position, routing bucket and remaining attempts. A hero can break free based on its catch chance. The first player to catch it gets it; the others see that it was taken.
- Collection: undiscovered heroes appear as silhouettes until they are caught for the first time. Every hero shows its copies, total catches, Candy value and discovery date.
- Candy: each catch gives Candy by rarity. Extra copies can be converted into Candy from the Collection or Candy tab. The Candy tab shows the balance and the full activity history.
- Tasks: daily and weekly tasks are picked from a pool, are the same for every player and reset at
Tasks.ResetHour. General tasks are permanent milestones. Completed tasks send a phone notification, and the reward is claimed in the Tasks tab. - Profile: collection completion, total catches, discovered heroes, the rarest hero, Candy balance, conversions and completed tasks.
Spawn statuses
| Status | Meaning |
|---|---|
active | In the world and can be caught |
captured | Caught by a player, captured_by holds the collection |
expired | Timed out, cleared by /heroclear or its hero was disabled |
Records that are not active are deleted after History.KeepSpawnHistoryDays days.