sFramework
Information sFramework is the core of the sUDE project. It ships many features and utilities used and/or implemented by sUDE modules : Advanced PostProcessing Cameras Overlays Game and User configuration interface Helper classes and utilities for developing and debugging Improvements to base game classes more... PostProcessing effects sFramework ships a centralized post processing effects manager, with the goal of… (more)
Information sFramework is the core of the sUDE project. It ships many features and utilities used and/or implemented by sUDE modules : Advanced PostProcessing Cameras Overlays Game and User configuration interface Helper classes and utilities for developing and debugging Improvements to base game classes more... PostProcessing effects sFramework ships a centralized post processing effects manager, with the goal of allowing multiple requests of the same effects, without hardcoding them. SPPEffect SPPEffect is the "container" of any PostProcess Effect you wish to add to it (e.g. saturation, vignette, motion blur etc.). SPPEffect myPPE = new SPPEffect(); To add a parameter use the provided setters: myPPE.setVignette(intensity, color); myPPE.setRadialBlur(powerX, powerY, offsetX, offsetY); myPPE.setChromAber(powerX, powerY); //... To apply it, "hand it over" to the SPPEManager, which will calculate the correct value of all active SPPEffect and then apply it SPPEManager.activate(myPPE); //SPPEManager.deactivate(myPPE); // to deactivate the effect SPPEffectAnimated A SPPEffectAnimated is just like a SPPEffect, but it has an animation mechanism which allows you to animate the values of a PostProcess effect. A SPPEffectAnimated is an abstract class. You need to implement it with your own class and override the onAnimate() method, which will be called on every frame. There also is a timed variant SPPEffectTimed, which will be automatically deactivated once a certain amount has passed. To create your animation, simply extend either SPPEffectAnimated or SPPEffectTimed class MyLoopAnimation : PPELoopedParams{ override void onAnimate(float deltaTime){ /* change PPE values here setOverlay(...); setChromAber(...); setCameraEffects(...); */ setVignetteIntensity( Math.Sin(getTime()) ); } } class MyTimedAnimation : SPPEffectTimed{ override void onAnimate(float deltaTime){ setVignetteIntensity( Math.Cos(getTime()) ); } } A SPPEffectTimed also has a "duration" which can be set with the constructor, or the provided method: MyTimedAnimation myTimedAnimation = new MyTimedAnimation(6); // the animation will last 6 seconds myTimedAnimation.setDuration(10.0); // the animation will last 10 seconds The activation of the animation is identical to any other SPPEffect MyLoopAnimation myAnimation = new MyLoopAnimation(); SPPEManager.activate(myAnimation); MyTimedAnimation myTimedAnimation = new MyTimedAnimation(5.5); SPPEManager.activate(myTimedAnimation); If you want to manually manage the animation you can use the provided methods myAnimation.start(); // Set the animation state to "Playing" myAnimation.stop(); // Reset the time and set the animation state to "Stopped" myAnimation.pause(); // Freeze the animation values and set the animation state to "Paused" myAnimation.resume(); // Resume the the animation and set the animation state to "Playing" Camera Overlays A camera overlay is nothing else than an image, used like an HUD. The fundemental unit of camera overlays is the SCameraOverlay, a very simple wrapper for the ImageWidget (the DayZ UI component that holds an image). It can be used in countless ways: As an animated UI : or for emulating headgear damage: (from sVisual, MotoHelmet in various health state: Pristine, Worn, Damaged, BadlyDamaged and Ruined) Defining an overlay is very simple and very similar to SPPEffects, in fact there are three types as well and the logic is identical to the SPPEffects: class MyAnimatedOverlay : SCameraOverlayAnimated { override void onInit(){ setImage("path/to/texture.edds"); //... } //onAnimate() gets called every frame! override void onAnimate(float deltaTime){ setSize(Math.Sin(getTime())); //setPosition(...) //setRotation(...) //setMask(...) //... } } To activate/deactivate an overlay, you use the SCameraOverlayManager: SCameraOverlaysManager.getInstance().activate(myOverlay); A SCameraOverlay has many attributes you can play with, which can be set either by scripts or in the config. Currently available attributes are: image=""; // Resource image path, can be whatever an ImageWidget accepts texture alpha=1.0; // [0.0 - 1.0] Alpha value (transparency) mask=""; // Resource image path, can be whatever an ImageWidget accepts as mask maskProgress=1.0; // [0.0 - 1.0] Mask progress maskTransitionWidth=1.0; // Mask transition width (used as progress + transitionWidth) position[] = {0.0, 0.0}; // [0.0 - 1.0] X and Y position in screenspace size[] = {1.0, 1.0}; // [0.0 - 1.0] X and Y size in screenspace rotation[] = {0.0, 0.0, 0.0}; // Yaw, Pitch and Roll defined in degrees priority = 0; // Higher priority means closer to the camera (also known as z-depth) targetCameras[] = {"DayZPlayerCamera"}; // Camera typename on which the overlay will be visible hidesWithIngameHUD = 0; // [0 = false, 1 = true] Determines if it must hides when the player hides the ingame HUD Utilities sFramework also has many other utilities such as: sUserConfig : to help in storing and loading custom client settings sRaycast : to help launching raycasts with more flexibility sSpawnable : to help in spawning many items with multiple attachments sFlagOperator : to help dealing with bitwise operations with flags sColor, sLog, sGameConfig and more... For a better insight of the tools, give a look at the github page Github page For a better insight give a look at the github page: github.com/simonvic/sFramework Need help? Come over to my DISCORD Monetization You are hereby given monetization approval, as long as you follow the DayZ Server Monetization rules and have obtained permission from Bohemia Repack You are NOT allowed to repack any part of this mod, unless given my explicit consent Contact me Found a bug or want to give a suggestion? Feel free to contact me! Discord server: DISCORD Buy me a coffee
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.
0.00248% of each server frame at 100 players (0.025 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; 17 others share it. Ranked list.
Every-frame hooks carry 100% of this mod's structural load. 0.025 ms/s in all.
1 hook · 0.025 ms/s
2 hooks · 0.000004 ms/s
| Every-frame hooksrun every server frame | 1 hook | 0.025 ms/s | 100% | DayZGame.OnUpdate |
| Lifecycle hooksrun when an entity is created, loaded or deleted | 2 hooks | 0.000004 ms/s | <0.1% | MissionServer.OnClientNewEvent, MissionServer.OnClientReadyEvent |
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.
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 28 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 |
|---|---|---|---|---|
DayZGame.DeferredInit |
— | yes | ✓ | sFramework.pbo::scripts\3_Game\sUDE\DayZGame.c:3 |
DayZGame.OnUpdate |
T0 | yes | ✓ | sFramework.pbo::scripts\3_Game\sUDE\DayZGame.c:12 |
DayZPlayerCamera1stPerson.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:3 |
DayZPlayerCamera1stPersonUnconscious.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:69 |
DayZPlayerCamera1stPersonVehicle.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:87 |
DayZPlayerCamera3rdPersonClimb.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:81 |
DayZPlayerCamera3rdPersonCrouch.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:39 |
DayZPlayerCamera3rdPersonCrouchRaised.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:45 |
DayZPlayerCamera3rdPersonErc.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:21 |
DayZPlayerCamera3rdPersonErcRaised.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:33 |
DayZPlayerCamera3rdPersonErcRaisedMelee.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:63 |
DayZPlayerCamera3rdPersonErcSpr.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:27 |
DayZPlayerCamera3rdPersonJump.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:75 |
DayZPlayerCamera3rdPersonProne.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:51 |
DayZPlayerCamera3rdPersonProneRaised.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:57 |
DayZPlayerCamera3rdPersonVehicle.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:93 |
DayZPlayerCameraBase.OnActivate |
— | yes | ✓ | sFramework.pbo::scripts\4_World\sUDE\camera\DayZPlayerCameraBase.c:6 |
DayZPlayerCameraIronsights.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:9 |
DayZPlayerCameraOptics.getRegisteredCameraID |
— | yes | ✗ none | sFramework.pbo::scripts\4_World\sUDE\camera\cameras.c:15 |
DayZPlayerCameras.RegisterCameras |
— | yes | ✓ | sFramework.pbo::scripts\4_World\sUDE\camera\DayZPlayerCameras.c:10 |
IngameHud.Update |
— | yes | ✓ | sFramework.pbo::scripts\5_Mission\sUDE\gui\ingame\hud\IngameHud.c:15 |
IngameHud.RefreshHudVisibility |
— | yes | ✓ | sFramework.pbo::scripts\5_Mission\sUDE\gui\ingame\hud\IngameHud.c:20 |
MissionGameplay.OnMissionFinish |
T3 | yes | ✓ | sFramework.pbo::scripts\5_Mission\sUDE\mission\MissionGameplay.c:3 |
MissionServer.OnClientNewEvent |
T3 | yes | ✓ | sFramework.pbo::scripts\5_Mission\sUDE\mission\MissionServer.c:3 |
MissionServer.OnClientReadyEvent |
T3 | yes | ✓ | sFramework.pbo::scripts\5_Mission\sUDE\mission\MissionServer.c:9 |
OptionsMenu.Init |
— | yes | ✓ | sFramework.pbo::scripts\5_Mission\sUDE\gui\optionsMenu\OptionsMenu.c:5 |
PluginDiagMenu.RegisterModdedDiagsIDs |
— | yes | ✓ | sFramework.pbo::scripts\4_World\sUDE\PluginDiagMenu.c:12 |
PluginDiagMenu.RegisterModdedDiags |
— | yes | ✓ | sFramework.pbo::scripts\4_World\sUDE\PluginDiagMenu.c:23 |
Dispatch surfaces and timers the grade prices
| surface | tier | rate (Hz) | rate source | ms/s |
|---|---|---|---|---|
DayZGame.OnUpdate | T0 | 1000.0 | measured | 0.0248 |
MissionServer.OnClientNewEvent | T3 | 0.1 | placeholder | 0.0000 |
MissionServer.OnClientReadyEvent | T3 | 0.1 | placeholder | 0.0000 |
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.
sFramework.pbo
sFrameworkrequiredVersion 0.1 — requiresDZ_Scripts
census 1.1 · findings 1.1 · hash f3b8d0e22e0d0704