Jump to content


Photo

The weapon that causes damage to itself

weapon.ini

  • Please log in to reply
9 replies to this topic

#1 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 29 August 2018 - 09:04 PM

How to create weapon who take damage to self and to enemies? If this is possible please help me!



#2 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 30 August 2018 - 06:50 AM

try adding: RadiusDamageAffects = ALLIES ENEMIES SELF


2qm3dd5.jpg


#3 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 15 September 2018 - 05:57 PM

Thanks, but "self" worked only with "allies" :whatoa:



#4 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 22 September 2018 - 09:32 PM

Check out the Fanatic power in ROTWK .
Fanatic halts enemy cavalry but takes damage for 30 sec
It does work , but is quite annoying getting a ‘ the enemy is attacking ‘ when you are just standing around

Radiusdamageaffects = ENEMIES SELF

#5 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 23 September 2018 - 12:33 AM

Thanks, need to check)



#6 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 24 September 2018 - 12:32 AM

Hi JUS_SAURON

 

I am check and for me they dont damaging himself

so in attributemodifer i found this:
 

ModifierList FanaticDeathWish
Category = SPELL
Modifier = DAMAGE_MULT 250% // Multiplicitive.  Damage multiplied by this, will compound in multiple bonuses
; Modifier = ARMOR -30%
Modifier = HEALTH_MULT 75%
Modifier = RESIST_KNOCKBACK 100%
Duration = 20000 // specified in the weaponmode power.
FX = FX_CreateAHeroBlademaster
End
 
In theory they lost 25% hp while you use this power and must be killed faster

and im check weapon

;------------------------------------------------------------------------------
Weapon IsengardFanaticDeathWishSword   ; BALANCE Berserker Weapon
  LeechRangeWeapon      = Yes
  RadiusDamageAffects = ENEMIES SELF
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
  MeleeWeapon           = Yes
  DelayBetweenShots     = ISENGARD_FANATIC_DEATH_DELAYBETWEENSHOTS            ; time between shots, msec
  PreAttackDelay        = ISENGARD_FANATIC_PREATTACKDELAY             ; 433 is natural time of the stabbing animation.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FiringDuration        = ISENGARD_FANATIC_FIRINGDURATION            ; min 600 for anim
  FireFX                = FX_GondorSwordHit
  
 
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = ISENGARD_FANATIC_DEATH_DAMAGE
    Radius        = ISENGARD_FANATIC_RADIUS
    DelayTime     = 0
    DamageType    = HERO
    DamageFXType  = SWORD_SLASH
    DeathType     = NORMAL
    DamageArc   = ISENGARD_FANATIC_ARC
    DamageScalar  = 10% NONE +IsengardFanatic
  End
 
;  MetaImpactNugget      ; A Nugget that throws things back with force
;    ShockWaveAmount   = 20.0
;    ShockWaveRadius   = 10.0
;    ShockWaveTaperOff = 1.0
;    ShockWaveArc      = 90
;    HeroResist   = 0.90 ; 90% resistance to heroes
;  End
End


And i try to play with parameters, like add more than 10%, add more damage (Damage        = ISENGARD_FANATIC_DEATH_DAMAGE to Damage        = 3000)

But they dont damage, kill himself when they attacking enemies.


#7 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 24 September 2018 - 02:11 AM

RadiusDamageAffects = ALLIES SELF SUICIDE ENEMIES  NOT_SIMILAR NEUTRALS

 

 
DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 1000000
    Radius        = 300.0
    DelayTime     = 0
    DamageType    = SIEGE
    DamageFXType  = FLAME
    DeathType     =  NORMAL
    SpecialObjectFilter = NONE +WhateverObject   
    ForceKillObjectFilter    = NONE +WhateverObject   
  End

Edited by JUS_SAURON, 24 September 2018 - 02:12 AM.


#8 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 26 September 2018 - 01:45 PM

Ok thanks for help guys!

So if change Modifier = HEALTH_MULT 75% to Modifier = HEALTH_MULT 1% you unit lost practically all hp)
i do not test this but i think 0,1% will be worked too.
But 0% do not do effect((


Edited by Slava Shadrinov, 26 September 2018 - 01:45 PM.


#9 Eol Ecthelion

Eol Ecthelion
  • Members
  • 25 posts

Posted 13 February 2019 - 07:29 AM

I don't know what exactly are you looking for, but yesterday i was precisely looking a suicide weapon and this worked fine with no colateral damage.

 
  Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_SlamWeaponFireUpdateCast123
SpecialPowerTemplate    = SpecialAbilityWordOfPower
SpecialWeapon = EuthanasiaWeapon_New
WhichSpecialWeapon = 1
StartAbilityRange = 200
SkipContinue = Yes
UnpackTime = 2000 ;;-;; 1000
PackTime = 1300
MustFinishAbility = Yes
ApproachRequiresLOS = No
End
 
 
Weapon EuthanasiaWeapon_New
RadiusDamageAffects = ENEMIES ALLIES SELF
AttackRange = 0
MinimumAttackRange = 0
LeechRangeWeapon = Yes
AcceptableAimDelta = 180
DamageDealtAtSelfPosition = Yes
PreAttackType = PER_SHOT
PreAttackDelay = 0
FiringDuration = 1
AutoReloadsClip  = Yes
ClipSize  = INFINITE_CLIP_SIZE
CanFireWhileMoving = Yes
DamageNugget
Damage        = 1000000
Radius        = 0
DelayTime     = 0
DamageType    = SIEGE
  DeathType     = EXTRA_2
;ForceKillObjectFilter = ANY +HERO SELF
End
End


#10 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 16 February 2019 - 08:36 PM

Hi Eol Ecthelion and thanks for answer.
 
Yes this weapon works great but if you are very close to someone this deal damage to you allies, and if you remove ALLIES from RadiusDamageAffects = this weapon dont be worked on you.
But i solved this problem with adding filter DamageNugget:
 
SpecialObjectFilter = NONE SAME_PLAYER +"yourobject"
 
But if I try to do this with any infantry (everyone who can be created several times), this filter will not help, because two units standing very close to each other can cause damage to each other.

Edited by Slava Shadrinov, 16 February 2019 - 08:41 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users