Making bullets last longer

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
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Making bullets last longer

Post by Fiodis »

How do you make the shotgun's bullets last longer instead of fading right out? I thought it had to do with the LifeSpan and FadeOutTime lines, so I tried tweaking the odfs like so:

com_weap_inf_shotgun_trace2:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "bolt"

[Properties]
LaserTexture = "com_sfx_laser_green"
LaserLength = "6.0"
LaserWidth = "0.02"
LaserGlowColor = "192 224 18 100"
LightColor = "192 224 18 100"
GlowLength = "3"
BlurLength = "5"

FadeOutTime = "1000.5"

LifeSpan = "1000.0"
Velocity = "160.0"
Gravity = "1.0"
Rebound = "0.0"

MaxDamage = "0.0"
VehicleScale = "0.0"
ShieldScale = "0.0"
PersonScale = "0.0"
AnimalScale = "0.0"
DroidScale = "0.0"
BuildingScale = "0.0"

BonusAmplification = "0.25" //how much more damage will be done when team_bonus_blaster_amplication is on
BonusColor = "240 0 0 255" //what color will be applied when the team_bonus_blaster_amplification is on
com_weap_inf_shotgun_or2:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "bullet"

[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"

LifeSpan = "1000.0"
Velocity = "2000.0"
Gravity = "1.0"
Rebound = "0.0"

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

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

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
com_weap_inf_shotgu2:
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
ScoreForMedalsType = 5
MedalsTypeToLock = 5

AnimationBank = "rifle"

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"

RoundsPerClip = "40"
ReloadTime = "1.75"

SecondaryOrdnanceName = "com_weap_inf_shotgun_trace2"
SecondaryOrdnancePeriod = 1

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

TriggerSingle = "1"
ShotDelay = "1.0"

PitchSpread = "3.0"
YawSpread = "4.5"

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"

LockOnRange = "40.0"
LockTime = "0.0"
AutoAimSize = "1.0"

MinRange = "0"
OptimalRange = "24"
MaxRange = "48"
AIUseBubbleCircle = "1"
AIBubbleSizeMultiplier = "1.25"

SalvoCount = "1"
ShotsPerSalvo = "8"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"

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

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"
But it had no noticable effect.

And yes, I did rename the odfs on purpose.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Making bullets last longer

Post by Taivyx »

Try adjusting these values:

Code: Select all

OptimalRange = "24"
MaxRange = "48"
OptimalRange refers to the distance that maximum damage is dealt.
MaxRange refers to the distance the ordnance can travel before it fades out.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Making bullets last longer

Post by Fiodis »

Nope; they travel far but stop and don't stick when they hit something. I've seen someone do it before, in a beta football map I think. I just don't know how....

Ah well, any other possibilities?

EDIT - I tried FadeLightColor = "0". No luck.
User avatar
Nylad
Second Lance Corporal
Second Lance Corporal
Posts: 108
Joined: Mon Jul 21, 2008 11:21 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: probably beating on an arrangement of cylindrical objects with two wooden sticks.

Re: Making bullets last longer

Post by Nylad »

Fiodis wrote:Nope; they travel far but stop and don't stick when they hit something. I've seen someone do it before, in a beta football map I think. I just don't know how....

Ah well, any other possibilities?

EDIT - I tried FadeLightColor = "0". No luck.
Whoa, sticking is a different thing entirely. If you want the bullets to stick to stuff you'd have to use
ClassLabel = "sticky"
in your ordnance odf and probably give it a model too, because it wouldn't know to make it a laser because it is now a sticky type.
to make it stick to buildings add this line:
StickBuilding = 1

Of course, you probably already knew that. :wink:
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Making bullets last longer

Post by Fiodis »

My new shotgun_or2:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[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"

LifeSpan = "1000.0"
Velocity = "2000.0"
Gravity = "1.0"
Rebound = "0.0"

MaxDamage = "65.0"
DamageTransitionDelay = "0.0" //How long in seconds before the damage change begins.
DamageTransitionPeriod = "0.1" //How long in seconds the damage change lasts.
DamageFinalDamage = "15.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 = "160 43 43 100" //What color the laser glow will be by the end of the transition. Varies over DamageTransitionPeriod. (only for lasers.)
EndLightColor = "160 43 43 150" //What color light will be applied by the end of the transition. Varies over DamageTransitionPeriod.

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

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

StickBuilding = "1"
Did I write the StickBuilding line the right way, and in the right place? Do I have to change the class and add the StickBuilding line to com_weap_inf_shotgu2 and trae2 as well? Because it still didn't work. I wonder why.


EDIT
I tried a few more things, none of them worked.

Here's what I did:

edited com_weap_inf_shotgun_or2:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
GeometryName = "rep_weap_inf_lightsabre"

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

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"
TrailEffect = "com_sfx_weap_grenade_red"

LifeSpan = "0.6"
Velocity = "25.0"
Gravity = "1.25"
Rebound = "0.0"
Friction = "2.0"

MaxDamage = "65.0"
DamageTransitionDelay = "0.0" //How long in seconds before the damage change begins.
DamageTransitionPeriod = "0.1" //How long in seconds the damage change lasts.
DamageFinalDamage = "15.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.
EndLightColor = "160 43 43 150" //What color light will be applied by the end of the transition. Varies over DamageTransitionPeriod.

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

CollisionOtherSound = "com_weap_inf_grenade_bounce"
CollisionWaterSound = "imp_inf_trooper_land_water"
CollisionFoliageSound = ""
Didn't work, tried editing com_weap_inf_shotgun_trace2:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "sticky"

[Properties]
GeometryName = "com_weap_inf_grenadethermal_ord"

LightColor = "192 224 18 100"
LightRadius = "4.0"

FadeOutTime = "1000.5"

LifeSpan = "1000.0"
Velocity = "160.0"
Gravity = "1.0"
Rebound = "0.0"

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


BonusAmplification = "0.25" //how much more damage will be done when team_bonus_blaster_amplication is on
BonusColor = "240 0 0 255" //what color will be applied when the team_bonus_blaster_amplification is on
That didn't work either. I'm okay with having to use a differemt msh than a shotgun's lasers, although I would prefer the lasers.

By the wa, I found that map that has the weapon I'm talking about. It was made by SilverBlade, and here's the link to it:

http://starwarsbattlefront.filefront.com/file/;86524

The shotgun there is what I'm talking about, although I don't care what color the lasers are.

EDIT2 - Argh! Just after I posted I realized that it's a double post. I didn't see this in my haste to get help, because this weapon is an important aspect of my map. If a mod sees this, could you please merge this post with the previous one? Thank you very much, and sorry.

EDIT 3 - I remunged the Rep side and got this:
Hidden/Spoiler:
Image
which is so cool I may very well keep it. But it's not exactly what I wanted: they (the things it shoots, whatever they are, I can't tell) well, they bounce. Any way to just get them to stop and stick to things?


EDIT 4 - After a few shots, the visual dissappears and the unit is no longer able to fire with any of his weapons. If you try to toss a detonator, for instance, he goes through the toss anim and your ammo goes down, but you don't see any detonator; nor is anyone hurt. How do you fix this wierdness?

Thanks for the merge, staff.
Last edited by Fiodis on Fri Dec 19, 2008 5:26 pm, edited 1 time in total.
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: Making bullets last longer

Post by Sky_216 »

Taivyx wrote:Try adjusting these values:

Code: Select all

OptimalRange = "24"
MaxRange = "48"
OptimalRange refers to the distance that maximum damage is dealt.
MaxRange refers to the distance the ordnance can travel before it fades out.
Errrmm...no they don't. They control AI use of the weapon. Trust me on this. I spent quite a while getting annoyed with space turrets not hitting (but trying to) hit other ships even when I put those up really high. The shots just blinked out at the same point. What you should use are:

Velocity
Lifespan

VxL = Range
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Making bullets last longer

Post by Fiodis »

Unfortunately, I did try adjusting lifespan. It did not work. Unless....how high to I need to set it? Before, in my experiments, I set it to about 1,000.
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: Making bullets last longer

Post by Sky_216 »

1000 is way too high. Most values have a max value, anything over that either 'goes backwards' or cancels out. Try setting it to 1.

Also: copy and rename the files your basing your shotgun off. So rename the 'com' bits to something like 'co2', then set your sides' weapon (eg rep_inf_shotgun) to read 'co2_inf_shotgun' as class parent. Do the same for ordnances. Really. This kind of thing often helps fix the problem of weapons not changing when you change them.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Making bullets last longer

Post by Fiodis »

Um, I did. If you didn't notice, instead of com_weap_inf_shotgun I have com_inf_weap_shotgu2. Ditto for the rest of them. I'll try setting it to 1.

EDIT - I did, didn't work. Should I try 10?
User avatar
Nylad
Second Lance Corporal
Second Lance Corporal
Posts: 108
Joined: Mon Jul 21, 2008 11:21 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: probably beating on an arrangement of cylindrical objects with two wooden sticks.

Re: Making bullets last longer

Post by Nylad »

To get stuff to stop bouncing go into the ordnance file and set:
Rebound = "0.0"
Post Reply