Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits) (+1)

The boxes for the dual wield modifiers (two-hand, offhand, dual wield damage %) are javascript evals.

This means you can use a ternary operator to make the value one of two values depending on a conditions.

if you put the following in your offhand modifier parameter box, it will increase the offhand damage to 90% if the actor has a state, or if the actor doesn't have the state, 75%.

(this.isStateAffected(X)) ? 0.9 : 0.75

because of the way the plugin uses this formula (this) is the actor. In the above statement, if the actor is affected by state X, his offhand modifier is 90%, but if he isn't, it's the base 75%.

You can also nest these, if you have multiple states that change the penalty (or grant bonuses)

(this.isStateAffected(X)) ? 0.9 : (this.isStateEffected(Y)) ? 0.99 : 0.75

It doesn't have to be a state either, anything on the actor object can be used, such as his name:

(this.actor().name == 'Harold') ? 1.12 : 0.75

Hope this helps.

Awesome this is perfect. Thank you very much for showing me this, You're the best Ramza, keep up the amazing work.