[en] - Modding Corner > General Modding Questions

Adding an attack effect to a hero?

(1/1)

DropItLikeItsDogg:
Hello everyone. I have a question. How can I add Witch King's melee attack range, shockwave and knock down to an another hero, for example Saruman or Gandalf? Thanks.  :)

Elendils Cousin 3. Grades:
1. Go to the Witch-King and find his weaponset.
2. Take a look at his melee weapon and copy what you want to copy: Attack range is pretty self explanatory, knockdown effects are called MetaImpactNugget in the code.
3. Find the melee weapon of the hero that you want to change and paste your desired changes there.

DropItLikeItsDogg:
Sorry, if you don't mind can you explain it in a little detailed way? I tried some but I couldn't.

Elendils Cousin 3. Grades:
Find the Witch-King's weapon.


* 1. In Edain, the Witch-King of Angmar is located the edain_data.big under data/ini/object/evilfaction/units/angmar/angmarwitchking.ini
* 2. Open his .ini and scroll down until you get to his weaponset, it should look something like this:
--- Code: ---    WeaponSet
        Weapon               = PRIMARY    AngmarWitchkingStartWeapon
        AutoChooseSources    = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    End
--- Ende Code ---
Find the melee weapon's properties.


* 1. Now we copy AngmarWitchkingStartWeapon and go looking for it in the weapon.ini, weapon.inc or weapon_attack.inc. We find it in the weapon.inc. [/list]
--- Code: ---Weapon AngmarWitchkingStartWeapon
    LeechRangeWeapon        = Yes
    AttackRange             = STANDARD_MELEE_ATTACK_RANGE
    MeleeWeapon             = Yes
    DelayBetweenShots       = WITCHKING_MACE_DELAYBETWEENSHOTS         ; time between shots, msec
    PreAttackDelay          = WITCHKING_MACE_PREATTACKDELAY             ; 300 is mace swing delay time before contact with target.
    PreAttackType           = PER_SHOT ; Do the delay each time we attack
    FireFX                  = FX_GondorSwordHit
    RadiusDamageAffects     = ENEMIES NEUTRALS NOT_SIMILAR
    FiringDuration          = WITCHKING_MACE_FIRINGDURATION   


    DamageNugget                        ; A basic Nugget that just does damage
        Damage             = 200
        Radius             = 20.0
        DelayTime          = 0
        DamageType         = HERO
        DamageFXType       = MAGIC
        DeathType          = NORMAL
        DamageScalar       = 10% NONE +RohanEowyn_mod
    End
DamageNugget                        ; A basic Nugget that just does damage
        Damage             = 60
        Radius             = 0.0
        DelayTime          = 0
        DamageType         = HERO
        DamageFXType       = MAGIC
        DeathType          = NORMAL
        DamageScalar       = 10% NONE +RohanEowyn_mod
    End
    MetaImpactNugget                         ; A Nugget that throws things back with force
        HeroResist        = STRONG_HERO_HERORESIST
        ShockWaveAmount   = 50.00
        ShockWaveRadius   = 20
        ShockWaveTaperOff = 0.75
        ShockWaveZMult    = 1.20
    End
End
--- Ende Code ---

* 2. As I mentioned earlier, knockback is determined by a MetaImpactNugget. So we copy the nugget.

Paste the properties into your target weapon.

Now we repeat the process of steps 1 and 2, except instead of copying something we will be pasting something: Find Gandalf or Saruman, find Gandalf's or Saruman's weapon and then add the MetaImpactNugget to it. I will put this entire step into a spoiler - I recommend you try doing it by yourself before looking into the spoiler. It's not very difficult, I'm sure you can do it. :)


* Saruman is located in data/ini/object/evilfaction/units/isengard/saruman.ini.
* We look for his weapon: It's called SarumanWeapon.
* We find his weapon's properties: This time, they're in the weapon.ini.
* We paste our new MetaImpactNugget to the weapon. Saruman already has knockback, so you can choose between replacing the old nugget or simply adding the new one on top of it. This is what it should look like after replacing the old nugget:
--- Code: ---Weapon SarumanWeapon
  IdleAfterFiringDelay  = 0
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
  MeleeWeapon           = Yes
  DelayBetweenShots     = SARUMAN_DELAYBETWEENSHOTS             ; time between shots, msec
  PreAttackDelay        = SARUMAN_PREATTACKDELAY                 ; 433 is natural time of the stabbing animation.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FiringDuration        = SARUMAN_FIRINGDURATION                 ; min 600 for anim
  FireFX                = FX_GondorSwordHit
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = SARUMAN_DAMAGE                   
    Radius        = 0.0
    DelayTime     = 0
    DamageType    = HERO
    DamageFXType  = SWORD_SLASH
    DeathType     = NORMAL
  End
    MetaImpactNugget                         ; A Nugget that throws things back with force
        HeroResist        = STRONG_HERO_HERORESIST
        ShockWaveAmount   = 50.00
        ShockWaveRadius   = 20
        ShockWaveTaperOff = 0.75
        ShockWaveZMult    = 1.20
    End
End
--- Ende Code ---

DropItLikeItsDogg:
Thanks for reply.   :)

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln