Weapon effects [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

={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Weapon effects [Solved]

Post by ={Z32}=Kfm946 »

I have two weapon effect problems:

1. i made a custom effect for a grenade but ingame, half the time it uses the regular effect and the custom one the other half. how do i fix it?

2. this is more about explosions but watever. i want to attach an explosion to the sniper ordinance, but its not working out too well. (i made the odfs just for the special sniper rifle in the side's folder (all) and the common folder and worked out all the class parent and stuff already)

These are probably the last two things i need for my new map (Invasion of Sullust) so I really need help fast. i'm already past the original release date that i wanted (halloween).
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: weapon effects

Post by DarthD.U.C.K. »

1. post the grenade odfs

2.post the sniperrifle odfs (inclusiding the ords)

3. dont care about pasting a releasedate who cares?
and who prefers a quickly-thrown-toghether but punktual map a well done and balanced one but delayed?
bokkenblader56
Private First Class
Posts: 85
Joined: Mon Aug 04, 2008 7:20 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: South Carolina
Contact:

Re: weapon effects

Post by bokkenblader56 »

I don't know about 1), but I've done 2) myself. Not sure if it's the easiest way, but it seemed to work. Just copy "com_weap_inf_rocket_launcher_exp" and rename it to, for example, "all_weap_inf_sniper_rifle_exp.odf." Actually, that's not entirely necessary, but it helped keep me organized. Then add...

Code: Select all

ExplosionName = "all_weap_inf_sniper_rifle_exp"
...to "all_weap_inf_sniper_rifle_ord". I think that's how I did it, anyway. Or if you want to do it with parent files, copy "all_weap_inf_rocket_launcher_exp" and rename it as necessary (or not) and reference it in your ordnance file. It should work.
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

rep_weap_inf_thermaldetonator_exp.odf
Hidden/Spoiler:
[ExplosionClass]
ClassParent = "com_weap_inf_thermaldetonator_exp"

[Properties]

Effect = "com_sfx_weap_grenade_emp_exp_ctm"
all_weap_hero_sniper_rifle.odf (its only for han)
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_hero_sniper_rifle"
GeometryName = "all_weap_inf_sniperrifle.msh"

[Properties]

GeometryName = "all_weap_inf_sniperrifle"
HighResGeometry = "all_1st_weap_inf_sniperrifle"

OrdnanceName = "all_weap_inf_sniper_rifle_ord"
FirePointName = "hp_fire"

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

FireSound = "all_weap_inf_sniper_rifle_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
_ord
Hidden/Spoiler:
[OrdnanceClass]
ClassParent = "com_weap_hero_sniper_rifle_ord"

[Properties]
LaserTexture = "com_sfx_laser_orange"
LaserGlowColor = "224 112 0 100"
LightColor = "224 112 0 150"
LightRadius = "4.0"

ExplosionName = "all_weap_hero_sniper_rifle_exp"
_exp
Hidden/Spoiler:
[ExplosionClass]
ClassParent = "com_weap_hero_sniper_rifle_exp"

[Properties]

Damage = "500.0"
DamageRadiusInner = "0.0"
DamageRadiusOuter = "6.5"

Push = "12.0"
PushRadiusInner = "5.0"
PushRadiusOuter = "6.5"

Shake = "2.0"
ShakeLength = "1.25"
ShakeRadiusInner = "5.0"
ShakeRadiusOuter = "10.0"

WaterEffect = "com_sfx_watersplash_lg"
Effect = "com_sfx_weap_hero_detpack_exp"
Decal = "decal_explosion"

LightColor = "46 252 5 150"
LightRadius = "8.0"
LightDuration = "1.0"

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

SoundProperty = "com_weap_detpack_exp"
com_weap_hero_sniper_rifle.odf
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
ScoreForMedalsType = 100000
MedalsTypeToLock = 4

AnimationBank = "rifle"

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

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

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

MinRange = "8"
OptimalRange = "64"
MaxRange = "128"
AIUseBubbleCircle = "1"
AIBubbleSizeMultiplier = "0.6"

LockOnRange = "0.0"
LockTime = "0.0"
LockOnAngle = "1.0"

ReticuleInAimingOnly = 1
SniperScope = 1
ZoomFirstPerson = 1
ZoomMin = "2.0"
ZoomMax = "8.0"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

KickStrength = "0.0" // "2.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" // 100
ReloadTime = "1.0"
ShotDelay = "0.25" //1.0
TriggerSingle = "1"
MaxPressedTime = "0.0"

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

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

ScopeTexture = "weapon_scopec3"

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"
_ord
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "missile"

[Properties]

ImpactEffectSoft = "com_sfx_ord_exp"
ImpactEffectRigid = "com_sfx_ord_exp"
ImpactEffectStatic = "com_sfx_ord_exp"
ImpactEffectTerrain = "com_sfx_ord_exp"
ImpactEffectWater = "com_sfx_watersplash_ord"
ImpactEffectShield = "com_sfx_ord_exp"
ExpireEffect = "com_sfx_ord_exp"

Explosion = "com_weap_hero_sniper_rifle_exp"

LifeSpan = "0.15"
MaxDamage = "300.0"
Velocity = "2000.0"
Gravity = "1.0"
Rebound = "0.0"

VehicleScale = "0.1"
ShieldScale = "1.0"
PersonScale = "1.0"
DroidScale = "1.0"
BuildingScale = "0.1"

DamageTransitionDelay = "0.0" //How long in seconds before the damage change begins.
DamageTransitionPeriod = "0.0" //How long in seconds the damage change lasts.
DamageFinalDamage = "-1.0" //What the damage would be at the end of the transition period. A negative value means that no change is applied.
FadeLightColor = "0" //Whether or not the color on the light should be faded along with the damage.
EndLaserGlowColor = "0 0 0 0" //What color the laser glow will be by the end of the transition. Varies over DamageTransitionPeriod. (only for lasers.)
EndLightColor = "0 0 0 0" //What color light will be applied by the end of the transition. Varies over DamageTransitionPeriod.

OrdnanceSound = "com_weap_inf_ord_hum_sm"
CollisionSound = "imp_weap_ord_exp"


BonusAmplification = "0.25" //how much more damage will be done when team_bonus_blaster_amplication is on
_exp
Hidden/Spoiler:
[ExplosionClass]
ClassLabel = "explosion"

[Properties]
Damage = "500.0"
DamageRadiusInner = "0.0"
DamageRadiusOuter = "6.5"

Push = "12.0"
PushRadiusInner = "5.0"
PushRadiusOuter = "6.5"

Shake = "2.0"
ShakeLength = "1.25"
ShakeRadiusInner = "5.0"
ShakeRadiusOuter = "10.0"

WaterEffect = "com_sfx_watersplash_lg"
Effect = "com_sfx_weap_hero_detpack_exp"
Decal = "decal_explosion"

LightColor = "46 252 5 150"
LightRadius = "8.0"
LightDuration = "1.0"

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

SoundProperty = "com_weap_detpack_exp"
@duck: btw, i've been working on this since june er sumthin so u cant say its quickly put together 'n' stuff
@bokkenblader: I tried that and it didn't work
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: weapon effects

Post by DarthD.U.C.K. »

i didnt say your map is quickly-thrown-together, i just wanted to point that out that you dont have to care to much about map-release-delays
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

ok np

Edit: so did you find anything wrong with the odfs?
bokkenblader56
Private First Class
Posts: 85
Joined: Mon Aug 04, 2008 7:20 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: South Carolina
Contact:

Re: weapon effects

Post by bokkenblader56 »

I'm not sure if it would have any bearing on the grenade's effects, it probably doesn't, but do you have a separate effect set in "com_weap_inf_thermaldetonator_exp.odf"?

I've never really messed with Parent and Child ODF files. I always just copied the common files and renamed them, then copied the extra info in the corresponding child ODF into the renamed common file so that it was all in one place. So, that was my one card for the sniper explosion.

*EDIT* Dangit, I took to long to edit that.
Last edited by bokkenblader56 on Fri Nov 07, 2008 6:28 pm, edited 2 times in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: weapon effects

Post by Maveritchell »

I'm fairly certain that explosion effects are able to be stacked (so that the .odf could call for more than one and have it randomly choose like you're seeing), which is why when you have a parent grenade using one effect and your grenade using another, both appear.

The solution is to make it not rely on the parent - copy everything from the parent .odf into the child .odf and set its classlabel up top equal to the grenade parent's classlabel (instead of the classparent line).
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

yea i was just thinkin of that

Edit: wat about the sniper stuff?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: weapon effects

Post by Maveritchell »

For starters, if your ordnance is going to be a missile, you should have a "launcher" classlabel for your weapon .odf.

That being said, it's just as easy to have a regular sniper rifle and add an explosion onto the bolt.
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

ok how do i add the explosion to the bolt?

Edit: originally it wasn't a missile but i thought changing it might help...i guess not though...
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: weapon effects

Post by Sky_216 »

Maveritchell wrote:I'm fairly certain that explosion effects are able to be stacked (so that the .odf could call for more than one and have it randomly choose like you're seeing), which is why when you have a parent grenade using one effect and your grenade using another, both appear.
Just to confirm: this is 100% true. Make sure when you fix it (either by making a new explosion or removing the effect from one of the files) you clean your sides. All of them. IE delete all the munged side files in the 'build' folder.
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

Maveritchell wrote: The solution is to make it not rely on the parent - copy everything from the parent .odf into the child .odf and set its classlabel up top equal to the grenade parent's classlabel (instead of the classparent line).
I did this and now it works. now i need help with the sniper stuff

Edit: How do i attach the explosion to the bolt?!
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: weapon effects

Post by Maveritchell »

Explosion = "explosionname"

or you can break it down with

ExplosionExpire and ExplosionImpact. All ordnances support an explosion.
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

i already did the Explosion = "name" and that doesn't work...Edit: what else do i need to do?
bokkenblader56
Private First Class
Posts: 85
Joined: Mon Aug 04, 2008 7:20 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: South Carolina
Contact:

Re: weapon effects

Post by bokkenblader56 »

Isn't there a different one called "ExplosionName"?
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: weapon effects

Post by Sky_216 »

For grenades use
ExplosionExpire = "x"

where x is the time in seconds you want it to explode after it stops moving.
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

I think you're kinda getting off topic....all i need to know is how to attach the explosion to the bolt of the sniper. everything any1's suggested so far hasn't worked. does any1 know anything else about it?
bokkenblader56
Private First Class
Posts: 85
Joined: Mon Aug 04, 2008 7:20 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: South Carolina
Contact:

Re: weapon effects

Post by bokkenblader56 »

In your Common hero sniper rifle's ordnance file, try deleting this line:

Code: Select all

Explosion = "com_weap_hero_sniper_rifle_exp"
. I couldn't really say, but it might be that you're referencing two explosion files. From what I've read, you really only need the ClassParent of all_weap_hero_sniper_rifle_exp to be com_weap_hero_sniper_rifle_exp rather than referencing both of them. Of course, it might have no effect whatsoever.
={Z32}=Kfm946
Private Second Class
Posts: 70
Joined: Wed Jul 30, 2008 6:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Uhh...Not behind you...
Contact:

Re: weapon effects

Post by ={Z32}=Kfm946 »

nope that didn't do anything....i was thinkin maybe i could just copy the stuff from the com_ odfs and put it in the all_ ones so there wouldn't be any ClassParents involved. do you think that would do anything?
Post Reply