API ReferenceGE Extensionscareermodules
Career Playbook Writer Module
M.dependencies = {'career_career'}
Dependencies
M.dependencies = {'career_career'}Simple mission history logger. Records each mission played with its star count into a JSON playbook file for career analytics and progression tracking.
Internal State
| Field | Type | Description |
|---|---|---|
M.onClientStartMission | varies | Assigned as onClientStartMission |
Public API
| Function | Signature | Description |
|---|---|---|
M.addMissionPlayedEntry | (missionId, stars) | Appends a {missionId, stars} entry to the playbook |
Lifecycle Hooks
| Hook | Purpose |
|---|---|
M.onExtensionLoaded | Loads playbook from save file on career start |
M.onCareerActive | Reloads playbook data when career becomes active |
M.onSaveCurrentSaveSlot | Writes playbook JSON to save directory |
Dependencies
career_career- active checkcareer_saveSystem- save slot path and JSON write utilities
Data Format
Stored at <savePath>/career/playbook.json as an array:
{
{ missionId = "drag_race_01", stars = 3 },
{ missionId = "delivery_05", stars = 2 },
-- ...
}Usage Example
-- Record a completed mission
career_modules_playbookWriter.addMissionPlayedEntry("drift_challenge_03", 2)See Also
- playerAttributes - Attribute log for financial/gameplay history
Career Permissions Module
Centralized permission system for career actions. Other modules hook into `onCheckPermission` to grant or restrict actions based on active gameplay state (e.g., missions, deliveries, tutorials).
Career Player Abstract Module
Provides the "Driver's Abstract" computer menu, which displays the player's insurance/driving record. Thin wrapper around the insurance system's abstract data.