View Single Post
Old September 24, 2012, 03:31   #16
Derakon's Avatar
Join Date: Dec 2009
Posts: 9,002
Derakon is on a distinguished road
Originally Posted by ekolis View Post
What kind of operations can a StatMod do? Just addition and multiplication? Or is it more of an "arbitrary function" sort of thing with an input and an output?
They have built-in support for addition and multiplication, and they can also link to an arbitrary function. The results of all these operations are added together to get the overall modifier.

So if you have two entities with the same speed, the one that's first alphabetically gets to go first? That just seems... wrong... Maybe just pick one at random instead?
Not just the same speed but also the same energy. So long as you generate monsters with random energy (could be between -1 and 0 if you want to ensure the player goes first) name should practically never be a problem.

I've heard of mixins before - I thought they were more along the lines of mixing code in several different languages to accomplish a task, though? What you describe sounds more like interfaces in C# and Java, except that (perhaps) you can combine two or more mixins to get the full functionality of a class, without actually having to inherit from said class in whatever is implementing the mixins...
Nope, what you heard is wrong.

Mixins are similar to interfaces in a way, though. Interfaces say "Inherit from me and you are required to implement these functions." Mixins say "Inherit from me and you automatically implement these functions."
Derakon is online now   Reply With Quote