1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Critical/Evasion/Block system request

Discussion in 'Requests' started by claptomanic, Nov 22, 2012.

  1. claptomanic

    claptomanic

    Joined:
    Jul 10, 2011
    Messages:
    562
    Resources:
    0
    Resources:
    0
    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):


    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: Dec 2, 2012
  2. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    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
    could you give example about that ?

    check this out
     

    Attached Files:

    Last edited: Nov 23, 2012
  3. claptomanic

    claptomanic

    Joined:
    Jul 10, 2011
    Messages:
    562
    Resources:
    0
    Resources:
    0
    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 ^^

    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
     
  4. TKF

    TKF

    Joined:
    Nov 29, 2006
    Messages:
    1,237
    Resources:
    5
    Maps:
    5
    Resources:
    5
    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.

    TRIGGER TEXT copied from the map (OLD!!)
    • 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
     
  5. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    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)

    i will try to add them.

    • Set ChanceBonusPerAgility = 0.01


    what did i do wrong ? :/
     
    Last edited: Nov 23, 2012
  6. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    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.
     

    Attached Files:

    Last edited: Nov 29, 2012
  7. claptomanic

    claptomanic

    Joined:
    Jul 10, 2011
    Messages:
    562
    Resources:
    0
    Resources:
    0
    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:
     
  8. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    Thats what bribe does.
     
  9. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    Fixed

    Fixed

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

    Attached Files:

  10. claptomanic

    claptomanic

    Joined:
    Jul 10, 2011
    Messages:
    562
    Resources:
    0
    Resources:
    0
    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.
     
  11. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    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. :)
     

    Attached Files:

  12. UndeadImmortal

    UndeadImmortal

    Joined:
    Jun 27, 2011
    Messages:
    1,587
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Isn't the critical strike's text is above the head of the attacker?
     
  13. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    hmm, you're right. but i will not do anything yet before he confirm that he wants it to be changed.

    thanks for the warning :)
     
  14. claptomanic

    claptomanic

    Joined:
    Jul 10, 2011
    Messages:
    562
    Resources:
    0
    Resources:
    0
    Thanks undead ;) havent realized that...

    Venomous please change it ;D
     
  15. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    Done
     

    Attached Files: