Jump to content
Darth_Rogue

[TUTORIAL] Adding logo to screen

Recommended Posts

Adding Static Logo Image to Screen

 

el6ldmj.png

 

 

 

Want to add a clan logo to your screen for your players?  It can be done!  And here's how.

 

1.  Open your favorite text editor and copy in this code:

 

​_pic = "images\dhlogo2.paa";
[
    '<img align=''left'' size=''2.1'' shadow=''0'' image='+(str(_pic))+' />',
    safeZoneX+0.02,
    safeZoneY+safeZoneH-0.18,
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;

 

2.  Save the text file as 'logo.sqf'

 

3.  Also in your text editor, copy and paste this code into a new text file:

 

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";
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};

 

4.  Save the file as logo.hpp.  File type should be "All Files"

 

5.  Open your init.sqf in your mission file and add this line ABOVE any line that says if "(!isDedicated and hasInterface) then"

          //In-Game Logo
          [] execVM "images\logo.sqf";

 

6.  Open your description.ext and add this at the bottom:
 
class RscTitles
{
	
	#include "images\logo.hpp"
};

If you already have an RscTitles section, then just add the #include line between the RscTitles brackets

 

7.  In your mission file, copy the files you just created to a sub-folder of your choosing.  You will have to update the file paths referenced above as necessary.

 

8.  Now comes the fun part.  You will need to design or find an image that will work.  The image should be resized to be any multiple of 2.  The best size is 128x128, but larger or smaller image sizes will work.  I would caution you though to try to find a balance between being large enough to see, but small enough so as to not balloon your mission file size too much.  128x128 seems to fit that bill nicely.  If you don't have them already, download the BIS tool set.  Run the installer.  All you really need to install for this project is TexView2.

 

9.  Open TexView2 and then open your desired image.  Save the image as a PAA, ensuring that in the upper left drop-down box RGBA is selected, which it should be by default.

 

10.  Copy the completed image to your mission file in a folder of your choosing and then make sure the path to the image in logo.sqf matches the name and location of the image file.

 
Things to note:
 
You can alter the placement of the image by playing with the alignment values in the hpp file.  You can also make adjustments to the sqf file, where it says 'left'.  You can change it to 'center' or 'right'.  
You can use any image as a source, but I would recommend using something with a transparent background so the image covers as little screen space as possible.  
From what I've seen thus far, no BE filters are necessary for this.
When this image is in game on screen, the text chat box moves up and around it, so there's no worries about the image covering player chat text.  
 
Credit goes to KiloSwiss and Zupa from their pointers in for helping work out the kinks.

 

Share this post


Link to post
Share on other sites

It's not getting it to show and I'm getting this as an error 

 

14:56:04 Error in expression <s\__CUR_MP.bornholm\watermark\logo.sqf"

​_pic = "watermark\FracFG.paa";
[
'<im>
14:56:04   Error position: <​_pic = "watermark\FracFG.paa";
[
'<im>
14:56:04   Error Invalid number in expression

14:56:04 File mpmissions\__CUR_MP.bornholm\watermark\logo.sqf, line 1

 

any Ideas?

Share this post


Link to post
Share on other sites

It's not getting it to show and I'm getting this as an error 

 

14:56:04 Error in expression <s\__CUR_MP.bornholm\watermark\logo.sqf"

​_pic = "watermark\FracFG.paa";
[
'<im>
14:56:04   Error position: <​_pic = "watermark\FracFG.paa";
[
'<im>
14:56:04   Error Invalid number in expression

14:56:04 File mpmissions\__CUR_MP.bornholm\watermark\logo.sqf, line 1

 

any Ideas?

 

 

Make sure that on the very first line that the _pic isn't showing in purple and like so:

 

_pic

 

It needs to be _pic - This caused me an error at first.

 

R.

Share this post


Link to post
Share on other sites

I added this to my server and thatnks for this post, but i have one little issue... the logo showes up blue. I used my avitar you see here with my name. and what i did in photoshop was mask it and saved it as a TGA then took it to texView2 and saved as a .paa with RGBA and DXT1 Any ideas?

 

Do i need to edit....

font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";   <------ do i leave blank or type transparent?
                    align = "left";
                    valign = "middle";
                    shadow = 2;

Share this post


Link to post
Share on other sites

 

I added this to my server and thatnks for this post, but i have one little issue... the logo showes up blue. I used my avitar you see here with my name. and what i did in photoshop was mask it and saved it as a TGA then took it to texView2 and saved as a .paa with RGBA and DXT1 Any ideas?

 

Do i need to edit....

font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";   <------ do i leave blank or type transparent?
                    align = "left";
                    valign = "middle";
                    shadow = 2;

 

 

 

That's the same as I have it in my .hpp section and mine is working fine.  The only thing I can think is maybe if the image doesn't have a transparent background it might act funny?  Can't say for sure.  When I did mine I took the stock image that already had a transparent background, added it into Photoshop and added the text you see at the bottom of the graphic and then saved it as a JPEG.  Then I opened it in TexView2 and saved it as PAA.  Worked perfectly on the first try.  

Share this post


Link to post
Share on other sites

My image works and its awesome, but I want mine in the right hand top corner, Ive changed the values in the .hpp a couple of times and im not sure I understand what I must edit to move it, anyone care to share some knowledge?

Share this post


Link to post
Share on other sites

My image works and its awesome, but I want mine in the right hand top corner, Ive changed the values in the .hpp a couple of times and im not sure I understand what I must edit to move it, anyone care to share some knowledge?

 

I have tried this also and failed. Still working on it, here is the code you change and what you change it too for the co-ords.

 

From Darth's post he linked another post regarding positions etc. So this is what I have ascertained from and added it/changed it in mine. 

 

In logo.sqf located this:

safeZoneX+0.02,

safeZoneY+safeZoneH-0.18,

 

Replace it with

safeZoneX+safeZoneW - 0.015,

safeZoneY+0.12,

 

Change the numbers accordingly to suit your/your server.

 

However I'm still working on mine and still haven't got it to work...so I could be WAY off.

 

If I get it working I'll post the co-ords etc. Or if anyone beats me to it...please share.

 

R.

Share this post


Link to post
Share on other sites

My image works and its awesome, but I want mine in the right hand top corner, Ive changed the values in the .hpp a couple of times and im not sure I understand what I must edit to move it, anyone care to share some knowledge?

 

 

I moved mine to top right.  Here's my files that work.

 

_pic = "images\dhlogo2.paa";
[
    '<img align=''left'' size=''2.1'' shadow=''0'' image='+(str(_pic))+' />',
    safeZoneX+safeZoneW - 0.15, //since X axis top-right is 1, we need to remove a bit to move it left
	safeZoneY+0.05, //since Y axis top right is 0, we want to add a bit to it to move it down
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;

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+safeZoneW-0.015;
                y = safeZoneY+0.05;
                w = 0.151*safeZoneH;
                h = 0.057*safeZoneH;
                shadow = 2;
                class Attributes
                {
                    font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";
                    align = "left";
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};

Share this post


Link to post
Share on other sites

i have logo too, but i use only 

_pic = "stay_alive.paa";
[
'<img align=''LEFT'' size=''1.5'' shadow=''0.2'' image='+(str(_pic))+' />',
safeZoneX+safeZoneW-0.40,//right upper corner
safeZoneY+0.015,         //right upper corner
99999,
0,
0,
3090
] spawn bis_fnc_dynamicText;

and run it from init 

 

on myt RscTitles i have only this:

class RscTitles
{

#include "addons\Status_Bar\statusBar.hpp"

};

2ltga5d.jpg

Share this post


Link to post
Share on other sites

Can anybody advise how to get less transparecny to the logo? the brackground is transparent which is right but the whole logo is barley readable due to its high transparency. Any advise?

 

PS: Of course the logo source is not transparent and looks like the paa should look after.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Warcoder
      Hello
       
      i would like to know how to modify the ingame uniforms.Like lets say i want to modify my characters uniform and add a logo on the back of the shirt how is that done???
       
      I allready know how to edit his face but would like to know how to do hes clothing please if anyone knows how to do this please help me.
       
      Thank you very much 
    • By Mr White
      Hello,
       
      I was wondering if anyone was using Mumble and the Overlay... or just Mumble. I know the dominant choice is TeamSpeak, seems like every game has their preference.
       
      I'm imagining it works, but not with the overlay. Either the overlay will not be visible, or BattleEye will kick for it.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...