Multi-shot grenade [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
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Multi-shot grenade [Solved]

Post by Dreadnot9 »

I'm using the following odfs in an attempt to get a weapon which "throws" 3 grenades simultaneously, it doesn't appear be working.
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "grenade"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
HighResGeometry = "com_weap_inf_thermaldetonator"
HUDTag = "cis_weap_inf_thermaldetonator"

OrdnanceName = "com_weap_inf_cherrybombs_ord"

OffhandWeapon = 1

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

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

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

MinRange = "8"
OptimalRange = "16"
MaxRange = "24"

LockOnRange = "30.0"

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

RoundsPerClip = "1"
ReloadTime = "0.0"
ShotDelay = "1.3"
ShotElevate = "0.18"
TriggerSingle = "1"
//MaxPressedTime = "0.0"

SalvoCount = "1"

ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.1 -0.8"
ShotPatternPitchYaw = "0.8 0.0"
ShotPatternPitchYaw = "-0.1 0.8"

SalvoDelay = "0.0"
InitialSalvoDelay = "0.51"
SalvoTime = "0.0"

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

ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.0"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.25"
ChargeDelayHeavy = "1.45"

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "0"
RecoilStrengthHeavy = "0"


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

FireSound = "com_weap_throw"
FireEmptySound = "com_weap_inf_ammo_empty"
Ordnance
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
ExplosionExpire = "com_weap_inf_cherrybombs_exp"

LightColor = "252 67 67 150"
LightRadius = "2.0"

ImpactEffectWater = "com_sfx_watersplash_sm"
ImpactEffect = "com_sfx_explosion_lg"
TrailEffect = "com_sfx_weap_grenade_red"

LifeSpan = "0.8"
Velocity = "25.0"
Gravity = "1.25"
Rebound = "0.2"
Friction = "2.0"

StickPerson = 1
StickAnimal = 1
StickDroid = 1
StickVehicle = 1
StickBuilding = 1
StickBuildingDead = 0
StickBuildingUnbuilt= 0
StickTerrain = 1

CollisionOtherSound = "com_weap_inf_grenade_bounce"
CollisionWaterSound = "imp_inf_trooper_land_water"
CollisionFoliageSound = ""
Explosion
Hidden/Spoiler:
[ExplosionClass]
ClassLabel = "explosion"

[Properties]
Damage = "100.0"
DamageRadiusInner = "4.0"
DamageRadiusOuter = "6.0"

Push = "5.0"
PushRadiusInner = "2.0"
PushRadiusOuter = "4.0"

PushDeadOnly = 0

Shake = "0.5"
ShakeLength = "0.75"
ShakeRadiusInner = "8.0"
ShakeRadiusOuter = "15.0"

Effect = "com_grenade_thermal_e_exp" //com_grenade_thermal, com_grenade_thermal_exp, com_grenade_thermal_v_exp
WaterEffect = "com_sfx_watersplash_lg"
Decal = "decal_explosion"
LightColor = "255 220 100 255"
LightRadius = "7.0"
LightDuration = "1.0"

VehicleScale = "1.0"
PersonScale = "1.0"
DroidScale = "1.0"
BuildingScale = "1.0"
AnimalScale = "1.0"

SoundProperty = "com_weap_thermaldetonator_exp"
//WaterExplosion = "com_weap_obj_med_water_exp"
My guess would be that the offset functions (for the each grenade) from the wrist tri-shot aren't compatible with a "grenade" class label, but I wasn't able to get it working using a "cannon" label either.
Any help is appreciated.
Last edited by Dreadnot9 on Wed Jul 17, 2013 7:30 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Multi-shot grenade

Post by Maveritchell »

When in doubt, use a "cannon" class weapon. That's the weapontype with the most feature support, and in this specific case, it's the weapontype that supports what you're looking for.
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Multi-shot grenade

Post by Dreadnot9 »

Thank you, I'll test it out, I had tried that, but I probably got something wrong...
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Multi-shot grenade

Post by Marth8880 »

Take the Tri-Shot ODF, change its ordnance to a grenade ODF, and give the weapon ODF a looooot of spread (so the shot pattern won't look the same each time upon firing.)
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Multi-shot grenade

Post by Dreadnot9 »

Well, this is what i've got, and it almost works, but it only seems to fire 1 grenade instead of 3.
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
HighResGeometry = "com_weap_inf_thermaldetonator"
HUDTag = "cis_weap_inf_thermaldetonator"

OrdnanceName = "com_weap_inf_cherrybombs_ord"

OffhandWeapon = 1

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

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

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

MinRange = "0"
OptimalRange = "0"
MaxRange = "0"

LockOnRange = "24.0"
LockTime = "0.4"
LockOnAngle = "1.0"

ZoomMin = "2.0"
ZoomMax = "2.0"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

SpreadRecover = "5.0"

KickStrength = "0.0"

SpreadPerShot = "5.0"
SpreadRecoverRate = "0.0"
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.0"
HeatRecoverRate = "0.4"
HeatThreshold = "0.25"

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

RoundsPerClip = "1"
ReloadTime = "0.0"
ShotDelay = "1.3"
TriggerSingle = "1"
ShotElevate = "0.18"
MaxPressedTime = "0.0"

SalvoDelay = "0.0"
InitialSalvoDelay = "0.51"
SalvoTime = "0.0"

SalvoCount = "1"

ShotsPerSalvo = "3"
ShotPatternCount = "3"
ShotPatternPitchYaw = "-0.2 -0.9"
ShotPatternPitchYaw = "0.9 0.0"
ShotPatternPitchYaw = "-0.2 0.9"

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

ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.0"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.25"
ChargeDelayHeavy = "1.45"

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "0"
RecoilStrengthHeavy = "0"


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

FireSound = "com_weap_throw"
FireEmptySound = "com_weap_inf_ammo_empty"
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
GeometryName = "com_weap_inf_thermaldetonator"
ExplosionExpire = "com_weap_inf_cherrybombs_exp"

LightColor = "252 67 67 150"
LightRadius = "2.0"

ImpactEffectWater = "com_sfx_watersplash_sm"
ImpactEffect = "com_sfx_explosion_lg"
TrailEffect = "com_sfx_weap_grenade_red"

LifeSpan = "0.8"
Velocity = "25.0"
Gravity = "1.25"
Rebound = "0.2"
Friction = "2.0"

StickPerson = 1
StickAnimal = 1
StickDroid = 1
StickVehicle = 1
StickBuilding = 1
StickBuildingDead = 0
StickBuildingUnbuilt= 0
StickTerrain = 1

CollisionOtherSound = "com_weap_inf_grenade_bounce"
CollisionWaterSound = "imp_inf_trooper_land_water"
CollisionFoliageSound = ""
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Multi-shot grenade

Post by Marth8880 »

Make sure that whichever unit it using the weapon has enough ammo allocated for that many shots in the unit's ODF.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Multi-shot grenade

Post by THEWULFMAN »

Code: Select all

RoundsPerClip = "1"
There's your problem. Increase it to 3.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Multi-shot grenade

Post by Marth8880 »

Yes, that^, and also allocate the weapon's WeaponAmmo parameter in your unit's ODF to a multiple of 3.
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: Multi-shot grenade

Post by CressAlbane »

Actually doesn't that parameter just give the number of clips?
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Multi-shot grenade

Post by THEWULFMAN »

CressAlbane wrote:Actually doesn't that parameter just give the number of clips?
Which one? WeaponAmmo or RoundsPerClip? The former does go with number of clips, Marth is not being very five right now. Latter is how much ammo per clip. Right now there's only one grenade for it to fire.

But yeah, RoundsPerClip, set that to 3. Should solve your problem.
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Multi-shot grenade

Post by Dreadnot9 »

It indeed did and the grenade(s) is working! thanks for the help.
Post Reply