Page 1 of 1

Floating Icon Won't Budge

Posted: Mon May 23, 2016 7:06 pm
by MidnightSpirit
I have added a new weapon to my republic side, the first new weapon so far.
In-game the weapon has an icon floating basically in the middle of the screen. There is indeed a tutorial to fix this here

I have tried a few times to move this weapon icon and it has remained unaffected by anything I do. This makes me think that whatever work I am doing is not being put into effect.
I am going to explain everything I have done so far in regard to putting this weapon into the game.

The weapon is Deviss' DC15a Blaster Rifle
1.) Moved rep_weap_DC15a_Rifle.msh and rep_weap_DC15a_rifle.msh.option to C:\BF2_ModTools\data_MY1\Sides\rep\msh
2.) Moved barrel.tga barrel.tga.option case.tga case.tga.option shaft.tga shaft.tga.option to C:\BF2_ModTools\data_MY1\Sides\rep\msh
3.) Opened rep_weap_inf_blaster rifle and changed the msh it loaded to rep_weap_DC15a_Rifle
Full rep_weap_inf_rifle.odf
Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "rep_weap_DC-15a_Rifle.msh"

[Properties]
GeometryName = "rep_weap_DC-15a_Rifle"
HighResGeometry = "rep_1st_weap_inf_rifle"
OrdnanceName = "rep_weap_inf_rifle_ord"
FirePointName = "hp_fire"
HUDTag = "rep_weap_DC-15a_Rifle"

//******************************************************
//*************** SOUND ****************
//******************************************************

MuzzleFlash = "small_muzzle_flash"
FlashColor = "80 80 255 255"
FlashLength = 0.025
FlashColor = "100 100 255 255"
FlashLength = 0.025
FlashLightColor = "220 220 255 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"


FireSound = "rep_weap_inf_rifle_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
[/code]
4.) Copied C:\BF2_ModTools\data_MY1\Sides\rep and pasted it to C:\BF2_ModTools\data_MY1\_BUILD\Sides replacing the files in the rep file there.
5.) Munged and loaded the game up. The weapon along with the tgas appeared fine but with the icon in the middle of the screen as well.
6.) Began tutorial to fix floating weapon icon. (All of the files in STEP 2 of the tutorial are in the right place. 100% sure of that.)
7.) Completed the tutorial. Copied the side folder as was done previous (and is always done when I change something on a side). Launched BF2 to see the icon was in the same place.

I tried repeating the process and nothing worked.

Full repshell.req
Hidden/Spoiler:
[code]ucft
{
REQN
{
"model"

"rep_inf_ep3trooper"
"rep_weap_inf_rifle"

"rep_inf_ep3spacepilot"
"rep_weap_inf_pistol"

"rep_inf_ep3heavytrooper"
"rep_weap_inf_launcher"

"rep_inf_ep3sniper"
"rep_weap_inf_sniperrifle"

"rep_inf_ep3armoredpilot"

"rep_inf_clonecommander"
"rep_weap_inf_chaingun"

"rep_inf_ep3jettrooper"
}
REQN
{
"model"
"com_inv_mesh"
}

REQN
{
"config"
"extraweapons"
}
}[/code]
Full extraweapons.hud
Hidden/Spoiler:
[code]Code:

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

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("rep_weap_DC-15a_Rifle", "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("rep_weap_DC-15a_Rifle")
{
Position(-0.200247, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}
}
}
}

// Second Weapons Section

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

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


}
}
}

[/code]
The extraweapons.hud was edited to delete everything that has (gar) in it. I did not know what was safe to delete or not so that file is an entire mess of confusion. I only added two things to this file.
This and this
Hidden/Spoiler:
[code] NameMesh("rep_weap_DC-15a_Rifle", "com_inv_mesh")[/code]
[code] MeshInfo("rep_weap_DC-15a_Rifle")
{
Position(-0.200247, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}[/code]
The weapon's position, rotation, and scale are copied from C:\BF2_ModTools\data_MY1\Common\hud 1playerhud.hud speficially from the weapon rep_weap_inf_rifle
rep_weap_inf_rifle position values
Hidden/Spoiler:
[code] MeshInfo("rep_weap_inf_rifle")
{
Position(-0.200247, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}[/code]
I would include the com_inv_mesh.msh as well but when I opened it the file was blank. Idk if that is how it is supposed to be or if something went wrong.

After doing all of the things shown above I munge EVERYTHING in visual munge and launch the game only to find the icon remains unchanged. Any idea what I am doing wrong?