HUD tags/icons [solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

HUD tags/icons [solved]

Post by Tears2Roses »

Im working on some custom sides, and I need to know how to make custom icons. I made a few new weapons; concussion grenades, and separate health/ammo dispensers; and they dont have HUD tags. The concussion grenade uses the default thermal D. grenade .msh, but with new effects. The separate health/ammo dispensers use the default dispenser .msh. There just isnt a HUD tag/icon. If you need anymore info I will be happy to post it.
Hidden/Spoiler:
Are the icons called HUD tags, or icons? It's just bugging me, and I really need to know if there is a difference between the two.
Last edited by Tears2Roses on Sun Mar 04, 2012 11:45 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: HUD tags/icons

Post by Marth8880 »

In order to have custom weapon icons, you'll need FragMe!'s Floating Icon Fix as well as an optional custom mesh to be used as your weapon's icon. Basically, what you'll do is you'll perform the floating icon fix on your new weapon icons, or should I say, you'll add the appropriate lines to the extraweapons.hud file. Then, you'll add HUDTag = "icon_mesh_name" to your weapons' ODF files. I'll post examples of my ME5 weapon icon files if you need.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: HUD tags/icons

Post by Tears2Roses »

Ok, that makes sense. Hopefully I can get it working now.

EDIT: Argh.... I cant get my grenade icons working. I can have a working thermal D icon, but no concussion grenade icon. And I can also have a very small floating concussion grenade icon, and no thermal detonator icon. This is really anoying me, any help is apreciated.

extraweapons.hud:
Hidden/Spoiler:
Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("all_weap_inf_pistol_dh17", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("all_weap_inf_pistol_dh17")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)

}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{
NameMesh("all_weap_inf_thermaldetonator", "com_inv_mesh")
NameMesh("item_powerup_health25", "com_inv_mesh")
NameMesh("item_powerup_ammo", "com_inv_mesh")


EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("all_weap_inf_thermaldetonator")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
MeshInfo("item_powerup_ammo")
{
Position(-0.258881, 0.200000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
MeshInfo("item_powerup_health25")
{
Position(-0.258881, 0.200000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
}
}
}
What I did is use the regular thermal D .msh in the extraweapon.hud, which doesnt work at the moment. The health and ammo works fine (im tweaking placement a bit, but it is there.) The DH17 is fine too, its just the grenades.. Im going to do a bunch of testing and hopefully get both grenades to have working icons.

EDIT2: Ok, so removing everything grenade related from the extraweapons.hud worked. I now have 2 grenade icons where they need to be. Most recent extraweapons.hud:
Hidden/Spoiler:
Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("all_weap_inf_pistol_dh17", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("all_weap_inf_pistol_dh17")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)

}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{

NameMesh("item_powerup_health25", "com_inv_mesh")
NameMesh("item_powerup_ammo", "com_inv_mesh")


EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("item_powerup_ammo")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
MeshInfo("item_powerup_health25")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
}
}
}
Now that I have all my icons working, how would I go about changing the glow of thermaldetonator from red to yellow? I still want to have a red glowing grenade (regular thermal D) and my concussion grenade (the yellow thermal D.) How would I go about doing this?
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: HUD tags/icons

Post by THEWULFMAN »

Tears2Roses wrote:Now that I have all my icons working, how would I go about changing the glow of thermaldetonator from red to yellow? I still want to have a red glowing grenade (regular thermal D) and my concussion grenade (the yellow thermal D.) How would I go about doing this?

Personally I took the stock icon from Data_ABC\Common\msh and put it in my sides folder. Then renamed the msh, hex edited it to have a different texture name, then renamed the texture. You should be able to figure out the rest. If not, just ask away.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: HUD tags/icons

Post by Tears2Roses »

Thanks wulf, I will try that and if I run into problems I'll ask.

EDIT: I got the model with a new .tga working, and hex editted correctly ( acording to .msh viewer). However, ingame I see nothing. Im going to put the new .msh into the extraweapons.hud and report back with my findings.

EDIT2: Ugh............now my map is crashing with the following sev 3 errors:
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDManager.cpp(619)
HUD unable to find HUD element type 0x16ce484a

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDTransformNameMesh.cpp(269)
HUD TransformNameMesh NameMesh requires 2 arguments

Message Severity: 3
..\PebbleFL\Common\PblConfig.h(71)
PblConfig: Data 63cc538f expected string
m_auiArgs >= m_uiNumArgs*4 && m_auiArgs < CONFIG_MAX_DATA_ARGS*4


extraweapons.hud:
Hidden/Spoiler:
Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("all_weap_inf_pistol_dh17", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("all_weap_inf_pistol_dh17")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)

}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{

NameMesh("item_powerup_health25", "com_inv_mesh")
NameMesh("item_powerup_ammo", "com_inv_mesh")
NameMesh(""hud_concussionnade", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("item_powerup_ammo")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
MeshInfo("item_powerup_health25")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
MeshInfo("hud_concussionnade")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
}
}
}


That reminds me, where should my new .msh/.tga go? If it is in the wrong spot that might be crashing it. I've never seen those sev 3 errors before either...help?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: HUD tags/icons

Post by AceMastermind »

Those errors are syntax related, did you get any mungelog errors?
It looks like you added an extra quotation mark:
Tears2Roses wrote: // Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{

NameMesh("item_powerup_health25", "com_inv_mesh")
NameMesh("item_powerup_ammo", "com_inv_mesh")
NameMesh(""hud_concussionnade", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}
Slow down and take your time when editing these files, you aren't in a race and there is no rush.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: HUD tags/icons

Post by Tears2Roses »

Many thanks ace, that fixed the crashing. Problem is now I have double floating health packs, and the concussion grenade is really small and still floating. I can easily move the ammo pack down to where it needs to be, but how do you fix double floating icons? As for my concussion grenade, since it uses a stock geometry just renamed and retextured I dont know why it isnt where it should be... What should the scale/positioning of the grenade be?

current extraweapons.hud:
Hidden/Spoiler:
Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("all_weap_inf_pistol_dh17", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("all_weap_inf_pistol_dh17")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)

}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{
NameMesh("item_powerup_ammo", "com_inv_mesh")
NameMesh("hud_concussionnade", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("item_powerup_ammo")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
MeshInfo("item_powerup_health25")
{
Position(-0.258881, 0.250000, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)
}
}
}
}
hopefully I can get rid of the double floating health packs, and quash these floating icons for good. On a side note, the DH17 is placed just fine and on the first try. Must have something to do with secondary weapons, I guess.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: HUD tags/icons

Post by lucasfart »

Have a look at the solution in the first post of FragMe's fix.....
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: HUD tags/icons

Post by Tears2Roses »

lucasfart wrote:Have a look at the solution in the first post of FragMe's fix.....
I did just now. Im only loading the rebel side, the imperial side is untouched.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: HUD tags/icons

Post by lucasfart »

If you go to data_ABC/Common/hud/1playerhud.hud and open it in notepad, you'll find a list of the co-ordinates for all the weapons in the game.....hopefully that should provide you with all the co-ordinates you need. :P
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: HUD tags/icons

Post by Tears2Roses »

ok, I will try that, and then I should hopefully have no more floating icons.

EDIT: argh.....I still have a double floating health pack, and a tiny floating concussion grenade. Im going to look over everything very carefully, but in case I miss something im going to post all of my work. All help is appreciated.

extraweapons.hud:
Hidden/Spoiler:
Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("all_weap_inf_pistol_dh17", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("all_weap_inf_pistol_dh17")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.720000, 0.720000, 0.720000)

}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{
NameMesh("item_powerup_ammo", "com_inv_mesh")
NameMesh("hud_concussionnade", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("item_powerup_ammo")
{
Position(-0.251899, 0.248431, 0.000000, "Viewport")
Rotation(0.020765, 359.925140, 359.999695)
Scale(0.330001, 0.330001, 0.330001)
}
MeshInfo("hud_concussionnade")
{
Position(-0.278276, 0.250243, 0.006280, "Viewport")
Rotation(0.056783, 359.996582, 359.999695)
Scale(0.610000, 0.610000, 0.610000)
}

MeshInfo("item_powerup_health25")
{
Position(-0.251899, 0.248431, 0.000000, "Viewport")
Rotation(0.020765, 359.925140, 359.999695)
Scale(0.330001, 0.330001, 0.330001)
}
}
}
}


The grenade .msh name is hud_concussionnade (copied and pasted the name) and is located in data_EI1/common/mshs. The health/ammo packs are called item_powerup_health25 and item_powerup_ammo and both are located in data_EI1/sides/all/msh/pc.

And these are the hud tag lines in the ODF's:

Code: Select all

HUDTag = "hud_concussionnade"
HUDTag = "item_powerup_health25"
HUDTag = "item_powerup_ammo"
The hud tag names are all in the main ODF, under properties. Im going to experiment with the location of my mshs and positioning of the icons via the extraweapons.hud, and hopefully get my icons where they need to be.

EDIT2: Good news! I got my double floating health icon fixed, and my ammo icon fixed. They are both scaled correctly and working great! The bad news is: My concussion grenade icon is not working, and not showing up. The double floating health pack icons were because I missed an entire section in the extraweapons.hud. This is my current extraweapons.hud, which has working health pack and ammo icons, but not the concussion grenade.
Hidden/Spoiler:
Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("all_weap_inf_pistol_dh17", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("all_weap_inf_pistol_dh17")
{
Position(-0.258881, 0.364262, 0.013887, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(0.800000, 0.800000, 0.800000) //0.72

}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{
NameMesh("item_powerup_ammo", "com_inv_mesh")
NameMesh("hud_concussionnade", "com_inv_mesh")
NameMesh("item_powerup_health25", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("item_powerup_ammo")
{
Position(-0.251899, 0.310000, 0.000000, "Viewport")
Rotation(0.020765, 359.925140, 359.999695)
Scale(0.700000, 0.700000, 0.700000) //0.72
}
MeshInfo("hud_concussionnade")
{
Position(-0.278276, 0.250243, 0.006280, "Viewport")
Rotation(0.056783, 359.996582, 359.999695)
Scale(0.610000, 0.610000, 0.610000)
}
MeshInfo("item_powerup_health25")
{
Position(-0.251899, 0.310000, 0.000000, "Viewport")
Rotation(0.020765, 359.925140, 359.999695)
Scale(0.700000, 0.700000, 0.700000) //0.72
}
}
}
}
Im going to re-do the hud_concussionnade.msh and call it something easier to spell, along with placing it where the hud_thermaldetonator.msh is.

EDIT3: Argh, I cannot get the concussion grenade icon working, no matter what I do. I guess no icon is better than a floating one. Topic solved, thanks for all the help everyone.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: HUD tags/icons [solved]

Post by lucasfart »

I notice you haven't mentioned anything about your side's .req file...Sorry to keep this afloat despite your belief that it won't work, but if you haven't tried this yet its worth a try....
I appologize for digging up an old topic but I have found something out that may help people that have been having problems, especially with termaldetonators for some reason.
Anyway you can use any msh as an Icon it doesn't necessarily have to be the weapons msh. This can be helpful esppecially with thermals as they use an HUD file that is not the easiest thing to change.

Here is what you need to do.
1. Create the Icon msh
2. Place it in your sides folder.
3. In you weapon odf put the msh name in on the HUDtag = line
4. Add the msh name to the sides .req file as shown below. (fake_icon is just the name I chose to use)

Code:
REQN
{
"model"
"com_inv_mesh"
"fake_icon"
}


5. Add the lines in the extraweapons.hud file as you normally would using the name of the msh you created.
6. Munge the side and you see the Icon.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: HUD tags/icons [solved]

Post by Tears2Roses »

No, I did not try that. I will do it right now though! Thanks lucasfart!

EDIT: YES!!!!! I got the icon working!! thank you so much!!!
Hidden/Spoiler:
in a way I kind of feel really dumb for not thinking of loading the .msh in my sides req in the first place...oh well.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: HUD tags/icons [solved]

Post by lucasfart »

Heh, glad I could help. :) In future, it might help to just read through the topic if you're having trouble. What i posted was something of FragMe's, which he posted in the middle of his topic which had the fix in it...
Post Reply