I dont understand this... Add ((Integer((Real((Strength of (same hero) (Exclude bonuses)))) x ((Real((Substring((Entered chat string), 6, 7)))) / 100.00)))))
whats with all the brackets
all those brackets are a part of one big calculation
Since Attributes are Integers, and Percent calculations are better done with Real values, i decided to convert a whole Real calculation into Integer(hence why it begins with (Integer to show that the final value is an Integer and not a Real). The function is Conversion - Convert Real to Integer
Secondly, since its a calculation, im going to need a Arithmetic function(is found at the top of the functions list when using Reals and Integers)
In the first of the two values of the Arithmetic function, I wanted the Current Strength of the Hero to be stored, but since its an Integer Value, im going to need another Conversion(since we are using Real values to calculate with), so in the first value of the Arithmetic function you are going to need a Conversion - Convert Integer to Real
In this Converison - Convert Integer to Real, simply go to Hero - Hero Attribute, and there we are reached the final settings of the first Arithmetic value
Now here comes the tricky part. Since you wanted the Chat Command to be able to increase the Strength depending on what number was used in the Chat Command, we must use a Substring(which, as emperor_d3st already explained) and divide it by 100(since we need the multiplication to be in percent and not in a full value)
So, in the second value of the Arithmetic function, simply put in another Arithmetic function, and in the first of this one, you need the complicated Substring thingy
which starts with a Conversion - Convert String to Real, and now, since we want what the player wrote after -Str, we are going to need to use a Substring. Now, while we are here, i can explain it better this time.
Substring((Entered chat string), 2, 7) will become (Str 25)
Substring((Entered chat string), 3, 6) will become (tr 2)
Substring((Entered chat string), 4, 5) will become (r )
Substring((Entered chat string), 1, 8) will become (-Str 25 )
you understand? the 2 numbers decide what letters(and all in between them) that will be used as a String instead of the whole of (Entered chat string)
now, as you have chosed Conversion - Convert String to Real, locate the Substring function at the top. In there, you choose the first value to be Event Response - Entered chat string, and the numbers to by 6 and 7
now, we still have the second value of the second Arithmetic function left, but that is the easiest one. Simply put in 100.00
To simplyfy things, here is how the calculation would look with variables
A x (B / 100)
A = The amount of Strength your Hero has
B = The number the player put after -Str
And a simplyfied verison of how to manage this in the Trigger Editor
Hero - Modify Attribute
--Strength
--YourHero(whatever hero you want)
--Add
--Converion - Convert Real to Integer
----Arithmetic( x in the middle)
------Conversion - Convert Integer to Real
--------Hero - Hero Attribute
----------Strength
----------YourHero
----------Exclude bonuses
------Arithmetic( / in the middle)
--------Conversion - Convert String to Real
----------Substring
------------Event Response - Entered chat string
------------6
------------7
--------100.00