Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old March 3rd, 2016, 11:57 AM
I am trying to create a simple adjustment that removes one skill proficiency and adds a different one.

The Component expressions are:
pCandExpr = component.BaseSkill & Helper.Proficient
pCandExpr2 = component.BaseSkill & !Helper.Proficient

The first is a selection of proficient skills on the hero.
The second is a selection of non-proficient skills on the hero.

My eval scripts is as follows:
Phase: First
Priority: 1000


Quote:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

doneif (field[pChosen].ischosen = 0)
doneif (field[pChosen2].ischosen = 0)

~ Mark our chosen skill as no longer proficient
perform field[pChosen].chosen.delete[Helper.Proficient]

~ Mark our chosen skill as proficient
perform field[pChosen2].chosen.assign[Helper.Proficient]
The basic script is stolen from the eval script on the Adjustment: Proficient Skill (pProfSki).
The key differences are for the removal of a skill proficiency at the same time as adding one.

When I chose to remove the Deception skill and add the Invistigate skill during a test, I get the following error . . .

Quote:
Attempt to access pick information or behaviors for read-only thing 'skInvestig'
I've tried different Phases and Priorities:

Post-levels, 10000 & Final Phase, 10000 with the same issue.

It has to be a simple issue that I am missing because the original adjustment works fine.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 3rd, 2016, 05:02 PM
The 2nd custom expression on adjustments defaults to Things not Picks. And you can't modify Things only Picks.

Take a look at my "Weapon, Damage Type" adjustment I added. See where I modified the field pUsePicks2 to be 0 that is Things instead change that line of code to equal 1 for "Picks".

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   #2 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 02:15 AM.


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