• 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

Pulltags and Macros...Conditional Ability Check Bonuses.

Hello! I am trying to deal with a boon that allows for circumstance bonus to ability checks on a situational basis. (e.g. +1 circumstance bonus on any Charisma based checks with any dwarf...)

I have found how to add a permanent bonus like this (non-situational) as well as situational bonuses to individual skill checks (thanks to ShadowChemosh and his Adjustments Addon) but not both.

I am not much of a programmer / coder and I'm stuck.... I am not sure how to get the #situational macro to acknowledge fields associated with the tags drawn from the pulltags command.


doneif (field[pIsOn].value = 0)

doneif (field[pChosen].ischosen = 0)

perform field[pChosen].chosen.setfocus

perform focus.pulltags[SkillOver.?]

foreach pick in hero from BaseSkill
if (eachpick.intersect[SkillOver,SkillOver] <> 0) then
#situational[?????,field[pDuration].text,field [pSource].text]
elseif (eachpick.islinkage[skillattr] <> 0) then
if (eachpick.linkage[skillattr].uniqindex = focus.uniqindex) then
#situational[?????,field[pDuration].text,field [pSource].text]
endif
endif
nexteach

I have had little luck finding anything in the forums nor in the help sites. I would appreciate any useful suggestions.
 
After some sleep I've come up with something that seems less messed up, but still have the same issue of how to tell the macro what field to use...

doneif (field[pIsOn].value = 0)

doneif (field[pChosen].ischosen = 0)

foreach pick in hero from BaseSkill
if (compare(eachpick.field[skAttrAbbr],field[pChosen].chosen) <> 0) then
#situational[eachpick.field[???],field[pDuration].text,field [pSource].text]
endif
nexteach
 
Please write out the text of the ability you're trying to code. I don't understand what you're trying to accomplish.
 
Text of ability

Apologies for being unclear. It is an adjustment as opposed to an ability.

The boon reads...

As a result you ... gain a +1 circumstance bonus on any Charisma-based checks with any citizen of Andoran.

In Pathfinder terms I read this as a bonus to skills such as bluff, diplomacy, etc. My intent is to make an adjustment where one picks the ability it is based on and the related skills are annotated with the situational bonus. This sort of thing keeps coming up a lot and I have several variants that use different abilities and situations.
 
I will try and add a Situational Bonus adjustment that affects all things of a ability score for the next release of my Adjustments Addon.

Until then I would just use "Skill Bonus, Situational" adjustment and add it 3 times so you can select "Bluff, Diplomacy, and Intimidate". Fill in your text of "+1 circumstance vs any citizen of Andoran" and boom your done!

Or you could make an adjustment that foreach loops through all the different Cha based skills. The fun is to make sure you cover any skill that gets changed from say a Wisdom to Cha. :) You can see THIS post for info on that.
 
Hmm maybe I should read slower. You basically have the code above... You just have maybe too much.... I have no access to HL so no way to test the below but I think its all good. ;)

Code:
~ If we are not on get out now!
doneif (field[pIsOn].value <> 1)

var nChaSkill as number

foreach pick in hero from BaseSkill
   ~ set Cha based skill flag to FALSE
   nChaSkill = 0

   ~ If skill override tag to Cha is found then set flag to TRUE
   if (eachpick.tagis[SkillOver.aCHA] <> 0) then
      nChaSkill = 1

   ~..else check the linkage to see if Cha skill then set flag to TRUE
   elseif (eachpick.linkage[skillattr].tagis[thingid.aCHA] <> 0) then
      nChaSkill = 1
   endif

   ~ If we found a valid Cha based skill set the situational text
   If (nChaSkill <> 0) Then
      #situational[eachpick,field[pDuration].text,field[pSource].text]
   Endif
nexteach
 
The above code works fine for Charisma skills. I'm going to try to see if I can adapt it to accept different abilities. Thank you much as this answers my initial questions.
 
Back
Top