Need help modding DA abilities
EDIT2-Now I just need to make it less destructive, add more comments if you wish
EDIT-nm, I was just missing two lines that I missed in the other thread I linked, so it should be working now. Although if I didn't do something right go ahead and post anyway.
I'm trying to mod the abilities for DA, like changing the energy costs and adding buffs, but I couldn't get it to work. In game the abilites are grayed out in the bottom of the screen, and in the ability assigning tab none of the tooltips for the skills show up when I hover the mouse over them. Here's what I've got so far
folders
mods>[TheMod]>hook>units>heroes>HDemon
I have a working mod_info in the mod folder, and in the HDemon folder I copied the HDemon_Abilites from dgdata and put it there.
I changed the energy costs, cooldown, and damage for warp strike 1 through 4 and spine attack 1 through 4, and also put in buffs for them. For the buffs I went here
http://forums.demigodthegame.com/370997
so it looks like this (EDIT2-changed the code to the working version)
- #################################################################################################################
- # Warp Strike I
- #################################################################################################################
- AbilityBlueprint {
- Name = 'HDemonWarpStrike01',
- DisplayName = '<LOC ABILITY_DA_0001>Warp Strike I',
- Description = '<LOC ABILITY_DA_0002>Demon Assassin warps to an enemy and instantly strikes, dealing [GetDamage] damage and permanently increasing weapon damage by [GetDamageBonusBuff]%.',
- AbilityType = 'TargetedUnit',
- TargetAlliance = 'Enemy',
- TargetCategory = 'ALLUNITS - UNTARGETABLE',
- TargetingMethod = 'HOSTILETARGETED',
- EnergyCost = 150,
- RangeMax = 10,
- Cooldown = 6,
- DamageAmt = 50,
- DamageType = 'Spell',
- UISlot = 1,
- HotKey = '1',
- CastAction = 'WarpStrike',
- FollowThroughTime = 0.3,
- GetDamage = function(self) return math.floor( self.DamageAmt ) end,
- GetDamageBonusBuff = function(self) return math.floor( Buffs['HDemonWarpStrikeBuff011'].Affects.DamageBonus.Mult * 100 ) end,
- OnStartAbility = function(self, unit, params)
- -- Set the old target so we attack the target of Warp Strike after warping and continue attacking them if
- -- we decide to use another ability after warping or if they run away.
- local tac = unit:GetAttacker()
- tac:SetOldTarget(params.Targets[1])
- ForkThread(WarpStrike, self, unit, params)
- Buff.ApplyBuff(unit, 'HDemonWarpStrikeBuff011', unit)
- end,
- Icon = '/DGDemonAssassin/DA_WarpStrike',
- }
- BuffBlueprint {
- Name = 'HDemonWarpStrikeBuff011',
- Debuff = false,
- DisplayName = 'Warp Strike Weapon Damage Buff',
- Description = '+10% Weapon Damage',
- BuffType = 'HDEMONWARPSTRIKEBUFF',
- Stacks = 'REPLACE',
- Duration = -1,
- Affects = {
- DamageBonus = {Mult = 0.10},
- },
- Icon = '/DGDemonAssassin/DA_WarpStrike',
- }
and
- #################################################################################################################
- # Spine Attack I
- #################################################################################################################
- AbilityBlueprint {
- Name = 'HDemonSpineAttack01',
- DisplayName = '<LOC ABILITY_DA_0008>Spine Attack I',
- Description = '<LOC ABILITY_DA_0009>Demon Assassin throws a deadly barb from his tail, dealing [GetDamage] damage and permanently increasing attack speed by [GetRateOfFireBuff]%.',
- AbilityType = 'TargetedUnit',
- ReengageTargetAfterUse = true,
- TargetAlliance = 'Enemy',
- TargetCategory = 'ALLUNITS - UNTARGETABLE',
- TargetingMethod = 'HOSTILETARGETED',
- EnergyCost = 150,
- RangeMax = 10,
- Cooldown = 3,
- DamageAmt = 125,
- DamageType = 'Spell',
- UISlot = 2,
- HotKey = '2',
- CastingTime = 0.3,
- CastAction = 'SpineAttack',
- FollowThroughTime = 0.1,
- GetDamage = function(self) return math.floor( self.DamageAmt ) end,
- GetRateOfFireBuff = function(self) return math.floor( Buffs['HDemonSpineAttackBuff011'].Affects.RateOfFire.Mult * 100 ) end,
- OnStartAbility = function(self, unit, params)
- ForkThread(SpineAttack, self, unit, params)
- Buff.ApplyBuff(unit, 'HDemonSpineAttackBuff011', unit)
- end,
- Icon = '/DGDemonAssassin/DA_SpineAttack',
- }
- BuffBlueprint {
- Name = 'HDemonSpineAttackBuff011',
- Debuff = false,
- DisplayName = 'Spine Attack Attack Speed Buff',
- Description = '+10% Attack Speed',
- BuffType = 'HDEMONWARPSTRIKEBUFF',
- Stacks = 'REPLACE',
- Duration = -1,
- Affects = {
- RateOfFire = {Mult = 0.10},
- },
- Icon = '/DGDemonAssassin/DA_SpineAttack',
- }
Can someone please explain what I have to do to make the skills work?