• 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

Assigning Tags

I am working on the Drider, and noticed it could be either cleric, sorcerer, or wizard. I have a chooser that can choose the spellcaster class (using a helper feat), but I need to assign the SplLookup.cHelpXxx to the Drider. Here's the problem, once I have the class helper chosen, I want to get the chosen class assigned with the spell lookup tag. The only way I know to do that is to assign the specific tag to the hero, which I can't do with a chooser. Is there a way to make a boolean comparison of the chosen helper class to the actual helper class. For example, the code field[fChosen].chosen needs a comparison before I can assign the specific tag. In psuedo-code, I need something like this:

if (field[fChosen].chosen.idstring = <??cHelpXxx??>) then
perform <race>.assign[SplLookup.cHelpXxx]
endif

The important part is the ?? part, how do I do this comparison, or is it even possible? Is there a way to have a chooser able to assign a tag with that chooser, such as assign[SplLookup.<chosen>]. This is the part I've been stumbing over, and before I spend a lot of time trying to figure it out, I wanted to know if it is even feasible to do something like this.
 
Here is the code I did in Pathfinder for Wayfinder#1. The choice was either for the Scimitar, Cleric Channel Energy, or Skill Knowledge Relgion.

The chooser was:
Code:
<fieldval field="usrCandid1" value="thingid.wScimitar|thingid.cClrChan|thingid.skKnowRel"/>

The Eval script looked like this which should be what you are looking for.
Code:
~Pre-Levels 5,000
~ If we've not chosen anything, get out
doneif (field[usrChosen1].ischosen = 0)

~If scimitar selected make the character proficient
if (field[usrChosen1].chosen.pulltags[thingid.wScimitar] = 1) then
      foreach pick in hero where "IsWeapon.wScimitar"
        perform eachpick.assign[Broadcast.WepProf]
      nexteach
endif
~If Know(Religion) selected make it a class skill
if (field[usrChosen1].chosen.pulltags[thingid.skKnowRel] = 1) then
   #makeclassskill[skKnowRel]
endif
~If Channel Energy selected give it a +1 to the DC
if (field[usrChosen1].chosen.pulltags[thingid.cClrChan] = 1) then
      #dc[xChannel] += 1
      ~also add to the DC of our help
      #dc[fComUnHelp] += 1
      #dc[fTurUnHelp] += 1
endif

The thing is to do the pulltags[] function.
 
Ah, pulltags, that is what I needed. This opens alot of doors for me, thanks tons!

Worked like a charm, now I need to figure out domain selections for cleric classes. Doesn't seem to difficult.
 
Last edited:
The value that pulltags returns is intended to be thrown away, and there is no formal definition for what it will return. I recommend not using it in an if () then. tagis[] or tagcount[] are what's intended to be used in tests.

Code:
perform field[usrChosen1].chosen.pulltags[SplLookup.?]
perform hero.findchild[BaseRace].pushtags[SplLookup.?]

Is I think what Kendall's looking for.

P.S. In Pathfinder, there are three drider races for the three spellcasting classes.
 
P.S. In Pathfinder, there are three drider races for the three spellcasting classes.

Yes, I saw this. I thought I could make a better implementation is all. As of now, my chooser works correctly, chooses the class and assigns it to the Drider, no problem. Still working on the kinks with assigning domains.

BTW, the pulltags is working fine in the if/then statement for me, giving correct results. Go figure.
 
Lawful_g, I feel your pain. Can't get these domains to work outside of a class. Seems the framework is in place, and the fields are present, but the mechanics have been completely overlooked. My feeling is it is not implemented for doing that yet, and with no update coming anytime soon, we may just have to let this one go. I'll continue to work at it from time to time to try new ideas (I always feel there is a workaround), but I'm not going to devote alot of time to it unfortunately. Domains are a custom ability, and I don't see how I can use one outside of a class.
 
Found another problem, at least for myself, with adding domains. Many of the powers in the domains rely on accessing cHelpClr fields, which causes an error in any hero that does not have this. The protective ward power from the Protection Domain comes to mind. Yet another pain.

I did make progress on figuring out what is going on with the secondary spell selections. For a lark, I made a dummy prestige class for testing secondary spells, and lo and behold, if you do not designate what should be selectable (spell wise, such as from a domain), you get the whole shebang. This means the whole problem with secondary spell selection with monsters is broken in d20 files, likely not even implemented, and thus nothing is returned (which gives you the entire list of spells).

That said, I will be attempting another approach to this, one that creates a whole new set of custom domains just for monsters and secondary spells. Will it work? I have no idea, since it seems secondary spells are unable to return any of the tag expressions in d20. But I feel like I can make a selectable list of spells in Specials that just might be able to do the trick. Don't know when I'll get around to working on that, since I got alot on my plate, but I'll keep you all informed if it works or not.
 
In experimenting with classes and domains, I am starting to understand what the choice of domains needs. In class, it's called cCustTot and is an array. This doesn't exist on a creature (which, for better or for worse, is a sort of class). I looked through all the arrays on a creature to see if there was a field similar to cCustTot on classes, but didn't find any, though there are some that look like candidates, but I'm doubting them. I will see what's what in the coming days and report again. If the necessary fields are missing, I'll report them as a feature request. Does Pathfinder have this capability in place?

UPDATE: No love. This mechanic just doesn't work for creatures, unfortunately. You can't even bootstrap the domain without any actual cleric levels. The only other solution I have, which I know will work, is too drastic to undertake. It would require work above and beyond what I think is a valid solution, and that is adding each spell level of the domain as a spell-like ability (dependent on cleric level of course) and bootstrapping the domain ability in (the book is rather unclear about whether something that casts as a cleric actually gets the domain ability, or just the ability to cast the domain spells). I'd have to do this for each race that has access to a domain, and I'd have to put in place static domain choices (which leads to a whole new can of worms, would you make a version for each combination of domains?). Again, that is too insane to contemplate, even though I can get that to work. Another thought was to give the creature one less HD and then one level of cleric, to get the domains in, but that also seems extreme as that requires fixing all the BAB, saves, etc. to exclude the additions of the cleric while giving the last HD properly. *Shrug* This needs fixing internally.
 
Last edited:
Ok, last update on this. Near as I can tell, the reason this isn't working is because part of the internal code that compiles to available secondary spells into the spell tag expression isn't working correctly for races. The internal code is looking for a field called cSplScExpr that doesn't exist on the Hero (not the race, but the herofields, which are in Totals). It should be looking for tSplScExpr instead, and that seems to be the entire problem. Could be a very easy fix if that is the case.
 
Ok, I have a bizarre idea that might work. I haven't implemented it, so I'm not sure, but I was thinking the other day about how I could approach this another way. One of the options I considered was making a dummy class level, but I discarded this idea when I realized it would appear in the level list, so no love. Today I was thinking about templates and went to look at those fields, again no love.

And that's when it occured to me. I've never used the Monster Class tab, though that would be a much better implementation of creatures. Unfortunately, I considered it too work intensive for little reward. However, in the case of the Angels and other critters, it's really not! Each creature is given a 1 level class, which has the appropriate bonuses to BAB, saves, etc. as well as giving the creature 1 actual HD. You would then subtract from those bonuses (if needed), keeping the hit die, and add in the domains on that last hit die. Then, when you create said Angel or whatever, you create it with a hit die less than it has, then add the 1 level of monster class to finish it off.

Yeah, it's kind of extreme, and I know it's going to be problematic, but it is one possible solution. I don't know if I like it myself well enough to implement it, I'd almost rather wait for an internal fix to this, whenever that will be. Sometime soon I hope?
 
Back
Top