Repository
Online mod repository client. Handles mod browsing, subscribing/unsubscribing, downloading with progress, update queuing, and synchronization with BeamNG servers.
Online mod repository client. Handles mod browsing, subscribing/unsubscribing, downloading with progress, update queuing, and synchronization with BeamNG servers.
Public Functions
| Function | Signature | Description |
|---|---|---|
M.requestMods | (query, orderBy, order, page, categories) | Searches the mod repository |
M.requestMyMods | (query, orderBy, order, page, categories) | Lists the user's own mods |
M.requestMod | (modId, callback) | Gets detailed info for a single mod |
M.requestModOffline | (modId) | Gets mod info from local data when offline |
M.modSubscribe | (modId, useOptOut) | Subscribes to a mod and queues download |
M.modUnsubscribe | (modId) | Unsubscribes and deletes the mod |
M.installMod | (uri, filename, localPath, callback) | Downloads and installs a mod ZIP |
M.addUpdateQueue | (data) | Adds a mod to the update/download queue |
M.uiUpdateQueue | () | Sends queue state to UI |
M.updateAllMods | () | Starts downloading all queued updates |
M.updateOneMod | (id) | Downloads a specific queued mod |
M.updateAllMissing | () | Downloads all missing mods |
M.changeStateUpdateQueue | (fname, state) | Updates a queue entry's state |
M.onUpdate | (dt) | Sends download progress to UI when dirty |
M.setRepoMsg | (data) | Sets repository message from server |
M.setRepoCmd | (data) | Sets repository command from server |
M.setrepoAutomationMsg | (data) | Sets Automation message from server |
M.onModManagerReady | () | Processes pending subscriptions and server commands |
M.uiShowRepo | () | Opens the mod repository UI |
M.uiShowMod | (modId) | Opens a specific mod's detail page |
M.runSubscription | () | Processes deferred subscription queue |
M.onOnlineStateChanged | (connected) | Runs subscriptions when online |
M.requestSubscriptions() | Requests repository subscription data. |
Update Queue Entry
| Field | Type | Description |
|---|---|---|
id | string | Mod repository ID |
filename | string | ZIP filename |
uri | string | Download URI path |
state | string | "waiting", "updating", "downloading", "downloaded", "done" |
reason | string | "update", "missing", "subscription" |
update | boolean | Whether download is authorized |
Download Flow
modSubscribeorcheckUpdateadds entries toupdateQueueupdateDownloadQueuestarts parallel downloads (up tomodNumParallelDownloadsetting)installModdownloads viacore_online.apiCallwith progress callback- On completion, old mod versions are cleaned up, new mod is mounted
modUpdateSuccessAPI call reports results to server
Opt-Out System
Users can opt out of auto-subscriptions. Opt-out state is stored in /settings/cloud/mods-optout.json. When useOptOut is true, opted-out mods are silently ignored.
Server Commands (repoCmd)
| Command | Action |
|---|---|
forceInstall | Auto-subscribe to listed mod IDs |
forceRemove | Auto-unsubscribe from listed mod IDs |
forceDisable | Deactivate listed mods |
Module State
| Variable | Type | Default |
|---|---|---|
requestSubscriptions | varies | requestSubscriptions |
Notes
- Downloads go to
/mods/repo/by default. - Parallel download count is configurable via
modNumParallelDownloadsetting (default 3). - Unpacked mods cannot be updated - user must pack first.
- Duplicate detection prevents the same mod ID from being queued twice.
- Uses
core_online.apiCallfor all server communication.
See Also
- modmanager - Local mod management
- online - Network API layer
Replay
Replay recording and playback system. Records vehicle physics state to `.rpl` files, plays back with variable speed, seeking, and frame stepping. Supports mission auto-recording and user-saved replays
Rope Visual Test
ImGui sandbox for creating, editing, and testing rope visual simulations. Provides a full editor for rope physics parameters, animations, node interaction, performance tracking, and save/load.