Poison Grenade [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

Post Reply
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Poison Grenade [Solved]

Post by Dreadnot9 »

Hey all, I'm trying to setup a poison grenade that actually poisons people (using similar properties as the poison buff that shipped with the mod tools). I'm doing this by having it mimmick an orbital strike beacon. So it'd go something like: 1) throw beacon, 2) Beacon lands/sticks to something, 3) beacon calls for buff ordnance, 4) troopers die.
I've got part 1 and 2 to work swimmingly so far, however there part three seems to be causing issues. I'll throw the beacon like a grenade, and the grenade will disappear shortly thereafter, but no buff :runaway:
Grenade ODF:
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "grenade"

[Properties]
GeometryName = "FEX-M3_det"
HighResGeometry = "FEX-M3_det"
HUDTag = "FEX-M3_det"

OrdnanceName = "cis_weap_inf_gasgrenade_ord"

OffhandWeapon = 1
FireAnim = 2

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

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

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

MinRange = "8"
OptimalRange = "16"
MaxRange = "24"

LockOnRange = "30.0"

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

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

AmmoPerShot = 1

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"
cis_weap_inf_gasgrenade_ord.odf:
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "beacon"

[Properties]
GeometryName = "FEX-M3_det"
OrdnanceName = "cis_weap_inf_gasgrenade_salvo_exp"

ImpactEffectWater = "com_sfx_watersplash_sm"
ImpactEffect = "com_sfx_explosion_lg"
TrailEffect = "com_sfx_weap_grenade_green"

LightColor = "53 247 53 150"
LightRadius = "4.0"

LifeSpan = "0.9"
Velocity = "25.0"
Gravity = "1.25"
Rebound = "0.2"
Friction = "2.0"
StartTimerOnContact = 0

SalvoCount = "1"
SalvoDelay = "0.88"

ScatterDistance = "0.0"

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

CollisionOtherSound = "com_weap_inf_grenade_bounce"
CollisionWaterSound = "imp_inf_trooper_land_water"
CollisionFoliageSound = ""
cis_weap_inf_gasgrenade_salvo_exp.odf
Hidden/Spoiler:
[OrdnanceClass]
//This area defines the ordnances class and the effects associated with it.
ClassParent = "com_weap_inf_buff_ord"



[Properties]
ConeLength = "0.0"
ConeAngle = "360.0"
MaxTargets = "10"
NoChaining = 1
Radius = "10.0"

DebuffDamageTimer = "40"
DebuffDamageRate = "500"

Effect = "com_sfx_gas_wave"
//Explosion = "com_sfx_gas_wave"

AffectEnemies = 1
AffectFriends = 1

ApplyOnOwnerIfOnOthers = "0"

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

OrdnanceSound = "com_weap_inf_gas_exp"
CollisionSound = "imp_weap_ord_exp_lg"
And yes, I have tried the autoturret method (see this topic: http://www.gametoast.com/forums/viewtop ... 27&t=13743) for getting effect nades to work. I've never really got this working, plus this prohibits other autoturrets from being on the battlefield at the same time. I also have a feeling this way will work. Any help is appreciated.
Last edited by Dreadnot9 on Wed Aug 01, 2012 10:36 pm, edited 1 time in total.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Poison Grenade

Post by razac920 »

I don't know so much about orbital strikes but I will say that I would probably use LUA scripting to get the effect you want. Something along the lines of:
OnObjectDamage(function(object,damager)
if GetObjectLastHitWeaponClass(object) == [grenade odf class name] then
... damaging poison code ...
end
end)
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Poison Grenade

Post by Dreadnot9 »

That would surely work, but I'd prefer to get it working through ODF coding (this is going into a side mode with several scripts, I'd rather make one semi-complicated ODF-set than go through each script and add those lines in). Thank you though, I'll keep that in mind if I can't get anything else working.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Poison Grenade

Post by razac920 »

Try adding PlayEffectOnOwner = "com_sfx_buff_poison" to cis_weap_inf_gasgrenade_salvo_exp.odf

I think you'll find that the poison buff comes from your unit, not the beacon...
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Poison Grenade

Post by Dreadnot9 »

razac920 wrote:Try adding PlayEffectOnOwner = "com_sfx_buff_poison" to cis_weap_inf_gasgrenade_salvo_exp.odf

I think you'll find that the poison buff comes from your unit, not the beacon...
You are indeed correct, the beacon would be thrown, then the poison "wave" would come from my unit (although no damage was done weather the opponents were close to me or the beacon). It's highly possible only units can initiate area effect buffs, which is unfortunate. I wonder how mav did it in Dark times. I suppose I could try the autoturret method again (or your suggested lua work around) and see what kind of results that produces.
User avatar
willinator
Major
Major
Posts: 517
Joined: Sun Mar 13, 2011 3:11 pm
Projects :: [Coming of the Sentinels]
Games I'm Playing :: SWBF2 Minecraft Halo
xbox live or psn: PC pwns all!
Location: The rings of Saturn...

Re: Poison Grenade

Post by willinator »

In Dark Times the grenades don't act like the buff. They reduce your health until the grenade explosion finishes. The poison doesn't last nearly as long as the Magnaguard's buff.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Poison Grenade

Post by razac920 »

Another thing is that in the regular orbital strike, the bolts are fired directly downward from an incredible height, and then continue going down to hit beacon. Perhaps with this poison wave it too is fired from that same great height, in which case you wouldn't be able to tell unless the radius was REALLY HUGE. Of course, if it is indeed spherical, you could arrange it such that the gigantic sphere-in-the-sky just barely grazes the ground, and get *roughly* what you want. It might not work indoors though, do normal buffs penetrate walls?
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Poison Grenade

Post by Dreadnot9 »

willinator wrote:In Dark Times the grenades don't act like the buff. They reduce your health until the grenade explosion finishes. The poison doesn't last nearly as long as the Magnaguard's buff.
Hmm, I'll try that out then. After I extend the explosion duration what lines should I add to do the gradual damage (I'm away from my modding pc at the moment, and can't look through any assets to find out for myself)?
razac920 wrote:Another thing is that in the regular orbital strike, the bolts are fired directly downward from an incredible height, and then continue going down to hit beacon. Perhaps with this poison wave it too is fired from that same great height, in which case you wouldn't be able to tell unless the radius was REALLY HUGE. Of course, if it is indeed spherical, you could arrange it such that the gigantic sphere-in-the-sky just barely grazes the ground, and get *roughly* what you want. It might not work indoors though, do normal buffs penetrate walls?
You're right about the orbital strikes, even if the buff played, I'd have to have (as you said) a huge effect radius. I don't think buffs penetrate walls, but I've been wrong before.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Poison Grenade

Post by Maveritchell »

You don't need to use buff effects at all (although you certainly can). Emitterordnances (the go-to invisible ordnance) support DoT with smolder damage.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Poison Grenade

Post by THEWULFMAN »

Usually I'd just tell you how to do it, but I'm really busy right now. So you can just take the ODF assets and edit them yourself. PM sent.

Ninja'd by Mav. :o
Dreadnot9
Chief Warrant Officer
Chief Warrant Officer
Posts: 341
Joined: Wed Jun 06, 2012 2:05 pm
Projects :: Rising Conflict CW v2.0
Games I'm Playing :: Skyrim TF2 FTL
xbox live or psn: Steam is Dreadnot9

Re: Poison Grenade

Post by Dreadnot9 »

Maveritchell wrote:You don't need to use buff effects at all (although you certainly can). Emitterordnances (the go-to invisible ordnance) support DoT with smolder damage.
THEWULFMAN wrote:Usually I'd just tell you how to do it, but I'm really busy right now. So you can just take the ODF assets and edit them yourself. PM sent.
Thank you, both of you! It's greatly appreciated.
Post Reply