Remaster 1.3 is released.
To disable all HUD elements use rema_noHUD = true in your mission and load a custom lvl file with
the default stock HUD but with your changes. For further Information about this, read the Remaster
developer documentation.
==================================================================
I haven't found a way to make a 100% custom HUD without an global ingame here on GT and everyone told me it's not possible. So i played around with the HUD and found a way to do it.
What can you learn with this tutorial:
- Step 0: Major trick for resolution problems
- Step 1: Remove any msh things from the HUD
- Step 2: Remove any bitmaps from the HUD
- Step 3: Remove any textes from the HUD (updated)
- Step 4: The HUD file itselfe
- Part 1: New msh, Basics (Groups, Move,...)
- Part 2: Colored msh, EventColor
- Part 3: Bitmaps, rect()
- Part 4: Msh transforms
- Step 5: custom minimap
After this is my first tutorial it would be nice if you can tell
me if something is not understandable.
==================================================================
First of all a big thanks to
- RepSharpshooter - for this tutorial. You should read it to understand the basics.
- kinetosimpetus - for this tutorial. It helped me to understand the Transforms.
- [RDH]Zerted - without this tutorial nothing would work. READ THIS!!
- FragMe! - for this floating icon tutorial. It helped me to understand the Basics better.
- Cerfon Rournes - for this tutorial it was necessary for removing texts.
- Marth8880 - for this example script. It makes it easier to apply the HUD changes on different aspect ratios.
- thelegend - for this simple but powerful finding. Without that we won't be able to make custom minimaps.
Step 0: Major trick for resolution problems
So after there are lots of Problems with people playing on different resolution, here is a tipp, how to fix this.
In the following tutorial you'll learn, how to modify the HUD and how to load the lvl files. This is about how to load different lvls for different resolutions.
Code: Select all
local screenWidth, screenHeight = ScriptCB_GetScreenInfo()
if screenHeight > 1000 and screenWidth > 1900 then
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:bmpKill.lvl")
else
ReadDataFile("ingame.lvl")
end
You can also use elseif if you want to distinguish more than two cases.
To make your changes be available on more than just one resolution you can work with the aspect ratio. You need to make HUD changes such as weapon icons only once per aspect ratio. Here an exaple code
Code: Select all
local screenWidth, screenHeight = ScriptCB_GetScreenInfo()
local aspectRatio = screenWidth / screenHeight
print("ME5_MiscFunctions: Width: "..screenWidth.." Height: "..screenHeight.." Aspect Ratio: "..aspectRatio)
if aspectRatio <= 1.4 then
print("ME5_MiscFunctions: Aspect Ratio is 4:3; loading scopes as such")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar43\\ar.lvl")
elseif aspectRatio <= 1.63 and aspectRatio >= 1.5 then
print("ME5_MiscFunctions: Aspect Ratio is 16:10; loading scopes as such")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar1610\\ar.lvl")
elseif aspectRatio <= 1.9 and aspectRatio >= 1.63 then
print("ME5_MiscFunctions: Aspect Ratio is 16:9; loading scopes as such")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar169\\ar.lvl")
else
print("ME5_MiscFunctions: Error! Invalid aspect ratio ("..aspectRatio..")! Defaulting to workaround")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar.lvl")
end
Step 1: Remove any msh things from the HUD
Ok this is about msh files and how to remove them from the HUD.
Examples for msh's on the HUD are the icons or the reticule. All HUD msh's are in the C:\BF2_ModTools\data_XXX\Common\mshs folder
If you want to remove an msh you need to scale it down to 0.0. For this you browse the directory i pointed out above and make a new option file.
Let's say we want to remove the reticule's bullseye. So first check if there still is an option file. In this case you just edit it and add
Code: Select all
-scale 0.0
Ok now the munge.bat will scale the reticule's bullseye to 0.0 when munging it. But first we need to tell the munge.bat that we want this msh be munged.
You need to edit the ingame.lvl in the C:\BF2_ModTools\data_XXX\Common folder.
There is a lot of stock stuff we don't need. So remove everything beside the bullseye.
Code: Select all
ucft
{
REQN
{
"model"
"hud_main_reticule_bullseye"
}
}
Now we need to setup the lua.
The interesting thing is the function ScriptInit(). Find the line
Code: Select all
ReadDataFile("ingame.lvl")
Code: Select all
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
Go and run BF2 and enjoy the difficult with an removed bullseye.
This works for all hud msh.
Step 2: Remove any bitmaps from the HUD
After you tested the msh remove possibilities you should have noticed there are things that cannot be removed this way (ammo clips, healthbar, heatbar,..). These are bitmaps. So you don't have an msh, only tga files.
The idea is the same as for the msh. Do something to make it invisible. So let's say we want to remove the ammo clips. The hud_clipbar_segment.tga can be found in the C:\BF2_ModTools\data_XXX\Common\interface folder. Edit it with an picture editor of your choice. But make sure it saves the tga with transparent. PSE for examples does not. I use Paint.Net for this.
You may already know we now need to edit the ingame.lvl again.
That's right, but we need a new ingame.lvl and not the one where we have the msh things in.
So there are two ways:
1st: use the How to munge a custom lvl tutorila somewhere here on gt
2nd: duplicate the ingame.req file, rename it and edit the duplication.
I toke the 2nd option.
So now i have an ingameMsh.req and an ingame.req in the C:\BF2_ModTools\data_XXX\Common folder.
edit the ingame.req and add your tga you want to remove.
Code: Select all
ucft
{
REQN
{
"texture"
"hud_clipbar_segment"
}
}
Just keep in mind what req file in your C:\BF2_ModTools\data_XXX\Common folder is called ingame.req - the msh one or the bmpKill one - if you munge your ingame the next time.
Now we are ready to set up the lua.
So find this part again
Code: Select all
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
Code: Select all
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:bmpKill.lvl")
It's because bitmaps will be overwritten. BF will load your custom bitmap in the first step, together with your custom msh files. Than from the stock ingame.lvl BF loads everything it doesn't already know AND all bitmaps. And now comes our bmpKill.lvl with the transparent tgas and BF loads them again.
You can also add the bmp's tgas to your custom ingame.lvl and load it before and after the stock one, but i thought this way is more cool . Also if you have bigger ingame.lvl bf take longer to load your map/mod if you load it twice.
So munge the edited lua file and enjoy a gamplay without ammo sticks.
This works for all bmps.
Step 3: Remove any textes from the HUD
= UPDATE =============================================
I released a mod that removes the text for you. It is more powerful since it uses a
few new tricks and functions to rescue every menu and submenu text.
But if you prefer to do everything on your own and stay with ugly unreadable text
and a huge sized mod feel free to continue reading this section
====================================================
Now we know how to disable all objects. But there are still the text things we don't like.
To remove them we need an font that takes spaces for all letters. I made one, but it's not perfect, after there are still things left (äöü and other things).
Follow the tutorial for custom fonts
Name the font the same the one is called you want to remove. And add it to an new req file the way they are loaded in the core file. Do not add them to the core.req. We have to do it the same way we did for the ingame.req
Code: Select all
ucft
{
REQN
{
"font"
"gamefont_large"
"gamefont_medium"
"gamefont_small"
"gamefont_super_tinny"
"gamefont_tinny"
}
}
munge the new core file and name it txtKill.lvl when it is munged. Than munge the stock core file again (!important because Modtools copies the core.lvl to the Addon folder!).
Now go and edit your lua again and find this part:
Code: Select all
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:bmpKill.lvl")
Code: Select all
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:bmpKill.lvl")
ReadDataFile("dc:txtKill.lvl")
I think the most interesting things are the ammo numbers and the weapon names. So here are the fonts you need to remove:
gamefont_large: reinforcements, ammo numbers
gamefont_small: weapon names
The problem we now have is that some menu textes are removed (spawn menu, esc menu, stats,...)
To fix that you need to edit the scripts and add them to the ingame.req. Replace all gamefont_large with an copy of the font with an different name. This font you need to load in the core.req (NOT txtKill.req).
Code: Select all
ucft
{
REQN
{
"script"
"ifs_sideselect"
"ifs_charselect"
"ifs_mapselect"
"ifs_readyselect"
}
REQN
{
"script"
"platform=pc"
"ifs_pc_spawnselect"
}
REQN
{
"model"
"hud_main_reticule_bullseye"
}
}
Also some scripts are loaded in the common.req file. You need to look for all loaded scripts if there is the font called you use. But till now i haven't got this working. So if you have an idea please tell us.
Ok i no find a way to make it work 100%.
This is what you need to do:
change font = gMenuButtonFont, in the ifs_sideselect.lua to font = "gamefont_large_rc", and load the script in the ingame.req. But remember that the font name need to be loaded in the core file. If you called it something else you need to take this name.
To make the text availabel at the loadscreen i haven't found a way. But if you load the txtKill.lvl at the end of the function you have the most time the textes displayed.
Also BF seams to have problems with mungeing the same fonts with different names. So as far as i noticed medium and small are the same. That's why we have problems with the medium fonts.
To fix it you need to change all calls for gamefont_medium to gamefont_small_rc or what ever you called the font.
Than you need to edit the common.req and only load this script:
Code: Select all
ucft
{
REQN
{
"script"
"ifs_pausemenu"
}
}
So now we have the problem, that the stats have no textes. But we also can not load the stat script in the common, because for some reason it doesn't work.
So go to C:\BF2_ModTools\data_XXX\Common\scripts and edit Objective_Conquest.lua or what ever objective you use and find the function ObjectiveConquest:Complete(winningTeam) (it's the last one in conquest). At the end you write ReadDataFile("core.lvl") this makes BF load the stock core file when you won or loos. So than it has the stock fonts again and can display the stats correctly.
Code: Select all
function ObjectiveConquest:Complete(winningTeam)
if not self.multiplayerRules then
--remove all the cp markers
for i, cp in pairs(self.commandPosts) do
MapRemoveEntityMarker(cp.name)
end
end
--then call the default objective complete method
Objective.Complete(self, winningTeam)
ReadDataFile("core.lvl")
end
Code: Select all
ReadDataFile("dc:common.lvl")
ReadDataFile("common.lvl")
Step 4: The HUD file itselfe
Ok this is very complex, so i start with
Part 1: New msh, Basics (Groups, Move,...)
This Part is very simple. It's about a new msh that you add to the HUD. All msh files for the HUD go to C:\BF2_ModTools\data_XXX\Common\mshs.
The tga's for them can also go there or you put them to C:\BF2_ModTools\data_RCM\Common\interface.
Than we need to add them to our ingame.req. You remember the one where we removed msh things.
Code: Select all
ucft
{
REQN
{
"texture"
"hud_rc_main"
}
REQN
{
"model"
"hud_main_reticule_bullseye"
"hud_rc"
}
}
Ok now BFII knows our files. But we need an other file where define the position and the event it should apear. Therefore we need to edit the 1playerhud.hud file. Just to clear: 1player means one player is playing. 2playerhud.hud overwrite the things in 1playerhud.hud if two players are playing with a split screen. We will not need that while moding for PC. The hudtransforms.hud file is for different transformations, more about this later.
But before we start to edit the hud file itselfs we add it to our ingame.req
Code: Select all
ucft
{
REQN
{
"texture"
"hud_rc_main"
}
REQN
{
"model"
"hud_main_reticule_bullseye"
"hud_rc"
}
REQN
{
"config"
"1playerhud"
}
}
Ok now we are ready to edit the HUD file. So browse C:\BF2_ModTools\data_RCM\Common\hud there you find the 1playerhud.hud file. But wait there is an PC folder with an other 1playerhud.hud file. After i wasn't sure what file BF2 munged and it seamed to me it takes everytime an other, i renamed the on in the PC folder to org_1playerhud.hud, so now bf2 need to take the on in the directory i pointed out above.
Now when you edit the 1playerhud.hud file there are a lot of things you will not need. You can delete everything. Because you also load the stock ingame.lvl and so the stock and with this the stock 1playerhud.hud file.
So here is your clean hud file. I don't know what this first lines are good for, but it was there before, so i added the header again:
Code: Select all
FileInfo("republicHUD")
{
Viewports(1)
}
To add our new msh file we now add the following code.
Code: Select all
Group("player1huddisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.000000, 1.00000, 0.000000, "Viewport")
ZOrder(1)
EventEnable("player1.spawn")
EventDisable("player1.die")
Model3D("player1hud")
{
Mesh("hud_rc")
Viewport(1)
Position(0.480000, 9.900000, 0.000000, "Viewport")
Rotation(0.000000, 0.000000, 0.000000)
Scale(21.800000, 24.000000, 10.000000)
ZOrder(0)
EventEnable("player1.spawn")
EventDisable("player1.die")
}
}
PropagateAlpha(1) - As far as i know it enables transparency to the objects.
Viewport(1) - you've seen it in the header. everything has this inside, so i added it, too.
Position(0.000000, 1.00000, 0.000000, "Viewport") - ok that's simple x, y, z but be carefull with changes just change a little bit. I have no idea about the scale, but somethimes +1 moves the things just an cm and sometimes a +0.1 makes your msh jump out of the screen.
Scale(0.000000, 0.000000, 0.000000) - isn't in this example, but this is for Scaleing the group/elements. No scale has the parameters (1.000000, 1.000000, 1.000000), or you delete this line.
Rotation(0.000000, 0.000000, 0.000000) - This rotates things. I have no idea in which direction. it was different for each thing i rotated and it also depens on the group's basis roation values.
ZOrder(1) - this means what element is before the others. 0 is the neares one to the camera, everything higher is more away. This can but needn't affect to bitmaps the same it does for mshs.
EventEnable("player1.spawn") - so this is about when your group is displayed in this case when the player spawn. There is no list about all events.
EventDisable("player1.die") - nothing to say.
After the properties you see an element. But there can also come a new child group.
All the Proporties above can be added to every element or child groupe. But remember that position or scale, or rotation changes are additive. So if you move the basis group to 0.1 and the child group/Element to 0.1 it's at position 0.2 on the screen.
About the zOrder:
If you have more child groups you can range their elements or their new child groups with the ZOrder again. This is not additive! Lets say we have two groups:
Code: Select all
Group("One")
{
PropagateAlpha(1)
Viewport(1)
Position(0.000000, 1.00000, 0.000000, "Viewport")
ZOrder(0)
EventEnable("player1.spawn")
EventDisable("player1.die")
Model3D("One")
{
Mesh("One")
Viewport(1)
ZOrder(255)
EventEnable("player1.spawn")
EventDisable("player1.die")
}
}
Group("Two")
{
PropagateAlpha(1)
Viewport(1)
Position(0.000000, 1.00000, 0.000000, "Viewport")
ZOrder(1)
EventEnable("player1.spawn")
EventDisable("player1.die")
Model3D("Two")
{
Mesh("two")
Viewport(1)
ZOrder(0)
EventEnable("player1.spawn")
EventDisable("player1.die")
}
}
There are lots of more options but they are mostly selfexplained.
An other tip if you make custom hud icons you can add their msh to the ingame.lvl and than make all the extraweapon's change from the floating icon tutorial in the 1playerud.hud file, or you make them in the extraweapon's file. I just thought it was an good i dea to have hud icons in the ingame.lvl file.
Part2: Colored msh, EventColor
OK now we know how to add msh to our hud. But sometimes we want to have a different color for different events (reticule team color, health color,..)
For this i have two examples. First is the reticule.
Code: Select all
Group("player1reticule")
{
EventPosition("player1.weapon1.reticule.position")
Position(0.500000, 0.5000, 0.000000, "Viewport")
Scale(0.8000, 0.8000, 0.8000)
PropagateAlpha(1)
Alpha(1.0000)
EventEnable("player1.weapon1.reticule.position")
EventDisable("player1.weapon1.reticule.disable")
EventAlpha("player1.reticule.alpha")
Model3D("player1reticule_inside")
{
Mesh("hud_rc_reticule_inside")
Lighting(5)
Scale(0.100000, 0.100000, 0.100000)
ZOrder(1)
Lighting(5)
Alpha(0.750000)
ColorChangeRate(0.001000)
EventEnable("initialize")
EventColor("player1.weapon1.target.teamColor")
}
Model3D("player1reticule_outside")
{
Mesh("hud_rc_reticule_outside")
Scale(0.100000, 0.100000, 0.100000)
Alpha(0.400000)
ColorChangeRate(0.001000)
EventEnable("initialize")
EventColor("player1.weapon1.target.teamColor")
}
}
In this case the above is not from the stock hud files, it's my Republic Commando's reticule. But this will do for pointing out how it works.
On of the basics of the reticule is the msh file. You need to add an texture to the msh even we will not use it. A white tga will do. There is still one in the interface folder, so you can make an reticule msh without texture and hex edit the MATL from the stock reticule.
OK to make it very simple this only enables a new msh on the screen (the reticule) and than there is the EventColor("player1.weapon1.target.teamColor") line at the msh's properties.
How the msh is added i explained in Part 1. The EventColor("") paint the reticule in the color of the team. How to change the Team's color i have no idea. If you want to have an statical color you can use instead of the EventColor line Color( R, Y, B) use values between 0 and 255 for Red, Yellow, Blue.
This was a very short example, but here is an other one:
The healthbar changes the color, if the healthvalue goes down.
Code: Select all
Group("player1healthbar")
{
PropagateAlpha(1)
Viewport(1)
Position(0.010803, 0.952479, 0.000000, "Viewport")
ZOrder(0)
Alpha(0.600000)
Color(255, 231, 255)
FadeInTime(1.000000)
FadeOutTime(0.200000)
EventEnable("player1.health")
EventDisable("player1.healthDisable")
BarBitmap("player1health_fill_l")
{
FlashyIncFadeOutTime(1.000000)
FlashyDecFadeOutTime(1.000000)
Bitmap("hud_rc_health_bitmap")
BitmapRect(0.225000, 0.060000, "Left", "Top", "Viewport")
TexCoords(0.000000, 0.500000, 1.000000, 1.000000)
Viewport(1)
Position(-0.010157, -0.165000, 0.000000, "Viewport")
ZOrder(2)
EventValue("player1.healthFraction")
EventColor("player1.healthColorNew")
EventPulseRate("player1.healthRegenPulseRate")
ColorChange(0, 0, 0)
ColorChangeRate(0.200000)
EventEnable("player1.healthFraction")
EventDisable("player1.healthDisable")
}
}
But we will only look at the color.
Important is this line:
EventColor("player1.healthColorNew")
you can also name it "player1.blablub" Important is that it is the same name as here at the transformation.
This need to be before the healthbar group.
Code: Select all
ViewPort("Transforms")
{
TransformNumberColor("player1healthcolor")
{
NumberColor(0.000000, 200, 0, 0)
NumberColor(0.290000, 200, 0, 0)
NumberColor(0.300000, 150, 240, 26)
NumberColor(0.590000, 150, 240, 26)
NumberColor(0.600000, 0, 213, 6)
NumberColor(1.000000, 0, 213, 6)
EventInput("player1.healthFraction")
EventOutput("player1.healthColorNew")
}
}
The NumberColor returns a color to player.healthColorNew. It depens on how big the inputvalue is in relation to it's start value.
Please do not hit me for my bad english. I try to explain with an example:
Your health is 100. Than you set this for the Value of the healthbar. When you are looking for the EventColor player1.healthColorNew the transformation returns it's value. And this depens on the EventInput player1.healthFraction. The Healthfraction is a value between 1.0 and 0.0, depending on how much of your life is left. You specify the return color with the NumberColor(upper/lower range, R, Y, B).
These Transformation can be found in the hudtransforms.hud file i told you above. I tryed to make these transforms in this file, but it doesn't worked. So i added the transform to the 1playerhud.hud file and than it worked.
After we saw the Rect() function and the bitmaps it's now interesting, how these things works and so we now come to
Part 3: Bitmaps and rect()
The bitmaps are simple tga files mostly with white and transparent parts. You find them in the inteface folder.
The Bitmap alone would simply shown on the screen with the color you define with EventColor() or Color(). But the BitmapRect() function defines an rectangle, what part of the Bitmap is shown.
So it's like you have an Bitmap as an pattern and the BitmapRect() draws just the part that is defined as an rectangle. But it only draws the white parts and not the transparents of the bitmap.
An example for this special Bitmaps are the Healthbar or the Jetpackbar.
I take again my Republic Commando HUD, so don't wonder that the values are not from the stock HUD.
Code: Select all
Group("player1healthbar")
{
PropagateAlpha(1)
Viewport(1)
Position(0.010803, 0.952479, 0.000000, "Viewport")
ZOrder(0)
Alpha(0.600000)
Color(255, 231, 255)
FadeInTime(1.000000)
FadeOutTime(0.200000)
EventEnable("player1.health")
EventDisable("player1.healthDisable")
BarBitmap("player1health_fill_l")
{
FlashyIncFadeOutTime(1.000000)
FlashyDecFadeOutTime(1.000000)
Bitmap("hud_rc_health_bitmap")
BitmapRect(0.225000, 0.060000, "Left", "Top", "Viewport")
TexCoords(0.000000, 0.500000, 1.000000, 1.000000)
Viewport(1)
Position(-0.010157, -0.165000, 0.000000, "Viewport")
ZOrder(2)
EventValue("player1.healthFraction")
EventColor("player1.healthColorNew")
EventPulseRate("player1.healthRegenPulseRate")
ColorChange(0, 0, 0)
ColorChangeRate(0.200000)
EventEnable("player1.healthFraction")
EventDisable("player1.healthDisable")
}
}
FlashyIncFadeOutTime(1.000000) - the time to fade in the new bar part when you get health.
FlashyDecFadeOutTime(1.000000) - the time to fade out the lost bar part when you loose health.
Bitmap("hud_rc_health_bitmap") - this opens the bitmap that should be drawn on the screen.
BitmapRect(0.225000, 0.060000, "Left", "Top", "Viewport") - this defines the rectangle that is drawn from the Bitmap ( X, Y). Left and Top says where to begin with drawing. In this case you will move the rectangle and bitmap with position begining at the upper left corner.
TexCoords(0.000000, 0.500000, 1.000000, 1.000000) . I have no Idea again.
EventValue("player1.healthFraction") - for some reason this affect the first value of the rectangle.
So now let's say we want to have an square with rounded edges. So you make an tga file with rounded edges, load it as Bitmap() and all is done.
The problem is mostly that the Bitmap is much bigger than the drawn rectangle. So when i made the HUD changes i started to move the bitmap at it's position and made the big and hight with the rect' X,Y values. Adn than i edited the tga to make the squar become round.
Sometimes it would be nice to change the direction the bar goes down. For this you can take the Rotation() function. Just change the last value. So for example Rotation(0.000000, 0.000000, 90.000000).
An other Tip: If you want the bar to go down from left to right you can also take negative values for the rectangel function. That's the way i made it at my RC HUD.
Code: Select all
Group("player1healthbar")
{
PropagateAlpha(1)
Viewport(1)
Position(0.010803, 0.952479, 0.000000, "Viewport")
ZOrder(0)
Alpha(0.600000)
Color(255, 231, 255)
FadeInTime(1.000000)
FadeOutTime(0.200000)
EventEnable("player1.health")
EventDisable("player1.healthDisable")
BarBitmap("player1health_fill_l")
{
FlashyIncFadeOutTime(1.000000)
FlashyDecFadeOutTime(1.000000)
Bitmap("hud_rc_health_bitmap")
BitmapRect(0.225000, 0.060000, "Left", "Top", "Viewport")
TexCoords(0.000000, 0.500000, 1.000000, 1.000000)
Viewport(1)
Position(-0.010157, -0.165000, 0.000000, "Viewport")
ZOrder(2)
EventValue("player1.healthFraction")
EventColor("player1.healthColorNew")
EventPulseRate("player1.healthRegenPulseRate")
ColorChange(0, 0, 0)
ColorChangeRate(0.200000)
EventEnable("player1.healthFraction")
EventDisable("player1.healthDisable")
}
BarBitmap("player1health_fill_r")
{
FlashyIncFadeOutTime(1.000000)
FlashyDecFadeOutTime(1.000000)
Bitmap("hud_rc_health_bitmap")
BitmapRect(-0.225000, 0.060000, "Left", "Top", "Viewport")
TexCoords(0.000000, 0.500000, 1.000000, 1.000000)
Viewport(1)
Position(0.988282, -0.165000, 0.000000, "Viewport")
ZOrder(2)
EventValue("player1.healthFraction")
EventColor("player1.healthColorNew")
EventPulseRate("player1.healthRegenPulseRate")
ColorChange(0, 0, 0)
ColorChangeRate(0.200000)
EventEnable("player1.healthFraction")
EventDisable("player1.healthDisable")
}
}
This way you can mirrow the bar insteaf of rotate it and make a new bitmap.
Part 4: Msh transforms
You may have the problem that you want to change some stock weapons msh but cannot find where the HUDIcon = "" line is in the odf file. For example the detpack plunger.
There is still a way to change the Icon with Msh transforms. It's the same that the floating icon fix (fif) uses.
At the fif you want to remove the floating icon and make a new one at the right position. Therefore you transform the icon to an invisible one and make a new one with the right position.
But this doesn't only work for removing things you can also change the stock icon to an new one instead of scaleing the stock one down and make a new one.
Code: Select all
ViewPort("Transforms")
{
EventNameFilter("player%")
TransformNameMesh("player1weapon1") // add msh names of first weapons here and remove unused lines
{
/////////////////////////////////REPUBLIK/////////////////////////////////
NameMesh("first_msh", "second_msh")
EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}
Step 5: Custom minimap
There are many who tried to move the minimap somewhere else and most failed. But thelegend finaly found a way to disable the stock minimap. It's very easy. You just need this line:
Code: Select all
DisableSmallMapMiniMap()
So that's all i know about HUD things. Enjoy and i hope for many new and interesting HUDs