This is my original macro, and it works fine. But it requires you to type in your effective skill level.
This returns the following results:[h: Skill = Effective_Skill_Level]
[Skill]
, Roll:
[T: Roll = 3d6]
,
[t,if(Roll <= Skill): output = "HIT!"; output = "MISS!"]
, orCharacter: « Skill = 12 » , Roll = 7, HIT!
Character: « Skill = 10 » , Roll = 15, MISS!
Now, I'm trying to add more automation, and get it to pull the attack skill from the token properties. I have added the property "RAT" (an abbreviation for Ranged Attack Skill) to the tokens, and assigned a value of 13 to that property on the test token. I have ticked the "Apply to Selected Tokens" checkbox.
This is what I've done in the macro:
I also tried it like this:[h: Skill = "RAT"]
[Skill]
, Roll:
[T: Roll = 3d6]
,
[t,if(Roll <= Skill): output = "HIT!"; output = "MISS!"]
Both of these return the following error message:[h: Skill = getProperty("RAT")]
[Skill]
, Roll:
[T: Roll = 3d6]
,
[t,if(Roll <= Skill): output = "HIT!"; output = "MISS!"]
I assume this is because I am not correctly referencing the token property. And I'm afraid that I'm going to have to learn how to use JSON, but I'm trying to avoid it if possible. If this is the case, I'd appreciate some guidance on where to start reading. I've tried to read up on it a bit, but so far it just hasn't clicked for me.Invalid condition in IF(Roll = Skill) roll option.
Statement options (if any): t,if(Roll = Skill)
Statement Body : output = "HIT!"; output = "MISS!"
Also, and this may be a whole different issue, but I am also going to want to calculate Skill as (RAT minus range), which means I also need to figure out how to select a target for the attack.
Thanks