Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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"/> 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 Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#2 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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 by Kendall-DM; September 30th, 2011 at 02:23 PM. |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.?] P.S. In Pathfinder, there are three drider races for the three spellcasting classes. |
#4 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
BTW, the pulltags is working fine in the if/then statement for me, giving correct results. Go figure. |
|
#5 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Heh, thanks for giving it a shot. Misery loves company.
|
#7 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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. |
#8 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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 by Kendall-DM; November 4th, 2011 at 11:56 AM. |
#9 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#10 |
|
|