**Basics:**

**Type**- sets what does the formula damage or heal.

**Element**- Sets which element to use. Normal attack - means will use same element as weapon.

**Variance**- How will damage fluctuate. E.g. If skill formula says it deals 100 damage and variance is 20%, the skill will deal between 80 and 120 damage.

**Critical**- Can skill critically hit, dealing increased damage by 300%.

**What do things like**

*a*and*b*mean?*So if Actor Glasses were to cast Fire on a Slime. a would be Glasses and b would be Slime.*

**only last number in the formula deals damage.**If you had 2 lines of formula. (semicolon ; tells where line ends for the program)

**Are there more letters other than a and b for the formulas?**

**Is there a way to make skill even more complex**, e.g. if some variable is over 100, deal extra damage?

if (statement) { formula1; } else { formula2; }

**But how to write it to the damage formula?**It only has 1 line!

if (statement) { formula1; } else { formula2; }

if (v[10] > 100) { a.atk*4 - b.def*2 } else { a.atk*2 - b.def*2 }

**Which can be shortened to this if you're using only 1 line of formula.**

if (statement) formula1; else formula2;

if (v[10] > 100) a.atk*4 - b.def*2; else a.atk*2 - b.def*2;

**And you can shorten it even further using ternary operator**(my favorite one):

statement ? formula1 : formula2;

v[10] > 100 ? a.atk*4 - b.def*2 : a.atk*2 - b.def*2;

**Symbols for statements:**

**Examples:**

**What about parameters to use for a and b?**

**Current**: (All flat numbers, e.g.: 900, 999, 11)

*(Actor only by default)*

**Params**: (All flat numbers, e.g.: 1337, 7331, 156)

**XParams**: (All decimal numbers symbolizing percent, e.g. 1.0, 0.5, 0.75, 2.44 would be 100%, 50%, 75%, 244%)

**SParams**:(All decimal numbers symbolizing percent, e.g. 1.0, 0.5, 0.75, 2.44 would be 100%, 50%, 75%, 244%)

**How about changing HP/MP/TP?**

**What about advanced stuff where you can influence formulas with states?**

**What about buffs? Can we buff and debuff battlers?**

**Parameter IDs**

**General Battler Stuff**

**For actor only:**

**What about Math? Can we use Math methods inside the formula?**

*numbers*) - returns a minimum number from provided numbers.

*numbers*) - returns a maximum number from provided numbers.

*number*) - rounds a number to nearest integer.

*number*) - rounds the number up to nearest integer.

*number*) - rounds the number down to nearest integer.

**Math.rand() returns a number between 0 and 1, but can we get a random number between 1 and 100? Or 5 and 200?**

**But that's a lot of text? Could we simplify somehow?**

**If you have any questions, feel free to ask or discuss various ways to make specific skills.**

**Edited by Glasses, 29 January 2016 - 09:50 AM.**