Junior Member
Join Date: Dec 2019
Posts: 10
|
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? |
#1 |
Senior Member
Join Date: May 2015
Posts: 830
|
What is a lore skill? you should be able to use similar code in part 2 and just adjust for whatever a "lore" is.
|
#2 |
Junior Member
Join Date: Dec 2019
Posts: 10
|
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. |
#3 |
Senior Member
Join Date: May 2015
Posts: 830
|
have you seen the two custom expressions? you should be setting your drop down from there.
|
#4 |
Junior Member
Join Date: Dec 2019
Posts: 10
|
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] |
#5 |
Senior Member
Join Date: May 2015
Posts: 830
|
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.?] 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 by Minous; July 11th, 2020 at 01:55 PM. |
#6 |
Senior Member
Join Date: May 2015
Posts: 830
|
to make a chosen a class skill:
perform field[usrChosen1].chosen.assign[Helper.ClassSkill] |
#7 |
Junior Member
Join Date: Dec 2019
Posts: 10
|
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 by ultodrago; July 11th, 2020 at 02:33 PM. |
#8 |
Senior Member
Join Date: May 2015
Posts: 830
|
#applybonus[BonTrait,field[usrChosen2].chosen,5]
|
#9 |
Senior Member
Join Date: May 2015
Posts: 830
|
The actual idstring doesn't matter, as working with the higher level objects tends to be easier.
|
#10 |
|
|