It is currently Tue Dec 06, 2022 9:31 am

All times are UTC-05:00




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Request - MachHud Help
PostPosted: Thu Oct 21, 2004 3:20 pm 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
OK, I'm looking to do a custom HUD, but I'm a little confused as to how to do it myself. Maybe someone can help me get started.

So here's what I'm looking for...

Jotun's hud
+ammo hud
+flag hud
+T1 or T2 vchat hud
+ping hud

Move the weapon boxes to the bottom, pack/nade icons to the right of the weapons. Leave stuff at top where it is. Move the personal score thing somewhere unobtrusive, top or corner or something. I think it's best if you can put the flag hud inside the score hud like some people have done. Ping hud should be next to score hud probably. Oh and the flashing thing that says you have the flag should be down on the bottom too. What else...can't remember.


Top
   
 Post subject:
PostPosted: Thu Oct 21, 2004 6:02 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
I'll explain this as much as I can. (I wish I had a mic).

Basics

Imagine if you will a grid overlay on your screen. That looks like this:

Image

Noticed how each section has an x and y varible, as well as how each varible has either a positve or negative value to it.

The way this works is a centered item you wanted moved up and to the right would recieve a positive x value greater than zero, and a positive y value greater than zero. To move that same item, from the same centered starting position, down and to the left you would have to give it a negative x value greater than zero and a negative y value greater than zero. Something like this:

Image

To figure out the distances take your resolution, in my case 1024x768 and divide both number by two to find the size of each section of the x,y axis in pixels. This gives me 512x384 in each section. 512 pixels from point (0,0) to the right and to the left on the x axis, and 384 pixels from point (0,0) to the top and to the bottom on the y axis. Like this:

Image

Containers

To simplify the process of moving hud elements around the screen IGA create groupings called containers. The container draws a box, of a size which you define using the width and height functions, and that box then holds all the hud elements that follow after it until it reaches another container. This means you can move the container to position and all the hud elements inside that container will move with it. This also helps with positioning hud elements inside of the container because now you can use the container to restrict the movements of the hud elements that are contained within it. In essences it draws another grid inside the container using the defined parameters you set. Like this:
Image


Alignments

This concept is pretty straight forward for anyone that has used a word proccessor. Simply put it aligns the HUD elements to either the top, bottom, center, middle, left, right, next, or previous. For simplicity's sake all vertical alignments are going to be either top, bottom, middle, next or previous. All horizontal alignments are going to be Left, right, center, next, or previous.

The next or previous alignments match an axis of the hud with the next or previous hud in the container's corresponding axis. This is used when dealing with the weapon icons, the vertical alignment its uses the next hud's or the previous hud's axis for reference.

Pos
Pos is used for position. It simply means the position of where the hud should start. The positions are PosX=* and PosY=*

Height/width
This controls the size.

Offset
The offset is just the number of pixels to offset the hud in relationship to the alignment and positioning you have given it. The offsets are OffsetX=* and OffsetY=* when * is the point on the respective axis.


(I'm tired of typing now so its gonna get a little complex, sorry Mach)

Advanced example of the Containers (Using the chat HUD as reference):

The following is found in your TribeHUD.ini

[default_MessageContainer]<=====This signifies the container start.
horizontalAlignment=HALIGN_Left<===Here is the Horizontal or X alignment
verticalAlignment=VALIGN_Top<=====Here is the Vertical or Y alignment
horizontalFill=HFILL_Relative<=====Not quite sure what this is so I don't touch it
RelativeWidth=0.4375<========Not quite sure what this is so I don't touch it
Width=330<=======Width in pixels
Height=90<=======Height in pixels
OffsetY=2<=======Offset Y in pixels
OffsetX=5<=======Offset X in pixels

[default_MessageWindow]<=======First Hud element in the container
backgroundTexture=(material=Texture'HUD.MPDialogueQuickChat',drawColor=(R=255,G=255,B=255,A=255),style=1,

bStretched=true)<=======This is the texture to be used in for the hud element.
horizontalAlignment=HALIGN_Left
horizontalFill=HFILL_Relative
verticalAlignment=VALIGN_Top
Height=40
borderTop=4<=======Size of the Top border in pixels
borderLeft=4<=======Size of the left border in pixels
borderBottom=4<=======Size of the bottom border in pixels
borderRight=4<=======Size of the right border in pixels
maxDisplayableLines=4<=======Number of lines that the Chat hud shows by default
SecondsPerWord=0.75<=======Not sure what it is so I don't touch it
templateMessageLabelName="GlobalMessage"<=======Not sure what it is so I don't touch it

For all the textures open up TVed.exe in your program/bin folder and click on the checkerboard Icon.

These are all the textures you can use in T:V. The drawcolor= controlls the color of the texture that is used with the Red, Green, and Blue values as well as the transparency of it with the Alpha value. Style= is a switch to turn the texture on or off. 1=on 0=off.

That should get you started. Look through the entire tribeshud.ini file and try to get an Idea of what

controlls each hud. The flaghud is located under [default_Carryable].

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Last edited by BFGanksta! on Fri Oct 22, 2004 12:35 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Thu Oct 21, 2004 6:54 pm 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
Wow, thanks, that's very helpful. I'm sure I'll have some more questions as I go through this.


Top
   
 Post subject:
PostPosted: Thu Oct 21, 2004 7:20 pm 
Offline
Dawg medium
Dawg medium

Joined: Mon Jun 14, 2004 12:43 pm
Posts: 650
Location: Third Rock From the Sun
cool.


Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 10:48 am 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
So for X offset, if the offset is positive, that moves it to the right?

And for Y offset, if that is positive it moves it down?

So for example if I have my horizontal weapon container, the first item would be X offset by about 2, then the next item (80 wide) would be X offset maybe 92 or something? That would put it in the correct place with a 10 pixel buffer in between?

So how can I have a negative offset? Wouldn't that put it outside the container?


Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 12:55 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
If the x offset is positive it moves it to the right, if the y offset is positive it moves it UP. This is the same as basic alegebra/trig, all those graphs everyone hates.

Mach you are taking into consideration the alignments. The alignments help the HUDs scale across screen resolutions, so the positioning isn't all screwed up. If you were to take my hud and use it on 800x600 most of the elements would still be in the right places, because I used alignments more than offsets. With the possible exception of the scoreboard/flaghud.

However to answer your question yes if the container is aligned to the left. This means means that the container and all the hud elements inside start at the left (which is the negative side of the axis). So to make them move right you would have to offset the X value with a positive number. If the container was aligned to the right and negative number would be needed to move the hud left.

I added another explanation and picture to illustrating how the container functions. In essences the container draws a virtual 'screen' on top of your real screen. Understand?

If you don't feel free to ask me. I enjoy this because its helping me understand the dynamics of the HUDs a whole lot better. The IGA guys did a great job with the containers, I think it is possible to make the HUDs scale across the every resolution completely.

BTW: I also changed where I told you to divide you resolution by four to two. I made a mistake. For a graph like that to work you would need the x axis divided in two, and the y axis divided in two.

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 1:01 pm 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
I understand now. I was thinking that a negative y offset would move it up, but that doesn't make sense. So if I left allign everything then I use a positve X, for right alligned things I use a negative x. Now I have a bottom, left aligned container so I use a negative y to move it up? So if I offset -2, then the bottom of the thing inside the container would be up 2 pixels?

I'm sure this will take me a while, but I think it's fun. Thanks for your help. Someone needs to write a freakin tutorial on this. Oh yah, you did :D


Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 1:23 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
It should. And mach instead of using a larger offset, use HALIGN_Next and HALIGN_Previous. These two functions will keep your weapons icons rather neat. And then the offset you give them will be smal and manageable.

So for the the weapon Icons, w/o the eblade, to be align across the bottom on the left it would look sort of like this:
Code:
[default_weaponContainer]
horizontalAlignment=HALIGN_left
verticalAlignment=VALIGN_Bottom
width=257<=======3*weapon icons (80pixels in width)+5 pixels in between them
height=40<==the weapon icons are 40 pixels high
OffsetX=2<==2 pixels to the right from the left side of the screen
OffsetY=2<==2 pixels UP from the bottom of the screen

[default_FallbackWeapon]<====the following doesn't have textures and is positioned offscreen
emptyTexture=(drawColor=(R=255,G=255,B=255,A=255),style=0)<==style 0 turns off the texture
fullTexture=(drawColor=(R=255,G=255,B=255,A=255),style=0)<==style 0 turns off the texture
bDrawKey=False<===The Hotkey isn't drawn (We are professionals here)
horizontalAlignment=HALIGN_Right<=disregard
verticalAlignment=VALIGN_Bottom<=disregard
Width=80<=disregard
Height=40<=disregard
offsetY=240<==disregard
offsetX=-5<==disregard

[default_weapon0]<==This is the reference (Sorry mach I don't know what I was thinking)
emptyTexture=(drawColor=(R=255,G=255,B=255,A=255),style=1)
fullTexture=(drawColor=(R=255,G=255,B=255,A=255),style=1)
bDrawKey=False
horizontalAlignment=HALIGN_Left<===This aligns the hud to the left side of the container
verticalAlignment=VALIGN_Top<==This aligns the hud to the top of the container
Width=80
Height=40

[default_weapon1]<===This will align weapon icon 2 with 1
emptyTexture=(drawColor=(R=255,G=255,B=255,A=255),style=1)
fullTexture=(drawColor=(R=255,G=255,B=255,A=255),style=1)
bDrawKey=False<===Removes the hotkey for the weapon
horizontalAlignment=HALIGN_Previous
Width=80
Height=40
offsetX=5<===5 pixels from right side of the next weapon icon

;Repeat [default_weapon 1] coordinates for [default_weapon 2]

This should be an example of what you are trying to do, doing in the cleanest manner possible. I haven't tested it though. So try it on your own.

Editted cause I was a raving lunatic. Sorry.

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Last edited by BFGanksta! on Fri Oct 22, 2004 3:15 pm, edited 2 times in total.

Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 2:17 pm 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
If I'm left aligning my first element, then horizontalaligning to previous for the others, then do I use a positive or negative X number for the offset?

Everyone else must be loving this :roll:


Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 3:25 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
positive.

The containers don't seem to work the way I thought they did.

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Last edited by BFGanksta! on Fri Oct 22, 2004 4:39 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Oct 22, 2004 4:01 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
I don't know what I'm doing now. :? I'm trying to make my hud work 100% with every resolution but I can't get the huds to align right.

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Top
   
 Post subject:
PostPosted: Fri Oct 29, 2004 8:12 am 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
I'm making progress. I want to install the same flag container stuff but in the lower right and then add in ammo hud and maybe a better vchat. That t2 vchat is a little buggy.


Top
   
 Post subject:
PostPosted: Fri Oct 29, 2004 4:59 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
I got a mic now so, later tonight around about 5:30 or 6:00 CST I'll get on teamspeak and talk you through it. If you need it.

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Top
   
 Post subject:
PostPosted: Fri Oct 29, 2004 6:31 pm 
Offline
Council Member
Council Member
User avatar

Joined: Mon Jun 23, 2003 7:33 am
Posts: 983
Location: Columbus, OH
Shazbot, I can't tonight. Maybe on Sunday or something.


Top
   
 Post subject:
PostPosted: Fri Oct 29, 2004 6:49 pm 
Offline
Runt Dawg
Runt Dawg

Joined: Wed Jun 25, 2003 12:15 am
Posts: 477
Location: @home
sure.

_________________
Quote:
I strolled over to the red phone without incident or bother, and noticed that there was no chair to accomodate anybody who might want to place an urgent telephone call regarding erotica.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC-05:00


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited