MATH FORMULA

From CoffeeMud Wiki
Revision as of 15:45, 11 November 2019 by Loki (talk | contribs) (Created page with "{{CoffeeMUDWikiBuilderTOC}} In certain fields and specifications, CoffeeMud will allow you to enter a mathematical formula in place of a simple number in order to calculate a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    

In certain fields and specifications, CoffeeMud will allow you to enter a mathematical formula in place of a simple number in order to calculate a number at run-time. This is useful for occasions where you want the number to have a random element, or where the value of the number is calculated based on certain variables only available at run-time.

The formulas can be anything from a simple number, to numbers combined with mathematical operators + - \ *, grouped with parenthesis ( ), and may also include certain special operators.

One special operator, ? , is for generating a random number (ex: 2?5 refers to a random number between 2 and 5). Another special operator, >, is for bounding the result of an operation (ex: 5 * 10 > 10 will evaluate to the greater of 10 or 5 * 10. The < operator does the opposite.

Notes

.