Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   New Class (http://forums.wolflair.com/showthread.php?t=12069)

thaimletches January 2nd, 2011 09:40 PM

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?

areteas January 2nd, 2011 11:21 PM

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.

thaimletches January 3rd, 2011 02:56 AM

1 Attachment(s)
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.

thaimletches January 3rd, 2011 05:58 AM

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?

risner January 3rd, 2011 06:55 AM

Quote:

Originally Posted by thaimletches (Post 49899)
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.

areteas January 3rd, 2011 09:15 AM

Quote:

Originally Posted by thaimletches (Post 49895)
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

Mathias January 3rd, 2011 09:59 AM

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.

thaimletches January 4th, 2011 04:08 AM

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.SkCatCra fts"

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.

Mathias January 4th, 2011 08:18 AM

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.

thaimletches January 4th, 2011 08:56 AM

Quote:

Originally Posted by Mathias (Post 49975)
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. :)


All times are GMT -8. The time now is 07:42 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.