How do I add Energy Bar drain to a weapon?

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
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

How do I add Energy Bar drain to a weapon?

Post by Ace_Azzameen_5 »

Looking at example odfs, research, etc, couldn't find out myself, so sorry:

How do I add Energy Bar (yellow sprint type) drain to weapon?

(My WIP racemap's speeder's have auto repair...but I have to give it some drawbacks.)

vvvvThanks, -_-.vvv
Last edited by Ace_Azzameen_5 on Tue Sep 11, 2007 3:08 pm, edited 2 times in total.
-_-
Gametoast Staff
Gametoast Staff
Posts: 2678
Joined: Sat May 07, 2005 1:22 pm

Re: Weapon Odf Settings for Energy bar instead of AMMO/Heat

Post by -_- »

EnergyDrain = "Value"
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
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 Odf Settings for Energy bar instead of AMMO/Heat

Post by Ace_Azzameen_5 »

Thats not working...might be class restrictions on it. I'm trying it for a weapon on a hover. But just in case its an ODF error, here are the weapon and hover odfs.

ace_weap_veh_fusioncutter
Hidden/Spoiler:
[code]
[WeaponClass]
ClassLabel = "repair"

[Properties]

MuzzleFlashEffect = "com_sfx_repair"
Discharge = "small_smoke_effect"

//RoundsPerClip = "-1"
//ReloadTime = "0.0"
//HeatRecoverRate = "0.16"
//HeatThreshold = "0.7"

AnimationBank = "tool"
FirePointName = "hp_fire"

ShotDelay = 0.5
TriggerSingle = "1"
//HeatPerShot = "0.060"

EnergyDrain = "100"

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

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

LockOnRange = 4.0
LockOnAngle = 90.0

VehicleHealth = 50

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

FireEmptySound = "com_weap_inf_weapon_empty"
FireLoopSound = "com_weap_inf_fusioncutter_fire"
ReloadSound = ""
ChargeSound = ""
OverheatSound = "com_weap_energy_depleted"
OverheatSoundPitch = "0.5"
OverheatStopSound = ""
ChangeModeSound = ""
WeaponChangeSound = ""
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"
[/code]
ace_hover_racespeeder
Hidden/Spoiler:
[code]
[GameObjectClass]
ClassLabel = "hover"
GeometryName = "rep_hover_barcspeeder.msh"

[Properties]
WaterEffect = "com_sfx_waterwake_sm"

FLYERSECTION = "BODY"
VehicleType = "light"

Label = "Speederbike"

MapTexture = "speederbike_icon"
HealthTexture = "HUD_speederbike_icon"
MapScale = 1.5

ExplosionName = "rep_hover_speederbike_exp"
GeometryName = "rep_hover_barcspeeder"
CollisionThreshold = "4.0 20.0 0.0"
CollisionScale = "0.0 -0.0001 -0.1"
//CollisionScale = "1.0 -0.5 0"
//FirstPerson = "rep\repspbk;rep_1st_cockpit_speederbike"
VehiclePosition = "common.vehiclepositions.pilot"
WakeEffect = "dustwake"
WaterEffect = "com_sfx_waterwake_sm"

PilotPosition = "hp_rider"
Pilot9Pose = "barc_9pose"

AnimationName = "rep_hover_barcspeeder"
FinAnimation = "barcspeeder_9pose"

MaxHealth = 80.0
//HitLocation = "p_crithit 0"

TimeRequiredToEject = "1.0"
EjectResistance = "0.01"
TimeTilReboard = "5.0"

DamageStartPercent = 70.0
DamageStopPercent = 50.0
DamageEffect = "com_sfx_vehiclespark"
DamageEffectScale = 0.4
DamageInheritVelocity = 0.75
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = 50.0
DamageStopPercent = 10.0
DamageEffect = "com_sfx_vehiclesmoke"
DamageEffectScale = 0.4
DamageInheritVelocity = 0.75
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = 10.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehicleflame"
DamageEffectScale = 0.2
DamageInheritVelocity = 0.75
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = 30.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehiclesmoke"
DamageEffectScale = 0.4
DamageInheritVelocity = 0.75
DamageAttachPoint = "hp_damage_2"

DamageStartPercent = 20.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_vehicleflame"
DamageEffectScale = 0.2
DamageInheritVelocity = 0.75
DamageAttachPoint = "hp_damage_3"

SetAltitude = .85
GravityScale = 4.0 //2


Acceleration = 30.0
Deceleration = 60.0
Traction = 35.0
ForwardSpeed = 28.0
ReverseSpeed = 6.0
StrafeSpeed = 3.0

EnergyAutoRestore = 25
EnergyBoostDrain = 10
BoostSpeed = 45
BoostAcceleration = 100.0
BoostFOV = 60

AddSpringBody = "0.0 0.7 1.5 1.4"
BodyOmegaXSpringFactor = -2.0

AddSpringBody = "-0.5 0.7 -1.0 1.4"
AddSpringBody = "0.5 0.7 -1.0 1.4"

AddSpringBody = "0.0 0.7 0.0 0.4"

VelocitySpring = 5
VelocityDamp = 2.5
OmegaXSpring = 3.0
OmegaXDamp = 2.5
OmegaZSpring = 5.0
OmegaZDamp = 1.8

//BuildingCollision = "p_bcube"


OrdnanceCollision = "CollisionMesh"
SoldierCollision = "p_bcube"


SpinRate = 1.4
TurnRate = 2.0
BoostTurnMultiplier = 0.5
TurnFilter = 15.0
PitchRate = 0.5
StrafeRollAngle = 0.0
ThrustPitchAngle = 0.0
BankAngle = 0.002
BankFilter = 3.0
LevelSpring = 10.0
LevelDamp = 5.0

JumpTimeMin = 0.1
JumpTimeMax = 0.35
JumpForce = 50.0
JumpMinSpeedMult = 0.4
JumpEnergyPerSec = 100.0


//PCPitchRate = 15.0
//PCSpinRate = 15.0
//PCTurnRate = 25.0


EyePointOffset = "0.0 1.0 0.0"
TrackCenter = "0 2.5 -6"
TrackOffset = "0.0 0.0 0.0"
TiltValue = "5.0"

CockpitTension = "12"

NormalDirection = "0.0 -10.0 0.0"

PitchLimits = "-5.0 5.0"
YawLimits = "-15.0 15.0"



WeaponName = "ace_weap_veh_fusioncutter"
WeaponAmmo = "0"

AimerNodeName = "aimer_frontleft_gun"
FirePointName = "hp_firefront_L"
BarrelNodeName = "hp_firefront_L"
BarrelLength = "1.0"
AimerPitchLimits = "0.0 0.0"
AimerYawLimits = "0.0 0.0"

NextAimer = "-"

AimerNodeName = "aimer_frontright_gun"
FirePointName = "hp_firefront_R"
BarrelNodeName = "hp_firefront_R"
BarrelLength = "2.0"
AimerPitchLimits = "-15.0 15.0"
AimerYawLimits = "-25.0 25.0"



BlurEffect = 0.5 //the closer to 1 the greater the blur
BlurStart = 0.8 //percentage of maxspeed where blur starts



AISizeType = "MEDIUM"
NoCombatInterrupt = 1
//AvailableForAnyTeam = 1

CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "rep_hover_barcspeeder_chunk1"
ChunkNodeName = ""
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "0.0 0.0 0.0"


CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "rep_hover_barcspeeder_chunk2"
ChunkNodeName = ""
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "0.0 0.0 0.0"


CHUNKSECTION = "CHUNK3"
ChunkGeometryName = "rep_hover_barcspeeder_chunk3"
ChunkNodeName = ""
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "0.0 0.0 0.0"


CHUNKSECTION = "CHUNK4"
ChunkGeometryName = "rep_hover_barcspeeder_chunk4"
ChunkNodeName = ""
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "0.0 0.0 0.0"


CHUNKSECTION = "CHUNK5"
ChunkGeometryName = "rep_hover_barcspeeder_chunk5"
ChunkNodeName = ""
ChunkTerrainCollisions = "4"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "0.0 0.0 0.0"


VOUnitType = 134
EngineSound = "speederbike_engine_parameterized"
HurtSound = ""
DeathSound = "com_weap_obj_small_exp"
VehicleCollisionSound ="com_veh_collision_sm"
TurnOnSound = ""
TurnOffSound = ""
Music = ""
CisMusic = "cis_vehicle"
RepMusic = "rep_vehicle"
MusicSpeed = "0.5"
MusicDelay = "3.0"
GroundedSound = ""
GroundedHeight = ""
//BoostSound = "imp_hover_speederbike_boost_on 0.5 1"
//BoostSound = "imp_hover_speederbike_boost_on_max 0.9 1"
//BoostSound = "imp_hover_speederbike_boost_off_max 0.8 0"
//BoostSound = "imp_hover_speederbike_boost_off 0.4 0"
FoleyFXGroup = "metal_foley"

[InstanceProperties]
EnergyBar = 50

[/code]
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: Weapon Odf Settings for Energy bar instead of AMMO/Heat

Post by MetalcoreRancor »

I dont think that can be done the way you are doing it. And honestly, I dont see why you have to give it a drawback, it's not like people are going to ride it around and others will scream "REPAIR NOOB!!!"
User avatar
squipple
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Tue Jun 28, 2005 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Weapon Odf Settings for Energy bar instead of AMMO/Heat

Post by squipple »

I dunno, seems like if you get good at anything in the game people will call you a noob for it. :roll:
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: UNSOLVED: Weapon subtact from Energy bar instead of AMMO/Hea

Post by Ace_Azzameen_5 »

Uh...its not inter-player balance, its more of a design thing. Why make a speeder that can constantly repair itself with a weapon instead of just add health?

I still want racers to have to limit damage, and thusly award good maneuvering skill. Repairs have to cost speed._________________________________________
Enter your message here, it may contain no more than 60000 characters.
Syth
General
General
Posts: 784
Joined: Thu Apr 13, 2006 8:46 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: happy fun island

Re: UNSOLVED: Weapon subtact from Energy bar instead of AMMO/Hea

Post by Syth »

Your trying to have a unit use do this, right? Or you trying to have a vehicle weapon that heals its self/ drains stamina.
Drain stamina values are only reconized by "cannon" types (least to my knoledge). You could try useing the below as the ordinance for any normal weapon (like a rifle or pistol) and then add the "EnergyDrain = 150.0" line to the weapon.

Code: Select all

[OrdnanceClass]

ClassLabel      = "emitterordnance"

[Properties]
Radius             = "0.75" // sphere used for finding the targets
ConeLength          = "1" // cone not used for finding the targets

ConeAngle           = "10"
FirstRadius         = "0.0"
MaxTargets          = "1"  // Max number of targets to hit. Chaining is off so the damage will be split between the number of targets
NoChaining          = "1"   // No chaining - all bolts coming from the attacker
ApplyOnOwnerIfOnOthers = "1"
AffectEnemies = "0" 

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

BuffHealthTimer = "1"
BuffHealthRate = "100"
Dont know if you can use emitterordnance on vehicles but you could try(I doubt it)
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: UNSOLVED: Weapon subtact from Energy bar instead of AMMO/Hea

Post by Ace_Azzameen_5 »

That didn't work... Sorry for the response lag...
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Re: UNSOLVED: Weapon subtact from Energy bar instead of AMMO/Hea

Post by PvtParts »

What about making the weapon itself overheat? It doesn't slow you down but it does mean that the speeders can't repair nonstop and thus must limit damage to a similar degree.

Or you could have a certain number of repair "rounds" in the clip, so you must reload after you have repaired you're vehicle.

I haven't really tooled with this kind of thing (Closest I've made was a force heal).
Post Reply