Torchmodders

Modding => Modding Questions => Topic started by: gytfunke on October 15, 2014, 08:07:28 pm


Title: Friendly Fire
Post by: gytfunke on October 15, 2014, 08:07:28 pm
@Wolven

Hey, I wanted to know if forcing PvP in an area made your players deal friendly fire damage to each other in TLA.   :)
Title: Re: Friendly Fire
Post by: Kva3imoda on October 15, 2014, 08:52:23 pm
Friendly fire is dangerous, but a good idea.
Title: Re: Friendly Fire
Post by: gytfunke on October 15, 2014, 10:08:43 pm
I know!  I think so, too!   ;)

I'm sure it will cause lots of griefing, but it can also be very exciting.
Title: Re: Friendly Fire
Post by: Wolven on October 15, 2014, 10:37:25 pm
@Wolven

Hey, I wanted to know if forcing PvP in an area made your players deal friendly fire damage to each other in TLA.   :)

Forcing pvp will cause players to hurt eachother, but I think it would also prevent beneficiary spells to work on other players, so you would not be able to heal anyone else than yourself and your pet or minions, for instance.

I've not tested this though, but it seems very likely.

Edit: PvP will also cause pets to attack other players.
Title: Re: Friendly Fire
Post by: gytfunke on October 15, 2014, 11:33:44 pm
Forcing pvp will cause players to hurt eachother, but I think it would also prevent beneficiary spells to work on other players, so you would not be able to heal anyone else than yourself and your pet or minions, for instance.

Edit: PvP will also cause pets to attack other players.

Aargh! Not the easy fix I was hoping for.
Title: Re: Friendly Fire
Post by: Phanjam on October 16, 2014, 07:57:22 am
Is this preparatory for LOE? Since LOE skills will be totally remade, how about we just set all skill's TARGET_TYPE to "ANY"?  So just the skills can hurt your companions, but not normal attacks and pets hurting them... just a thought
Title: Re: Friendly Fire
Post by: gytfunke on October 16, 2014, 07:59:31 am
Yes, this is for LoE.  You're probably right Phanjam.

I tried for about 4 hours to get friendly fire to work with normal weapon swings without any luck.  It might be better anyway to just limit friendly fire to skills.
Title: Re: Friendly Fire
Post by: Kva3imoda on October 16, 2014, 10:29:42 am
I tried for about 4 hours to get friendly fire to work with normal weapon swings without any luck.
You can add a hidden affix. This affix can cause damage only to friendly targets.
I mean any weapon procs. Something like bleeding or stun.
Title: Re: Friendly Fire
Post by: gytfunke on October 16, 2014, 12:42:21 pm
You can add a hidden affix. This affix can cause damage only to friendly targets.
I mean any weapon procs. Something like bleeding or stun.

That's a good point.  It doesn't have to be full damage to your allies with weapon effects et al.
Title: Re: Friendly Fire
Post by: Kva3imoda on October 16, 2014, 12:52:00 pm
It doesn't have to be full damage to your allies with weapon effects et al.
Absolutely true, it is more convenient for balance and not as dangerous as the full damage.
Title: Re: Friendly Fire
Post by: gytfunke on October 16, 2014, 05:04:16 pm
Does anyone know if there's an elegant way to implement friendly fire on skills by say, flipping one variable?  Or do I have to give each skill separate affixes for Enemy/Self/Allies?
Title: Re: Friendly Fire
Post by: TwinkleToes on October 16, 2014, 05:57:00 pm
make the damage shape the skill itself and the affix target: everybody

this should work,
you could also go into the event itself and put
<BOOL>IGNOREALIGNMENTTYPE:1
this will make the event ignore the target setting you put into the skill
Title: Re: Friendly Fire
Post by: gytfunke on October 16, 2014, 09:39:52 pm
make the damage shape the skill itself and the affix target: everybody

this should work,
you could also go into the event itself and put
<BOOL>IGNOREALIGNMENTTYPE:1
this will make the event ignore the target setting you put into the skill

Hahahahahahaha!   :D  I just spent the past 10 minutes lighting my pet badger on fire.

Okay, so, the above is mostly correct, but I didn't want this skill in particular to set the caster aflame, so a few adjustments were needed.  Setting 'Everybody' on an Affix seems to target the caster as well, even if they're not hit by the damage shape.  Dunno why.  But, here's how I got it to work correctly:

Set 'EVERYBODY' as the Target of the Skill.
Set 'ALL' as the damage shape's target.
Set 2 affixes, each identical save that one targets ENEMY one targets FRIEND.

Voila.
Title: Re: Friendly Fire
Post by: TwinkleToes on October 16, 2014, 10:03:25 pm
 :D lol
not sure but i think the reason you were igniting yourself regardless of damage shape is because you had your affix on an event start, they ignore damage shapes and the skills target type, directly applying affixes set to target Self(this is included with the everybody setting)
Title: Re: Friendly Fire
Post by: gytfunke on October 20, 2014, 08:50:29 pm
Nah, it's not an EVENT_START.

I'm not sure why, but, as affix target types, EVERYBODY and SELF affect the caster whether or not the caster is hit by the damage shape.  For now, I guess self-inflicted damage is off the table unless someone can figure it out.  I may try later.
Title: Re: Friendly Fire
Post by: TwinkleToes on October 20, 2014, 10:56:44 pm
I guess self-inflicted damage is off the table unless someone can figure it out.  I may try later.
my mod has a whole tree dedicated so self inflicted harm(%max hp as a resource), it can be done with the hp mod over time effect, you can also deal damage to your self without scaling on focus, with instant death invisible pets
Title: Re: Friendly Fire
Post by: gytfunke on October 21, 2014, 01:57:50 pm
Yeah, but I want selectively applied self-inflicted damage.  If you're in the fireball, you burn.  If not, you don't.

What I have now is a skill where damage shapes are irrelevant to detecting the caster.  If I turn on possible damage for the caster it is always applied whether or not they're in the damage shape as long as the Event condition is met (I.e. trigger, unit_hit, missile_die, etc).
Title: Re: Friendly Fire
Post by: TwinkleToes on October 21, 2014, 02:40:58 pm
Yeah, but I want selectively applied self-inflicted damage.  If you're in the fireball, you burn.  If not, you don't.
invisible dummy units  :D
summon one to make an area, (you can use the spam cast or the aura method). and set the target on the skill as GOOD, and on the affixes as OWNER,
if you want it to also damage other players and pets, set the affix targeting to FRIEND

almost all targeting problems ive encountered when making my class was solved with invisible dummy units 8)
Title: Re: Friendly Fire
Post by: gytfunke on October 21, 2014, 04:35:55 pm
Excellent.  I will give this a try.
Title: Re: Friendly Fire
Post by: gytfunke on October 21, 2014, 11:20:24 pm
The dummy works like a charm, Twinkle!  Muchos gracias!  ;D
Title: Re: Friendly Fire
Post by: TwinkleToes on October 21, 2014, 11:27:30 pm
np  ;D
i finally get to put some of my discoveries to good use  8)
Title: Re: Friendly Fire
Post by: Phanjam on October 22, 2014, 06:43:13 am
Quote from: TwinkleToes
almost all targeting problems ive encountered when making my class was solved with invisible dummy units 8)

LOL! This is too great :D