SWBFGamers

Modding for the Original SWBF1 and SWBF2 => Requests => Topic started by: Are§ on January 31, 2013, 03:12:00 PM

Title: Help: Weapon odfs
Post by: Are§ on January 31, 2013, 03:12:00 PM
Hey, today I am trying to make a rifle that shoots its one shot only when you charge it up, not before though. So far i have been able to apply the charge to it, but I'm not sure how to make it so that it won't let you shoot until it is fully charged. Can anyone help me with this?
Title: Re: Help: Weapon odfs
Post by: Dark_Phantom on January 31, 2013, 03:41:33 PM
I think if you look at the Wookiee bowcaster it mentions how many shots to fire when it's at a certain charge level (like 0.50, 0.75, if I remember right).  Maybe if you copy those and change the shots to 0 then it won't fire.
Also, maybe just putting one at 0.00 and then making the shot count 0 will do it.
Sorry I don't have the exact code with me now...
Title: Re: Help: Weapon odfs
Post by: Are§ on January 31, 2013, 04:06:23 PM
ok thanks, that's what i was gonna try next
Title: Re: Help: Weapon odfs
Post by: Phobos on January 31, 2013, 04:42:33 PM
set the next charge for how many milliseconds you want the charge delay to be. id look at the mortar odfs to get a good idea of how its structured.
Title: Re: Help: Weapon odfs
Post by: Are§ on January 31, 2013, 06:37:20 PM
So this is what i have in the odf now and it still is not working (i have tried various combinations)

[WeaponClass]
ClassLabel = "cannon"

[Properties]
AnimationBank = "rifle"
GeometryName = "wunderwaffe"
HighResGeometry         = "wunderwaffe"

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

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

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

MinRange = "0"
OptimalRange = "16"
MaxRange = "48"

LockOnRange             = "64.0"
LockTime = "0.4"
lockOnAngle = "1.0"

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

YawSpread = "0.0"
PitchSpread = "0.0"

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"

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

//RoundsPerClip = "10"
ReloadTime = "1.5"
ShotDelay = "1.0"
TriggerSingle = "0"
MaxPressedTime = "2.25"

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

OrdnanceName = "imp_weap_inf_rifl4_ord"
FirePointName = "hp_fire"

//***********************************************
//***********  HUD & CONTROLLER VALUES  *********
//***********************************************

IconTexture = "IMP_blasterrifle_icon"
ReticuleTexture = "reticule_rifle"
ModeTexture = "HUD_weap_charge"

ChargeUpEffect = "chargeup"
MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 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"

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

FireSound        = "imp_weap_inf_rifle_fire"
ReloadSound      = "imp_weap_inf_reload_med"
ChangeModeSound = "imp_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "imp_weap_inf_equip_med"
ClankLeftWalkSound  = ""
ClankRightWalkSound = ""
ClankLeftRunSound   = ""
ClankRightRunSound  = ""
JumpSound           = "imp_weap_inf_rifle_mvt_jump"
LandSound           = "imp_weap_inf_rifle_mvt_land"
RollSound           = "imp_weap_inf_rifle_mvt_roll"
ProneSound          = "imp_weap_inf_rifle_mvt_squat"
SquatSound          = "imp_weap_inf_rifle_mvt_lie"
StandSound          = "imp_weap_inf_rifle_mvt_getup"

ChargeRateLight          = "1.0"
MaxChargeStrengthLight  = "1.0"
ChargeDelayLight        = "0.0"
ChargeRateHeavy          = "1.0"
MaxChargeStrengthHeavy  = "0.5"
ChargeDelayHeavy        = "2.2"

NextCharge = "0.00"

OrdnanceName = "imp_weap_inf_rifl4_ord"

NextCharge = "2.20"

ShotsPerSalvo = 1

OrdnanceName = "imp_weap_inf_rifl4_ord"


any clue on what i could be doing wrong? Right now the charge works and everything, but i dont think it is recognizing the second salvo, because it won't shoot anything while it's fully charge. My guess is that it is still referring to the first salvo, which doesn't have a shot. Note: when i put the stuff at the bottom in the weapon performance area, the reticule wouldnt show up for some reason and it still didnt fire anything.
Title: Re: Help: Weapon odfs
Post by: Dark_Phantom on February 01, 2013, 07:26:00 AM
"NextCharge = 2.20"
Maybe refresh my memory, but shouldn't it only go to 1.0?  I forgot to check my bowcaster again...
Title: Re: Help: Weapon odfs
Post by: Are§ on February 01, 2013, 07:46:04 AM
I set max charge time to 2.25 though

But anyways this issue is resolved as i came across another method of making the desired weapons, but thanks for the help  8)
Title: Re: Help: Weapon odfs
Post by: Sereja on February 01, 2013, 07:57:36 PM
Quote from: Are§ on February 01, 2013, 07:46:04 AM
I set max charge time to 2.25 though
I think, a charge rate number, it's not a time, it's a percent. So, 2.25, means 225%  :D.
To solve tnis, all you have to do, it's change rate to correct number, and put the number of shots.

For example:

ShotsPerSalvo         = "0"

And for charge rate:

NextCharge         = 0.99
HeatPerShot         = "1.0"
ShotsPerSalvo         = "1"
EhPortal 1.34 © 2024, WebDev