Multicharacter
Identity
config/identity.lua - character data validation, nationalities and flags, random names, and the citizen id format.
On this page5 sections
All limits are checked on the server. The form only gives hints, the server decides.
Character data
Config.Identity = { minAge = 18, maxAge = 90, nameMinLen = 2, nameMaxLen = 24, genders = { 'male', 'female' }, heightMin = 150, heightMax = 210, randomHeight = false, weightMin = 40, weightMax = 150, randomWeight = false,}| Option | Description |
|---|---|
minAge, maxAge | Youngest and oldest allowed character age. |
nameMinLen, nameMaxLen | First and last name length. Digits are never accepted. |
genders | Available genders. |
heightMin, heightMax | Height range in cm. |
randomHeight | true rolls the height instead of letting players pick. |
weightMin, weightMax | Weight range in kg. |
randomWeight | true rolls the weight. |
Nationalities
nationalities = { 'American', 'British', 'Polish', 'German', 'Other',},nationalityFlags = { American = 'US', British = 'GB', Polish = 'PL', German = 'DE',},nationalitiesis the list in the form, in this order.nationalityFlagsmaps a nationality to an ISO 3166-1 alpha-2 country code for its flag.- A nationality without an entry is shown without a flag.
Over 40 nationalities with flags are included.
Add a nationality
Flags are SVG files in web/dist/flags/, named with the lowercase country code, for example pl.svg.
Add the flag
If the flag is missing, get the SVG from flag-icons (opens in a new tab) (MIT, folder
flags/4x3/). Save it asweb/dist/flags/<code>.svg, for exampleweb/dist/flags/lt.svg.
Random names
The random button in the creator picks names from these lists:
randomNames = { firstNamesMale = { 'James', 'John', 'Jakub', 'Piotr' }, firstNamesFemale = { 'Mary', 'Anna', 'Katarzyna', 'Ewa' }, lastNames = { 'Smith', 'Kowalski', 'Nowak' },},The selected gender is kept when rolling.
Citizen ID format
Config.CitizenId = { length = 8, prefix = '',}| Option | Description |
|---|---|
length | Total id length, including the prefix. |
prefix | Text at the start of every id, for example 'SC-'. |
The id uses uppercase letters and digits. Uniqueness is checked in the database before saving.