• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Help needed coding a campaign trait.

ultodrago

Member
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?
 
What is a lore skill? you should be able to use similar code in part 2 and just adjust for whatever a "lore" is.
 
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.
 
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]
 
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.
 
Last edited:
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.
 
Last edited:
Back
Top