rpdat Modifier Question

Discussion of your thoughts & requests, help for users and game specific configuration files for Character Tool

Moderators: Azhrei, dorpond

Post Reply
dunstvangeet
Kobold
Posts: 11
Joined: Sun Apr 17, 2011 2:27 pm

rpdat Modifier Question

Post by dunstvangeet »

Looking at finishing out the PHB2 dataset (YAY ME!). Just have a little question.

The Avenger class gets a +3 AC Bonus if they are wearing no armor, or have cloth armor. I also need to check for a shield (they can't use a shield). I'm having trouble constructing the boolean to add to the APPLIES tag, and could use some help.

What properties am I looking for?

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: rpdat Modifier Question

Post by Jagged »

What happens if they have a shield?

If its simply that they don't get the bonus for the shield then you shouldn't have to do anything.

If it effects the +3 AC bonus then that's more complicated.

dunstvangeet
Kobold
Posts: 11
Joined: Sun Apr 17, 2011 2:27 pm

Re: rpdat Modifier Question

Post by dunstvangeet »

Here's the official text...

"The favor of your deity wards you from harm. While you are wearing cloth armor or no armor and aren’t using a shield, you gain a +3 bonus to AC."

So, it's while there is no shield, and either cloth armor, or no armor.

dunstvangeet
Kobold
Posts: 11
Joined: Sun Apr 17, 2011 2:27 pm

Re: rpdat Modifier Question

Post by dunstvangeet »

So, the boolean logic would be...

AND(shield == none, OR(armorType == cloth, armorType == none))

I'm just not sure which parentheses I can use to get to it. That's all that I need to know.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: rpdat Modifier Question

Post by Jagged »

I am not sure how you check for no armour but for the rest I am guessing something like:

Code: Select all


and( not(exists("root.equipped.shield.armorBonus")) ,
  or(getIfExists("armorItem.armorType", "Cloth") , getIfExists("armorItem.armorType", "") ) )


dunstvangeet
Kobold
Posts: 11
Joined: Sun Apr 17, 2011 2:27 pm

Re: rpdat Modifier Question

Post by dunstvangeet »

Okay, I got the asking for Cloth Armor part. I'm still not sure how to ask if they're not equipped with any armor, nor where they're equipped with a shield.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: rpdat Modifier Question

Post by Jagged »

I "think" getIfExists("armorItem.armorType", "") should check if they have no armour.

And not(exists("root.equipped.shield.armorBonus")) should check they aren't getting a shield bonus.

I think :) None of that is tested.

dunstvangeet
Kobold
Posts: 11
Joined: Sun Apr 17, 2011 2:27 pm

Re: rpdat Modifier Question

Post by dunstvangeet »

Tried the armor one. Keep on getting NullPointerExceptions. Jay, if you're around, I'd like your opinion...

User avatar
jay
RPTools Team
Posts: 1765
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx
Contact:

Re: rpdat Modifier Question

Post by jay »

This will return true if the player has no armor equipped or just Cloth armor.

Code: Select all

eq(getIfExists("root.equipped.armor.armorType", "Cloth"), "Cloth")

This will return true if the player doesn't have a shield equipped.

Code: Select all

not(exists("root.equipped.shield.name"))

dunstvangeet
Kobold
Posts: 11
Joined: Sun Apr 17, 2011 2:27 pm

Re: rpdat Modifier Question

Post by dunstvangeet »

Thank you. Finally works the way I want it to.

Post Reply

Return to “CharacterTool”