wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-09-2009, 07:22 PM   #16
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

I get -6.9... when i try to give a negative value in the object editor, and the damage calculated is right.
So there is an hardcoded value but you can have a negative armour, and it seems not less than -6.9...
Btw i've tried it for a footman.

Last edited by Troll-Brain : 05-09-2009 at 07:23 PM.
Troll-Brain is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-09-2009, 09:30 PM   #17
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

The library has been updated to properly handle the following things:
  • The 'Armor Damage Reduction Multiplier' constant is not used by Blizzard's armor system for negative armor.
  • Negative armor calculation needed a different formula to properly return the correct armor, hence the current need for Logarithm.
  • The system will no longer accidentally kill units whose max life is under the DAMAGE_TEST constant's value; there is now an ObjectMerger ability creation call to handle this.
  • WC3 armor caps in the negatives for damage reduction at -71%, so I made mention of this limitation. This corresponds to an armor value of -20, so if you use GetUnitArmor on a unit with -100 armor, it will return -20.
  • Updated the documentation to explain that ATTACK_TYPE_CHAOS shouldn't be changed or that you should use something that deals 100% to all types for the damage. Also updated the documentation with all of the new stuff it has.
Thanks for the feedback all!
__________________

Last edited by Rising_Dusk : 05-09-2009 at 09:31 PM.
Rising_Dusk is offline   Reply With Quote
Old 05-10-2009, 03:50 PM   #18
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Updated again to fix some documentation oversights and disable the triggering trigger (if enabled) so as to work happily with damage detection systems.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-10-2009, 04:14 PM   #19
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

The boolean "adlv" is unneeded, you can simply remove the ability, if the unit hasn't it won't crash.
You could also simply use GetTriggeringTrigger().

Yes, i'm annoying, i know it.

Last edited by Troll-Brain : 05-10-2009 at 04:19 PM.
Troll-Brain is offline   Reply With Quote
Old 05-10-2009, 04:18 PM   #20
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Troll-Brain
the boolean "adlv" is unneeded, you can simply remove the ability, if the unit hasn't it won't crash.
Blah, you're right. You should've said that before I updated. *Grumbles*
__________________

Last edited by Rising_Dusk : 05-10-2009 at 04:18 PM.
Rising_Dusk is offline   Reply With Quote
Old 05-10-2009, 04:20 PM   #21
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

And what about GetTriggeringTrigger (edited my post after you have answered)
Troll-Brain is offline   Reply With Quote
Old 05-10-2009, 04:27 PM   #22
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I'd rather store the trigger than call GetTriggeringTrigger() four times. Anyways, updated.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-11-2009, 03:39 AM   #23
fX_
User
 
fX_'s Avatar
 
Join Date: Jan 2007
Posts: 528

Submissions (2)

fX_ will become famous soon enough (38)fX_ will become famous soon enough (38)

Default

why is it called armor utils
fX_ is offline   Reply With Quote
Old 05-11-2009, 04:19 AM   #24
wraithseeker
User
 
Join Date: Feb 2009
Posts: 406

wraithseeker is on a distinguished road (17)

Default

Because it does stuff that is related to armour like getting a unit's armour.

It would be nice to include a GetUnitArmourType function.

Last edited by wraithseeker : 05-11-2009 at 11:23 AM.
wraithseeker is offline   Reply With Quote
Old 05-11-2009, 06:45 PM   #25
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

There is no way to effectively implement GetUnitArmorType for any variation of armor types other than the defaults in WC3. If you change those tables at all, the whole function would be fried.

I was eventually thinking of implementing a 2-D array that a user could load with the gameplay constants and then do the math based on that, but I feel like it's in no way critical. If you trigger your own armor types, it'd be easier anyways.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-12-2009, 12:43 AM   #26
Ignitedstar
Moderator
 
Ignitedstar's Avatar


RP Section Moderator
 
Join Date: Jul 2005
Posts: 1,755

Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)

Send a message via MSN to Ignitedstar Send a message via Yahoo to Ignitedstar
Default

Finally. Something that's more up-to-date compared to ADS. Thanks, Dusk!

Now, I just have to make sure that this works with the new numbers that I propped into the damage tables. So long as I have a damage type that hits 100% to everything, there shouldn't be any problem, I hope?
__________________
Current Activity: School
Evaluation: I actually logged in?!?!
"If I speak in the tongues of men and of angels, but have not love,
I am only a resounding gong or a clanging cymbal.
If I have the gift of prophecy and can fathom all mysteries and all knowledge,
and if I have a faith that can move mountains, but have not love, I am nothing."

1 Corinthians 13:1-2

Current Works:
None.
Ignitedstar is offline   Reply With Quote
Old 05-12-2009, 01:00 AM   #27
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by IgnitedStar
Now, I just have to make sure that this works with the new numbers that I propped into the damage tables. So long as I have a damage type that hits 100% to everything, there shouldn't be any problem, I hope?
Right, unless you have other damage altering things at play. For instance, I think if you use a spell like 'Berserk' before using GetUnitArmor(), it'll return less armor than you actually have. (Assuming you use the damage altering of the spell) These are all the same limitations that Daelin's system had, though.

I still recommend coding all damage altering things yourself, it'll save you trouble in the long run.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-12-2009, 01:13 AM   #28
Ignitedstar
Moderator
 
Ignitedstar's Avatar


RP Section Moderator
 
Join Date: Jul 2005
Posts: 1,755

Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)

Send a message via MSN to Ignitedstar Send a message via Yahoo to Ignitedstar
Default

Oh, that's not a problem. I don't think it matters, but does ANYONE know whether those count armor beforehand or after? I'm also taking about other spells like Mana Shield, an adjusted Anti-Magic Shell that reduces spell damage and not make units immune to it, Avatar, and building type adjustments (like in Starfall, Blizzard, and Flame Strike).

Which reminds me, if someone wanted to fix the problem of using a damage-altering spell like Berserk which changes the amount of damage the caster takes, wouldn't it be easier just to use EVENT_PLAYER_UNIT_SPELL_CAST to deal damage to the unit before the effects happen so that the amount of armor received from the system doesn't screw up? I'm pretty sure that it activates before the effect of the spell. I know that I use that for a hero of mine that requires charges to cast some of his spells. It stops him from wasting the spell and the mana used to cast it.

Eh, I don't know. Just pondering out loud.
__________________
Current Activity: School
Evaluation: I actually logged in?!?!
"If I speak in the tongues of men and of angels, but have not love,
I am only a resounding gong or a clanging cymbal.
If I have the gift of prophecy and can fathom all mysteries and all knowledge,
and if I have a faith that can move mountains, but have not love, I am nothing."

1 Corinthians 13:1-2

Current Works:
None.
Ignitedstar is offline   Reply With Quote
Old 05-12-2009, 01:48 AM   #29
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

It'd be easier to just code all damage done in your map using a damage detection system and then just augment the damage on your own as necessary for armor types, damage types, spells, etc. That's really the best way to do it, I can't emphasize enough.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-12-2009, 02:07 AM   #30
Ignitedstar
Moderator
 
Ignitedstar's Avatar


RP Section Moderator
 
Join Date: Jul 2005
Posts: 1,755

Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)

Send a message via MSN to Ignitedstar Send a message via Yahoo to Ignitedstar
Default

Oh, boy. It looks like I need ADS, after all. I still need GetUnitArmorType, which is what this doesn't have... but it's not like I NEED it... I'll find some workaround.
__________________
Current Activity: School
Evaluation: I actually logged in?!?!
"If I speak in the tongues of men and of angels, but have not love,
I am only a resounding gong or a clanging cymbal.
If I have the gift of prophecy and can fathom all mysteries and all knowledge,
and if I have a faith that can move mountains, but have not love, I am nothing."

1 Corinthians 13:1-2

Current Works:
None.
Ignitedstar is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:30 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services