• 🏆 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!

[!!!GUI!!!] Trigger based attributes... need help!!!

Status
Not open for further replies.
Level 2
Joined
May 8, 2014
Messages
12
Hi all,
I need help with creating custom attributes... based on [GUI] Triggers...
I have 3 main attributes (Ability based (skill points))
- Strenght
- Agility
- Inteligence
And 2 Ability based Attributes
- Vitality
- Wisdom

Every attribute increase any bonuses, effects, etc...

Strenght
[Attribute]Melee/Ranged Crit damage multiplier: 1.5+(Str/[baseStr]-1)*0.15
- This effect are for Normal and Piercing attack type
- Multiplier are round to -.-- value
- // If unit cause a critical hit (Normal or Piercing) than Attack Power*Melee/Ranged Crit damage multiplier.
[Attribute]Armor Peneration: 0+(Str/[baseStr]-1)*0.5
- Peneration are round to -.-- % value -> This value is percental!!!
- // If unit cause damage to unit... penerate the armor of Armor Peneration% Example... Armor(with Bonuses etc...)*(1-Armor Peneration value non- percental)... if Armor Peneration are 4.33% then value non-percental = 0.04!!!
[Attribute]Parry Chance: 5+(Str/[baseStr]-1)*5
- This value are -.-- % percentual!!!!
// Chance for unit parry 100% damage caused to him... unit can parry attack type -> Normal.

Agility
[Attribute]Attack/Spell Crit chance: 5+(Agi/[baseAgi]-1)*10
- This value are -.-- % percentual!!!
// This is a chance for critical hit with attack types (Normal, Piercing and Magic) Chance are for Basic Attack and Spells!!!
[Attribute]Dodge Chance: 5+(Agi/[baseAgi]-1)*5
- This value are -.-- % percentual!!!!
// Chance for unit dodge 100% damage caused to him... unit can dodge attack type -> Piercing
[Attribute]Spell Haste: (Agi/[baseAgi]-1)*0.8
- This value are -.-- % percentual!!!!
// This value increase Spell Cast speed by Spell Haste%

Intelligence
[Attribute]Spell Crit damage multiplier: 1.5+(Int/[base Int]-1)*0.2
- This value are the same with Melee/Ranged Crit damage multiplier
// This value are same effect with Melee/Ranged... and multiplier for attack type Magic!!!
[Attribute]Spell Power: (Int*1)
- This value the same with Attack Power... this power type for Healing and Magic spells...
// Example... Fireball cause [Spell Power*2.7] fire damage to oponent
[Attribute]Spell Peneration: 0+(Int/[baseInt]-1)*0.4
- This value a same with Armor Peneration
// This value reduce oponent Spell Resistance by... Spell Resistance*(1-Spell Peneration no percent)... if Spell Peneration are 7.21% then no percent = 0.07.

Vitality
AttributeHealth +10+ability level /per ability level
AttributeHealth Regeneration +0.10+(0.01*ability level) /per ability level

Wisdom
AttributeMana +12 /per ability level
AttributeMana Regeneration +0.12 /per ability
AttributeSpell Resistance +1%
- This value are percentual!!!!
// This value protect vs Magic attack type...

Additional
All attributes must can be increased by stats, abilities, buffs, debuffs, items.
All resistances max. 75%
All chances and penerations max. 75%
All must be in GUI Triggers :)

Any w3x maps?
Thanx advance :)
 
Level 12
Joined
Nov 3, 2013
Messages
989
Like solu said, you create variables for each stat, they will then represent how high stats a unit have.

Then after you can start to do the actual triggers, which nobody can help you with right now since we don't really know what you're gonna have besides custom stats that will be uses in the other triggers

Edit: well I guess you could already do the auto attacks

And btw is it really intended that the base stats are negative multipliers? I know that it's a RPG standard that the Initial Values do not count towards secondary stats. But that's additively like instead of 0+(Str/[baseStr]-1)*0.5 it's usually 0+(Str-[baseStr])*0.5 and usually the base stat is like 10 or so which means you remove 10 from the current value...
 
And i can use chance percentual ? :OO or create?

Not sure what you mean so I'll just ramble on.
Damage is dealt in reals (real numbers = 1.00) and not integer (whole numbers = 1).
That is why percentage based modifiers like Trueshot Aura works.
Health and mana are also reals but the UI only shows you the whole number.
In fact a unit can have below 1 HP without dying. I think it's around 0.42 that is the breakpoint.

Let's say you want a unit to deal 180% Strength as damage with 22 Strength:
Strength x 1.80
22.00 x 1.80
= 39.6

Here the targeted unit will lose exactly that, 39.6.

Hope this clarifies something.

And anyone. Please correct me if I said something that is untrue.
 
Level 2
Joined
May 8, 2014
Messages
12
OK... and if i have:
Armor Peneration....16.31%
Oponent's armor....62

How can i breake armor? armor-16.31%

And i have:
Crit Damage Multiplier: 2.68x
Crit Hit chance: 36.12%

How can i use crit chance?

--------
I need non-percentual armor (point based) for armor peneration
 
For the armor.
You need to completely trigger a units armor because you can't get a unit's armor ingame.
So from here on we assume you have an Armor variable. Let's called it Armor_Var (it's a Real variable).
And the Armor Penetration you also make as a Real variable. We called this ArmorPen_Var.

First you do the armor reduction calculation.

62 x ((100 - ArmorPen_Var) / 100) --------------- can also be (1 - ArmorPen) is you wish. It depends on how you add to the Armor Penetration variable.
62 x ((100 - 16.31) / 100)
= 51.88

Calculate Hit chance:
Have an Integer variable called something like RandomNumber_Var

You then set the RandomNumber_Var to (random number between 1 and 100)
Setup and If/Then/Else condition.

If -
RandomNumber_Var is Equal to or less than HitChance_Var
Then -
Set Damage_Var (Real) = Strength of triggering unit.
You then set the RandomNumber_Var to (random number between 1 and 100)(Set the random number again to calculate if the hit is a critical strike)
If -
RandomNumber_Var is Equal to or less than CritChance_Var
Then -
Set Damage_Var = Damage_Var X (1 + CritDamage_Var) (22 x (1 + 2.68) = 80.96.
Else-
Else-

And this is after (or below if you want) the if/then/elses

Make triggering unit damage enemy unit Damage_Var as Normal attack dealing Normal damage.

I hope that is not too confusing.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Should probably make a hit chance = accuracy - evasion OR seperate evasion rolls (slightly OP imo but some games have it) And also some games have both evasion AND dodge, evasion counteracts the accuracy while dodge have it's own roll, where all units have evasion and dodge tends to come from special abilities.

And before damage is dealt same deal again as with hit chance but with crit also this time there is

Then for crit, if attack hits = true then
set RandomNumber_Var to (random number between 1 and 100) (new roll)

If -
RandomNumber_Var is Equal to or less than CritChance_Var
ETC...

Edit: Actually the rolls should be with reals, it's usually not a great idea for balance to have flat increase with things like Crit or Dodge since then you can get capped and then 1-100 is pretty inaccurate

Resistance should also not be a flat increase
 
Last edited:
Status
Not open for further replies.
Top