Monday, April 2, 2012

Guide - Events EveMath

So now we have a calculator in the event system called evemath. The advantages are so that we can choose a job based on a total of skills rather then just fixed stats. Mainly its for milking and assistants to add there loyalty + likes + a random luck. But there are some really odd rules to evemath.

First because it can and will most likely be used in evecheck it happens before the checks. This is an extremely important point. If you are doing a check through fall down don't keep reloading it because it will change. Just include once. That needs more explanation...

event 1 math
hello = hello + loyalty;
hello == (hello+loyalty)

now call it again

hello = hello + loyalty;
hello == (hello+loyalty + loyalty)

Some math expert just wanted to kill me I can feel it...

the other important note is how it does the math itself it can take up to 4 arguments but doesn't follow normal math rules instead 1 and 2 are done first then the total and 3 and then the total and 4

label = "loyaltymath" arg1 = "#rand100_2" math12 = "add" arg2 = "#asloyalty"

loyaltymath = #rand100_2 + #asloyalty

label = "loyaltymath" arg1 = "#rand100_2" math12 = "add" arg2 = "#asloyalty" math 13 = "sub" arg3 = "subthingy"

loyaltymath = #rand100_2 + #asloyalty
loyalytmath = loyaltymath - subthingy or loyaltymath = (#rand100_2 + #asloyalty) - subthingy

label = "loyaltymath" arg1 = "#rand100_2" math12 = "add" arg2 = "#asloyalty" math 13 = "sub" arg3 = "subthingy" math14 = "mult" arg4 = "multthingy"

loyaltymath = #rand100_2 + #asloyalty
loyalytmath = loyaltymath - subthingy
loyalytmath = loyaltymath * multthingy
loyalytmath = loyaltymath * multhingy or loyaltymath = ((#rand100_2 + #asloyalty) - subthingy ) * multthingy

Last this thing is a resource hag because it doesn't know any better as to the event it should check for so it sets for every event so use sparingly.

label = "loyaltymath" -- the variable being changed on the fly is best
resetstart = "true" -- reset each time events are called if not will only run once the entire game at the start...
resetevery = "false" --- reset every time a check is made... don't use
arg1 = "#rand100_2" --- the first math argument
arg2 = "#asloyalty" --- the second math argument
arg3 = "#asloyalty" --- the third math argument
arg4 = "#asloyalty" --- the third math argument
math12 = "add" --- the type of math add, sub, mult, div between arg1 and arg2
math13 = "add" --- the type of math add, sub, mult, div between arg1 and arg3
math14 = "add" --- the type of math add, sub, mult, div between arg1 and arg4

reroll = "label"  --- evechange can call specific maths to re calculate this is the label that is called... default is "" and can not be called.

If this gives you any problem let me know its pretty experimental.

----- Change Log ----

4/3/12 Math is now done outside events rather then in. Thanks to Rudi_stoned for this suggestion.
4/22/12 added reroll
4/6/13 - force set


No comments:

Post a Comment