Multi-Grenade Launcher

Started by Ascertes, April 06, 2017, 03:16:32 PM

Previous topic - Next topic
Really quick thing here. I'm trying to get the standard Imperial mortal launcher used by the pilot to launch multiple mortars at once. However, I've had no luck. I've sifted through the ODF's for the blast cannons and the CIS's tri-shot, but after copying various bits and pieces of the code, have come up empty-handed.

Here's my ODF:
[WeaponClass]
ClassLabel = "grenade"

[Properties]
GeometryName = "com_weap_inf_torpedo"
HighResGeometry    = "com_1st_weap_inf_torpedo"

IconTexture = "HUD_all_lascannon_icon"

Discharge = "small_smoke_effect"
MuzzleFlash = "med_muzzle_flash"

FlashColor = "255 130 20 255"
FlashLength = "0.025"
FlashLightColor = "255 220 120 175"

RoundsPerClip = "8"
ReloadTime = "2.25"
HeatRecoverRate = "0.15"
HeatThreshold = "0.3"
HideOnFire              = "0"

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

AnimationBank = "rifle"

FireSound        = "imp_weap_inf_mortar_launcher_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"

ModeTexture = "HUD_weap_impact"
ReticuleTexture = "reticule_rocket"
OrdnanceName = "imp_weap_inf_mortar_launcher_ord1"

MaxPressedTime = "0.75"
TriggerSingle = "1"
ShotDelay = "1.5"
//HeatPerShot = "0.5"

ShotElevate = "0.1"
PitchSpread = "2.0"
YawSpread = "4.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"

ExtremeRange = "64.0"
LockOnRange = "0.0"
LockTime = "0.0"
AutoAimSize = "1.0"

MinRange = "10"
OptimalRange = "32"
MaxRange = "48"

ExtremeRange = "48"

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

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

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

ChargeRateLight         = "1.0"
MaxChargeStrengthLight  = "1.0"
ChargeDelayLight        = "0.1"
ChargeRateHeavy         = "1.0"
MaxChargeStrengthHeavy  = "0.5"
ChargeDelayHeavy        = "0.75"

RecoilLengthHeavy       = "1.0"
RecoilStrengthHeavy     = "1"
RecoilDecayHeavy        = ".75"

NextCharge = 0.9
OrdnanceName = "imp_weap_inf_mortar_launcher_ord"


I feel like the solution is really simple, and I'm going to look like an idiot when its revealed  :blink: Thanks in advance!
"Birth, pain, fear, death; the cycle of existence." -Dread Master Calphayus.

SWBF1 Maps: Tatooine: Mos Anek, Kashyyyk: Village, Naboo: Province, Tatooine: Gulch.

SWBF2 Maps: Space Carida.

Try adjusting these

SalvoCount      = "1"  (maybe make this three)
ShotsPerSalvo      = "4"
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

In case this is of any help here are the multimortar grenade launcher ODFs I created for NOTLD.

[spoiler]nld_weap_inf_mortar.odf
[WeaponClass]
ClassLabel      = "cannon"

[Properties]
GeometryName        = "multimortar"
HighResGeometry     = "multimortar"

IconTexture     = "HUD_all_lascannon_icon"

//Discharge       = "small_smoke_effect"
//MuzzleFlash     = "med_muzzle_flash"

FlashColor      = "255 198 62 255"
FlashLength         = "0.075"
FlashLightColor     = "255 198 62 175"

RoundsPerClip       = "4"
ReloadTime      = "4.0"
HeatRecoverRate     = "0.15"
HeatThreshold       = "0.3"
HideOnFire              = "0"

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

AnimationBank       = "rifle"
ForceFireAnimation  = "0"

ModeTexture     = "HUD_weap_impact"
ReticuleTexture     = "reticule_rocket" // reticule_mortar

ScopeTexture    = "weapon_scope2"
OrdnanceName        = "nld_weap_inf_mortar_ord"

TriggerSingle       = "1"
MaxPressedTime = "0.0"
ShotDelay       = "0.5"
//HeatPerShot       = "0.5"

ShotElevate     = "0.3"
PitchSpread     = "6.5"
YawSpread       = "6.5"

ExtremeRange        = "512.0"
LockOnRange     = "0.0"
LockTime        = "0.0"
AutoAimSize     = "1.0"

SalvoCount = "4"
//ShotsPerSalvo       = "1"
SalvoDelay = "0.5"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

MinRange        = "0"
OptimalRange        = "256"
MaxRange        = "384"

ExtremeRange        = "384"

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

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

RecoilLengthHeavy       = "1.5"
RecoilStrengthHeavy     = "1"
RecoilDecayHeavy        = ".75"

FireSound           = "imp_weap_inf_mortar_launcher_fire"
ReloadSound         = "all_weap_inf_reload_med"
ChangeModeSound     = "all_weap_inf_equip_med"
FireEmptySound      = "com_weap_inf_ammo_empty"
WeaponChangeSound   = "all_weap_inf_equip_med"
ClankLeftWalkSound  = ""
ClankRightWalkSound = ""
ClankLeftRunSound   = ""
ClankRightRunSound  = ""
JumpSound           = "all_weap_inf_torpedo_mvt_jump"
LandSound           = "all_weap_inf_torpedo_mvt_land"
RollSound           = "all_weap_inf_torpedo_mvt_roll"
ProneSound          = "all_weap_inf_torpedo_mvt_squat"
SquatSound          = "all_weap_inf_torpedo_mvt_lie"
StandSound          = "all_weap_inf_torpedo_mvt_getup"


nld_weap_inf_mortar_ord.odf
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
ImpactEffectWater = "watersplash_sm"

GeometryName = "grenade"
ExplosionExpire = "nld_weap_inf_mortar_exp"
ImpactEffect = "medium_explosion"
//ExplosionImpact = "medium_explosion" // "nld_weap_inf_mortar_exp"
//OrdnanceEffect = "com_sfx_weap_grenade_red"
//TrailEffect = "nadesmoke"
//TrailEffect = "com_sfx_weap_grenade_red"

LightColor              = "253 43 43 150"
LightRadius             = "3.0"

LifeSpan = "3.0"
Velocity = "30.0"
Gravity = "1.0"
Rebound = "0.3"
Friction = "1.0"

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

OrdnanceSound = ""
CollisionOtherSound = "com_weap_inf_grenade_bounce"


nld_weap_inf_mortar_exp
[ExplosionClass]
ClassLabel = "explosion"

[Properties]
WaterEffect = "watersplash_lg"

Damage   = "7500.0"
DamageRadiusInner = "3.0"
DamageRadiusOuter = "6.0"

Push   = "12.0"
PushRadiusInner   = "3.0"
PushRadiusOuter   = "6.0"

Shake   = "1.0"
ShakeLength   = "0.5"
ShakeRadiusInner  = "3.0"
ShakeRadiusOuter  = "6.0"

//Effect = "super_explosion"
Effect = "com_sfx_weap_flame_exp_lg"
//ExpireEffect = "com_sfx_weap_flame_exp_lg"

LightColor      = "250 136 16 100"
LightRadius = "7.0"
LightDuration = "1.0"

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

SoundProperty = "com_weap_thermaldetonator_exp"
[/spoiler]

The line SalvoCount determines the number of grenades. SalvoDelay is the time between each shot. PitchSpread and YawSpread can be lowered or increased as needed.

I've also attached the multimortar model assets by Wazmol in case you want to add these too

Aha! I found the issue.

The mortar launcher by default has a class label of grenade. I just had to change this to cannon, like in phobos' ODF.

Thanks for the help guys! :)
"Birth, pain, fear, death; the cycle of existence." -Dread Master Calphayus.

SWBF1 Maps: Tatooine: Mos Anek, Kashyyyk: Village, Naboo: Province, Tatooine: Gulch.

SWBF2 Maps: Space Carida.