Darth_Rogue Posted April 16, 2015 Report Share Posted April 16, 2015 Adding Static Logo Image to Screen 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. Salutesh, Tango2k13, stonXer and 4 others 7 Link to comment Share on other sites More sharing options...
RuschGaming Posted April 17, 2015 Report Share Posted April 17, 2015 awesome man! ill give it a try when i get home :D Link to comment Share on other sites More sharing options...
Salutesh Posted April 17, 2015 Report Share Posted April 17, 2015 Required BE Filter: scripts.txt LINE 2 add: !"] spawn bis_fnc_dynamicText;" Thanks for sharing! Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 18, 2015 Author Report Share Posted April 18, 2015 Ahhhh....ok that makes sense. I already had that filter in place for another script that was already installed. Thanks! Salutesh 1 Link to comment Share on other sites More sharing options...
knights†emplar Posted April 18, 2015 Report Share Posted April 18, 2015 Was thinking about releasing this myself you beat me to it!! :P Looks awesome by the way, you should look to combine it with your player HUD as one script , since they both on the same screen and add graphical display to players screen... and you call them both once.. Link to comment Share on other sites More sharing options...
Tango2k13 Posted April 20, 2015 Report Share Posted April 20, 2015 @Darth Thanks for Filling this Request got it to work like your Tutorial. Anyway Thank you for this Tutorial this will help People that looking for this like me before. Regards Link to comment Share on other sites More sharing options...
Pops Posted April 20, 2015 Report Share Posted April 20, 2015 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? Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 20, 2015 Author Report Share Posted April 20, 2015 Check your code again against what was posted. Something isn't positioned properly it seems. It's probably in the image= line just below the image path. Link to comment Share on other sites More sharing options...
Rocko_MB Posted April 22, 2015 Report Share Posted April 22, 2015 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. Link to comment Share on other sites More sharing options...
Luggz Posted April 22, 2015 Report Share Posted April 22, 2015 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; Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 23, 2015 Author Report Share Posted April 23, 2015 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. Link to comment Share on other sites More sharing options...
R4ziel Posted April 23, 2015 Report Share Posted April 23, 2015 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? Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted April 23, 2015 Report Share Posted April 23, 2015 @Darth, Worked perfectly ! Thank you ! Link to comment Share on other sites More sharing options...
Rocko_MB Posted April 23, 2015 Report Share Posted April 23, 2015 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. Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 23, 2015 Author Report Share Posted April 23, 2015 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=""; }; }; }; }; Link to comment Share on other sites More sharing options...
SadBoy1981 Posted May 1, 2015 Report Share Posted May 1, 2015 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" }; Link to comment Share on other sites More sharing options...
Kronky Posted July 25, 2015 Report Share Posted July 25, 2015 Darth_Rogue what kind of color filters are you using, because that picture looks very rich and i like the contrast. Link to comment Share on other sites More sharing options...
Darth_Rogue Posted July 27, 2015 Author Report Share Posted July 27, 2015 No filters used. I just pay close attention to my monitor calibration and also adjust the color saturation in NVidia control panel. Link to comment Share on other sites More sharing options...
flow0815 Posted August 4, 2015 Report Share Posted August 4, 2015 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now