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
SteelRat451
Junior Member
 
Join Date: Nov 2013
Posts: 14

Old November 17th, 2013, 06:10 PM
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.


Quote:
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.
SteelRat451 is offline   #1 Reply With Quote
SteelRat451
Junior Member
 
Join Date: Nov 2013
Posts: 14

Old November 18th, 2013, 07:01 AM
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...

Quote:
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
SteelRat451 is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 18th, 2013, 07:07 AM
Please write out the text of the ability you're trying to code. I don't understand what you're trying to accomplish.
Mathias is online now   #3 Reply With Quote
SteelRat451
Junior Member
 
Join Date: Nov 2013
Posts: 14

Old November 18th, 2013, 09:27 AM
Apologies for being unclear. It is an adjustment as opposed to an ability.

The boon reads...

Quote:
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.
SteelRat451 is offline   #4 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 18th, 2013, 10:10 AM
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.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 18th, 2013, 10:30 AM
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

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #6 Reply With Quote
SteelRat451
Junior Member
 
Join Date: Nov 2013
Posts: 14

Old November 18th, 2013, 10:47 AM
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.
SteelRat451 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 08:17 AM.


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