Grenade Problem

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
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Grenade Problem

Post by t551 »

Here's a new problem for you. In my custom side, I gave a trooper a custom plasma grenade, with custom trail and explosion effects. The level munges and loads fine, no complaints. I can switch to the grenade (it's a primary weapon), but as soon as I throw it, the game crashes. BFront.log says nothing.

I do know that the problem is not the model, because before I added HUDtag = "hud" in the .odf, I could see the model in the screen. I am also fairly certain that the problem lies in the ordnance .odf, because the game crashes when it would be called. I tried commenting out the line for the trail effect, and it still crashed.

Here are the .odf's of the weapon, ordnance, and explosion:

cov_weap_inf_plasma_grenade.odf:

Code: Select all

[WeaponClass]
ClassLabel          = "grenade"
GeometryName            = "cov_weap_inf_plasma_grenade.msh"

[Properties]
HUDTag = "hud"

GeometryName        = "cov_weap_inf_plasma_grenade"
HighResGeometry     = "cov_weap_inf_plasma_grenade"

OffhandWeapon       = 1

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

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

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

MinRange            = "12"
OptimalRange        = "18"
MaxRange            = "24"

LockOnRange         = "30.0"

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

RoundsPerClip       = "1"
ReloadTime          = "0.0"
ShotDelay           = "1.3"
ShotElevate         = "0.21"
MaxPressedTime      = "0.0"

InitialSalvoDelay   = "0.51"

//***********************************************
//***********  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"
FireLoopSound       = ""
ReloadSound         = "com_weap_inf_equip_sm"
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"
cov_weap_inf_plasma_grenade_ord.odf:

Code: Select all

[OrdnanceClass]
ClassLabel          = "sticky"
GeometryName        	= "cov_weap_inf_plasma_grenade.msh"

[Properties]
GeometryName        = "cov_weap_inf_plasma_grenade"

ExplosionExpire		= "cov_weap_inf_plasma_grenade_exp"

LightColor          = "252 67 67 150"
LightRadius         = "4.0"

ImpactEffectWater   = "com_sfx_watersplash_sm"
ImpactEffect        = "com_sfx_explosion_lg"
TrailEffect         = "cov_weap_inf_plasma_grenade_trail"

LifeSpan            = "0.6"
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        = 0

CollisionOtherSound     = "com_weap_inf_grenade_bounce"
CollisionWaterSound     = "imp_inf_trooper_land_water"
CollisionFoliageSound   = ""
and cov_weap_inf_plasma_grenade_exp.odf:

Code: Select all

[ExplosionClass]
ClassLabel          = "explosion"

[Properties]
Damage              = "450.0"
DamageRadiusInner   = "4.5"
DamageRadiusOuter   = "6.5"

Push                = "10.0"
PushRadiusInner     = "6.5"
PushRadiusOuter     = "6.5"

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

Effect              = "cov_sfx_plasma_grenade_explosion"
WaterEffect         = "com_sfx_watersplash_lg"
Decal               = "decal_explosion"
LightColor          = "20 20 255 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"
I can't see any errors, spelling or otherwise. Perhaps you can?
fat_walrus

Post by fat_walrus »

Are these in the Common sides folder?
-_-
Gametoast Staff
Gametoast Staff
Posts: 2678
Joined: Sat May 07, 2005 1:22 pm

Post by -_- »

make sure you have all the right spelling.
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by t551 »

The custom effects are in my side's effects folder, but the unchanged effects are all in the common folder.
Big_rich

Post by Big_rich »

reason why it is crashing is because it has no ordanance refrence in the main

cov_weap_inf_plasma_grenade.odf

add this line to the odf:

OrdnanceName = "cov_weap_inf_plasma_grenade_ord"
Post Reply