Can't fix the floating weapon bug [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
Raigiku
Private Third Class
Posts: 58
Joined: Mon Jun 05, 2017 5:14 pm
Projects :: Battlefront Redux
Games I'm Playing :: League of Legends
xbox live or psn: TheRaigiku
Location: Perú

Can't fix the floating weapon bug [Solved]

Post by Raigiku »

I think this is the 20th time I try to use the fix found here http://www.gametoast.com/viewtopic.php?f=64&t=9703 but I still can't manage to fix the bug. I'm 100% that I've followed every step correctly. Please help me I will attach a video of me doing the whole process to see if you guys can catch the reason why it's not working.


Rifle ODF
Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "com_weap_WESTAR-M5_C.msh"

[Properties]
HUDTag = "com_weap_WESTAR-M5_C"
GeometryName = "com_weap_WESTAR-M5_C"
HighResGeometry = "com_weap_WESTAR-M5_C"
OrdnanceName = "rep_weap_inf_rifle_ord"
FirePointName = "hp_fire"


//******************************************************
//*************** 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]
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("com_weap_WESTAR-M5_C", "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("com_weap_WESTAR-M5_C")
{
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
{


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

}
}
}





[/code]
rep.req
Hidden/Spoiler:
[code]ucft
{
REQN
{
"lvl"
"rep_bldg_forwardcenter"
"rep_fly_anakinstarfighter_sc"
"rep_fly_arc170fighter_dome"
"rep_fly_arc170fighter_sc"
"rep_fly_assault_dome"
"rep_fly_cat_dome"
"rep_fly_gunship"
"kam_fly_ride_gunship"
"rep_fly_gunship_sc"
"rep_fly_gunship_dome"
"rep_fly_jedifighter_dome"
"rep_fly_jedifighter_sc"
"rep_fly_ride_gunship"
"rep_fly_vwing"
"rep_hero_aalya"
"rep_hero_anakin"
"rep_hero_cloakedanakin"
"rep_hero_kiyadimundi"
"rep_hero_macewindu"
"rep_hero_macewindu_obi"
"rep_hero_obiwan"
"rep_hero_yoda"
"rep_hover_fightertank"
"rep_hover_barcspeeder"
"rep_inf_ep2_engineer"
"rep_inf_ep2_jettrooper"
"rep_inf_ep2_jettrooper_training"
"rep_inf_ep2_jettrooper_rifleman"
"rep_inf_ep2_jettrooper_sniper"
"rep_inf_ep2_officer"
"rep_inf_ep2_officer_training"
"rep_inf_ep2_pilot"
"rep_inf_ep2_rifleman"
"rep_inf_ep2_rocketeer"
"rep_inf_ep2_rocketeer_chaingun"
"rep_inf_ep2_sniper"
"rep_inf_ep2_marine"
"rep_inf_ep3_engineer"
"rep_inf_ep3_jettrooper"
"rep_inf_ep3_officer"
"rep_inf_ep3_pilot"
"rep_inf_ep3_rifleman"
"rep_inf_ep3_marine"
"rep_inf_ep3_rocketeer"
"rep_inf_ep3_sniper"
"rep_inf_ep3_sniper_felucia"
"rep_walk_atte"
"rep_walk_atte_nospawn"
"rep_walk_oneman_atst"
"rep_veh_remote_terminal"
"uta1_prop_gunship"
"uta_fly_ride_gunship"
"uta_fly_ride_gunshipmyg"

}

REQN
{
"model"
"com_inv_mesh"
}

REQN
{
"config"
"extraweapons"
}
}
[/code]
Last edited by Raigiku on Fri Aug 04, 2017 2:19 pm, edited 2 times in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Can't fix the floating weapon bug

Post by AQT »

Did you try the following?
Also, try using a name for your weapon MSH file that doesn't have a hyphen in it. So instead of com_weap_WESTAR-M5_C.msh, rename everything to com_weap_WESTAR_M5_C.msh.
Raigiku
Private Third Class
Posts: 58
Joined: Mon Jun 05, 2017 5:14 pm
Projects :: Battlefront Redux
Games I'm Playing :: League of Legends
xbox live or psn: TheRaigiku
Location: Perú

Re: Can't fix the floating weapon bug

Post by Raigiku »

AQT wrote:Did you try the following?
Also, try using a name for your weapon MSH file that doesn't have a hyphen in it. So instead of com_weap_WESTAR-M5_C.msh, rename everything to com_weap_WESTAR_M5_C.msh.
I created a new map and everything, added a new weapon without a hyphen and IT FINALLY WORKED :D I don't know if it was the hyphen or something else I didn't do. Anyways, thank you!
Post Reply