toolsCharacter Builder

Character Builder

Create and customize detailed character data for testing, roleplay scenarios, and server administration.

Overview

The Character Builder helps administrators and developers create comprehensive character profiles with realistic data, proper formatting, and QBCore compatibility. Generate complete character datasets including personal information, job assignments, financial data, and inventory items.

Character Builder

Create detailed character profiles for testing and roleplay

Basic Information

Generated Character

Build a character to see generated data

Character Building Features

Comprehensive Data Generation

  • Personal Information: Names, birthdates, nationality, and contact details
  • Physical Appearance: Skin, face, hair, and eye customization options
  • Job Assignment: Complete job hierarchy with grades and salaries
  • Gang Affiliation: Gang membership with appropriate grade levels
  • Financial Profile: Cash, bank account, and cryptocurrency balances

QBCore Integration

  • Citizen ID Generation: Automatic unique identifier creation
  • Proper Data Format: JSON structures matching QBCore standards
  • Database Compatibility: SQL export ready for direct database insertion
  • Metadata Inclusion: Health, hunger, thirst, and other player stats

Advanced Features

  • Random Generation: Create realistic random characters instantly
  • Template System: Pre-built character templates for common roles
  • Bulk Creation: Generate multiple characters simultaneously
  • Import/Export: Save and load character templates

Character Templates

Law Enforcement Officer

{
  "job": "police",
  "jobgrade": 3,
  "licenses": ["driver", "weapon"],
  "cash": 1000,
  "bank": 8000,
  "inventory": [
    {"name": "weapon_pistol", "amount": 1},
    {"name": "radio", "amount": 1},
    {"name": "handcuffs", "amount": 1}
  ]
}

Medical Professional

{
  "job": "ambulance",
  "jobgrade": 4,
  "licenses": ["driver", "business"],
  "cash": 800,
  "bank": 12000,
  "inventory": [
    {"name": "bandage", "amount": 10},
    {"name": "painkillers", "amount": 5},
    {"name": "radio", "amount": 1}
  ]
}

Criminal Character

{
  "gang": "ballas",
  "ganggrade": 2,
  "job": "unemployed",
  "cash": 2500,
  "bank": 1000,
  "stress": 25,
  "inventory": [
    {"name": "lockpick", "amount": 5},
    {"name": "phone", "amount": 1}
  ]
}

Database Integration

Player Table Structure

CREATE TABLE `players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citizenid` varchar(50) NOT NULL,
  `cid` int(11) DEFAULT NULL,
  `license` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `money` text NOT NULL,
  `charinfo` text DEFAULT NULL,
  `job` text NOT NULL,
  `gang` text DEFAULT NULL,
  `position` text NOT NULL,
  `metadata` text NOT NULL,
  `inventory` longtext DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`citizenid`),
  KEY `id` (`id`),
  KEY `last_updated` (`last_updated`),
  KEY `license` (`license`)
);

Money Structure

{
  "cash": 500,
  "bank": 5000,
  "crypto": 0
}

Character Info Structure

{
  "firstname": "John",
  "lastname": "Doe",
  "birthdate": "01/15/1990",
  "gender": 0,
  "nationality": "USA",
  "phone": "1234567890",
  "account": "US012345678"
}

Job Structure

{
  "name": "police",
  "label": "Police Officer",
  "payment": 150,
  "onduty": false,
  "isboss": false,
  "grade": {
    "name": "Sergeant",
    "level": 4
  }
}

Automation & Scripting

Bulk Character Creation

-- Server-side character creation script
local function createCharacter(characterData)
    local citizenid = generateCitizenId()
    local charinfo = json.encode(characterData.charinfo)
    local money = json.encode(characterData.money)
    local job = json.encode(characterData.job)
    local position = json.encode(characterData.position)
    local metadata = json.encode(characterData.metadata)
    
    MySQL.insert('INSERT INTO players (citizenid, name, money, charinfo, job, position, metadata) VALUES (?, ?, ?, ?, ?, ?, ?)', {
        citizenid,
        characterData.name,
        money,
        charinfo,
        job,
        position,
        metadata
    })
    
    return citizenid
end
 
-- Create multiple test characters
local testCharacters = {
    {name = "Test Officer", job = "police", jobgrade = 2},
    {name = "Test Medic", job = "ambulance", jobgrade = 3},
    {name = "Test Civilian", job = "unemployed", jobgrade = 0}
}
 
for _, char in pairs(testCharacters) do
    createCharacter(char)
end

Character Data Validation

local function validateCharacterData(data)
    local errors = {}
    
    -- Required fields
    if not data.firstname or data.firstname == "" then
        table.insert(errors, "First name is required")
    end
    
    if not data.lastname or data.lastname == "" then
        table.insert(errors, "Last name is required")
    end
    
    -- Money validation
    if data.money then
        if data.money.cash < 0 or data.money.bank < 0 then
            table.insert(errors, "Money amounts cannot be negative")
        end
    end
    
    -- Job validation
    if data.job and not Config.Jobs[data.job] then
        table.insert(errors, "Invalid job specified")
    end
    
    return #errors == 0, errors
end

Testing Scenarios

Roleplay Character Sets

Create character sets for specific roleplay scenarios:

  1. Police Department: Officers of various ranks for training scenarios
  2. Hospital Staff: Medical professionals for emergency response testing
  3. Criminal Organization: Gang members for law enforcement training
  4. Civilian Population: Regular citizens for realistic city atmosphere

Performance Testing

Generate characters for server performance testing:

-- Generate 100 test characters
for i = 1, 100 do
    local testChar = {
        firstname = "Test" .. i,
        lastname = "User",
        money = {cash = 500, bank = 5000},
        job = "unemployed",
        position = getRandomSpawnPoint()
    }
    createCharacter(testChar)
end

Best Practices

Character Naming

  • Use realistic names appropriate for the server setting
  • Avoid inappropriate or offensive names
  • Consider cultural diversity in character creation
  • Maintain consistency with server lore and theme

Job Assignment

  • Respect server job limits and hierarchies
  • Assign appropriate grades based on character background
  • Consider job requirements and qualifications
  • Balance character skills with job responsibilities

Financial Settings

  • Set realistic starting money amounts
  • Consider server economy balance
  • Avoid creating overpowered characters
  • Match wealth to character background and job

Pro Tip: Use the Character Builder to create diverse test characters for comprehensive server testing. Generate characters with different backgrounds, jobs, and financial situations to ensure your server works well for all player types.

Need help with character creation? Check our player guide or visit our roleplay community.