HeroHunt AppNew

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.

v1.0.0Escrow protectedQBox · QBCore · ESX · Standalone

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

ResourceRequiredNotes
lb-phoneYesThe app, its map and its notifications run inside the phone
ox_libYesCallbacks, commands and locales
oxmysqlYesCollections, spawns, tasks and Candy history are stored in SQL
OneSyncYesThe server reads player positions to validate every catch
qbx_core / qb-core / es_extendedOptionalPicked 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.

config.lua
heroes.lua
tasks.lua
fxmanifest.lua

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:

TableContent
hero_player_dataCandy balance and totals of each collection
hero_discoveriesThe first catch of every hero, per collection
hero_inventoryCopies, total catches and conversions per hero
hero_world_spawnsEvery world spawn with its position, region and status
hero_tasksTask definitions, synced from config/tasks.lua on every start
hero_player_tasksTask progress, completion and claim per period
hero_transactionsEvery 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.

server.cfg
ensure oxmysql
ensure ox_lib
ensure qbx_core          # or qb-core / es_extended, leave out for standalone
ensure lb-phone

# HypeScripts
ensure hype-herohunt-app

Set 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.TargetPerPlayer heroes nearby. Each spawn can be caught only once and disappears after Spawn.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.Radius meters. Heroes inside it can be caught. Heroes up to Discovery.PreviewRadius show 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

StatusMeaning
activeIn the world and can be caught
capturedCaught by a player, captured_by holds the collection
expiredTimed out, cleared by /heroclear or its hero was disabled

Records that are not active are deleted after History.KeepSpawnHistoryDays days.

Next steps

On this page