Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Hydrothermal
Junior Member
 
Join Date: Sep 2014
Location: USA
Posts: 11

Old February 10th, 2020, 01:41 PM
I want to add a new weapon that allows the user to toggle a checkbox to change its damage and other stats. However, nonmagical weapons don't have an option to give them an activated ability. I got around this by directly adding the User.Activation tag and actName field, then checking abilActive in an eval script to manipulate the weapon's stats.

Code:
doneif (field[abilActive].value = 0)

field[wDamage].value -= 1
field[wAttack].value -= 1
perform this.delete[wCritMin.19]
perform this.assign[wCritMin.20]
This triggers an error when the weapon is loaded for the first time ("Attempt to access field 'usrChkText' that does not exist for thing wTestItem"), but it does work. I'm mostly okay with the error popping up if it's otherwise functional, but it also breaks if the weapon is selected for a custom magic weapon. I assume because the magic weapon is picking the actual weapon as a gizmo, my eval script only sets the fields on the gizmo pick and not the container. I have two questions:

- Is there a better way to get the checkbox to show up (ideally without the usrChkText error)? I thought about bootstrapping a separate ability to create the entry on the in-play tab, but I don't want to go down that road if it's not the right solution.
- How can I get my eval script to work both when the weapon is magical and nonmagical? I tried to figure out how to reference the container from the script, but I've never worked with gizmos before so I think I'm missing a lot of steps.

Last edited by Hydrothermal; February 11th, 2020 at 08:34 PM.
Hydrothermal is offline   #1 Reply With Quote
Hydrothermal
Junior Member
 
Join Date: Sep 2014
Location: USA
Posts: 11

Old February 11th, 2020, 09:59 PM
I fixed the magic weapon issue by checking container.ishero and then using either this or parent to make the modifications. I still get the (non-breaking) usrChkText error, though. It seems it will occur as long as User.Activation is present on the weapon and setting usrChkText just triggers the same error. Is there a different tag that I should use, or a way to define usrChkText for the thing?
Hydrothermal is offline   #2 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old February 12th, 2020, 07:20 AM
You might think of implementing this via an adjustment that selects the weapon in a drop down
Minous is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

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:11 AM.


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