Universal Api
The Universal API and Webservice The Universal Api Mod and Webservice this is my attempt to make a Universal Api Backend for the server hosters, allowing for a robust, easy to use and set up backend. and for modders an easy to use API wrapper to help them make hived and cross-server mods more easily. With the mod and API I handle authentication and client tokens allowing you to ensure that the data you are accessing… (more)
The Universal API and Webservice The Universal Api Mod and Webservice this is my attempt to make a Universal Api Backend for the server hosters, allowing for a robust, easy to use and set up backend. and for modders an easy to use API wrapper to help them make hived and cross-server mods more easily. With the mod and API I handle authentication and client tokens allowing you to ensure that the data you are accessing and using is secured, preventing rouge and unwanted access to the APIs. THIS MOD IS NOT PLUG AND PLAY YOU MUST READ ALL DOCUMENTATION FIRST BEFORE INSTALLING ON YOUR SERVER Some quick links for setting up the webapi backend How to install the webservice on windows How to install the webservice on Linux(Scroll up if you don't know how to set up linux) The Discord Link - https://discord.gg/SkUkPv4 All the Modder/Developer documentation is available here https://github.com/daemonforge/DayZ-UniveralApi/wiki/Developer-Reference Database Functions Load/Save Objects(JSON) Update Objects (can set sub Elements/Variables including Pull and Push from Arrays) Transactions (increment float/ints in database with constancy (aka from multiple servers at once) Queries (MongoDB Queries) Discord Functions Simple Web Interface for players to connect there steam accounts to discord (customizable for server owners) Add/Remove Roles Get User (Returns an object with current Roles and Discord ID/Name) Send Message (Sends DM from bot to player, player doesn't have to be connected to DayZ server at the time) Create/Edit/Delete Channels Send Message to Channels Get Messages from Channels Move User to Voice Channel Mute User in Voice Channel Kick User from Voice Channel Get User's current Voice Channel Other Stuff Quantum Random Numbers Toxicity Checker (TensorFlow Toxicity) Translate (Libre Translate) And More If you are a modder interested in how this works and how you can make a hived mod using the Universal API mod please join the discord The Discord Link - https://discord.gg/SkUkPv4 How to Support Me Sponsor Me On Github Donate via Paypal
No file I/O on hot paths, no timers created per event, no per-player-per-frame hooks.
3 chain breaks, all on specific classes the mod replaces wholesale — matters only if another mod patches the same classes.
less than 0.001% of each server frame at 100 players (0.000 ms/s). Counts hook dispatch and timers only, not what the hooks do inside. Methodology.
Structural load of the 328 scripted mods analyzed, lightest on the left. This mod's bar is lit; 36 others share it. Ranked list.
Event hooks carry 99.8% of this mod's structural load. 0.000 ms/s in all.
1 hook · 0.0002 ms/s
| Event hooksrun when something happens: an inventory move, a hit, an action | 1 hook | 0.0002 ms/s | 99.8% | Weapon_Base.OnRPC |
Counts how often each hook is dispatched and how many timers stay alive, not what the code inside does. Some rates are order-of-magnitude estimates; the methodology lists which.
Chain breaks, by consequence
3 overrides that skip super(), ranked by how much they can affect. On any server a break replaces vanilla's behaviour on that method and silences every earlier-loaded mod hooking it.
LoadEntity · SaveEntity
Only this class is affected. Matters only if another mod in your stack patches the same class.
1 class
UApiEntityStore2 locations
_UniversalApi.pbo::scripts\4_World\UApi\ItemStore.c:157_UniversalApi.pbo::scripts\4_World\UApi\ItemStore.c:3SendToApi
Only this class is affected. Matters only if another mod in your stack patches the same class.
1 class
ULoggerBaseInstance1 location
_UniversalApi.pbo::scripts\3_Game\UApi\Logger.c:2Where this mod runs often
Hooks on per-frame and high-rate surfaces, with what their bodies call. Body work, not the hook itself, is what costs frame time.
Other findings
super() only on some paths · 4 · warning
- PluginAdminLog.BleedingOut calls super.BleedingOut() only on some paths — on the others the chain below this mod is dropped.
_UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:226 - PluginAdminLog.PlayerKilled calls super.PlayerKilled() only on some paths — on the others the chain below this mod is dropped.
_UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:3 - PluginAdminLog.PlayerList calls super.PlayerList() only on some paths — on the others the chain below this mod is dropped.
_UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:249 - PluginAdminLog.Suicide calls super.Suicide() only on some paths — on the others the chain below this mod is dropped.
_UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:203
- PluginAdminLog.BleedingOut calls super.BleedingOut() only on some paths — on the others the chain below this mod is dropped.
Which vanilla methods the mod hooks, which of them drop the chain, how often each hook fires, and which risky calls sit inside hot hooks.
How long hook bodies take, network cost, or engine-side load. Measured across live fleets, most server lag comes from the engine and world state, not mod script chains — a light footprint does not clear a mod of lag, and a heavy one does not convict it. Methodology.
Everything else
All 29 overrides
Surface is the dispatch tier the rubric can price (— = unpriced); server is whether the override exists on a dedicated server; super() shows whether the vanilla chain is preserved on a server.
| method | surface | server | super() | where |
|---|---|---|---|---|
BloodContainerBase.OnUApiSave |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\VanillaItems.c:46 |
BloodContainerBase.OnUApiLoad |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\VanillaItems.c:53 |
CarScript.OnUApiSave |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\CarScript.c:3 |
CarScript.OnUApiLoad |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\CarScript.c:17 |
ChatInputMenu.OnChange |
— | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\ChatInputMenu.c:3 |
Edible_Base.OnUApiSave |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\VanillaItems.c:18 |
Edible_Base.OnUApiLoad |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\VanillaItems.c:28 |
ItemBase.OnUApiSave |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\ItemBase.c:3 |
ItemBase.OnUApiLoad |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\ItemBase.c:7 |
MissionBase.UniversalApiReady |
— | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\MissionBase.c:8 |
MissionGameplay.OnMissionStart |
T3 | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\MissionGameplay.c:4 |
MissionGameplay.OnMissionFinish |
T3 | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\MissionGameplay.c:13 |
MissionGameplay.UniversalApiReady |
— | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\MissionGameplay.c:19 |
MissionServer.OnClientPrepareEvent |
— | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\MissionServer.c:9 |
MissionServer.UniversalApiReady |
— | yes | ✓ | _UniversalApi.pbo::scripts\5_Mission\UApi\MissionServer.c:18 |
PluginAdminLog.PlayerKilled |
— | yes | conditional | _UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:3 |
PluginAdminLog.Suicide |
— | yes | conditional | _UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:203 |
PluginAdminLog.BleedingOut |
— | yes | conditional | _UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:226 |
PluginAdminLog.PlayerList |
— | yes | conditional | _UniversalApi.pbo::scripts\4_World\UApi\Classes\PluginAdminLog.c:249 |
TransmitterBase.OnUApiSave |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\VanillaItems.c:2 |
TransmitterBase.OnUApiLoad |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\VanillaItems.c:8 |
UApiEntityStore.SaveEntity |
— | yes | ✗ none | _UniversalApi.pbo::scripts\4_World\UApi\ItemStore.c:3 |
UApiEntityStore.Create |
— | yes | ✗ none | _UniversalApi.pbo::scripts\4_World\UApi\ItemStore.c:117 |
UApiEntityStore.CreateAtPos |
— | yes | ✗ none | _UniversalApi.pbo::scripts\4_World\UApi\ItemStore.c:144 |
UApiEntityStore.LoadEntity |
— | yes | ✗ none | _UniversalApi.pbo::scripts\4_World\UApi\ItemStore.c:157 |
ULoggerBaseInstance.SendToApi |
— | yes | ✗ none | _UniversalApi.pbo::scripts\3_Game\UApi\Logger.c:2 |
Weapon_Base.OnUApiSave |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\Weapon_Base.c:3 |
Weapon_Base.OnUApiLoad |
— | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\Weapon_Base.c:8 |
Weapon_Base.OnRPC |
T2 | yes | ✓ | _UniversalApi.pbo::scripts\4_World\UApi\Entities\Weapon_Base.c:79 |
Dispatch surfaces and timers the grade prices
| surface | tier | rate (Hz) | rate source | ms/s |
|---|---|---|---|---|
Weapon_Base.OnRPC | T2 | 8.0 | placeholder | 0.0002 |
Includes 0.000 ms/s from placeholder-rated surfaces.
Load-order constraints (CfgPatches)
What each PBO declares: its addon identity and the addons it requires to be loaded first (requiredAddons). A partial load-order signal from the mod's own metadata.
_UAPIBase.pbo
UAPIBaserequiredVersion 0.1 — no requiredAddonsUAPIBaserequiredVersion 0.1 — no requiredAddons
_UniversalApi.pbo
UniversalApirequiredVersion 0.1 — requiresUAPIBase,JM_CF_ScriptsUniversalApirequiredVersion 0.1 — requiresUAPIBase,JM_CF_Scripts
census 1.1 · findings 1.1 · hash 87c209848784c990