Code Lock
Introduction: Code Lock is aimed at simplifying the base combination lock. No longer will you have to scramble to lock a gate that gives access to your base. There are also tons of configurable settings for this mod including logs, raid times, raid settings, client rate limiting and more! ---------------------------------------------------------------------------------------------------- Contributions: Thanks to… (more)
Introduction: Code Lock is aimed at simplifying the base combination lock. No longer will you have to scramble to lock a gate that gives access to your base. There are also tons of configurable settings for this mod including logs, raid times, raid settings, client rate limiting and more! ---------------------------------------------------------------------------------------------------- Contributions: Thanks to WarDog for the new UI! : https://steamcommunity.com/id/officialwardog/ Thanks to OP for implementing the custom model!: https://steamcommunity.com/profiles/76561198379941795/ Model used for Lock: https://sketchfab.com/3d-models/keypad-b9968a00bc9249df927ff1969acf2f7e ---------------------------------------------------------------------------------------------------- LICENSE: PERMISSION IS NOT GRANTED FOR THIS MOD TO BE INCLUDED IN A "SERVER PACK" or "MOD PACK". Use a Collection if you want to include this mod on your server for your users. Monetization while using this mod is NOT approved. Requests for monetization MUST go through Room Service. Copyright 2023 Room Service. This item is not authorized (strictly forbidden) for any of these conditions: - posting on Steam, except under the Steam account theroomservice. - hosting on any download server other than Code Lock's current workshop download. - hosting on any launcher for distribution other than Code Lock's current workshop download. - to be packaged in any form other than Code Lock's current workshop download. - to create derivative works.
No file I/O on hot paths, no timers created per event, no per-player-per-frame hooks.
Every server-visible override preserves its chain.
less than 0.001% of each server frame at 100 players (0.002 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; 22 others share it. Ranked list.
Event hooks carry 99.7% of this mod's structural load. 0.002 ms/s in all.
9 hooks · 0.0018 ms/s
1 hook · 0.000002 ms/s
| Event hooksrun when something happens: an inventory move, a hit, an action | 9 hooks | 0.0018 ms/s | 99.7% | ActionCloseFence.ActionCondition, ActionPackTent.ActionCondition, ActionToggleTentOpen.ActionCondition and 6 more |
| Lifecycle hooksrun when an entity is created, loaded or deleted | 1 hook | 0.000002 ms/s | 0.1% | MissionServer.InvokeOnConnect |
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.
Where 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 · 10 · warning
- ActionPackTent.OnExecuteServer calls super.OnExecuteServer() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Actions\interact\ActionPackTent.c:14 - ItemBase.CombineItemsClient calls super.CombineItemsClient() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Entities\ItemBase.c:13 - ItemBase.OnRightClick calls super.OnRightClick() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Entities\ItemBase.c:18 - TentBase.CanDisplayAttachmentCategory calls super.CanDisplayAttachmentCategory() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Entities\TentBase.c:25 - TentBase.CanReceiveAttachment calls super.CanReceiveAttachment() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Entities\TentBase.c:33 - TentBase.CanReceiveItemIntoCargo calls super.CanReceiveItemIntoCargo() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Entities\TentBase.c:11 - TentBase.CanReleaseCargo calls super.CanReleaseCargo() only on some paths — on the others the chain below this mod is dropped.
CodeLock.pbo::scripts\4_world\Entities\TentBase.c:18 - ActionDismantlePart.DismantleCondition vetoes early (returns false) on some paths and defers to super.DismantleCondition() otherwise — composes safely with vanilla's and earlier mods' conditions.
CodeLock.pbo::scripts\4_world\Actions\continuous\ActionDismantlePart.c:2 - Fence.CanOpenFence vetoes early (returns false) on some paths and defers to super.CanOpenFence() otherwise — composes safely with vanilla's and earlier mods' conditions.
CodeLock.pbo::scripts\4_world\Entities\Fence.c:4 - Fence.CanReceiveAttachment vetoes early (returns false) on some paths and defers to super.CanReceiveAttachment() otherwise — composes safely with vanilla's and earlier mods' conditions.
CodeLock.pbo::scripts\4_world\Entities\Fence.c:11
- ActionPackTent.OnExecuteServer calls super.OnExecuteServer() 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 23 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 |
|---|---|---|---|---|
ActionCloseFence.ActionCondition |
T2 | yes | ✓ | CodeLock.pbo::scripts\4_world\Actions\interact\ActionCloseFence.c:2 |
ActionConstructor.RegisterActions |
— | yes | ✓ | CodeLock.pbo::scripts\4_world\Actions\actionconstructor.c:2 |
ActionDismantlePart.DismantleCondition |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Actions\continuous\ActionDismantlePart.c:2 |
ActionPackTent.ActionCondition |
T2 | yes | ✓ | CodeLock.pbo::scripts\4_world\Actions\interact\ActionPackTent.c:2 |
ActionPackTent.OnExecuteServer |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Actions\interact\ActionPackTent.c:14 |
ActionToggleTentOpen.ActionCondition |
T2 | yes | ✓ | CodeLock.pbo::scripts\4_world\Actions\interact\ActionToggleTentOpen.c:2 |
Fence.CanOpenFence |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\Fence.c:4 |
Fence.CanReceiveAttachment |
T2 | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\Fence.c:11 |
Fence.OnPartDismantledServer |
— | yes | ✓ | CodeLock.pbo::scripts\4_world\Entities\Fence.c:22 |
Fence.OnPartDestroyedServer |
— | yes | ✓ | CodeLock.pbo::scripts\4_world\Entities\Fence.c:34 |
Fence.SetActions |
T2 | yes | ✓ | CodeLock.pbo::scripts\4_world\Entities\Fence.c:50 |
Hacksaw.SetActions |
T2 | yes | ✓ | CodeLock.pbo::scripts\4_world\Entities\Hacksaw.c:3 |
ItemBase.CombineItemsClient |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\ItemBase.c:13 |
ItemBase.OnRightClick |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\ItemBase.c:18 |
MissionGameplay.CreateScriptedMenu |
— | yes | ✓ | CodeLock.pbo::scripts\5_mission\MissionBase.c:2 |
MissionGameplay.OnKeyPress |
— | yes | conditional | CodeLock.pbo::scripts\5_mission\MissionBase.c:41 |
MissionServer.InvokeOnConnect |
T3 | yes | ✓ | CodeLock.pbo::scripts\5_mission\MissionServer.c:31 |
PluginManager.Init |
— | yes | ✓ | CodeLock.pbo::scripts\4_world\PluginManager\PluginManager.c:2 |
TentBase.CanReceiveItemIntoCargo |
T2 | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\TentBase.c:11 |
TentBase.CanReleaseCargo |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\TentBase.c:18 |
TentBase.CanDisplayAttachmentCategory |
— | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\TentBase.c:25 |
TentBase.CanReceiveAttachment |
T2 | yes | conditional | CodeLock.pbo::scripts\4_world\Entities\TentBase.c:33 |
TentBase.SetActions |
T2 | yes | ✓ | CodeLock.pbo::scripts\4_world\Entities\TentBase.c:57 |
Dispatch surfaces and timers the grade prices
| surface | tier | rate (Hz) | rate source | ms/s |
|---|---|---|---|---|
ActionCloseFence.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
ActionPackTent.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
ActionToggleTentOpen.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
Fence.CanReceiveAttachment | T2 | 8.0 | placeholder | 0.0002 |
Fence.SetActions | T2 | 8.0 | placeholder | 0.0002 |
Hacksaw.SetActions | T2 | 8.0 | placeholder | 0.0002 |
TentBase.CanReceiveItemIntoCargo | T2 | 8.0 | placeholder | 0.0002 |
TentBase.CanReceiveAttachment | T2 | 8.0 | placeholder | 0.0002 |
TentBase.SetActions | T2 | 8.0 | placeholder | 0.0002 |
MissionServer.InvokeOnConnect | T3 | 0.1 | placeholder | 0.0000 |
Includes 0.002 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.
CodeLock.pbo
GDZ_CodelockrequiredVersion 0.1 — requiresDZ_Data,DZ_Gear_CampingCodeLock— requiresDZ_Data,DZ_Scripts
census 1.1 · findings 1.1 · hash 5b47c50bfe995514