Damage Questions (IDDS related)

This is where all discussion of WC3 mapmaking should be held. This forum exists particularly for mapmaking needs. If you have a question on how something works or have need for some code review, this is the place to put it.
Post Reply
User avatar
Deschain
Diabolical Doomsayer
Posts: 703
Joined: Thu Jan 17, 2008 9:44 am
Location: Four Trials

Damage Questions (IDDS related)

Post by Deschain » Thu Feb 12, 2009 11:09 am

1. Requirment: IDDS (Dusk's Intricate Damage Detection System). How would one make damage subtractive. For example If a hero deals 11 damage (from any source, but I'm specifically interested in attack.) and the shield is 3 how would I make so that damage dealt to hero would be only 8? I would have to add hardened skins that allows 0.01 damage (so it can be detected but doesn't reduce ally hit points) to all units, right? And then somehow trigger the damage, right? But how would I make it
2. Requirement: IDDS. Is there any way to connect a damage type (example Chaos ) that unit causes to a IDDS custom damage type (example Fire) we made?
3. Is there some bonus mod or trigger that can increase a hero's base attack (Agility, Intelligence and Strength do not contribute to attack in any possible way) without creating green bonus letters (I would prefer not to use upgrades to add base attack since it looks ugly).

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: Damage Questions (IDDS related)

Post by Rising_Dusk » Thu Feb 12, 2009 11:46 am

It's the Intuitive Damage Detection System, not Intricate. :p
Deschain wrote:1. Requirment: IDDS (Dusk's Intricate Damage Detection System). How would one make damage subtractive. For example If a hero deals 11 damage (from any source, but I'm specifically interested in attack.) and the shield is 3 how would I make so that damage dealt to hero would be only 8? I would have to add hardened skins that allows 0.01 damage (so it can be detected but doesn't reduce ally hit points) to all units, right? And then somehow trigger the damage, right? But how would I make it
Well, I was working on a shield system mod for the IDDS lately. If you want it to be perfect, it's rather complicated, which was why I was going to make it. You'd probably be better off waiting until I'm not lazy and do it myself, but meh. If you used the hardened skin method, you'd need to have some information attached to the unit to tell you its attack damage range. Use UnitIndexingUtils or Table or something for that.
Deschain wrote:2. Requirement: IDDS. Is there any way to connect a damage type (example Chaos ) that unit causes to a IDDS custom damage type (example Fire) we made?
Sure, it's an easy mod to make. Just create an iconless ability and add it to units with "chaos" damage attack type. Then on the IDDS callback check GetTriggerDamageType() == DAMAGE_TYPE_ATTACK and GetUnitAbilitylevel(GetTriggerDamageSource(), 'A000') > 0 where A000 is the raw of that iconless ability.
Deschain wrote:3. Is there some bonus mod or trigger that can increase a hero's base attack (Agility, Intelligence and Strength do not contribute to attack in any possible way) without creating green bonus letters (I would prefer not to use upgrades to add base attack since it looks ugly).
Look up UnitProperties at WC3C.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

User avatar
Deschain
Diabolical Doomsayer
Posts: 703
Joined: Thu Jan 17, 2008 9:44 am
Location: Four Trials

Re: Damage Questions (IDDS related)

Post by Deschain » Thu Feb 12, 2009 12:55 pm

Nice idea duskeh.

I know about unit properties, I just don't know if there is an ability that changes base attack without displaying green letters.

PS. If you do make the shield system could you make it global in some way so it would resemble Starcraft.
Those who seek war deserve for the war to find them.

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: Damage Questions (IDDS related)

Post by Rising_Dusk » Thu Feb 12, 2009 1:12 pm

Deschain wrote:PS. If you do make the shield system could you make it global in some way so it would resemble Starcraft.
I will, no doubts there. Anyways, it would be global and have the capacity to work as a flat reduction or percent.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

User avatar
Deschain
Diabolical Doomsayer
Posts: 703
Joined: Thu Jan 17, 2008 9:44 am
Location: Four Trials

Re: Damage Questions (IDDS related)

Post by Deschain » Thu Feb 12, 2009 1:33 pm

Than IDDS will become IDE (Intuitive Damage Engine ) :P

As for that ability that changes base attack (as in increases the damage range of attack without adding green text, i.e. 12-13 becomes 13-15 and not 12-13+2). Any ideas? I would really hate to have to use upgrades for something as trivial as that.
Those who seek war deserve for the war to find them.

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: Damage Questions (IDDS related)

Post by Rising_Dusk » Thu Feb 12, 2009 1:36 pm

There is nothing other than attributes or upgrades that change the base number of the attack value.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

User avatar
Deschain
Diabolical Doomsayer
Posts: 703
Joined: Thu Jan 17, 2008 9:44 am
Location: Four Trials

Re: Damage Questions (IDDS related)

Post by Deschain » Thu Feb 12, 2009 1:53 pm

Problems solved then...
Those who seek war deserve for the war to find them.

User avatar
Fledermaus
Keeper of the Keys
Posts: 354
Joined: Fri Feb 01, 2008 9:55 am
Location: New Zealand
Contact:

Re: Damage Questions (IDDS related)

Post by Fledermaus » Thu Feb 12, 2009 9:09 pm

Sure there is, 'AIaa' (Item Permanent Damage Gain).

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: Damage Questions (IDDS related)

Post by Rising_Dusk » Thu Feb 12, 2009 9:49 pm

Wait, is that a tome? That exists? Oo
Learn something new everyday..
"I'll come to Florida one day and make you look like a damn princess." ~Hep

User avatar
Deschain
Diabolical Doomsayer
Posts: 703
Joined: Thu Jan 17, 2008 9:44 am
Location: Four Trials

Re: Damage Questions (IDDS related)

Post by Deschain » Fri Feb 13, 2009 2:01 am

Tnx Fledermaus, you are a life saver.

PS. I tried to add ability to a hero but to no avail. On init I use the global variable MK to set it to my Mountain King unit

Code: Select all

function Trig_add_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "Add" )
    call UnitAddAbility( udg_MK, 'AImh' )
    call UnitAddAbility( udg_MK, 'AIaa' )
endfunction

//===========================================================================
function InitTrig_add takes nothing returns nothing
    set gg_trg_add = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_add, Player(0), "add", true )
    call TriggerAddAction( gg_trg_add, function Trig_add_Actions )
endfunction
Am I doing something wrong or is the ability in such way it can't be added through triggers?
Those who seek war deserve for the war to find them.

Greenspawn
Keeper of the Keys
Posts: 434
Joined: Fri Jan 18, 2008 4:50 pm
Location: Massachusetts

Re: Damage Questions (IDDS related)

Post by Greenspawn » Fri Feb 13, 2009 4:04 pm

Is is possible to create a spell that deals the caster's attack damage when it hits units? I'm not talking about Rikter's Whirlwind, where the attack is simulated. I mean detecting the caster's attack damage and dealing that damage to the targets of the spell.
Math is # |e^iπ|
"I can't imagine getting hit by a giant rock and not being maimed or crippled or ruined" -Dusk

Logue: Please replace the toilet paper when you use it all. For some reason my 5 year old son believes if it's not there he does not have to wipe.

User avatar
Fledermaus
Keeper of the Keys
Posts: 354
Joined: Fri Feb 01, 2008 9:55 am
Location: New Zealand
Contact:

Re: Damage Questions (IDDS related)

Post by Fledermaus » Fri Feb 13, 2009 8:28 pm

Deschain wrote:PS. I tried to add ability to a hero but to no avail. On init I use the global variable MK to set it to my Mountain King unit
Am I doing something wrong or is the ability in such way it can't be added through triggers?
Not sure, try creating a tome with the ability and giving the unit that instead?

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: Damage Questions (IDDS related)

Post by Rising_Dusk » Fri Feb 13, 2009 9:24 pm

Greenspawn wrote:Is is possible to create a spell that deals the caster's attack damage when it hits units? I'm not talking about Rikter's Whirlwind, where the attack is simulated. I mean detecting the caster's attack damage and dealing that damage to the targets of the spell.
There is no native for getting a unit's damage or armor. If you use some BonusMod derivative for your bonus attack damage and somehow keep track of (Map-specifically) the base damage, you can do it by some formula. This is how I do a skill like Rikter's that takes his attack damage into consideration.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

Here-b-Trollz
Noobite Warrior
Posts: 9
Joined: Thu Aug 21, 2008 9:21 pm

Re: Damage Questions (IDDS related)

Post by Here-b-Trollz » Sat Mar 14, 2009 11:16 am

Deschain wrote:1. Requirment: IDDS (Dusk's Intricate Damage Detection System). How would one make damage subtractive. For example If a hero deals 11 damage (from any source, but I'm specifically interested in attack.) and the shield is 3 how would I make so that damage dealt to hero would be only 8? I would have to add hardened skins that allows 0.01 damage (so it can be detected but doesn't reduce ally hit points) to all units, right? And then somehow trigger the damage, right? But how would I make it
You can do it without hardened skin. The most common method is just to add life (in this case 3) when the unit takes damage, since EVENT_UNIT_DAMAGED actually fires just before the unit takes damage. In some instances, though, if you are blocking the damage, you might need to use a 0. second timer and an uber life bonus ability.

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: Damage Questions (IDDS related)

Post by Rising_Dusk » Sun Mar 15, 2009 12:43 pm

Hardened Skin is the method by which one would trigger every attack in the map. This way, if you can back-calculate a unit's attack damage, you can run it through your DDS (in my case the IDDS) and still show the unit's attack damage on the command card. You don't need the Hardened Skin trick for general damage detection, though, Trollzies is right.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

Post Reply

Return to “Custom Map Creation”