PCS Game Hosting
 
  Forum Index    Search    Usergroups    Edit your profile    Members    Arcade    Ranks

 Reputation    Medals    Staff    Statistics    Board Rules    Forum FAQ    Private MessagesLogin, Check Messages    Log in 

Search for at
Soldier Of Fortune 2 Advanced Search



Post new topicReply to topicprinter-friendly viewThank Post
   Soldier Of Fortune 2 Forum Index » SOF2 Tutorials » SOF2MODDING Tutorial.12 - ui Files
 View previous topic :: View next topic  
Author Message
Punisher
Administrator
Administrator


In Game: The Punisher
Gender: Gender:Male
Joined: May 04, 2012
Last Visit: Nov 01, 2019
Age: 22
Posts: 740

Netherlands.png 
Reputation: 4027
votes: 3
Medals: 2 (View more...)
Dedication (Amount: 1)

Status: Offline
PostPosted: Tue Aug 13, 2013 2:44 pm
PostPost subject: sof2 SOF2MODDING Tutorial.12 - ui Files
Reply with quote

SOF2MODDING Tutorial.12 - Ui files

Welcome to the SOF2MODDING Tutorial Series. I'm gonna explain how to make a MOD for Soldier Of Fortune Double Helix II. The tutorials are for beginners and advanced modders. Some parts are hard to understand, so if you have any Questions you can Comment or send me a PM with the Question you have.
Alright Let's Start.

In this Tutorial i will explain about the scripts of the ui files.
In the tutorial Video i will show you how to change the menu! Now i'm just showing what everything is.

Open the ui Folder and open Main.MENU.
if you scroll down you are thinking like ' WTF is this? '.
You see much the same, but with other names and numbers.

First the Font & Cursor & Background.

If you watch everything above the rule:
Hidden: 


//////////////////////////////////////////////////////
// Precache the player model
//////////////////////////////////////////////////////


You can see the Font,  Background, Cursor.

defaultFont "hud"  - hud is the default fontname, if you changed the fontname in the font folder to something else change this to what you changed in your font folder.

cursor "gfx/menus/cursor/cursor" - The Path where the cursor file is in.

Hidden: 

fadeClamp 1.0 // sets the fadeup alpha
fadeCycle 1 // how often fade happens in milliseconds
fadeAmount 0.1 // amount to adjust alpha per cycle

shadowColor 0.1 0.1 0.1 0.25 // shadow color

shader gfx/menus/backdrop/menu_multiplayer_joinserver // precache image
}


This is a bit harder, but you dont need to change anything inhere.
it's the fade of the background ( From Black to white for example ).

i'm not very familiair with this, so i wont explain this and i'm not gonna change it.

Now i'm gonna explain something about the basics of the ui files.

name "main" - The name of the ui file.
background "gfx/menus/backdrop/menu_multiplayer_back" - The path to the background image.
fullScreen MENU_TRUE - MENU_TRUE = Fullscreen MENU_FALSE = No Fullscreen.
Hidden: 

rect 74 393 67 47

the first 2 numbers are the places.

The first is from left to right and the second is up to down. ( 74 from left to right and 393 from up to down. )
the last 2 are the sizes. ( 67 is the width and 47 is the height ).
So if you look good this rect is an icon image.

visible MENU_TRUE - if TRUE it will show, if FALSE it wont show.

Hidden: 

focusColor 1 .75 0 1 // Menu focus color for text and items
tooltipbackcolor .49 .56 .27 1
tooltipforecolor .12 .14 .08 1
tooltipscale .43
tooltipfont "hud"
tooltipdelay 500

Tooltipbackcolor is like the shadow of the text.
Tooltipforecolor is the maincolor of the text.

Colors are working with RGBA codes. (  RGBA Color Picker ).

example:
.49 = R ( R for Red ).
.56 = G ( G for Green ).
.27 = B ( B for Blue ).

and 1 is the opacity. ( 1 = 100% 0.5 = 50% )


so i like the have a light blue color.
First the foreground color = .0 .255 .255 1
Now the background take a darker color = .61 .61 .255 1

Than we have the Tooltipscale it's like the size.
Tooltipfont is the fonttype.

and i dont really know what tooltipdelay stands for.

Hidden: 

onOpen
{
open setup_menu;

show options_glow;
hide options_button;

playlooped "music/shop/shopa_slow.mp3"
}

onESC
{
open quit_popmenu;
}

Than you can see this.
open will open a file ingame, inhere it opens the setup file, and the option icon will glow and it will hide the option button. it will play shopa_slow. if you press ESC ( upper right on your keyboard ) the quit popupmenu will open.


Hidden: 

//////////////////////////////////////////////////////
// Precache the player model
//////////////////////////////////////////////////////

itemDef
{
name modelselection
ownerdraw UI_PLAYERMODEL
rect 0 0 0 0
style WINDOW_STYLE_EMPTY
visible 1
decoration
    }

Don't change! it are character models if i'm correct.


if you scroll down you will see the things i just explained.
You see some ' STYLE & GROUP Text ' dont change them if you dont know what your doing.

Thats the most basic part most modders want to change.

Hope you can go further with it now.

Good Luck,
Punisher

Video Tutorial Coming Soon!

Sorry for that much spoils but else it's hard to read and the page will be to long.
Now it will be shorter and you can expand and hide it.


Website: House of Pain Server - Website
Serverlist: House of Pain Server - Serverlist

<a><img></a>

<a><img></a>
Back to top
View user's profile Send private message
Sponsor
Display posts from previous:
Post new topicReply to topic printer-friendly viewThank Post
Soldier Of Fortune 2 Forum Index »  SOF2 Tutorials
 
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts How to make you own mod? 6 Crankedup 4905 Tue Jun 19, 2018 11:00 pm
Punisher View latest post
No new posts SOF2MAPPING Tutorial.2 - Make a room 0 Punisher 2215 Tue Oct 06, 2015 3:16 pm
Punisher View latest post
No new posts To make it more clear to everyone READ PLZ 3 Teo 4315 Thu Nov 28, 2013 8:41 pm
Teo View latest post
No new posts want to make a post :) 6 conviction 5187 Thu Nov 15, 2012 10:08 pm
Lessoe View latest post
No new posts Teo which programs u use for make themes? 1 MacTavishXx 4031 Wed May 02, 2012 5:23 pm
Teo View latest post
 




Back to Top

SOF2.ORG Multiplayer Community © 2019 All times are UTC + 2 Hours [DST enabled]
 

Copyright ©