• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Critical/Evasion/Block system request

Status
Not open for further replies.
Level 9
Joined
Jul 10, 2011
Messages
562
hey guys ;D

because i wanna add 4 different passives to each hero in my map i wanna request the systems for them here because i dont have much time for coding at the moment and if i have the time i have to do masses of other things for my map so it would be really nice if someone would code these 4 small systems for me (if it will be put in one code it good too^^).

so now to the description of the 4 systems (every hero owned by a player shall get these passives and theres just one hero per player so MPI is enough ; please make it so that its checked regularly (0.5 seconds for example) which hero is owned by the player and which stats it has because you can upgrade your class to another hero so the hero can change):

Critical
like the critical hit in wc3...you have a chance to crit and you have a specific value the damage dealt is multiplied with then. both values are changable through items and stats. the damage multiplier is 1.00 before the bonuses for stats etc are added.
-every 1 agility increase the chance of critting by 0.01%
-items/spells have different values


features it should have:
-floating text showing the damage above the damaged unit with an ! at the end(color red)

Spell Crit
similar to the crit system but this time for spells (please tell me what damage type or whatever i should use for the spells so they can be handled differently). the damage multiplier is 1.00 by default.
-spell crit can only be increased by items & spells (active/passive)

features it should have:
-floating text above the damaged unit showing thr damage with an ! at the end(color purple)

Evasion
again similar to the one in wc3...every hero has the chance to evade physical damage (NOT SPELLS). Default chance of evading is 0%.
-evasion increases by 0.01% every 1 agility
-items/spells have different values


features it should have:
-floating text above the evading unit showing the word "Evaded"(color light blue)

Block
every unit has the chance to block X damage dealt (physically and by a spell). Default chance of blocking is 0%.
-block chance and blocked damage are just increase by items/spells

features it should have:
-floating text above the blocking unit showing the word "Blocked"(color grey)


Every value shall be changable for every player...the trigger for changing the values i can make easily (1 big item hash and 1 trigger). if you wanna add it i would be glad ;D less work to do ^^

whether its made GUI/Jass/vJass...i dont care ;D main thing is its working ^_^

if there are any questions just ask them.


thanks in advance

greetz clapto


oh and by the way im using bribes damage detection ;D
 
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
I made the Critical System just for fun :D

you can configure up to 8 (yet) fields.
this is the list of all the fields available
  • Example
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ----------------------------------------- Critical Base Chance ------------------------------------------- --------
      • Set CriticalBaseChance = 0.10
      • -------- -------------------------- Chance Bonus Increased for each Agility --------------------------- --------
      • Set ChanceBonusPerAgility = 0.01
      • -------- --------------------------------------- Damage Multiplier Base ---------------------------------------- --------
      • Set DamageMultiplierBase = 1.00
      • -------- ------------------------------------------- Floating Text Color --------------------------------------------- --------
      • Set FloatingTextColor = |cffff0000
      • -------- ---------------------------------------------- First Item --------------------------------------------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- The increment of item count --------
      • Set i = (i + 1)
      • -------- Your item --------
      • Set Item[i] = Ring of Regeneration
      • -------- Your item critical chance bonus --------
      • Set ItemChances[i] = 1.25
      • -------- Your item damage multiplier bonus --------
      • Set ItemMultipliers[i] = 0.20
      • -------- ------------------------------------------- Second Item ------------------------------------------------------ --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- The increment of item count --------
      • Set i = (i + 1)
      • -------- Your item --------
      • Set Item[i] = Mask of Death
      • -------- Your item critical chance bonus --------
      • Set ItemChances[i] = 7.50
      • -------- Your item damage multiplier bonus --------
      • Set ItemMultipliers[i] = 0.15
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- --------------------------------------------- Third Item -------------------------------------------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- The increment of item count --------
      • Set i = (i + 1)
      • -------- Your item --------
      • Set Item[i] = Ring of Protection +2
      • -------- Your item critical chance bonus --------
      • Set ItemChances[i] = 2.50
      • -------- Your item damage multiplier bonus --------
      • Set ItemMultipliers[i] = 1.00
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------- Remember not to use any kind of variable used for this system ---------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------- Remember to check whether there is variable similar to mine ----------- --------
      • -------- ------------------------------- before importing them into your map ----------------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- ------------------------------ I hope for feebacks about my system ---------------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- ------------------------ You can check critical chance by typing -cc ------------------------ --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------- You can check damage multiplier by typing -dm ---------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------- --------
anyway, this is MPI (only works for one hero each player). if you want a MUI version, i also made them :D

though i still didn't get this
Every value shall be changable for every player..
could you give example about that ?

check this out
 

Attachments

  • Critical Systems.w3x
    33.5 KB · Views: 78
Last edited:
Level 9
Joined
Jul 10, 2011
Messages
562
thanks man looks really good man ;D thanks ^^ performs really nice ingame.

but 1 thing i have to mention....the chance and the multiplier dont decrease when the items are dropped, sold, whatever...havent looked at the triggers so far but i should be able to solve that ^^

Every value shall be changable for every player..
that just means that i wanna do spells,buff,etc that change these values for a specific time or permanent and so i want these values to be changeable for every player seperatly^^
i dont know whether your system supports that...if not it would be nice if you could add something for that.


+rep for your work so far. EDIT: i cant rep you sorry...but youll get credits
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
He wanted 0.01 %, not 1% chance pr agility.

I have a crude and simple critical hit system in Naval Battle (for the ships though) which increases the chance for critical hit based on agility. It's MUI and it has 6% for normal units and 0.5% pr agility on heroes.

  • Projectile Death Detect
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Killing unit)) Not equal to Collision Dummy
      • (Race of (Killing unit)) Not equal to Orc
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Custom value of (Triggering unit)) Equal to 2
              • (Race of (Triggering unit)) Equal to Orc
          • ((Triggering unit) is in Move) Equal to True
          • ((Triggering unit) is in MoveFast) Equal to True
          • ((Triggering unit) is in MoveSlow) Equal to True
    • Actions
      • -------- Critical Hit System --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Not equal to 2
          • ((Killing unit) has buff Barrier ) Equal to False
        • Then - Actions
          • Set Dice = (Random integer number between 1 and 6)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Killing unit) is A Hero) Equal to True
            • Then - Actions
              • Set CritChance = (Dice + ((Agility of HeroShip[(Player number of (Owner of (Triggering unit)))] (Include bonuses)) - (((Level of (Killing unit)) + 7) + (Strength of (Killing unit) (Include bonuses)))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CriticalHitBonus[(Player number of (Owner of (Triggering unit)))] Greater than 0
                • Then - Actions
                  • Set CritChance = (CritChance + CriticalHitBonus[(Player number of (Owner of (Triggering unit)))])
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CritChance Less than 4
                • Then - Actions
                  • Set CritChance = 4
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Killing unit) is A structure) Equal to False
                • Then - Actions
                  • Set CritChance = (Dice + (-3 + (Agility of HeroShip[(Player number of (Owner of (Triggering unit)))] (Include bonuses))))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CriticalHitBonus[(Player number of (Owner of (Triggering unit)))] Greater than 0
                    • Then - Actions
                      • Set CritChance = (CritChance + CriticalHitBonus[(Player number of (Owner of (Triggering unit)))])
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CritChance Less than 6
                    • Then - Actions
                      • Set CritChance = 6
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Killing unit) is A structure) Equal to True
                    • Then - Actions
                      • Set CritChance = (Dice + (-33 + (Agility of HeroShip[(Player number of (Owner of (Triggering unit)))] (Include bonuses))))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CriticalHitBonus[(Player number of (Owner of (Triggering unit)))] Greater than 0
                        • Then - Actions
                          • Set CritChance = (CritChance + (CriticalHitBonus[(Player number of (Owner of (Triggering unit)))] / 2))
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CritChance Less than 2
                        • Then - Actions
                          • Set CritChance = 2
                        • Else - Actions
                    • Else - Actions
                      • Set CritChance = 1
          • Set CritChance = (CritChance / 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CritChance Greater than 1
            • Then - Actions
              • Set Dice = (Random integer number between 0 and 99)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CritChance Greater than Dice
                • Then - Actions
                  • Set TempPoint1 = (Position of (Triggering unit))
                  • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at TempPoint1 facing (Facing of (Triggering unit)) degrees
                  • Unit - Add a 0.15 second Generic expiration timer to (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to 2
                • Else - Actions
            • Else - Actions
        • Else - Actions


The main problem is that its intregated into the cannon projectile ball system and creates and also doubles the effects of every cannon, which is a complicated system.


Edit_

Well TwoVenomous idea works better in your case I didn't read it properly
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
thanks man looks really good man ;D thanks ^^ performs really nice ingame.

but 1 thing i have to mention....the chance and the multiplier dont decrease when the items are dropped, sold, whatever...havent looked at the triggers so far but i should be able to solve that ^^

lol, i completely forgot about that. it's a simple fix though. i will come up with a newer version (this ain't a final version though :p)

that just means that i wanna do spells,buff,etc that change these values for a specific time or permanent and so i want these values to be changeable for every player seperatly^^
i dont know whether your system supports that...if not it would be nice if you could add something for that.

i will try to add them.

He wanted 0.01 %, not 1% chance pr agility.

  • Set ChanceBonusPerAgility = 0.01
what did i do wrong ? :/
 
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
Bump. i want to update the newer version of the Critical Systems

Changelog :
- now it will decrease the chance or multiplier if the item is dropped.
- made an example of passive ability and active ability.

the active ability is a little complicated though, i hope you understand what to do, if you don't then let me know what ability you need this to be applied and i will try to work on it.

here is the test map

EDIT : uploaded another version for the ability which is less complicated.
 

Attachments

  • Critical Systems.w3x
    38.1 KB · Views: 39
  • Critical Systems Other Version.w3x
    36.9 KB · Views: 38
Last edited:
Level 9
Joined
Jul 10, 2011
Messages
562
hey venomous....sorry for taking so long to write but i was busy...

i took a look at your crit system (just the second version 'the other version') and there are 2 small things i would like you to fix ^^ :

1. the active ability setup : if i understand your code im just able to cast one spell per player manipulating crit in any form because if i cast a second spell during the first ones duration the values of the second spell are subtracted twice and the first spells values are gone.

2. could you change it so that the damage is manipulated BEFORE its dealt and not healed and then dealt with crit multiplier? afaik there's a function bribe made...'DamageModifier' was the name i think...or something similar.

would be really nice ;D

thanks in advance :thumbs_up:
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
hey venomous....sorry for taking so long to write but i was busy...

i took a look at your crit system (just the second version 'the other version') and there are 2 small things i would like you to fix ^^ :

1. the active ability setup : if i understand your code im just able to cast one spell per player manipulating crit in any form because if i cast a second spell during the first ones duration the values of the second spell are subtracted twice and the first spells values are gone.

2. could you change it so that the damage is manipulated BEFORE its dealt and not healed and then dealt with crit multiplier? afaik there's a function bribe made...'DamageModifier' was the name i think...or something similar.

would be really nice ;D

thanks in advance :thumbs_up:

Thats what bribe does.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
1. the active ability setup : if i understand your code im just able to cast one spell per player manipulating crit in any form because if i cast a second spell during the first ones duration the values of the second spell are subtracted twice and the first spells values are gone.
Fixed

2. could you change it so that the damage is manipulated BEFORE its dealt and not healed and then dealt with crit multiplier? afaik there's a function bribe made...'DamageModifier' was the name i think...or something similar.
Fixed

tell me if there is anymore flaw on the system :)
if this is finished, i might continue to the evasion one.
 

Attachments

  • Critical Systems v1.1.w3x
    36.7 KB · Views: 55
Level 9
Joined
Jul 10, 2011
Messages
562
could you add another small change? i realized that all units owned by the player can crit now but i need it to just work for units having a specific spell. rest seems to be exactly like it should be.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
could you add another small change? i realized that all units owned by the player can crit now but i need it to just work for units having a specific spell. rest seems to be exactly like it should be.

Done

sorry about that, i never thought of that.
now, only hero can increase the stats from picking item, only hero can do the critical and only hero can cast the ability to increase the critical. :)
 

Attachments

  • Critical Systems v1.2.w3x
    37 KB · Views: 58
Status
Not open for further replies.
Top