Game freezes from a weapon [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
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Game freezes from a weapon [Solved]

Post by 501st_commander »

Ok, i have this one unit and when i change the main weapon the game freezes. Is there a way to fix this? I'm not sure what files to post so here are every file i have for that unit and the weapon odf's i made,

odf's,

rep_inf_default_recon:
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "rep_inf_default"

[Properties]
UnitType = "scout"

PointsToUnlock = 16

ScanningRange = 30.0
TransmitRange = 300.0

MaxSpeed = 8.0
MaxStrafeSpeed = 6.0

WEAPONSECTION = 1
WeaponName = "rep_weap_inf_reconrifle"
WeaponAmmo = 10

WEAPONSECTION = 2
WeaponName = "ak47"
WeaponAmmo = 0

WEAPONSECTION = 3
WeaponName = "rep_weap_inf_haywiredetonator"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 4
WeaponName = "rep_weap_inf_thermaldetonator"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 5
WeaponName = "rep_weap_inf_mine_dispenser"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_Pulse_Grenade"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_award_rifle"
WeaponAmmo = 10


VOUnitType = 121
rep_inf_recon:
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "rep_inf_default_recon"

[Properties]
GeometryName = "rep_inf_atrt_driver"
GeometryLowRes = "rep_inf_feluciatrooper_low1"
FirstPerson = "REP\repatrtdrv;rep_1st_ATRT"
rep_weap_inf_reconrifle:
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "rep_weap_inf_rifle.msh"

[Properties]
GeometryName = "rep_weap_inf_rifle"
HighResGeometry = "rep_1st_weap_inf_rifle"
OrdnanceName = "rep_weap_inf_reconrifle_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"
rep_weap_inf_reconrifle_ord
Hidden/Spoiler:
[OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

MaxDamage = "300.0"

LaserTexture = "com_sfx_laser_yellow"
LaserGlowColor = "42 249 42 100"
LightColor = "92 136 250 100"
LaserLength = "8"
LaserWidth = "0.50"
LightRadius = "2"
ak47:
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "ak47.msh"

[Properties]
GeometryName = "ak47"
HighResGeometry = "ak47"
OrdnanceName = "ak47_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_chaingun_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"
ak47_ord:
Hidden/Spoiler:
[OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

LaserTexture = "com_sfx_laser_yellow"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"

and the rep_inf_recon.REQ
Hidden/Spoiler:
ucft
{
REQN
{
"class"
"rep_inf_recon"
}
REQN
{
"texture"
"imp_inf_snowtrooper_pack"
}
}
Is there anything wrong?
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Game freezes from a weapon

Post by sampip »

Code: Select all

WEAPONSECTION = 6
WeaponName = "rep_weap_Pulse_Grenade"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_award_rifle"
WeaponAmmo = 10
you have to weapon section 6's here. that could be an error....
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Game freezes from a weapon

Post by 501st_commander »

no more freezes from a weapon but i cant use the ak47.... when i switch weapons it goes to the award and i try to switch again it dosen't...
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Game freezes from a weapon

Post by YaNkFaN »

both the ak-47 and recon rifle use com_weap_inf_rifle as a class parent iff you have the award rifle unlocked, it will pick one in this case the recon rifle to overwtrite with the award rifle. I don't have the code on me (in school) but i will post it when I get home to remove the switching ability (from normal to award) for weapons. If anyone wants to save me the time just post it it's somethign like scoreformedaltype = -1 or something liek that
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Game freezes from a weapon

Post by 501st_commander »

ok, i'll wait untill you get out of.... school?
thanks for your help btw
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Game freezes from a weapon

Post by MercuryNoodles »

That -1 thing is something I made up one day. It just disables the parameter by using an invalid value. As far as I know it can be any number not associated with an award.

There are three parameters; one to tell the game which award it's to associate with the weapon, one to lock out a weapon, and one to unlock a weapon. (Off the top of my head they are ScoresForMedalsType, MedalsTypeToLock, and MedalsTypeToUnlock.) Really, I'd recommend making a weapon odf that has no parent and just exclude those odf parameters, unless you're doing a lot of weapon modding for say a large sides mod. It involves more copy/paste work, but it'll cut the lock/unlock problem out without disabling the award weapon elsewhere, should it be needed.
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Game freezes from a weapon

Post by YaNkFaN »

yea these are the lines and it's easier just to add this instead imo

ScoreForMedalsType = -1
MedalsTypeToLock = -1
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Game freezes from a weapon

Post by 501st_commander »

so where do i put that?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Game freezes from a weapon

Post by AQT »

Under [Properties] of your weapons' .odf.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Game freezes from a weapon

Post by 501st_commander »

[weapon]_ord?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Game freezes from a weapon

Post by AQT »

Nope, just [weapon].
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Game freezes from a weapon

Post by YaNkFaN »

nope just weapon right under this line here's mine for example

it's called rep_weap_inf_gauss.odf

[WeaponClass]
ClassLabel = "cannon"
GeometryName = "sfor_republic_carbine"

[Properties]

AnimationBank = "rifle"

ScoreForMedalsType = -1
MedalsTypeToLock = -1

GeometryName = "sfor_republic_carbine"
HighResGeometry = "sfor_republic_carbine"
OrdnanceName = "rep_weap_inf_gauss_ord"
FirePointName = "hp_fire"
HUDTag = "sfor_republic_carbine"
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Game freezes from a weapon

Post by 501st_commander »

ok, i'll try that and report back, thanks.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Game freezes from a weapon

Post by AQT »

It doesn't have to be right exactly there. As long as it is under [Properties] it will work.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Game freezes from a weapon

Post by 501st_commander »

thanks YaNk and AQT, you've saved me. It works! :thumbs:

mods this can be locked, if you like to.
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Game freezes from a weapon

Post by YaNkFaN »

:wink: glad i could help
Post Reply