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
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old May 28th, 2017, 11:13 AM
Hoping someone can quickly point me at an example of an ability that changes the relevant ability score for a skill that could be ported over as a Trait, if it is not one already.

Specifically, I am trying to create a trait called Idiot Savant, which requires that you have an Intelligence of 9 or less. If you take this trait, you may choose one Intelligence skill, and perform it with your Wisdom bonus instead.

This is to create an NPC who is really quite simple-minded, but BRILLIANT at making things (Craft) which is intelligence based.

If this sort of code already exists, can someone please point me in the right direction? If it does not exist, can I get someone to help me write it?

Thanks in advance

Erin
ErinRigh is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 28th, 2017, 02:50 PM
You just need to assign a SkillOver tag for whatever attribute you want to use instead of the base, to the skill in question.

Did you want to treat all craft skills as a single selection for the purposes of this trait, or would the user select a single craft skill to get the benefit?
Aaron is offline   #2 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old May 29th, 2017, 05:40 AM
It would apply to all craft skills, how wold I go about that?
ErinRigh is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 29th, 2017, 06:49 AM
Code:
~ Find all Craft Skills
foreach pick in hero from BaseSkill where "Helper.SkCatCraft"
  ~ Make the craft skill use Wisdom
  perform eachpick.assign[SkillOver.aWIS]
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   #4 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 29th, 2017, 07:03 AM
Well, first you'd set up a selector on the trait to choose among all intelligence skills plus the "AllKnow" and "AllCraft" skill helpers. Go to "Develop -> Enable Data File Debugging". Use debug and look at, for example, the Appraise skill by right clicking on it and "Show Debug Tags". Do you see the tag in that list which indicates this skill is based off of INT? For the helpers, just use the thingid tags. When building a tag expression, like for this selector | means "or".

Once that is done, make sure you can choose among the correct skills, then move to the next step, which is the eval. I'll rough something out, with some notes on what you need to complete it. The ~ symbol means that line is a note/instruction, and is ignored for the purpose of code

Code:
~ This line is to stop the code from executing if something disables this trait
doneif (tagis[Helper.FtDisable] <> 0)

~ This line stops the code if our selector hasn't chosen anything yet
doneif (field[usrChosen1].ischosen = 0)

~ The following section sees what we have selected, and depending on that applies a skillover tag to one or more skills.

~ First branch is if we picked Craft. XXX is the unique ID for the All Craft helper
if (field[usrChosen1].chosen.tagis[thingid.XXX] <> 0) then
  ~ cycle all the skills with a tag saying they are craft skills. YYY is the tag ID of this tag
  foreach pick in hero from BaseSkill where "Helper.YYY"
    perform eachpick.assign[SkillOver.aWIS]
    nexteach

~ Second branch is if we picked Knowledge. ZZZ is the unique ID for the All Knowledge helper
elseif (field[usrChosen1].chosen.tagis[thingid.ZZZ] <> 0) then
  ~ cycle all the skills with a tag saying they are craft skills. AAA is the tag ID of this tag
  foreach pick in hero from BaseSkill where "Helper.AAA"
    perform eachpick.assign[SkillOver.aWIS]
    nexteach

~ Third branch is not a group of skills, so just assign the SkillOver to what we selected
else
  perform field[usrChosen1].chosen.assign[SkillOver.aWIS]
  endif
Aaron is offline   #5 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old May 29th, 2017, 03:45 PM
Thanks to you both, I got it working, just great
ErinRigh is offline   #6 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 06:23 AM.


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