Armor and Spells: Damage reduction Question

User avatar

Topic author
GnaReffotsirk
Zerg Larva Herder
Zerg Larva Herder
Posts: 338
Joined: Sat Nov 15, 2008 4:54 am
Status: Offline

Armor and Spells: Damage reduction Question

Postby GnaReffotsirk » Wed Dec 10, 2008 4:03 am

Is it possible to create a spell that has the same damage rating to a given armor type, as piercing, normal, magic, etc.? Like, for example, fireball spell that does 120% damage to medium armor, but does 50% to heavy armor.

Is it possible to create this effect?

Is there a spell in WC3 that follows this mechanic?

How can this be done?

Also, is it possible to edit the distance between units in formation? Like, say, footmen would walk closer together than the default.

Is it possible to edit the formations? like, instead of box formation, we have a line formation, or wedge as default.
Last edited by GnaReffotsirk on Wed Dec 10, 2008 4:32 am, edited 1 time in total.
Image

User avatar

Ricky_Honejasi
Xel'naga Solar Moderator
Xel'naga Solar Moderator
Posts: 2023
Joined: Wed Aug 16, 2006 3:50 pm
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby Ricky_Honejasi » Wed Dec 10, 2008 4:53 am

GnaReffotsirk wrote:Is it possible to create a spell that has the same damage rating to a given armor type, as piercing, normal, magic, etc.? Like, for example, fireball spell that does 120% damage to medium armor, but does 50% to heavy armor.

Is it possible to create this effect?

It might be possible but you will need to consider every possible case on a unit-type basis instead of armor since there is no easy way to do it. For example, if it's a knight (which is a unit-type with heavy armor), it only suffers 50% damage instead of "picked unit-type has heavy armor so 50% damage".

This is obviously painful if we consider every single creep creature possible in addition of whatever custom unit added in the mix. Obviously requires an array unit-type variable along with some other array variable to remember their armor type if you want to keep any sanity in this.

This is also presuming you want specific spells with different spell damage ratings for the same armor-type instead of all dealing the same % of damage on a specific armor-type. Otherwise, you modify the gameplay constants.

Is there a spell in WC3 that follows this mechanic?

Only some and very partially (only one or two specific armor types) so ultimately better say no in the grand scheme of things.

Also, is it possible to edit the distance between units in formation? Like, say, footmen would walk closer together than the default. Is it possible to edit the formations? like, instead of box formation, we have a line formation, or wedge as default.
I believe not. Probably hardcoded too. Even with lots of triggers, you will have force a whole group to move each unit individually so you can make your own formation by constantly order each unit the way you want.

Honestly, more pain than it is worth unless you have a very special reason to go that far.

User avatar

Topic author
GnaReffotsirk
Zerg Larva Herder
Zerg Larva Herder
Posts: 338
Joined: Sat Nov 15, 2008 4:54 am
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby GnaReffotsirk » Wed Dec 10, 2008 11:47 am

Thanks Ricky!
Image

User avatar

Mucky
Protoss Khalai Missionary
Protoss Khalai Missionary
Posts: 1037
Joined: Thu Aug 24, 2006 10:35 pm
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby Mucky » Wed Dec 10, 2008 12:20 pm

Open WorldEdit -> Click Advanced -> Go to Gameplay Constants -> Find 'Combat - Damage Bonus Table - Spells'

There is nothing in trigger conditions that can calculate a unit's armor or armor-type, unfortunately.

User avatar

Milldawg
Zerg Defiler Nutritionist
Zerg Defiler Nutritionist
Posts: 733
Joined: Fri Aug 25, 2006 1:00 pm
Location: US
Contact:
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby Milldawg » Wed Dec 10, 2008 1:21 pm

Another option would be to trigger the spell using dummy units. Whenever your guy "casts fireball," it creates an invisible dummy unit who has an attack animation that looks like a fireball and whose damage is piercing, magic, etc. Ricky can tell you more about dummy units ;)

User avatar

Mucky
Protoss Khalai Missionary
Protoss Khalai Missionary
Posts: 1037
Joined: Thu Aug 24, 2006 10:35 pm
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby Mucky » Wed Dec 10, 2008 3:51 pm

The problem with dummy units is that they're supposed to emulate the caster launching the fireball. If you don't know exactly what you're doing (probably involves a lot of trial-and-error in the unit's art fields), the fireball's origin point will be offset from the caster. Whether you're using dummy units to fire the projectile or simply having the caster fire it, you'd need to go to Gameplay Constants to get the values you want. Unless you only want Fireball obeying these rules, I'd take the simpler route and modify the Spells damage value tables.

User avatar

RazorclawX
Xel'naga World Shaper
Xel'naga World Shaper
Posts: 1598
Joined: Thu Aug 24, 2006 7:19 pm
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby RazorclawX » Wed Dec 10, 2008 6:31 pm

Mucky wrote:Open WorldEdit -> Click Advanced -> Go to Gameplay Constants -> Find 'Combat - Damage Bonus Table - Spells'

There is nothing in trigger conditions that can calculate a unit's armor or armor-type, unfortunately.


That affects every spell; if you only wanted it to affect one spell you're out of luck.
Image
-- Razorclaw X
Creator of Wanderers of Sorceria and Vision of the Future

User avatar

Topic author
GnaReffotsirk
Zerg Larva Herder
Zerg Larva Herder
Posts: 338
Joined: Sat Nov 15, 2008 4:54 am
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby GnaReffotsirk » Thu Dec 11, 2008 6:45 am

What about a damage modifier spell which adds damage bonus to a unit's attack, and costs mana everytime the unit attacks?

Like, the Searing Arrow hero spell? Say, we give it to the footman and archer, and the bonus is +20, does the Searing Arrow bonus adhere to each unit's damage ratings over their targets?

What I wanted to do was give a kind of limited attack bonus for each unit in WC3. If these units engage in battle too long, their attack potential is exhausted (mana depleted by attacking targets).
Last edited by GnaReffotsirk on Thu Dec 11, 2008 7:05 am, edited 1 time in total.
Image

User avatar

Mucky
Protoss Khalai Missionary
Protoss Khalai Missionary
Posts: 1037
Joined: Thu Aug 24, 2006 10:35 pm
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby Mucky » Thu Dec 11, 2008 8:06 pm

When a unit uses Searing Arrows, it deals damage using the same damage type as the unit.

...If that's what your question is.

Also, giving a melee unit an arrow orb will cause some issues.

User avatar

Topic author
GnaReffotsirk
Zerg Larva Herder
Zerg Larva Herder
Posts: 338
Joined: Sat Nov 15, 2008 4:54 am
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby GnaReffotsirk » Fri Dec 12, 2008 11:53 am

Yup, that was the question.

You're awesome! Thanks, Mucky!!

Woot!
Image


tipereth
Zerg Hydralisk Nail Stylist
Zerg Hydralisk Nail Stylist
Posts: 599
Joined: Tue Sep 19, 2006 7:37 pm
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby tipereth » Fri Dec 12, 2008 12:55 pm

Fyi you could easily do the effect Milldawg was talking about, have the fireball spell art shoot a fireball projectile or whatever and then have the dummy unit use an invisible projectile with the same speed as the fireball. They wont sync perfectly but it will be close enough that it will be hard to notice.

This would still involve triggering every spell that did reduced/bonus damage though, so if its a ton of spells you might be better off just changing global constants.

User avatar

Topic author
GnaReffotsirk
Zerg Larva Herder
Zerg Larva Herder
Posts: 338
Joined: Sat Nov 15, 2008 4:54 am
Status: Offline

Re: Armor and Spells: Damage reduction Question

Postby GnaReffotsirk » Fri Dec 12, 2008 10:22 pm

The problem is, there are a lot of units engaging on screen with less spaces. And the coding would hurt. The searing arrows would do fine for this little project for now.

However, if you don't mind, maybe the project would need the method you're proposing, so, I might PM you for help.

You guys are the best!
Image


Return to “WarCraft Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests