Fixed, and floating icon problem. [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
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Fixed, and floating icon problem. [Solved]

Post by Jendo7 »

I have used FragMe!'s icon fix, and have done a thorough search, and found this: Double Icon Problem (Floating and Fixed Simultaneously), which is the same problem as mine. The fix for that problem doesn't work for me though, as I have only one side that uses the extraweapons.hud. I do have have other sides that use custom weapons but those icons are not floating, so I didn't need to use the icon fix.

Scripts:

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("mnd_weap_inf_boba_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("mnd_weap_inf_boba_rifle")
{
Position(-0.222832, 0.361293, 0.014590, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
}
}
}
}




[/code]
imp.req:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"lvl"
"imp_hero_bobafett"
}

REQN
{
"model"
"com_inv_mesh"
}

REQN
{
"config"
"extraweapons"
}
}
[/code]
imp_weap_hero_bobarifle.odf:
Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_award_rifle"
GeometryName = "mnd_weap_inf_boba_rifle.msh"

[Properties]
ScoreForMedalsType = -1
MedalsTypeToUnlock = -1

GeometryName = "mnd_weap_inf_boba_rifle"
HighResGeometry = "mnd_weap_inf_boba_rifle"
HUDTag = "mnd_weap_inf_boba_rifle"
OrdnanceName = "imp_weap_hero_bobarifle_ord"
FirePointName = "hp_fire"

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

FireSound = "imp_weap_inf_rifle_fire"
FireEmptySound = "com_weap_inf_ammo_empty"
FireLoopSound = ""
ReloadSound = "com_weap_inf_reload_med"
ChargeSound = ""
ChargeSoundPitch = ""
ChangeModeSound = "com_weap_inf_equip_med"
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]
I also had to reduce the scale, and added an option file:

mnd_weap_inf_boba_rifle.msh.option:

-scale 1.2

A section of my LUA file:
Hidden/Spoiler:
[code]
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()

--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")



SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight(80)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\tan.lvl;tan1gcw")
ReadDataFile("dc:sound\\bne.lvl;bnegcw")
ReadDataFile("dc:sound\\bes.lvl;bnegcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\bgl.lvl;bglgcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_urban",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_pilot",
"all_inf_officer",
"all_inf_wookiee",
"all_fly_awing")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_pilot",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_walk_atst",
"imp_fly_destroyer_dome")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_hero_bobafett")

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dtspace.lvl",
"all_fly_dt_ywing",
"imp_fly_dt_slave1")

ReadDataFile("dc:SIDE\\trt.lvl",
"imp_fly_trooptrans",
"bes_fly_cloudcar",
"all_hero_bespin_luke",
"all_inf_rocketeer_urban",
"all_inf_sniper_urban",
"all_inf_engineer_pilot",
"imp_inf_engineer_pilot",
"imp_inf_officer_gray",
"all_fly_xwing",
"imp_fly_tiefighter")

[/code]


Screen:
Hidden/Spoiler:
Image

I really don't know what the problem could be having followed the tutorial precisely.

If anyone has any idea at all, it would be much appreciated.
Last edited by Jendo7 on Fri Nov 26, 2010 6:52 pm, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Fixed, and floating icon problem.

Post by AQT »

Do you happen to have another extraweapons.hud and/or com_inv_mesh.msh loaded in trt.lvl? Usually that would be the cause of the problem. If so, I suggest combining your custom imp side with your trt side.
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Fixed, and floating icon problem.

Post by Jendo7 »

There all stock weapons for the trt side, so I've only got the extraweapons.hud, and com_inv_mesh.msh loaded in the imp side just for that rifle. I'm really baffled as to what it could be.

Edit: I have got other custom weapons but there in the rep side, and don't have any floating icons. They are the same weapons from the patch 1.3 r117 Jango's pistol, and the commando's underarm chaingun.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Fixed, and floating icon problem.

Post by AQT »

Yeah, I don't know what else could be going on either. Alternatively though, you can try renaming your rifle model to whatever the EE-3 carbine used in the 1.2 patch was called (EE_3.msh or something similar, I think) and get rid of the extraweapons.hud and con_inv_mesh.msh all together.
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Fixed, and floating icon problem. [Solved]

Post by Jendo7 »

Thanks AQT, I'll try that.

Edit: Great, it worked. :thumbs:

I'll just have to make sure if I use the patch weapons/.msh names in another map, and release it, the 1.3 patch will have to be made a requirement.
Post Reply