Migrating from op-crime
Gangs V2 can import a server running op-crime: every op-crime organisation becomes a Gangs V2 gang with its members, ranks, money, level and stash. It reads straight from your database, so there is nothing to export.
📦 What Gets Migrated
| op-crime | Gangs V2 |
|---|---|
Organisations (opcrime_orgs) | Gangs with the same name, colour and logo (graffiti image) |
| Level and experience | Level and XP, kept within that level |
| Balance and dirty money | Clean and dirty treasury |
| Upgrades (stash, member, rank, vehicle and outfit slots, garage, black medic, laundering, market, gang wars) | The matching upgrades. Never lower than the Gangs V2 starting values |
| Interior: entrance and garage points, MLO points or shell | Hideout entrance, garage, desk, stash and wardrobe |
| Captured zones, missions done, wars won and total | Gang stats |
| Monthly finance chart | Treasury chart |
| Battle pass: premium and claimed levels | Season pass progress |
Ranks (opcrime_ranks) | Ranks in the same order. Rank 1 becomes the boss with every permission |
Members (opcrime_players) | Members on the rank with the same name. Owners become boss |
Gang stash (organisation_<id> in ox_inventory) | The gang's stash |
Turf zones and influence (opcrime_turfzones) | Turfs with each gang's influence |
| Racketeering points | Rackets |
| Black medic locations | Black Medic locations |
| Spy cameras and car GPS trackers | Surveillance cameras and trackers |
| Gang dealership vehicles | Dealership catalogue, with stock, sold count, allowed gangs and hidden state |
Rank Permissions
op-crime permissions are turned into Gangs V2 permissions:
| op-crime | Gangs V2 |
|---|---|
| Boss menu | Management, Treasury, Recruit, Discipline, Rank Editor, Branding, Season Pass |
| Garage | Garage |
| Storage | Stash |
| Black medic | Black Medic |
| Money laundry | Laundering |
| Gang wars | Gang Wars, Rivalries, Turf Control |
| Furniture | Furniture |
Every rank also gets Wardrobe, Contracts, Market and Racketeering. A gang without any ranks gets the default Boss, Lieutenant and Soldier ranks.
What Does Not Carry Over
- Outfits. op-crime saves clothing in a different format. They stay in
opcrime_clothing; re-save them in the hideout wardrobe. - Stash items on other inventories. Only ox_inventory stashes are copied. On other inventories the report warns and the stash starts empty.
- Members whose rank no longer exists are placed on the gang's lowest rank. The report lists each one.
🚀 Running the Migration
Back up your database first, and stop op-crime. The import refuses to run while it is started, so balances cannot change halfway through.
- Start
kartik-gangsonce so its tables are created. - In the server console, run
kg_import_opcrime. This is a preview: it prints every gang, turf and location it would import, and writes nothing. - Fix every error in the report (see Problems That Block the Import). Warnings do not block it.
- Run
kg_import_opcrime confirm. restart kartik-gangsto load the imported gangs.
| Command | Description |
|---|---|
kg_import_opcrime | Preview. Prints the full report, changes nothing. |
kg_import_opcrime confirm | Runs the import. |
Both run from the server console only.
🛟 Safety
- All or nothing: the whole import is written in one transaction. If anything fails, it is rolled back and nothing is written.
- Runs once: after a successful import, running it again is refused, so gangs are never imported twice.
- op-crime data is never changed: its tables and stash rows are only read. Drop them yourself once you are happy.
- Existing gangs are kept: imported gangs get new IDs after your existing ones, so nothing is overwritten.
🧭 Problems That Block the Import
The preview lists every one of these. Fix them, then run the preview again.
| Error | Fix |
|---|---|
| A Gangs V2 gang with that name already exists | Rename or delete one of them |
| Two op-crime gangs have the same name | Rename one in op-crime |
| A character is in two op-crime gangs, or already in a Gangs V2 gang | Remove them from one gang |
A stash has more stacks than StashSlots | Raise StashSlots in shared/hideout.lua (see Hideout) |
ox_inventory already has a stash called kg_stash_<id> | Remove the leftover stash row |
| A gang name longer than 64 characters | Shorten it in op-crime |
opcrime_orgs not found | Import the op-crime tables into this database first |
➡️ Next: Language