Junior Member
Join Date: Jan 2011
Posts: 13
|
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? |
#1 |
Member
Join Date: Jul 2010
Posts: 75
|
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 |
#2 |
Junior Member
Join Date: Jan 2011
Posts: 13
|
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. |
#3 |
Junior Member
Join Date: Jan 2011
Posts: 13
|
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? |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
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. |
|
#5 |
Member
Join Date: Jul 2010
Posts: 75
|
Quote:
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 The prob with your custom expression is a lack of parenthesis. Code:
thingid.skAcrobat | thingid.skKnowNobl | component.BaseSkill & Helper.SkCatCraft You want Code:
thingid.skAcrobat | thingid.skKnowNobl | ( component.BaseSkill & Helper.SkCatCraft ) 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 by areteas; January 3rd, 2011 at 09:27 AM. |
|
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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) 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)" 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. |
#7 |
Junior Member
Join Date: Jan 2011
Posts: 13
|
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 Code:
.... eachpick.field[usrCandid1].text = eachpick.field[usrCandid1].text & "|skill1|skill2|skill3" .... 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. |
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Code:
hero.childfound[cPWaPathSk].field[usrCandid1].text |
#9 |
Junior Member
Join Date: Jan 2011
Posts: 13
|
Quote:
I'm a chemist by trade so I may not always come up with the best solution to my problems, but I am trying. |
|
#10 |
|
|