• 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

New Class

I am attempting to add the Psychic Warrior class from Psionics Unleashed and I have a skeleton of the class built. All of the class abilities show up at the proper levels and I am now moving on to making the Warrior Path selectable and adding the proper bonuses for the path skill ability.

The warrior path portion, I believe, is mostly done. They can select a path and I believe I can add the appropriate abilities the path grants at the correct levels.

What I am having trouble with is the Path Skill. It should allow the player to select one of three path skills to gain a +2 bonus.

Originally I had this as a class special and it showed up in the list, but I could find nothing illustrating how to populate the Item selection list. Ideally, I would like to set the skill list in the Custom Ability used to define the Warrior Path. Then, I add the path skill as class abilities to this object and at the correct levels, the user selects which skill they would like to apply the bonus to.

In case that wasn't clear, I use either the target of reference skills section of the custom ability. I then add the class special to the custom ability and the item selection list of the class special is populated by the target or reference skills list of the custom ability.

Is this even possible, and if so, how would I go about doing so?
 
I don't do psionics, so I'm afraid I don't have the sourcebook you're working from... but it sounds like these three path skills are fairly static? There are ways to alter the restriction expression via eval script if necessary, but this way's a bit simpler.

If it was (for example), a choice of Stealth, Bluff or Diplomacy, you could set up the class special along these lines (cribbed from any of the 'and one of these skills is always a class skill for you' traits):
Item Selection section
Select from... none.
Custom Expression: thingid.skDiplo|thingid.skBluff | thingid.skStealth

Then an eval script (say post-levels 10000) to set the bonus (assuming an untyped bonus here, adjust as necessary to whatever the sourcebook/ uses as the bonus type):
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.SpcDisable] <> 0)

if (field[usrChosen1].ischosen <> 0) then
  field[usrChosen1].chosen.field[Bonus].value += 2
  endif

~ Set shortname as appropriate
field[shortname].text = "Warrior Path: " & field[usrChosen1].chosen.field[name].text
If the three skills to choose from depend on some other ability or variable, there're ways to set that up too.
 
I tried something similar to that method at first. Admittedly, I had some of the syntax wrong, and thanks for showing me the proper syntax.

The problem with that method is that I'd have to create an entry for each of the paths and I was trying to reduce the amount of code. I saw the same was essentially done the elemental bloodline but I was hoping that I could come up with some creative alternative way of doing this.

So I have x paths and each path has its own set of skills.

Would it be possible to set the custom expression to something along the lines of:

thingid.[Warrior Path ID].target

I'm not exactly sure how to reference the list as Versatile Performer uses x.target.?, I believe, to grab the selected skill.

If you're interested, I've attached a pdf of the Psychic Warrior that I am working from.
 

Attachments

For now I am forging ahead with a separate class special for each of the different paths. In doing so, I have come across another problem.

I am trying to use the Custom Expression:
thingid.skAcrobat | thingid.skKnowNobl | component.BaseSkill & Helper.SkCatCraft

If I remove ' | component.BaseSkill & Helper.SkCatCraft' then everything works as expected or if I remove the skills and keep 'component.BaseSkill & Helper.SkCatCraft' then everything works. Is there a way of getting this to work that I am not seeing?
 
thingid.skAcrobat | thingid.skKnowNobl | component.BaseSkill & Helper.SkCatCraft

Grep on RoA - Feats.user shows:
component.BaseSkill & Helper.SkCatKnow | Helper.SkCatCraft | thingid.kAppraise | thingid.kDecScript | thingid.kDisable | thingid.kForgery | thingid.kSearch | thingid.kSpellcr

So try that, putting component.BaseSkill first then use and for the skills.
 
I tried something similar to that method at first. Admittedly, I had some of the syntax wrong, and thanks for showing me the proper syntax.

The problem with that method is that I'd have to create an entry for each of the paths and I was trying to reduce the amount of code. I saw the same was essentially done the elemental bloodline but I was hoping that I could come up with some creative alternative way of doing this.

So I have x paths and each path has its own set of skills.

Would it be possible to set the custom expression to something along the lines of:

thingid.[Warrior Path ID].target

I'm not exactly sure how to reference the list as Versatile Performer uses x.target.?, I believe, to grab the selected skill.

If you're interested, I've attached a pdf of the Psychic Warrior that I am working from.
Honestly that may be a bit beyond me capabilities... the elemental bloodline is kind of a sticky situation, as it requires checks at timing levels that occur before the class special is actually confirmed on the hero (at First/450). See the Sorcerer class's eval script for this:
Code:
      ~because custom class specials test their existnace at First/500, they can't run a script before then
      ~however, we need to find out what energy has been selected, so we know which set of abilities to add
      ~therefore, we make the check from the class, rather than the bloodline, and forward that tag to the hero
      if (hero.findchild[BaseCustSp,"SpecSource.cHelpSor"].field[usrChosen1].ischosen <> 0) then
        perform hero.findchild[BaseCustSp,"SpecSource.cHelpSor"].field[usrChosen1].chosen.forward[BloodEner.?]
        endif
I guess it then makes all subsequent checks for the energy resistances, etc based on the tags this eval script forwards, but I'm already a bit in the dark with that.

The prob with your custom expression is a lack of parenthesis.
Code:
thingid.skAcrobat | thingid.skKnowNobl | component.BaseSkill & Helper.SkCatCraft
resolves to 'selection must be Acrobatics, Knowledge: Nobility or any base skill, AND it must be a Craft Skill' (ie, only craft skills).
You want
Code:
thingid.skAcrobat | thingid.skKnowNobl | ( component.BaseSkill & Helper.SkCatCraft )
I believe, which should be 'Acrobatics, Knowledge: Nobility, or any base skill that is a craft skill'.

Edit - Or the above would work, as long as the things that are 'or' selections are contiguous and separate from the 'and' selections. risner's way is probably more in line with what you're trying to do; should read whole thread before I post. :3
 
Last edited:
Just as a note, component.BaseSkill doesn't mean "Base Skill" - it's the component that defines the behaviors of all skills, so thingid.skAcrobat will also have the component.BaseSkill tag, just like the craft skills do. The reason to look for it specifically is that you can't guarantee that Helper.skCatCraft isn't used on something that isn't a skill. thingid tags, on the other hand - I believe HL will complain if there isn't exactly one thingid tag on each of the picks on the hero, so you know exactly what you're getting if you search for that.

Personally, I'd recommend

Code:
component.BaseSkill & (thingid.skAcrobat | thingid.skKnowNobi | Helper.SkCatCraft)

but risner and aretas both gave suggestions that are fine.



If you wanted to use the same class special for all of them, you can set the expression in a script like this (this script would be on the path):

Code:
hero.childfound[cPWaXXXXX].field[usrCandid1].text = "
component.BaseSkill & (thingid.skAcrobat | thingid.skKnowNobi | Helper.SkCatCraft)"

Replace cPWaXXXXX with the Id of the class special you create.

Personally, I'd rather see "Red Warrior Path Skill" than "Warrior Path Skill" show up on the list of the class specials I get when I'm looking at what abilities I'll get as I level up in this class, so from an aesthetic standpoint, I'd recommend separate class specials for each of the paths.
 
Thank you all for your suggestions. I have once again moved to a single path skill model as it will make things easier in the long run. I agree Mathias, it would be more pleasing to see "X Warrior Path Skill" but the problem with that lie in the ability to add more warrior paths and thus more skills. Having a generic path skill is just easier to work with. In the end, here is what I've gone with:
Code:
~Populate the list of path skills the user can choose from.

    foreach pick in hero where "thingid.cPWaPathSk"

        eachpick.field[usrCandid1].text = "skill1|skill2|skill3"

    nexteach

And for the secondary path
Code:
    ....
        eachpick.field[usrCandid1].text = eachpick.field[usrCandid1].text & "|skill1|skill2|skill3"
    ....

This works well for everything except for the CustomSpec which sets usrCandid1 to "component.BaseSkill&skill1|skill2|Helper.SkCatCrafts"

It works if this is the secondary path but it usrCandid1 is set to this from the primary path, nothing I have been able to do will update usrCandid1.

I have tried checking to see if hero has the CustomSpec id and building a new custom expression to populate the field, I have tried overwriting the field with something else but in every case I only see the choices as set by the original path.
 
Code:
hero.childfound[cPWaPathSk].field[usrCandid1].text

Is considerably faster for HL to execute than a foreach - since you know exactly what you want, you don't need to go searching for it.
 
Code:
hero.childfound[cPWaPathSk].field[usrCandid1].text

Is considerably faster for HL to execute than a foreach - since you know exactly what you want, you don't need to go searching for it.

I had that at first but noticed that only one instance of cPwaPathSk would be updated. This was the only way that I found to update all instances.

I'm a chemist by trade so I may not always come up with the best solution to my problems, but I am trying. :)
 
I had that at first but noticed that only one instance of cPwaPathSk would be updated. This was the only way that I found to update all instances.

The assumption is that that thingid is unique. If you bootstrap the same thing multiple times with different tags or fields, you would have multiple.

Is that how you have duplicate things with the same ID?
 
Class Skills should generally make use of the FirstCopy mechanism - unless it's a wierd case, only one copy of each class skill is active and running its script, so when you need to make a change, you only need to change the one copy.

The search logic that decides whch copy is the FirstCopy is the same as the search logic that decides which thing hero.child[] should transition to if there are multiple choices, so hero.child[] will take you to the only copy that matters.

(The exception to this would be a thing where at each level you get the ability, you add a separate bonus to a new thing - for example, add a new spell known of any level you can currently cast - at each level you get the ability you'd select the level of spells to add for that choice).
 
Here is the description for the ability:

Path Skill: At 4th level, the psychic warrior gains a +2 bonus to one skill associated with a path he is on. Every three levels thereafter, he can choose to increase the bonus to one of his path skills by +2 (to a maximum of +6 for any one path skill). This may be a skill he has already chosen or a new skill associated with a path he is on.​

Having the latest copy active makes sense, but in my testing I have a character of a certain level and I work form there. I think once everything is working to my satisfaction, I will return to the previous behavior as it does make more logical sense.

Again, thanks for all the help. And maybe someone can save me the trouble of trying to recall were I saw it.

I am trying to get the hit die of the hero, or total levels, but I think hit die would be more correct. I saw it once, I recall it being a hashtag (macro?), but now that I want to use it, I can't recall where I saw it or locate the reference again.
 
For the ability you're describing, make sure that the "Independant Copies" checkbox is checked in the editor. That will mean that every copy (whose level has been reached) is marked as a FirstCopy, since you need to display each one separately.

For macros, open the help menu in the editor...Help on Using the Editor, then choose the link called "Reference Information" - the macro you're looking for is the first thing on that page.
 
I found what I was looking for to get the hero's hit die in the half-fiend template, the place I had originally located it. I wasn't sure if #totallevels[] took into account hit die (for monstrous characters) and the feat specified hit die, so I wanted to stay true to its wording.

I will try the 'Independent Copies' checkbox when I return to the psychic warrior. I have taken a break to finish adding the races and psion class. In doing so, I did notice an oddity.

I have the custom field set to three spells (as place holders for now) and they show up, but I see each spell name duplicated in the list. Everything works as expected with the proper spell being removed from usrCandid2 based on the choice in usrCandid1, but I thought I'd ask if this is expected behavior of have I done something wrong/unexpected?

Last question, I've been assigning Hero.Psionic to the classes I've added to facilitate selecting psionic and metapsionic feats. Will I need to remove this once there is proper psionic support or will it be fine to forget about it and only consider removing it in an effort to clean up unnecessary cruft from the files later.
 
Did you restrict the spells it's looking for to those from a specific class, or are you looking for every possible spell there is? (there are multiple copies of many spells).

Hero.Psionic is part of the Psioncs mechanics that was never removed, so it'll still be used once the d20 psionics are put back in. So, it's the proper tag to mark a character who's eligible for Psionic feats.
 
Back
Top