Charge Weapon is not Charging Right

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
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Charge Weapon is not Charging Right

Post by RED51 »

Hey guys! One of my PF weapons are not working right. I've made a chargeable weapon, but when I fire it, it freezes the game. I've check the error logs, but I found nothing, so I believe the problem is in my odfs. Here's my odf for the com_weap base:
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]

AnimationBank = "rifle"

ChargeUpEffect = "com_sfx_chargeup"
ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.1"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.5"
ChargeDelayHeavy = "0.75"
//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

MinRange = "0"
OptimalRange = "24"
MaxRange = "64"

LockOnRange = "40.0"
LockTime = "0.4"
lockOnAngle = "1.0"

ZoomMin = "2.5"
ZoomMax = "2.5"
ZoomRate = "0.0"

YawSpread = "0.225"
PitchSpread = "0.225"

SpreadPerShot = "0.75"
SpreadRecoverRate = "2.0"
SpreadThreshold = "3.0"
SpreadLimit = "1.25"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "100"
ReloadTime = "0"
ShotDelay = "0.1"
TriggerSingle = "1"

DisplayRefire = "0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"
//***********************************************
//*************** CHARGE VALUES *****************
//***********************************************
MaxPressedTime = "1.25"

NextCharge = 0.50
SalvoCount = "1"
ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.1 -0.8"
ShotPatternPitchYaw = "0.8 0.0"
ShotPatternPitchYaw = "-0.1 0.8"
SalvoDelay = "0.0"
OrdnanceName = "com_weap_inf_emprifle_emptri_ord"

NextCharge = 0.75
SalvoCount = "1"
ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.1 -0.8"
ShotPatternPitchYaw = "0.8 0.0"
ShotPatternPitchYaw = "-0.1 0.8"
SalvoDelay = "0.0"
OrdnanceName = "com_weap_inf_emprifle_bolt_ord"
//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

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

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "1.0"
RecoilStrengthHeavy = "0.2"
RecoilDecayLight = "0.0"
RecoilDecayHeavy = "0.0"
And here's the Side_weap odf:
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_emprifle"
GeometryName = "imp_weap_inf_rifle.msh"

[Properties]
GeometryName = "imp_weap_inf_rifle"
HighResGeometry = "imp_weap_inf_rifle"
OrdnanceName = "fed_weap_inf_emprifle_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"
SquatSound = "com_weap_inf_rifle_mvt_squat"
Any ideas?
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: Charge Weapon is not Charging Right

Post by RED51 »

Sorry for the bump, but I did some checking and redoing, I and have managed to fix the freezing bug, but now the weapon uses the first ord even after being fully charged. I did some changes to the odf, but it's mostly the same:
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]

AnimationBank = "rifle"

ChargeUpEffect = "com_sfx_chargeup"
ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.1"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.5"
ChargeDelayHeavy = "0.75"
//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

MinRange = "0"
OptimalRange = "24"
MaxRange = "64"

LockOnRange = "40.0"
LockTime = "0.4"
lockOnAngle = "1.0"

ZoomMin = "2.5"
ZoomMax = "2.5"
ZoomRate = "0.0"

YawSpread = "0.225"
PitchSpread = "0.225"

SpreadPerShot = "0.75"
SpreadRecoverRate = "2.0"
SpreadThreshold = "3.0"
SpreadLimit = "1.25"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "100"
ReloadTime = "0"
ShotDelay = "0.1"
TriggerSingle = "1"

DisplayRefire = "0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"
//***********************************************
//*************** CHARGE VALUES *****************
//***********************************************
MaxPressedTime = "1.00"

OrdnanceName = "fed_weap_inf_emprifle_ord"

NextCharge = 0.75
FireSound = "cis_weap_inf_droideka_fire"
SalvoCount = "1"
ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.1 -0.8"
ShotPatternPitchYaw = "0.8 0.0"
ShotPatternPitchYaw = "-0.1 0.8"
SalvoDelay = "0.0"
OrdnanceName = "com_weap_inf_emprifle_bolt_ord"
//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

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

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "1.0"
RecoilStrengthHeavy = "0.2"
RecoilDecayLight = "0.0"
RecoilDecayHeavy = "0.0"
Any ideas?
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Charge Weapon is not Charging Right

Post by skelltor »

idk if this will work but try increaseing the max pressed time
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: Charge Weapon is not Charging Right

Post by RED51 »

I just tried it, but avast, the bug still lives on...
User avatar
DarthHamster
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 300
Joined: Wed Nov 18, 2009 9:09 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Orlando, Florida
Contact:

Re: Charge Weapon is not Charging Right

Post by DarthHamster »

Skimming throught all this all I noticed was that you had no quotes around your flash length numbers.
MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashColor = "255 100 100 255"
FlashLength = 0.025
FlashLightColor = "255 220 220 175"
FlashLightRadius = "2.0"
Sorry if I'm wasting your time because there is something in the rules that says there should't be quotes there. I'm not the most experienced modder. :)
Post Reply