PDA

View Full Version : Programming Question


Nockerkin
June 7th, 2010, 11:30 PM
I'm trying to figure out if I can do this...

I brought back old MET concepts in my LARP with Influences like the ones used in the old Dark Epics supplements. One of my house rules dictates that your Total Number of Influences can not exceed your total numer of Attribute Dots. I have 15 base influences and 9 base attributes...

Basically it would be...

VALID IF ATTRIBUTE STR+DEX+STAM+MANI+COMP+PRES+INT+WIT+RESO >= INFLUENCE A+B+C+D+E+F+G+H+I+J+K+L... etc. etc.

Is there a way I can write this into the script of Herolabs to notify me when a Character has gone over their max? ...and how do I write it in the proper syntax?



-Jim

rob
June 15th, 2010, 06:06 PM
I'm not familiar with the old MET concept of Influences, so you're going to need to explain how they work to me. :(

How have you added the Influences into the data files? I need to know that in order to figure out how to tally up the totals.

You can add a Mechanic thing to the data files via the Editor. This thing will be auto-added to every character. Within this thing, you can define an Eval Rule that performs the validation test you're seeking.

The Eval Rule will need to tally up the total dots spent on Influences and Attributes, which can then be compared. The latter tally can be achieved with the script code below.


var attribs as number
foreach pick in hero from Attribute
attribs += eachpick.field[anetvalue].value
nexteach