8/01/2010

RPG Kit for Unity: Formulas

While the work on the battle system part of the RPG kit improves, I want to give you an understanding of one of the key features of the kit:

The power of formulas
Formulas are used to calculate hit chances of skills, weapons or enemies, skill damage, the effect of items (e.g. on status values) or to determine the order of actions in the battle system, escape chances, counter attack chances, etc.

As you can see, formulas are used in nearly every major aspect of an RPG. Normally you would have to code your formulas yourself whenever you need it …
But in the RPG kit for Unity, formulas can be done much easier – you simply put them together in the Project Editor and then use them whenever you need it.



Formula creation


Formulas are organized in steps, every step has a value and an operator (add, sub, multiply, divide and done – this finishes the calculation). The value can be:

  • A value: type in the number you want to calculate with
  • A status value: select a status value of the user or target used for the calculation
  • A formula: use a formula you already created within another formula
  • A random number: define minimum and maximum of the random pool

The operator determines how the next step should interact with the current value of the formula. By using formulas within a formula it is very easy to create complex calculations. To see if your formula works the way you want, you can test it right away – just define the status values for user and target and click the test button.

That's it for now, stay tuned …

4 Kommentare:

  1. man, once this comes out, I'm all over it. question though, will it be only usable for Unity Pro or is it cool to use w Unity free?

    AntwortenLöschen
  2. I'm developing it on the free version since I had no need for the pro version yet :D
    A base version of the kit will be released sometime in september.

    AntwortenLöschen
  3. This is awesome. No need to say more.

    AntwortenLöschen
  4. Thanks, I'll do my best to make it even more awesome :D

    AntwortenLöschen