Senior Member
Join Date: Apr 2010
Posts: 152
|
I have a magic item that can be specific to certain good-aligned deities. So, if the wielder of the item's patron deity matches the deity of the item, they get to use extra powers of the item. I'm looking for two things:
Matt Droz Community material (Forgotten Realms & Non-SRD/Retro) |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
1 - You'd have to do a "foreach thing in hero" to cycle through all the deities looking for the good alignment tag and append the name/unique id of each to a string variable. Does that make sense?
2 - When the hero chooses a deity, that applies a HasDeity tag which you can match to the one on the item (if it chooses among a list of deities and pulls the HasDeity tag from the chosen), or it can just check for the presence/abscence of the tag if you make a new version of the item for each god. |
#2 |
Senior Member
Join Date: Apr 2010
Posts: 152
|
1) That does make sense, but will it restrict it to just the deities available to the hero?
3) a) That's what I was thinking, regarding the HasDeity tag, but I wasn't sure how exactly to code it. b) I was afraid you might suggest an item for each deity. The problem is, I'm looking at the Forgotten Realms pantheon. At last count, there are 57 good deities (20 if I use just the Faerūnian pantheon). Matt Droz Community material (Forgotten Realms & Non-SRD/Retro) |
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
What do you mean "available to the hero"? You mean as in, which sources are checked? I don't think you can exclude things linked to this or that source. If this is something you intend for FR, you may be better served to Mark each of your new dieties with a Forgotten Realms tag you can include in the foreach.
3 - It is certainly possible to have just 1 version that picks a deity. Once you have set the candidate expression, have the user pick the deity on the item, and then have it pull the HasDeity tag from the chosen deity. You can then use tagmatch or intersect to confirm there is the same tag on the hero. |
#4 |
Senior Member
Join Date: Apr 2010
Posts: 152
|
Could you give me some code examples (or point me to where I might find some)?
Matt Droz Community material (Forgotten Realms & Non-SRD/Retro) |
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Look at the eval scripts for Greater Elemental Focus feat for pulling and pushing to the hero. Then the eval rule does a tagmatch between the hero and the feat.
|
#6 |
|
|