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
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old April 30th, 2012, 04:32 AM
Okay, so I thought I had this working (and it does, sort of). I am working on a feat hat gives you a favored class in addition to the one you get to choose (this one is chosen between the bard, sorcerer, or wizard). The script I have will make the chosen class a favored class, but only for one level, after that it is no longer a favored class. Any help would be appreciated. Here is what I have.

Code:
       ~assign Bard as a favored class
       if (field[usrChosen1].chosen.pulltags[thingid.cBard] = 1) then
          perform hero.assign[FavClass.cBard]
          perform hero.childfound[cBard].assign[Helper.FavorClass]

       ~assign Sorcerer as a favored class
       elseif (field[usrChosen1].chosen.pulltags[thingid.cSorcerer] = 1) then
          perform hero.assign[FavClass.cSorcerer]
          perform hero.childfound[cSorcerer].assign[Helper.FavorClass]

      ~assign wizard as a favored class
      elseif (field[usrChosen1].chosen.pulltags[thingid.cWizard] = 1) then
         perform hero.assign[FavClass.cWizard]
         perform hero.childfound[cWizard].assign[Helper.FavorClass]
      endif
mbran01 is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old April 30th, 2012, 06:31 AM
pulltags is an order to perform an operation, not something you should test.

You want tagis[]
Mathias is online now   #2 Reply With Quote
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old April 30th, 2012, 06:59 AM
I think you said that to me before, and it got lost in some other things I was doing. I fixed the code to say tagis[]. It still only gives me the class as a favored class for one level. Any thoughts?
mbran01 is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old April 30th, 2012, 07:20 AM
field[usrChosen1].chosen is how you go about choosing a particular item.

Have you seen any other methods of finding items?

Any searches that can find all examples of a particular thing?
Mathias is online now   #4 Reply With Quote
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old April 30th, 2012, 11:06 AM
I played around with a foreach pick in hero statement, but that didn't work (with the foreach statement it would'nt even give me the class as favored for one level). So I am basically at a loss as to where to go from here.
mbran01 is offline   #5 Reply With Quote
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old May 2nd, 2012, 08:37 PM
So I was hoping someone could take a look at the code below and tell me if they see any problems with it. I have tried the script in various phases and priorities. Nothing seems to work, but I don't get any validation errors when compiling. So here's hoping someone can point me in the right direction with this one.

Code:
        foreach pick in hero from BaseClass

       ~assign Bard as a favored class
       if (field[usrChosen1].chosen.tagis[thingid.cBard] <> 0) then
          perform hero.assign[FavClass.cBard]
          perform hero.childfound[cBard].assign[Helper.FavorClass]

       ~assign Sorcerer as a favored class
       elseif (field[usrChosen1].chosen.tagis[thingid.cSorcerer] <> 0) then
          perform hero.assign[FavClass.cSorcerer]
          perform hero.childfound[cSorcerer].assign[Helper.FavorClass]

      ~assign wizard as a favored class
      elseif (field[usrChosen1].chosen.tagis[thingid.cWizard] <> 0) then
         perform hero.assign[FavClass.cWizard]
         perform hero.childfound[cWizard].assign[Helper.FavorClass]
      endif
      nexteach
Edit: Well I figured out that I needed to add eachpick in place of hero.childfound[cClass], this causes all classes to become favored. Still not what I was looking for, but a step closer I think.

Last edited by mbran01; May 2nd, 2012 at 09:02 PM. Reason: solved part of the issue
mbran01 is offline   #6 Reply With Quote
mbran01
Senior Member
 
Join Date: Jan 2011
Location: Flint, MI
Posts: 100

Old May 2nd, 2012, 09:22 PM
I think I finally cracked this nut. This seems to be working.

phase/priority (post levels/11000)

Code:
       ~ Assign bard as a favored class
       if (field[usrChosen1].chosen.tagis[thingid.cBard] <> 0) then
          foreach pick in hero from BaseClass where "thingid.cBard"
          perform hero.assign[FavClass.cBard]
          perform eachpick.assign[Helper.FavorClass]
        nexteach

       ~ Assign sorcerer as a favored class
       elseif (field[usrChosen1].chosen.tagis[thingid.cSorcerer] <> 0) then
          foreach pick in hero from BaseClass where "thingid.cSorcerer"
          perform hero.assign[FavClass.cSorcerer]
          perform eachpick.assign[Helper.FavorClass]
        nexteach

       ~ Assign wizard as a favored class
       elseif (field[usrChosen1].chosen.tagis[thingid.cWizard] <> 0) then
          foreach pick in hero from BaseClass where "thingid.cWizard"
          perform hero.assign[FavClass.cWizard]
          perform eachpick.assign[Helper.FavorClass]
        nexteach
       endif
This was a tough one for me, but I figured it out. thanks to all that helped point me in the right direction.
mbran01 is offline   #7 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 10:34 AM.


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