• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Spell-Prerequisite Questions

TobyFox2002

Well-known member
I have three questions regarding spells.

1) I want to simulate the Required Deity Restriction using Pre-requisite script. That way I can have it select "Is silent error" that way it is cross-system compatible. (faerun 3.0/faerun 3.5)

2) How do I set up spell to be acceptable to any cleric who has a deity with access to a specific domain or portfolio. I am assuming this would be a pre-requisite script.

3) I am looking into how to handle the initiate feats. These feats add spells to spell casting classes.
 
1) I want to simulate the Required Deity Restriction using Pre-requisite script. That way I can have it select "Is silent error" that way it is cross-system compatible. (faerun 3.0/faerun 3.5)
Checking for a deity is really easy:
Code:
#hasdeity[XXXXXX] <> 0
Where XXXXX is the unique id of the Deity.

2) How do I set up spell to be acceptable to any cleric who has a deity with access to a specific domain or portfolio. I am assuming this would be a pre-requisite script.
Same logic as above. You can use this on feats, traits, gear, spells, etc....

3) I am looking into how to handle the initiate feats. These feats add spells to spell casting classes.
Look at the trait 'Two-World Magic' for an example.
 
Thanks, I will need to look into buying that pack unless you could be so kind as to post the relevant code for Two-World magic.

Also, #hasdomain[] <> 0 gave compile error. I found #hasability[cdXXX] <> 0 did seem to work. However, thats not what I am asking to check.

I was asking of a way to check what domains/portfolios the character's chosen deity has and if they possess XXX domain or portfolio then the feat choice is valid. Perhaps, I use the same code but I'm just not performing it at the right level in the parent/child... but that sort of thing has always confused the heck out of me.
 
Thanks, I will need to look into buying that pack unless you could be so kind as to post the relevant code for Two-World magic.
Forgot that's from a supplement. See what I can do about posting it.

Also, #hasdomain[] <> 0 gave compile error. I found #hasability[cdXXX] <> 0 did seem to work. However, thats not what I am asking to check.
Most Things in Pathfinder are abilities. So using #hasability[] is the correct way to check for a domain or any class ability or racial ability or custom ability.

I was asking of a way to check what domains/portfolios the character's chosen deity has and if they possess XXX domain or portfolio then the feat choice is valid. Perhaps, I use the same code but I'm just not performing it at the right level in the parent/child... but that sort of thing has always confused the heck out of me.
A domain is a specific "Thing" in HL. A god's portfolio is not a Thing its a concept so how could you check for that?

If you want to check for a specific domain is "valid" choice and not actually taken I think there is a tag that gets placed on the Hero (or on the Deity Thing itself) that you can check. I am not near HL so not sure but I can check tonight.

To make sure we are on the same page you want to know if a the Deity that the gamer choose actually "allows" the Domain or Sub-Domain to be taken. You are not checking to see if a specific domain was actually chosen. Right?

In example Sarenrae allows the domains: Fire, Glory, Good, Healing, Sun. Plus allows the sub-domains: Agathion, Day, Heroism, Light, (Redemption), Restoration, Resurrection, (Revelation). So you want to check that say "Good" is allowed for Sarenrae even though the character actually picked "Healing" as its domain?
 
To make sure we are on the same page you want to know if a the Deity that the gamer choose actually "allows" the Domain or Sub-Domain to be taken. You are not checking to see if a specific domain was actually chosen. Right?

In example Sarenrae allows the domains: Fire, Glory, Good, Healing, Sun. Plus allows the sub-domains: Agathion, Day, Heroism, Light, (Redemption), Restoration, Resurrection, (Revelation). So you want to check that say "Good" is allowed for Sarenrae even though the character actually picked "Healing" as its domain?

Correct, I want to check if the deity has a domain or sub domain on its list. Regardless of the player's choice.

As for checking the portfolio, it may not be a thing but I bet it could probably be done with a field checking compare or something... But thats really not important, I can get away with just using the domain.

Domain and subdomain should work for what I need.
 
Correct, I want to check if the deity has a domain or sub domain on its list. Regardless of the player's choice.

As for checking the portfolio, it may not be a thing but I bet it could probably be done with a field checking compare or something... But thats really not important, I can get away with just using the domain.

Domain and subdomain should work for what I need.
So lets figure this out. So first thing go to "Develop->Enable Data File Debugging" and make sure this is check marked.

Then make sure that "Inner Sea World Guide" is check marked in the Configure Your Hero window. Go to the "Background" tab and add the god "Sarenrae" to your character. Then go to "Develop->Floating Info Windows->Show Hero Tags" in the new window lets look for any domains that Sarenrae has. So in the new "search" box in the top left corner type in "Heroism" as that is a domain Sarenrae has that should not match anything but that domain. Do you see any "tags" than that you can use?

The check would be:
Code:
hero.tagis[XXXXXX.YYYYYY] <> 0
Replace "XXXXXX" with the tag group (the first part of the tag before the period you found above) and then replace YYYYYY with the tag (part after the period) which is the Unique ID of the Domain you are looking for.
 
Last edited:
Forgot that's from a supplement. See what I can do about posting it.
So here is the script logic for Two-World Magic. The important part is getting the tag ClsAllowSp.? onto the class.

Pre-Levels/5000
Code:
      ~if we haven't chosen anything yet, just get out now
      doneif (field[usrChosen2].ischosen = 0)

      ~now that we've chosen a class, we can restrict the list of spells available
      field[usrCandid1].text &= " & !(" & field[usrChosen2].chosen.tagids[sClass.?,"|"] & ")"

      ~if we haven't chosen anything yet, just get out now
      doneif (field[usrChosen1].ischosen = 0)

      doneif (tagis[Helper.FtDisable] <> 0)

      ~ If we are a spontaneous caster this will set the correct cantrip
      perform field[usrChosen1].chosen.pulltags[ClsAllowSp.?]
      perform field[usrChosen2].chosen.pushtags[ClsAllowSp.?]
 
I entered that script and the feat shows no chooser to select from.. is there something on the editor page that I am missing in the Item Selection section of the editor?

Also, I did a search for the Heroism on the hero tags and nothing came up. Not a single thing.
 
I entered that script and the feat shows no chooser to select from.. is there something on the editor page that I am missing in the Item Selection section of the editor?
I guess that could be helpful: :p :)
Custom Expression: component.BaseSpell&sLevel.0
2nd Custom Expression: component.Class & CasterType.?

Also, I did a search for the Heroism on the hero tags and nothing came up. Not a single thing.
You followed the exact steps above and capitalization counts and typed in Heroism? Then just take a look for tag groups that would fit with the Domains.

But I am seeing Heroism in the list.....
 
AllowDom.cdHeroism... Sorry, I must have missed it.


As for the Feat, and Custom Expressions; the second is exactly what I need however the first one is not quite how the feat works.

For reference the following text is the text for the Initiate of Mystra feat:

You have been initiated into the greatest secrets of Mystra's church.
{b}Prerequisites:{/b} Cleric level 3rd, patron deity Mystra.
{b}Benefit:{/b} You can attempt to cast spells even within a dead magic zone or an antimagic field. In a dead magic zone, you must make a successful caster level check against a DC equal to 20 + the level of the spell you are trying to cast. In an antimagic field, you must make a successful caster level check against a DC equal to 11 + the caster level of the antimagic field. If this check is successful, your spell functions normally.

In addition, you add the following spells to your cleric spell list:

2nd {b}Spell Shield:{/b} Grants +3 resistance bonus on saving throws against spells and spell-like abilities.

3rd {b}Anyspell:{/b} You can read and prepare up to a 2nd-level arcane spell from a scroll or spellbook in a 3rd-level domain spell slot.

5th {b}Spell Phylactery:{/b} Activates a spell on a scroll when a triggering condition is met.

6th {b}Greater Anyspell:{/b} As anyspell, but you can read and prepare any arcane spell up to 5th level in a 6th-level domain spell slot.

6th {b}Spellmantle:{/b} Absorbs designated incoming spells and redirects their energy to healing or a previously chosen spell.

7th {b}Holy Star:{/b} Creates a glowing star that turns 1d6+3 spell levels as spell turning, grants +10 circumstance bonus to AC, or fires an energy bolt that deals 1d6 damage/two levels.


As you can see the spells and spell levels are already set, so there is no need to choose anything. Once I get it working I will of course start to tinker with it o work with more divine classes (as per pathfinder's expanded class lists.)
 
So here is the script logic for Two-World Magic. The important part is getting the tag ClsAllowSp.? onto the class.
As mentioned your looking the ClsAllowSp.? tag group. So add a Spell and look at its tags and you will see spells have ClsAllowSp (Class Allow Spell) group. The "tag" will be the Unique ID of the Spell. You simply need to assign these "tags" to the Class (ie Cleric).

So I don't know what the spell id of Spell Shield is but I "assume" this is Forgotten Realms. I assume the spell id is spFRSpeShi but it works for this example.

To allow a Cleric to cast this spell simply do:
Pre-Levels/5000
Code:
perform hero.childfound[cHelpClr].assign[ClsAllowSp.spFRSpeShi]
 
Thank you for your help with this. This has succeeded beyond my expectations. Both for the pathfinder and (I think), it will help me implement the initiate feats in the 3.5 files.

As it turns out the Two-World magic feat wasn't really needed for this, although there are a few feats I can see where that logic might be helpful. Especially for feats that grant a limited number of spells to non casters as spell-like abilities.

I just have to study it it a bit more.

... And yeah, I know this was delayed greatly.
 
Back
Top