Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
athelu
Member
 
Join Date: Aug 2008
Posts: 74

Old June 28th, 2021, 07:18 PM
I have created two new classes that are dedicated to a specific deity. The classes are like Ying/Yang of each other and received different "blessings" from the god.

I want to restrict the choice of domains available to be selected based upon what class the user is. I was trying to do this via an EVAL script on the Deity.

I removed all domains and want to have the AllowDom tags pushed based on the results of the Eval Script

I was trying:

~ if Custom class, give these domains
If (hero.pickexists[cHelpnas] <> 1) then
perform pushtags[AllowDom.cdMagic]

endif

This compiles without issue, but when i add the class and look at the domains it shows all domains.
athelu is offline   #1 Reply With Quote
athelu
Member
 
Join Date: Aug 2008
Posts: 74

Old June 30th, 2021, 03:44 PM
So I have it working - but it is not horribly elegant.
setup as a Eval Script on the Deity

Phase: Post-Levels
Priority: 10000

Code:
~ if Custom class, give these domains
If (#levelcount[cHelpNas]>= 1) then
perform hero.assign[AllowDom.cdLaw]
perform hero.assign[AllowDom.cdNobility]
perform hero.assign[AllowDom.cdProtect]
perform hero.assign[AllowDom.cdStrength]
perform hero.assign[AllowDom.cdSun]

elseIf (#levelcount[cHelpYas]>= 1) then
perform hero.assign[AllowDom.cdFire]
perform hero.assign[AllowDom.cdLaw]
perform hero.assign[AllowDom.cdNobility]
perform hero.assign[AllowDom.cdStrength]
perform hero.assign[AllowDom.cdWar]
endif
I am using the #levelcount macro because i could not get the hero.pickexists to validate.

I need to now tell it to assign a different set of domains if any other class beside these two chooses this deity. I was thinking of doing something like:
Code:
If (!firstclass | !secondclass)
but I am using the levelcount to find the class currently and I assume there has got to be a better way.
athelu is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 30th, 2021, 05:09 PM
It won't work to just have an "else" in the if...elseif you've already got - so if it's got the one class it has the first set, elseif it has the second class, it has the second set, and if neither of those apply, it has the third set.

Alternatively, since #levelcount[] returns a number (the count of levels), the double not is just #levelcount[cHelpNas] + #levelcount[cHelpYas] = 0


Since it looks like there's a large percentage of overlap between the domain lists, you can put the parts that overlap outside of the if...elseif, so that you only need to assign those once. Or you can just define those as the standard domains on the deity, and only handle the parts that change here.
Mathias is offline   #3 Reply With Quote
athelu
Member
 
Join Date: Aug 2008
Posts: 74

Old June 30th, 2021, 06:05 PM
Quote:
Originally Posted by Mathias View Post
Since it looks like there's a large percentage of overlap between the domain lists, you can put the parts that overlap outside of the if...elseif, so that you only need to assign those once. Or you can just define those as the standard domains on the deity, and only handle the parts that change here.
Yes - thanks for that. I went ahead and assigned all of the overlap to the deity.

This is what i have now (and it works):
Code:
~ if Alkira is not chosen as the deity, get out now
	doneIf (hero.pickexists[deiLAAlkira] <> 1) 

~ if we are not a follower of Ja'Alkira receive all domain options
    if (#levelcount[cHelpNas] + #levelcount[cHelpYas] = 0) then
        perform hero.assign[AllowDom.cdFire]
        perform hero.assign[AllowDom.cdWar]
        perform hero.assign[AllowDom.cdProtect]
        perform hero.assign[AllowDom.cdSun]
    endif

~ if class is Nashan get these domain options
    If (#levelcount[cHelpNas]>= 1) then
        perform hero.assign[AllowDom.cdProtect]
        perform hero.assign[AllowDom.cdSun]

~ if class is Yashan get these domain options
    elseIf (#levelcount[cHelpYas]>= 1) then
        perform hero.assign[AllowDom.cdFire]
        perform hero.assign[AllowDom.cdWar]
    endif
I noticed that inquisitions are showing up in the domains. They are ones that are available to any God. Is their a way to hide or suppress these?
athelu is offline   #4 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:57 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.