DayZ
291 ratings
sFramework
3
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod Type: Mechanics
File Size
Posted
Updated
783.308 KB
29 Sep, 2021 @ 4:17am
20 Feb, 2024 @ 7:32am
9 Change Notes ( view )

Subscribe to download
sFramework

In 1 collection by simonvic
sUDE
3 items
Description





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: https://github.com/simonvic/sFramework

Need help?
Come over to my DISCORD[discord.gg]

Monetization
You are hereby given monetization approval, as long as you follow the DayZ Server Monetization rules[www.bohemia.net] 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[discord.gg]


Buy me a coffee
[paypal.me]
36 Comments
MATPOCOB 28 Dec, 2024 @ 1:40pm 
Warning for players: on the [RU] Grotesk PvE Dayz server you may encounter problems such as ignoring player opinions, unauthorized changes to balance and mechanics, rating and donation manipulation, which creates a false impression of the server's popularity. The game turns into a monotonous grind, with pay-to-win elements. The administration often makes decisions without explanation, creating a despotic atmosphere and ignoring the interests of the players. :steamthumbsdown:
MATPOCOB 28 Dec, 2024 @ 1:27pm 
Предупреждение для игроков: на сервере [RU] Grotesk PvE Dayz вас могут ожидать проблемы, такие как игнорирование мнений игроков, несанкционированные изменения в балансе и механиках, манипуляции с рейтингом и донатом, что создаёт ложное представление о популярности сервера. Игра превращается в монотонный гринд, с элементами pay-to-win. Администрация часто принимает решения без объяснений, создавая деспотичную атмосферу и игнорируя интересы игроков. :steamthumbsdown:
simonvic  [author] 16 Oct, 2024 @ 5:51am 
nope, the DLC is not needed :)
Amandinha 15 Oct, 2024 @ 8:27pm 
your mod need DLC ?
Endergoth 3 Oct, 2024 @ 10:52am 
Added with great pleasure to the DarkMoon server.
simonvic  [author] 14 Sep, 2024 @ 7:44am 
heyo @Idaho
No need for a wipe. You can add or remove the mod without issues :)
Idaho 13 Sep, 2024 @ 7:35am 
Is it recommended to install this mod with a server wipe?
xqz 8 Sep, 2024 @ 10:03am 
:steammocking: Приглашаю всех на сервер, использующий этот мод - XHUNTER
Endergoth 28 Jun, 2024 @ 2:38pm 
DarkMoon server lovels it! (Address: 88.99.164.150:2302).
_OBIN_ 16 Sep, 2023 @ 3:31am 
мод обновлен под новую версию дейза?