Adding logo overlay to screen

Ixxo

Member
Hi there I am looking to add a logo in the bottom left of the screen on my server. I have found a few servers that have this but can't seem to find anything about it on forums. I have however found a script that displays the server name but this is just text. Any help would be fantastic.

Sent from my GT-I9300 using Tapatalk
 
Last edited:
Anybody at all? I can do all the work required I just need to be pointed in the right direction, I have already made a logo in .paa format that I would like to be displayed in the bottom left on the screen. Like this... CLICK ME
 
Nope. That's not what I meant. I meant an actual image. Like a very small logo, a bit like a squad xml image. I'll post it up how I got it to work.

Sent from my GT-I9300 using Tapatalk
 
OK here goes... (For this I assume you know how to edit your files etc)

Step 1.
Create your logo in Photoshop (or any other image editor you like) with dimensions 106 x 350 pixels. 106 pixels is the height. You can make the logo longer if you wish, as mine is set to 106 x 370 so our server name fully fits into the design but the height is best left at that size.
NB: The image dimensions have to be in PIXELS

After your logo is complete convert it to .paa format. There are tutorials that cover this so I won't go into that into too much here but my advice is to save your initial image as .PNG and then open it up in TexView2 and save it as .paa as this seems to transfer your alpha layer better. Alpha layer = trasparency.

Save your image as watermarklogo.paa and place it in your mission.pbo where all your custom scripts etc are.

Step 2.
In your init.sqf inside your mission.pbo place the following code inside the if (!isDedicated) then { section.

Copy this code...
Code:
//---------------- Logo --------------------------
_pic = "Scripts\watermarklogo.paa";
[
    '<img align=''left'' size=''1.0'' shadow=''1'' image='+(str(_pic))+' />',
    safeZoneX+0.027,
    safeZoneY+safeZoneH-0.1,
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;
//------------------------------------------------

And place it here... (This is where mine is located as an example)
Code:
if (!isDedicated) then {
//------------------------- Welcome Credits ----------------------------------------------------------//
[] execVM "Scripts\Server_WelcomeCredits.sqf";
//------------------------- Welcome Credits ----------------------------------------------------------//
    //Conduct map operations
    0 fadeSound 0;
    waitUntil {!isNil "dayz_loadScreenMsg"};
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

    //Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

    //anti Hack
    //[] execVM "\z\addons\dayz_code\system\antihack.sqf";

    //Lights
    //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
//---------------- Logo --------------------------
_pic = "Scripts\watermarklogo.paa";
[
    '<img align=''left'' size=''1.0'' shadow=''1'' image='+(str(_pic))+' />',
    safeZoneX+0.027,
    safeZoneY+safeZoneH-0.1,
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;
//------------------------------------------------
};

NB: Remember to change the path of where the image is located to point to your custom files!
Code:
_pic = "Scripts\watermarklogo.paa";

Step 3.
Inside your description.ext file inside your mission.pbo place the following code after the last };

Copy this code...
Code:
//------------------ Watermark Logo Space ----------------------------------------
class RscTitles {
    class wm_disp {
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
        fadeout = 0;
        duration = 10e10;
        controlsBackground[] = {};
        objects[] = {};
        class controls {
            class wm_text2 {
                idc = 1;
                x = safeZoneX+0.027;//safeZoneW*0.01;
                y = safeZoneY+safeZoneH-0.16;
                w = 0.151*safeZoneH;
                h = 0.057*safeZoneH;
                shadow = 2;
                class Attributes
                {
                    font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";
                    align = "left"; // put "center" here if you want some background
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };  // uncomment and increase 4th number to have a background
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};

And place it here like this...
Code:
respawn = "BASE";
respawndelay = 5;
onLoadMission= "DayZ Epoch Chernarus";
OnLoadIntro = "Welcome to DayZ Epoch Chernarus";
OnLoadIntroTime = False;
OnLoadMissionTime = False;
disabledAI = true;
disableChannels[]={0,2,6};
enableItemsDropping = 0;

briefing = 0;
debriefing = 0;

onPauseScript = "";
loadScreen = "AdmiralFistSplashScreen.jpg";

class Header
{
gameType = COOP;            //DM, Team, Coop, ...
minPlayers = 1;             //min # of players the mission supports
maxPlayers = 100;            //Max # of players the mission supports
};

aiKills = 1;
diagRadio = 1;
diagHit = 1;

class RscText
{
    type = 0;
    idc = -1;
    x = 0;
    y = 0;
    h = 0.037;
    w = 0.3;
    style = 0x100;
    font = Zeppelin32;
    SizeEx = 0.03921;
    colorText[] = {1,1,1,1};
    colorBackground[] = {0, 0, 0, 0};
    linespacing = 1;
};
class RscPicture
{
    access=0;
    type=0;
    idc=-1;
    style=48;
    colorBackground[]={0,0,0,0};
    colorText[]={1,1,1,1};
    font="TahomaB";
    sizeEx=0;
    lineSpacing=0;
    text="";
};
class RscLoadingText : RscText
{
    style = 2;
    x = 0.323532;
    y = 0.666672;
    w = 0.352944;
    h = 0.039216;
    sizeEx = 0.03921;
    colorText[] = {0.543,0.5742,0.4102,1.0};
};
class RscProgress
{
    x = 0.344;
    y = 0.619;
    w = 0.313726;
    h = 0.0261438;
    texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
    colorFrame[] = {0,0,0,0};
    colorBar[] = {1,1,1,1};
};
class RscProgressNotFreeze
{
    idc = -1;
    type = 45;
    style = 0;
    x = 0.022059;
    y = 0.911772;
    w = 0.029412;
    h = 0.039216;
    texture = "#(argb,8,8,3)color(0,0,0,0)";
};
//
// the loading screen itself
//
class DayZ_loadingScreen
{
    idd = -1;
    duration = 10e10;
    fadein = 0;
    fadeout = 0;
    name = "loading screen";
    class controlsBackground
    {
        class blackBG : RscText
        {
            x = safezoneX;
            y = safezoneY;
            w = safezoneW;
            h = safezoneH;
            text = "";
            colorText[] = {0,0,0,0};
            colorBackground[] = {0,0,0,1};
        };
        /*
        class nicePic : RscPicture
        {
            style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO
            x = safezoneX + safezoneW/2 - 0.25;
            y = safezoneY + safezoneH/2 - 0.2;
            w = 0.5;
            h = 0.4;
            text = "img\nicePic.paa";
        };
        */
    };
    class controls
    {
        class Title1 : RscLoadingText
        {
            text = "$STR_LOADING"; // "Loading" text in the middle of the screen
        };
        class CA_Progress : RscProgress // progress bar, has to have idc 104
        {
            idc = 104;
            type = 8; // CT_PROGRESS
            style = 0; // ST_SINGLE
            texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
        };
        class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse
        {
            idc = 103;
        };
        class Name2: RscText // the text on the top-left
        {
            idc = 101;
            x = 0.05;
            y = 0.029412;
            w = 0.9;
            h = 0.04902;
            text = "";
            sizeEx = 0.05;
            colorText[] = {0.543,0.5742,0.4102,1.0};
        };
    };
};

//------------------ Watermark Logo Space ----------------------------------------
class RscTitles {
    class wm_disp {
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
        fadeout = 0;
        duration = 10e10;
        controlsBackground[] = {};
        objects[] = {};
        class controls {
            class wm_text2 {
                idc = 1;
                x = safeZoneX+0.027;//safeZoneW*0.01;
                y = safeZoneY+safeZoneH-0.16;
                w = 0.151*safeZoneH;
                h = 0.057*safeZoneH;
                shadow = 2;
                class Attributes
                {
                    font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";
                    align = "left"; // put "center" here if you want some background
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };  // uncomment and increase 4th number to have a background
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};

#include "Scripts\Snap\points.hpp" //----------------------------- Build Snapping

This is the same code to place the servername watermark like in other scripts. I don't have the servername specified in my init.sqf so if you do this might overlap the name with the logo but for me the logo gets placed in the space specified for the servername. Well I presume this is what happens.

Let me know how you get on with this.

This is my end result...
699C286EC0116C4D355C58D15885F0C45C00D7DE
 
Last edited:
Back
Top