Civilian Registration (CivReg)
Register characters in-game or sync character portrait images to Database Sync.
Civilian Registration makes character creation from in-game simple.
For menu based servers, a registration window with your custom character record form is shown with a single button to generate a character selfie.
For framework servers with DB sync, this submodule syncs in-game selfies/mugshots to the character records.

Activation Guide
1. Download and Install the Resource
2. Configure the Submodule
Open sonorancad/configuration/civreg_config.lua. Keep enabled = true and templateId = 7 for civilian character registration.
3. Optional: Configure Database Sync Mode
If both Database Sync and its Character mapping are enabled in CAD, CivReg uses database mode automatically.
Run the database sync AI configuration tool after starting the civilian registration submodule. This will automatically map any image field in your character record to the newly generated sonoran_mugshot database column.
4. Link Players to CAD
When not using database sync, each player must link their CAD account in-game before using /civreg. If in database sync mode, your characters will be automatically searchable, now complete with mugshot images.
5. Review Your Character Template
In CAD, open Admin > Customization > Custom Records and review the civilian character template. The built-in character template ID is 7. See Creating Custom Record and Report Types for editing fields and sections. Add an editable Image field if players should attach a portrait, and make that field required if a portrait is mandatory.
In database mode, add an Image field and map it to sonoran_mugshot in the CAD DB Sync character mapping. Other character fields continue to come from the database mappings you already configured.
In API mode, templates are cached for 60 seconds by default. After saving a template change, allow the cache to expire, then close and reopen /civreg to load the updated form. An already-open form does not refresh automatically.
6. Configure Optional Autofill and Portrait Uploads
For identity autofill, follow Framework Autofill. For templates with image fields, review Portrait Uploads and the image size limit.
Player Guide
API Mode
Database Sync Mode
Framework Autofill
Configuration Reference
Troubleshooting
Last updated
Was this helpful?


