Weapon Switching

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
Hill400
Private First Class
Posts: 81
Joined: Wed Jun 11, 2014 4:50 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: New England, USA

Weapon Switching

Post by Hill400 »

Hello, I've recently been having issues with weapon switching. I modified the sbdroid's tri-shot so it functions like a pistol, but my issue is that I've got it working, but once it switches to the trishot it won't switch back to the wrist blaster. Anyone have any thoughts?
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Weapon Switching

Post by thelegend »

1. Can we see your weapon's odf file please?
2. Does your weapon has an award weapon? What I mean if you kill a few enemies do you 'should' get an award's weapon or have you removed that?
Hill400
Private First Class
Posts: 81
Joined: Wed Jun 11, 2014 4:50 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: New England, USA

Re: Weapon Switching

Post by Hill400 »

Thanks for the help! No, there is no award weapon by the way. Here's the odf.
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
AnimationBank = "rifle"

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

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

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

MinRange = "0"
OptimalRange = "16"
MaxRange = "24"

LockOnRange = "40.0"
LockTime = "0.4"
LockOnAngle = "1.0"

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

YawSpread = "0.4"
PitchSpread = "0.4"

SpreadPerShot = "1.1"
SpreadRecoverRate = "4.8"
SpreadThreshold = "1.6"
SpreadLimit = "6.0"

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

HeatPerShot = "0.175"
HeatRecoverRate = "0.3"
HeatThreshold = "0.25"


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

RoundsPerClip = "0"
ReloadTime = "2.0"
ShotDelay = "0.2"
TriggerSingle = "1"
MaxPressedTime = "0.0"

DisplayRefire = "0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

FirePointName = "hp_fire"

OrdnanceName = "cis_weap_inf_pistol_ord"

//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************
MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashLightColor = "255 192 192 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"


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

FireSound = "cis_weap_inf_pistol_fire"
FireEmptySound = "com_weap_inf_ammo_empty"
FireLoopSound = ""
ReloadSound = ""
ChargeSound = ""
OverheatSound = "com_weap_energy_depleted"
OverheatSoundPitch = "0.5"
OverheatStopSound = "com_weap_energy_refilled"
ChangeModeSound = "com_weap_inf_equip_sm"
WeaponChangeSound = "com_weap_inf_equip_sm"
JumpSound = "com_weap_inf_pistol_mvt_jump"
LandSound = "com_weap_inf_pistol_mvt_land"
RollSound = "com_weap_inf_pistol_mvt_roll"
//ProneSound = "com_weap_inf_pistol_mvt_lie"
SquatSound = "com_weap_inf_pistol_mvt_squat"
//StandSound = "com_weap_inf_pistol_mvt_getup"
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Weapon Switching

Post by thelegend »

I think just test it with RoundsperClip to RoundsPerClip = "5". Just as a test. I am not 100% sure. If nothing happens can you post your characters odf. I would like to see which weapons you load/want for your unit.
Hill400
Private First Class
Posts: 81
Joined: Wed Jun 11, 2014 4:50 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: New England, USA

Re: Weapon Switching

Post by Hill400 »

I tried changing the Roundsperclip to "5" but it didn't affect the issue. The weapon still wouldn't chabge back. I'm posting the side now.
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "cis_inf_default"


[Properties]
UnitType = "trooper"

MaxSpeed = 6.0 // base forward speed
MaxStrafeSpeed = 4.5 // base right/left speed

WEAPONSECTION = 1
WeaponName = "cis_weap_inf_wrist_blaster"
WeaponAmmo = 5

WEAPONSECTION = 2
WeaponName = "cis_weap_inf_wrist_trishot"
WeaponAmmo = 0

WEAPONSECTION = 3
WeaponName = "cis_weap_inf_wrist_rocket"
WeaponAmmo = 4
WeaponChannel = 1

WEAPONSECTION = 4
WeaponName = "cis_weap_inf_detpack"
WeaponAmmo = 3
WeaponChannel = 1

VOUnitType = 082
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Weapon Switching

Post by MileHighGuy »

Just a guess, but try to change maxpressedtime and roundsperclip (whole number only) to a number greater than 0. Also clean and remunge.
Hill400
Private First Class
Posts: 81
Joined: Wed Jun 11, 2014 4:50 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: New England, USA

Re: Weapon Switching

Post by Hill400 »

It didn't work, I'm just going to abandon the idea I had entirely. Thanks for your help, but this has become too much of a hassle. I'll figure something else out. I'm sorry for wasting your time.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Weapon Switching

Post by thelegend »

No no. Why we should waste our time. I am always glad if I can help someone who has/had problems with something and I (or others) know the solution. I do not waste time. I spend time. And if anything may work where you had your problems it would make me happy and a little bit proud if I have helped you.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Weapon Switching

Post by razac920 »

This sounds exactly like an award weapon issue. I see that your unit does not have cis_weap_award_wrist_blaster as a weapon. I suspect that the reason you can't switch back is because cis_weap_inf_wrist_blaster is locked once you get an award. Since you didn't seem to have to get kills for this bug to happen, I'd guess you have the Frenzy award at Legendary. Did you try removing the wrist_trishot weapon? If it is an award weapon issue, the game should freeze and crash when you try to switch from the wrist_blaster. Alternatively, you could just check if you have this award at legendary. At any rate, to fix it, if it is what I think it is, you should (assuming you don't want this unit to have an award weapon to replace cis_weap_inf_wrist_blaster) just add these lines to cis_weap_inf_wrist_blaster.odf

Code: Select all

ScoreForMedalsType = -1
MedalsTypeToUnlock = -1
Post Reply