RPTools.net

Discussion and Support

Skip to content

It is currently Thu Sep 21, 2017 3:48 am 






Reply to topic  [ 10 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Sun Apr 17, 2011 1:27 pm
Posts: 14
 Post subject: rpdat Modifier Question
PostPosted: Mon May 02, 2011 11:52 pm 
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?


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1169
Location: Bristol, UK
 Post subject: Re: rpdat Modifier Question
PostPosted: Tue May 03, 2011 4:24 am 
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.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Apr 17, 2011 1:27 pm
Posts: 14
 Post subject: Re: rpdat Modifier Question
PostPosted: Tue May 03, 2011 10:01 am 
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.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Apr 17, 2011 1:27 pm
Posts: 14
 Post subject: Re: rpdat Modifier Question
PostPosted: Tue May 03, 2011 11:15 am 
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.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1169
Location: Bristol, UK
 Post subject: Re: rpdat Modifier Question
PostPosted: Tue May 03, 2011 12:33 pm 
I am not sure how you check for no armour but for the rest I am guessing something like:
Code:

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



Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Apr 17, 2011 1:27 pm
Posts: 14
 Post subject: Re: rpdat Modifier Question
PostPosted: Wed May 04, 2011 2:45 am 
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.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1169
Location: Bristol, UK
 Post subject: Re: rpdat Modifier Question
PostPosted: Wed May 04, 2011 3:30 am 
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.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Apr 17, 2011 1:27 pm
Posts: 14
 Post subject: Re: rpdat Modifier Question
PostPosted: Wed May 04, 2011 10:15 am 
Tried the armor one. Keep on getting NullPointerExceptions. Jay, if you're around, I'd like your opinion...


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: rpdat Modifier Question
PostPosted: Wed May 04, 2011 10:21 am 
This will return true if the player has no armor equipped or just Cloth armor.
Code:
eq(getIfExists("root.equipped.armor.armorType", "Cloth"), "Cloth")

This will return true if the player doesn't have a shield equipped.
Code:
not(exists("root.equipped.shield.name"))


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Apr 17, 2011 1:27 pm
Posts: 14
 Post subject: Re: rpdat Modifier Question
PostPosted: Wed May 04, 2011 11:20 am 
Thank you. Finally works the way I want it to.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 10 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman