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)
-   -   Help needed coding a campaign trait. (http://forums.wolflair.com/showthread.php?t=64508)

ultodrago July 11th, 2020 07:48 AM

Help needed coding a campaign trait.
 
So I'm trying to make a campaign trait for a home campaign that does the following:
1) Give +1 to Knowledge (History).
2) Give +1 to another Knowledge skill of the user's choice.
3) Give +1 to a Lore skill of the user's choice.

By replicating something similar to what's done in the Bandit (River Kingdoms) trait, I can get 1 and 2 working easily, but 3 can't be done with the current implementation.

I've tried multiple methods of getting step 3 to work, all which either don't work and just grab the first dropdown, or throw a compiler error.

I have scrapped the code I used prior, so I don't have anything to show. Is there a way to read from more than one drop-down selector?

Minous July 11th, 2020 12:44 PM

What is a lore skill? you should be able to use similar code in part 2 and just adjust for whatever a "lore" is.

ultodrago July 11th, 2020 01:23 PM

Firstly, Lore is a new skill added alongside the Background Skills rules in Pathfinder.

Secondly, the issue with replicating how the Bandit trait works is that, like I said, it only works for Part 2. Every attempt I have used to try and modify it to work for a second drop-down list failed to do anything but give the choice in the first drop-down again.

Minous July 11th, 2020 01:39 PM

have you seen the two custom expressions? you should be setting your drop down from there.

ultodrago July 11th, 2020 01:48 PM

Ok. I want to be clear here. I can populate Dropdown A and Dropdown B just fine. My issue is the fact that I can't read what's in Dropdown B with... basically this code that comes straight from the Bandit trait.

Code:

      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      call fTargetFoc

      doneif (state.isfocus = 0)

      ~make our chosen skill a class skill
      var focusskill as string
      focusskill = "ClassSkill." & focus.idstring
      perform hero.assignstr[focusskill]

      ~add 1 to our chosen skill
      #applybonus[BonTrait,focus,1]


Minous July 11th, 2020 01:53 PM

Ok, that looks like that trait is just poorly written, take a look at something that uses two drop downs:

Code:


      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      doneif (field[pChosen].ischosen = 0)

      perform field[pChosen].chosen.pulltags[ClsAllowSp.?]

      doneif (field[pChosen2].ischosen = 0)

      perform field[pChosen2].chosen.pushtags[ClsAllowSp.?]

Usage of pChosen and pChosen2 should help you reading both fields

PS: Getting as specific as possible when asking for help allows us to figure out exactly what we should be helping you with.

Minous July 11th, 2020 01:58 PM

to make a chosen a class skill:

perform field[usrChosen1].chosen.assign[Helper.ClassSkill]

ultodrago July 11th, 2020 02:31 PM

Ok, so that at least work with two dropdowns other than cause a compiler error, which I am thankful for. How would I be able to read and manipulate what skill IDs are chosen tho? Let's say that pChosen (which I swapped with usrChosen1 in my code) is set to Knowledge (Religion) which has the tag of skKnowRel and pChosen2 (which is usrChosen2 in my code) is set to Lore (asdf) which has a tag of skLorOther. How would I go from what I have now to that? How would I prevent it from affecting more than 1 instance of skLorOther if the user has more than 1?

Also I want to apologise for the lack of info prior. I thought I gave enough info initially, but I was mistaken.

Minous July 11th, 2020 06:03 PM

#applybonus[BonTrait,field[usrChosen2].chosen,5]

Minous July 11th, 2020 06:06 PM

The actual idstring doesn't matter, as working with the higher level objects tends to be easier.


All times are GMT -8. The time now is 01:08 AM.

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