Jump to content

[RELEASE] RLNT Update Panel (26.09.2017, v1.4)


Relentless

Recommended Posts

I guess this is currently not compatible with my RLNT Weapon HUD. If you want to use this as nfcStyle you would have to make the changes yourself or wait until I update it, thanks. Studying is taking a ton of time :*

LAST UPDATE: 26.09.2017 - go to the bottom for changelog

Hey there Epoch-Community,
in this topic, I want to release my Update Panel. This may need some longer explanation so if you are interested, read carefully. 
:happy:


Background-Story:
So I was a bit annoyed by all the vanilla functions that are currently available in ArmA 2.
Everytime you just see format texts or hint boxes, sometimes even dynamic texts but still not my taste. So I decided to create a Display that is spawned by a function.
It's like a modern version of hint boxes. The cool thing is that you can adjust nearly everything of it by giving the function different arguments.
Due to that fact, you could easily manage all your server messages and notifications through this function to have a universal system. It's a bit confusing and ugly
when you are running multiple mission systems for example and one is using text at the top of the screen and the other one directly in the middle.


What features does it have:
Currently, there are 9 different arguments to adjust the Update Panel to your liking. Meanwhile I made ALL arguments optional so you can leave them out.

  1. Receiver aka the Side - defines whether the Update Panel is only shown to the Client it's running on or whether it should be shown to everyone like a global message
  2. Style - At the moment there are four styles, they are different in the box style and whether it contains an image or not
  3. Background Color - Ofcourse you can also adjust the Color of the Box
  4. Font Color - Aswell as the text color
  5. Header - This is the Headline of the Update-Panel, you could use something like your server tag
  6. Line 1 - The first textline of the panel that holds up to 40 characters
  7. Line 2 - The second textline that can also hold up to 40 characters and also a good option to display a single line update panel
  8. Duration - Also you can adjust the time how long the panel will be visible to the clients
  9. Image - The second style can hold an image, here you can define the path of an image that should be displayed in the panel

If you are interested in how to use all the arguments and how to make them optional, read this: RLNT GITHUB

So you should be able to see that you can adjust a lot of things. And you can suggest even more. If you want another style with a different position of the panel, no problem!
Also the function contains a config where you are able to set default variables in case you don't want to write so many arguments each time. Let's say you want to display
all messages of your server with this panel, then you can just set the Background Color you want to use for all your panels in the config and never write this color array again.
Instead you just type nil as an argument. The function will automatically recognize this and replaces the nil with the variable from the config.


All currently available styles:
Style 1    Woxzfe4.png    Style 2    1XWcirz.png

Style 3   PxxW6Lm.png    Style 4    yVrZRJR.png



Codeexamples:

Spoiler

I will show you different images with the execution line above:

1. If I keep everything default like it's set in the config and only change the text it will look like that:


_header = "RLNT Updatepanel:";
_line1 = "Just trying to find out how much text is fitting in here.";
_line2 = "And another important point is how it looks like.";

[nil,nil,nil,nil,_header,_line1,_line2,nil,nil] spawn RLNT_updatePanel;

Woxzfe4.png

 

2. It will look like this if you change to style 2 with the same messages:


_header = "RLNT Updatepanel:";
_line1 = "Just trying to find out how much text is fitting in here.";
_line2 = "And another important point is how it looks like.";

[nil,2,nil,nil,_header,_line1,_line2,nil,nil] spawn RLNT_updatePanel;

1XWcirz.png

 

3. It will look like this using style 3, this one has an image box but it's white because I didn't define a path to a picture:


_header = "RLNT Updatepanel:";
_line1 = "Just trying to find out how much text is fitting in here.";
_line2 = "And another important point is how it looks like.";

[nil,3,nil,nil,_header,_line1,_line2,nil,nil] spawn RLNT_updatePanel;

PxxW6Lm.png

 

4. Meanwhile it's possible to have optional arguments, mean with this code it will still look the same:


[] spawn RLNT_updatePanel;

Woxzfe4.png


Credits:

  • @Sp4rkY - teached me the most in sqf
  • @iben - got the wonderful github formatting from him
  • @He-Man - made me familiar with eventHandlers and communication between client and server
  • @DirtySanchez - helps me to improve my scripts (performance and structur)
  • @LordGolias - made an awesome sqf-linter for the Atom-Editor
  • @Epoch-Discord - especially @salival @BigEgg @DirtySanchez @scuba_steve - always helpful and very patient

 

Download and Installation:
 
Bugs, Issues and Suggestions:
RLNT GITHUB
 
Changelog:

Screenshot_3.png.e06c83f486dce3a59408e64a7d245dec.png

Click here for the Changelog with actual links if you are interested in the commits: Changelog

Link to comment
Share on other sites

18 hours ago, SmokeyBR said:

i tried to test, see how it looks but i could not make it work.

is this tested ? i asked because i saw some undefinied variables errors (unsure if the problem on my side).

also how would u call this from server side ?

This is tested on vanilla and high modded servers so it's working 100%. I guess the reason why you get undefined variables is because you try to call it from server side. This function was made for always calling it from client-side but you can send a global message from client side. If you want to call it from server-side, you need to trigger the server eventHandler manually.

Link to comment
Share on other sites

im pretty sure ive done everything correctly but im still getting errors and cannot execute it, since i dont know where to go from here to get it fixed i thought id show the errors in case someone might have a sugestion to try.

1sr error when loading in, doesnt seem to be big deal since its only a variable for debug purposes so i just defined the variable on the top of the file to get rid of errors.

Spoiler

Error in expression <pdate Panel\RLNT_up_config.sqf";

if (rlnt_up_debug) then {
diag_log format [">
  Error position: <rlnt_up_debug) then {
diag_log format [">
  Error Undefined variable in expression: rlnt_up_debug
File mpmissions\__CUR_MP.Chernarus\rlnt\addons\Update Panel\RLNT_up_init.sqf, line 20

 

when trying to execute from client side with

[] spawn RLNT_updatePanel;
Spoiler

Error in expression <];
};
};
};

if ((_varArray select 1) == "local") then {
if (rlnt_up_debug) th>
  Error position: <== "local") then {
if (rlnt_up_debug) th>
  Error Generic error in expression
File mpmissions\__CUR_MP.Chernarus\rlnt\functions\RLNT_up_main.sqf, line 38

also tried to execute RLNT_updatePanel with actual values inside the array i will get the same error.

Link to comment
Share on other sites

@SmokeyBR

The rlnt_up_debug is just a variable for debug outputs in the log file, so it shouldn't cause this issue. It's defined in the compiles.sqf. Make sure you have these lines in there:

https://github.com/DAmNRelentless/RLNTUpdatePanel/blob/ce93f0e48cad30a30f2b0e523b0061fb40a2db69/rlnt/client/init/RLNT_compiles.sqf#L8-L15


Next I would like to see your config for the script.

Link to comment
Share on other sites

there is no rlnt_up_debug defined on the file you linked however it is defined on here (wrong place to call it?) anyways i realize that error should not stop the script from running just a heads up on the error. do u also have the error?

what has me uncertain is the second error, as far as my RLNT_up_config is... i have not changed any values just trying to test it (with the exception of picture path)

/*  Default RLNT Debug - DON'T TOUCH THIS  */
if (rlnt_debug) then {
  diag_log "[RLNT][MAIN] The Update Panel Config was succesfully loaded!";
};

rlnt_up_Side          = "local";       /* default: "local" */
rlnt_up_Style         = 1;             /* default: 1 */
rlnt_up_Header        = "RLNT Panel:";
rlnt_up_Line1         = "Here could be your advertisement!";
rlnt_up_Line2         = "Here could be your advertisement!";
rlnt_up_Img           = "m.paa";
rlnt_up_Duration      = 5;             /*  default: 5  */
rlnt_up_FontColor     = [1,1,1,1];     /* default: [1,1,1,1] */
rlnt_up_BgColor       = [0,0.2,0,0.7]; /* default: [0,0.2,0,0.7] */
rlnt_up_debug         = false;         /* default: false */
/*  Don't edit blow  */
rlnt_up_defaults = [rlnt_up_Side,rlnt_up_Style,rlnt_up_Header,rlnt_up_Line1,rlnt_up_Line2,rlnt_up_Img,rlnt_up_Duration,rlnt_up_FontColor,rlnt_up_BgColor];
rlnt_up_configLoaded = true;

at second glance seems RLNT_up_config is not being loaded at all because of this error

Error in expression <pdate Panel\RLNT_up_config.sqf";

Link to comment
Share on other sites

3 hours ago, SmokeyBR said:

do u also have the error?

No, you are using outdated files

Quote

if ((_varArray select 1) == "local") then {
if (rlnt_up_debug) th>
  Error position: <== "local") then {

But you are right with that. I messed something up with the receiver. Working on a fix right now

Link to comment
Share on other sites

  • 3 weeks later...

hey i keep getting this error

Spoiler

9:29:22 Error in expression <ers\RLNT_eventHandlers.sqf" if (rlnt_debug) then {diag_log "[RLNT][MAIN>
9:29:22   Error position: <rlnt_debug) then {diag_log "[RLNT][MAIN>
9:29:22   Error Undefined variable in expression: rlnt_debug
 9:29:22 File z\addons\dayz_server\rlnt\eventHandlers\RLNT_eventHandlers.sqf, line 9

 

can anyone help?

Link to comment
Share on other sites

1 hour ago, Erzengelgames said:

can anyone help?

Sure, go to dayz_server\rlnt\RLNT_eventHandlers.sqf and delete the following codeblocks (this is just debug).

/*  Default RLNT Debug  */
if (rlnt_debug) then {
  diag_log "[RLNT] The Server RLNT_eventHandlers.sqf was succesfully loaded!";
};

 

    if (rlnt_up_debug) then {
      diag_log "[RLNT] The RLNT_up_global EventHandler was succesfully triggered!";
    };

 

Link to comment
Share on other sites

did that but messages are still not showing up. i will show you how i trieded to use it

called in dropinit (a simple mission script by my self)

Spoiler
Quote


//"drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"

sleep 60;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];
_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[] spawn RLNT_updatePanel;

sleep 900;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];
_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[] spawn RLNT_updatePanel;

sleep 1300;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];
_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[] spawn RLNT_updatePanel;

sleep 1600;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];
_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[] spawn RLNT_updatePanel;

sleep 1600;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];
_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[] spawn RLNT_updatePanel;

sleep 1600;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];
_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[] spawn RLNT_updatePanel;

would like to use it like also for misions called from admin menu and in epoch event

//edit: just noticed i should assign the variables just once ^^

config



/*
Filename:     RLNT_up_config.sqf
Author:       Relentless
Description:  Config for Update Panel
*/


/*
Explanation of this function:
I never liked the vanilla notification functions that were
implemented by Bohemia by default, so I decided to create a
new function. With it, you are able to create a display
with different styles and other changable elements like the
colors, the image, the receiver, the duration and more.
People like Scripters and Devs can also make a use of it
by implementing it into their scripts to have a new way
of displaying notifications. No more ugly Hint boxes or
format texts. Read more on the Epoch-Forum-Thread:
http://bit.ly/2yaCtBM
*/

/*
Explanation of the config:
In this config, you can set dafault variables. That means
whenever you replace an argument in the spawn command of the
function by nil, it will be replaced by the variable that's
set in this config. Also all the arguments are optional, means
if you leave them out, they also will be replaced by these
config variables. That's useful if you use this function
as default notification system on your server. Let's say
you always want a green background for all messages on your
server, then you can just set this here and when you spawn
the function, you just replace the argument for the BgColor
with nil.
*/


////////////////////////////////////////////////////////////
////  Side-Option:                                      ////
////  Default string that defines how to display the    ////
////  Update Panel.                                     ////
////  Possible Options: "local" or "global"             ////
////  local - Update Panel only for the client          ////
////  global - Update Panel will be displayed globally  ////
////  THE OPTION HAS TO BE A STRING!                    ////
////////////////////////////////////////////////////////////
rlnt_up_Side          = "global";       /* default: "local" */

////////////////////////////////////////////////////////////
////  Style-Option:                                     ////
////  Default value that defines in what style the      ////
////  Update Panel is displayed.                        ////
////  Possible Options: 1 to 4                          ////
////  1 - Left upper corner without image               ////
////  Example image: https://i.imgur.com/Woxzfe4.png    ////
////  2 - Left upper corner without image (PLAIN)       ////
////  Example image: https://i.imgur.com/1XWcirz.png    ////
////  3 - Left upper corner with image                  ////
////  Example image: https://i.imgur.com/PxxW6Lm.png    ////
////  4 - Left upper corner with image (PLAIN)          ////
////  Example image: https://i.imgur.com/yVrZRJR.png    ////
////  THE OPTION HAS TO BE AN INTEGER!                  ////
////  If you want more styles, suggest them in this     ////
////  topic: http://bit.ly/2yaCtBM                      ////
////////////////////////////////////////////////////////////
rlnt_up_Style         = 1;             /* default: 1 */

////////////////////////////////////////////////////////////
////  Header-Text-Option:                               ////
////  Default string that defines the text that's used  ////
////  as the header of the Update Panel.                ////
////  THE OPTION HAS TO BE A STRING!                    ////
////  MAXIMUM CHAR AMOUNT IS 16!                        ////
////////////////////////////////////////////////////////////
rlnt_up_Header        = "_Header";

////////////////////////////////////////////////////////////
////  Line 1-Text-Option:                               ////
////  Default string that defines the text that's used  ////
////  as the first line of the Update Panel.            ////
////  THE OPTION HAS TO BE A STRING!                    ////
////  MAXIMUM CHAR AMOUNT IS 40!                        ////
////////////////////////////////////////////////////////////
rlnt_up_Line1         = "_Line1";

////////////////////////////////////////////////////////////
////  Line 2-Text-Option:                               ////
////  Default string that defines the text that's used  ////
////  as the seccond line of the Update Panel.          ////
////  THE OPTION HAS TO BE A STRING!                    ////
////  MAXIMUM CHAR AMOUNT IS 40!                        ////
////////////////////////////////////////////////////////////
rlnt_up_Line2         = "_Line2";

////////////////////////////////////////////////////////////
////  Image-Option:                                     ////
////  Default string that defines the path to the       ////
////  image that will be displayed in the Update Panel. ////
////  THE OPTION HAS TO BE A STRING WITH A VALID PATH!  ////
////  I would always suggest a resolution of 340x300.   ////
////  The image has to be in .paa format.               ////
////////////////////////////////////////////////////////////
rlnt_up_Img           = "rlnt\images\picture.paa";

////////////////////////////////////////////////////////////
////  Duration-Option:                                  ////
////  Default value that defines the duration on how    ////
////  long the Update Panel is visible.                 ////
////  Possible Options: 1 to 60                         ////
////  THE OPTION HAS TO BE AN INTEGER!                  ////
////  This option allow defines the seconds for 100%    ////
////  visibility, there will be 1 second before and     ////
////  after to fade in and out.                         ////
////////////////////////////////////////////////////////////
rlnt_up_Duration      = 6;             /*  default: 5  */

////////////////////////////////////////////////////////////
////  Text-Color-Option:                                ////
////  Default color-array that defines what color the   ////
////  text of the Update Panel has.                     ////
////  THE OPTION HAS TO BE AN ARRAY!                    ////
////  The format is [r,g,b,alpha]                       ////
////  I would always suggest an alpha value of 1.       ////
////  You can use this site to find a fitting color:    ////
////  http://bit.ly/2f543cr                             ////
////////////////////////////////////////////////////////////
rlnt_up_FontColor     = [0,0,0,1];     /* default: [1,1,1,1] */

////////////////////////////////////////////////////////////
////  Background-Color-Option:                          ////
////  Default color-array that defines what color the   ////
////  background of the Update Panel has.               ////
////  THE OPTION HAS TO BE AN ARRAY!                    ////
////  The format is [r,g,b,alpha]                       ////
////  I would always suggest an alpha value of 0.7.     ////
////  You can use this site to find a fitting color:    ////
////  http://bit.ly/2f543cr                             ////
////////////////////////////////////////////////////////////
rlnt_up_BgColor       = [1,1,1,1]; /* default: [0,0.2,0,0.7] */

////////////////////////////////////////////////////////////
////  Developer-Option:                                 ////
////  Variable to toggle on and off advanced options    ////
////  to help devs finding bugs in this script.         ////
////  DON'T EDIT IF YOU DON'T KNOW WHAT YOU ARE DOING!  ////
////////////////////////////////////////////////////////////
rlnt_up_debug         = false;         /* default: false */
publicVariableServer "rlnt_up_debug";


/*  Don't edit blow  */
if (rlnt_debug) then {
  diag_log "[RLNT][MAIN] The Update Panel Config was succesfully loaded!";
};

rlnt_up_defaults = [rlnt_up_Side,rlnt_up_Style,rlnt_up_Header,rlnt_up_Line1,rlnt_up_Line2,rlnt_up_Img,rlnt_up_Duration,rlnt_up_FontColor,rlnt_up_BgColor];

if (rlnt_up_debug) then {
  diag_log format ["[RLNT][UP] The default variable array is %1.", str(rlnt_up_defaults)];
};

rlnt_up_configLoaded = true;
publicVariableServer "rlnt_up_configLoaded";

 

 

 

Link to comment
Share on other sites

On 14.10.2017 at 3:09 PM, Erzengelgames said:

rlnt_up_Header = "_Header";

I don't think that will work, you could try it with _header so it's no string but with that the box will just be displayed with the header "_Header".

I would write something like your server name in there and if you want to display the update panel with your variables, you calling line should look like this:

_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[nil,nil,_header,_line1,_line2] spawn RLNT_updatePanel;

 

Link to comment
Share on other sites

if i do understand right i can not use this display my messages for missions ?

i did try it with your code so, but wasnt working also

sleep 60;

_path = "custom\drops\drops\";
_scripts = ["drop1"];
_rnd = floor(random(count _scripts));
execVM format["%1%2.sqf",_path,_scripts select _rnd];

_header = "Mysterybox";
_line1 = "Search the box inside the blue circle marked on your map";
_line2 = "The crate can basicly contain everything";

[nil,nil,_header,_line1,_line2] spawn RLNT_updatePanel;

sleep 900;

_path = "custom\drops\drops\";
_scripts = ["drop1","drop2","drop3","drop4","drop5","drop6","drop7","drop8","drop9","drop10","drop11","drop12"];

used it like this but i keep getting this error

Error in expression <

[nil,nil,_header,_line1,_line2] spawn RLNT_updatePanel;

sleep 900;

_path = ">
22:26:57   Error position: <RLNT_updatePanel;

sleep 900;

_path = ">
22:26:57   Error Undefined variable in expression: rlnt_updatepanel
22:26:57 File mpmissions\DayZ_Epoch_11.Chernarus\custom\drops\dropinit.sqf, line 14

 

Link to comment
Share on other sites

Hit me up via PM or discord, I will help you with that.
Discord: Relentless#6820

Edit: Just to inform others who maybe also have these errors. His problem was that the execVM line in the init.sqf wasn't located below the !isDedicated block. He placed it inside the block so it threw out some errors due to the fact that only the client side was loading. Also he misplaced the folder on the server.

Link to comment
Share on other sites

Hi!

After installing this script, the game load gets stuck during the server identification.

Client rpt:

Spoiler

Strange convex component278 in warehouse\models\warehouse.p3d:geometryView
"PRELOAD_ Functions\init [[L 1-1-A:1 REMOTE],any]"
"MPframework inited"
"dayz_preloadFinished reset"
"Loading custom client compiles"
CLICK ACTIONS: loading...
"Deploy Anything: loading version 2.8.2 ..."
"Deploy Anything: waiting for login..."
"z\addons\dayz_code\system\REsec.sqf:Monitoring Remote Exe..."
"Service Points: loading config..."
"z\addons\dayz_code\system\antihack.sqf: Plants libs tests done!"
"Server authentication time out! Disconnect and try again!"
[166.526,"onPreloadStarted"]
"[RLNT][MAIN] The Client RLNT_init.sqf was succesfully loaded!"
[166.541,"onPreloadFinished"]

 

Server rpt:

Spoiler

 9:51:24 Strange convex component278 in warehouse\models\warehouse.p3d:geometryView
 9:51:27 "PRELOAD_ Functions\init [[<No group>:0 (FunctionsManager)],any]"
 9:51:27 "MPframework inited"
 9:51:27 "dayz_preloadFinished reset"
 9:51:41 "TESTKIT - Authorized startup by W0LF(76561198000206238)"
 9:53:47 Client: Remote object 2:10 not found
 9:53:47 Client: Remote object 2:11 not found
 9:53:47 Client: Remote object 2:12 not found
 9:53:51 "[RLNT] The Server RLNT_eventHandlers.sqf was succesfully loaded!"
 9:53:51 "extDB: Connected to database."

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...