๐๏ธ BLN Society โ

๐บ Preview โ
๐ฐ Buy Now โ
BLN Society is the management layer for every structured group on your server โ a general store, saloon, ranch, sheriff's department, doctor's office, gang, or mayor's office. One resource tracks who belongs, what they can do, whether they are on duty, and where the money goes.
Whether you call it a business, a company, a faction, or a society, the setup is the same: members and ranks, permissions, finances, payroll, storage, fines, and a full audit trail โ plus an API so your other scripts can plug in without reinventing any of it.
โจ What can you do with it? โ
For server owners โ
- ๐ข Unlimited societies โ sheriffs, businesses, gangs, ranches, government offices, and more
- ๐ฅ Members & ranks โ hire, fire, promote, demote with a level-based hierarchy
- ๐ Permission system โ dot-namespaced permissions with wildcards and per-member overrides
- โฑ๏ธ Duty tracking โ clock in/out, worked hours, activity reports, inactivity sweeps
- ๐ฐ Finances โ multi-currency accounts, deposits, withdrawals, transfers, full ledger
- ๐ต Payroll & paychecks โ automatic wage runs, collect salary at the office
- ๐ฆ State-funded orgs โ government departments that generate wages without a treasury
- ๐ฆ Society storage โ buy and manage shared inventories with rank gates
- โ๏ธ Fines โ issue and collect fines from members
- ๐ Action fees โ configurable fees on hires, withdrawals, payroll runs, and more
- ๐ Audit logs โ every action recorded, optional Discord webhook per society
- ๐บ๏ธ World points โ blip, marker and prompt at the office (members only)
- ๐ ๏ธ Admin menu โ create, move, edit and dissolve societies in-game
- ๐ Translations โ all player-facing text in one locale file, no rebuild needed
For developers โ
- ๐ Export API โ societies, members, ranks, money, duty, storage, fines
- ๐ฆ Statebags โ read membership, duty and balances on the client with no callbacks
- ๐ก Events โ react to member changes, balance updates, duty toggles
- ๐ช Hooks โ veto hires, withdrawals, payroll and more before they commit
- ๐ Integration-ready โ
EnsureSocietykeyed to your resource so you never store society IDs
๐ป Framework compatibility โ
โ VORP โ RSG โ Custom
Framework access goes through bln_lib โ this resource never talks to a framework directly.
๐ฆ Dependencies โ
Start these before bln_society:
| Resource | Why |
|---|---|
| bln_lib | Framework abstraction (VORP, RSG, and more) |
| bln_notify | Player notifications |
| oxmysql | Database access |
โ๏ธ Installation โ
- Download and extract
bln_societyinto yourresourcesfolder - Add to your
server.cfgafter the dependencies:
ensure oxmysql
ensure bln_lib
ensure bln_notify
ensure bln_society- Start the server โ no SQL file to import. Migrations run automatically on boot.
- Restart and enjoy!
โ๏ธ Configuration โ
All setup lives in config/. Every option is commented in the files โ open them and change what you need. No rebuild required.
| File | What it's for |
|---|---|
main.cfg.lua | Currencies, admin, hiring, duty, finance, payroll, fees, storage, fines, logs, UI, world points |
presets.cfg.lua | Default rank ladders for new societies |
permissions.cfg.lua | Permission list โ add your own for custom scripts |
blips.cfg.lua | Blip sprites for the admin picker |
locale.cfg.lua | All player-facing text |
First things most servers may touch:
Config.admin.allowIfโ who can use/societyadminConfig.currenciesโ cash-only vs cash + goldConfig.payrollโ interval, mode, and paycheck rules
To disable a whole system (payroll, fines, storage, etc.), set its enabled = false in main.cfg.lua. Restart the resource after changes.
๐ Society presets โ
Presets are starter templates โ they save you from building a rank ladder from scratch every time you create a society.
When you pick one (in /societyadmin or via the API), it pre-fills:
- Ranks โ names, levels, salaries, and permissions (Owner โ Manager โ Employee, etc.)
- Funding โ whether wages come from the society treasury or are state-generated
That is all they do at create time only.
You get the following presets ready for you by default:
| Preset | Good for | Wages paid from |
|---|---|---|
default | Any generic group | Society account |
business | Shops, saloons, stores | Society account |
law | Sheriff departments | State (no treasury needed) |
government | Mayor's office, clerks | State |
medical | Doctors, clinics | State |
ranch | Ranches, farms | Society account |
gang | Outlaw factions | Society account |
Shipped presets live in config/presets.cfg.lua. Edit them, add your own, or pass custom ranks via the API.
๐ Permissions โ
Every permission is registered in config/permissions.cfg.lua. The management menu renders from this list โ add your own permissions here and check them from your resources.
| Group | Examples |
|---|---|
| Society | society.manage, society.rename, society.delete, settings.manage |
| Members | members.hire, members.fire, members.promote, members.permissions, members.activity |
| Ranks | ranks.manage, ranks.salary |
| Finances | finances.view, finances.deposit, finances.withdraw, finances.transfer |
| Payroll | payroll.manage, payroll.view, payroll.collect |
| Duty | duty.use, duty.manage |
| Storage | storage.use, storage.deposit, storage.take, storage.buy, storage.manage |
| Fines | fines.view, fines.manage |
| Fees | tax.view |
| Logs | logs.view |
Never check a rank name โ check a permission instead. Deputy is a label players can rename; fines.manage is the contract.
Wildcards when granting: members.*, storage.*, or * for everything. Deny with a leading -, e.g. -finances.withdraw.
๐ Translations โ
Every string the player reads lives in config/locale.cfg.lua. One file, no rebuild.
๐ฎ Using it in game โ
Players โ
Two ways into a society menu:
- Stand at the society's point and press the prompt key (default E).
- Another resource opens it via
exports.bln_society:OpenSociety(societyId, source).
Duty is toggled from the menu header. At the point, members also get prompts for duty (default G) and collect salary (default R).
Optional: Config.paycheck.useCommand = 'collectsalary' to collect from anywhere.
Admins โ
/societyadmin opens the admin interface (if Config.admin.allowIf passes):
- Create โ name, preset, owner, location with blip picker
- Manage โ move points, edit societies, open menus, dissolve
Society menu โ
| Tab | What it does |
|---|---|
| Overview | Summary, pending pay, quick stats |
| Members | Hire, fire, promote, permissions, activity |
| Ranks | Create and edit ranks, salaries, permissions |
| Finances | Balance, deposit, withdraw, transfer, ledger |
| Payroll | Run payroll, history, eligible members |
| Storage | Buy storages, set rank access, open inventory |
| Fines | Issue and manage member fines |
| Taxes | View action fees |
| Logs | Audit trail, Discord webhook in Settings |
| Settings | Society policies, inactivity, hiring rules |
For developers โ
Each topic has its own page:
| Page | Use when you need toโฆ |
|---|---|
| Examples | Copy-paste patterns for common integrations |
| API Reference | Call exports, use the society handle, handle error codes |
| Statebags | Read synced client data (memberships, duty, balances) |
| Events | React after something changed |
| Hooks | Block an operation before it commits |
Good to know โ
- One society per thing โ tie yours to your resource with
ownerResource+externalKey. You never need to store a society id; resolve it withSocietyByKeywhenever you need it. - Wait for ready โ do not call mutating exports until
bln_society:readyfires. Details: Events. - Permissions, not rank names โ check
HasPermission('storage.use'), not"Deputy". Register custom permissions inconfig/permissions.cfg.lua. - Who is acting โ pass
sourcewhen a player clicked something; omit it for system calls like booking revenue. Full rules: API โ actor argument. - Two kinds of money calls โ
AddMoney/RemoveMoneyfor revenue and costs (no permission check).Deposit/Withdrawfor member actions (checks permissions, moves player money). Details: API Reference. - Client reads are free โ membership, duty, and balances sync to the client via statebags. No callback needed. Details: Statebags.
- Need a walkthrough? โ see Examples.
โ FAQ โ
Use /societyadmin in-game if your admin check passes.
No. Tables are created and upgraded automatically on boot.
Yes, unless you set Config.hiring.maxSocieties or enable require_no_other_society on a specific society.
Every society has a funding source โ it decides where payroll money comes from. Set it when creating the society (preset or /societyadmin) or via the API.
| Type | Value | What it means | Best for |
|---|---|---|---|
| Account | 'account' | Wages and running costs are paid from the society's own balance. Shop sales, deposits, and transfers fill the till โ payroll spends it. Can run empty if revenue stops. | Businesses, saloons, stores, ranches, gangs โ anything that earns its own money |
| State | 'state' | Wages are generated on payroll runs. No treasury is required to pay members. The society can still hold a balance for other flows, but salaries are not capped by what's in the account. | Sheriff departments, clinics, government offices โ public-funded roles |
Presets that default to each type:
- Account โ
default,business,ranch,gang - State โ
law,government,medical
Account-funded payroll follows Config.payroll.insufficientFunds when the balance cannot cover a run (stop, partial, skip, or negative). State-funded payroll always pays and records a payroll_state ledger entry so you can track what was generated.
Use preset law or set fundingSource = 'state' when creating the department. State-funded societies generate wages on payroll runs โ see funding source types.
At the society point (prompt or menu). Optionally enable /collectsalary with Config.paycheck.useCommand.
Set the matching Config.<system>.enabled = false in main.cfg.lua.
Use EnsureSociety with ownerResource and externalKey, book revenue with AddMoney, and gate staff actions with HasPermission. See Examples.
No. Society points are visible to members only.
Add it to config/permissions.cfg.lua, grant it to ranks in the menu, then check it with HasPermission.
DeleteSociety is a soft delete โ history remains. PurgeSociety is permanent and system-only via the API.
Set discord_webhook in the society's Settings tab (requires settings.manage). Each society configures its own webhook URL.
๐ค Support โ
- ๐ฌ discord.bln-studio.com
- ๐ bln.tebex.io
- ๐ docs.bln-studio.com
