Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old June 14th, 2012, 11:42 AM
Here's what I'm looking to do (based on the Zhentarim Spy in Player's Guide to Faerūn).

The character can have a cover identity for each Craft or Profession skill that has two or more ranks. I've got it so that I can do a count of the skills and get how many Cover Identities they can choose for a Custom Ability. What I would like is if there is a quick and dirty way to create the list it pulls from instead of my adding a list item for each Craft and Profession skill and setting a prerequisite to display it based on its ranks.

Any ideas/suggestions?
Matt Droz is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 14th, 2012, 12:12 PM
a foreach through all the craft and profession skills - for each one with 2+ ranks, add its tagids[thingid.?] to field[usrCandid1].text. That way, you're building up a selection list that includes only the valid skills at that time.

Last edited by Mathias; June 14th, 2012 at 12:35 PM.
Mathias is offline   #2 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old June 14th, 2012, 12:25 PM
Okay, do you have that in code form? I've tried a couple of different things, but it's giving me a error on the "candid1" item. Here's what I've got, in the Eval Scripts on the Class tab:

Phase: First Priority: 100 Index: 1
Code:
      ~search through all the craft skills we have and count how many we have 2+ ranks in
      foreach pick in hero from BaseSkill where "Helper.SkCatCraft"
        if (eachpick.field[skUser].value >= 2) then
          field[candid1].text += foreach.tagids[thingid.?]
          endif
        nexteach

      ~search through all the profession skills we have and count how many we have 2+ ranks in
      foreach pick in hero from BaseSkill where "Helper.SkCatProf"
        if (eachpick.field[skUser].value >= 2) then
          field[candid1].text += foreach.tagids[thingid.?]
          endif
        nexteach
Matt Droz is offline   #3 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old June 14th, 2012, 12:33 PM
The red text is just something I put in to show how I'm thinking. I've tried a couple other bits of code and can't seem to get the right one.
Matt Droz is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 14th, 2012, 12:41 PM
&=, not += when adding text to an existing text string. += is for adding numbers to each other.

Also,
Code:
foreach pick in hero from BaseSkill where "Helper.SkCatProf | Helper.SkCatCraft"
so you can combine the two foreaches into one.

You'll also need an OR: " | " between each Id you place in there:

Code:
 
field[usrCandid1].text = splice(field[usrCandid1].text,eachpick.tagids[thingid.?]," | ")
Sorry about mis-typing the Id of the usrCandid1 field earlier - I was typing too fast and not thinking hard enough about what I was writing.

Phase & Priority: never use First unless there's a specific reason to, and don't use priorities of less than 1000 unless there's a specific reason to. I'd say Final/10000 for this.

You may also want to use skRanks, instead of skUser, so that it also finds those skills whose ranks have come from racial skill ranks or from a headband of vast intelligence.
Mathias is offline   #5 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old June 14th, 2012, 12:48 PM
Thanks!

It's compiling fine now, but when it completes, I get a list of the following error multiple times:

Attempt to access field 'usrCandid1' that does not exist for thing 'cHelpZht'

I tried putting it in as a User Tag, but still get the error.

Code:
      ~search through all the craft skills we have and count how many we have 2+ ranks in
      var bonus as number
      foreach pick in hero from BaseSkill where "Helper.SkCatProf | Helper.SkCatCraft"
        if (eachpick.field[skRanks].value >= 2) then
          field[usrCandid1].text = splice(field[usrCandid1].text,eachpick.tagids[thingid.?]," | ")
          endif
        nexteach
Matt Droz is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 14th, 2012, 12:53 PM
Oh, I thought you were on a class special and were building the list for a drop-down.

How are you doing this?
Mathias is offline   #7 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old June 14th, 2012, 12:54 PM
On the Class tab, trying to build it as a Custom Ability list.
Matt Droz is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 14th, 2012, 12:54 PM
Suggestion: Have only one (not unique) "Cover Id" ability that can be selected - each Id you add then uses a drop-down to select which skill it applies to. The user adds a new copy for each cover Id they want.
Mathias is offline   #9 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old June 14th, 2012, 12:58 PM
Okay, I'll take a look and see if I can make it work that way.
Matt Droz is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:40 AM.


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