Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 14th, 2014, 05:48 PM
So looks like Matt forgot to give the timing which is very important. This has to run at Final/9999999999 to work correctly.

Once you have this working all you have to do is make the following changes:
1) Add the script to Mechanic so it runs for all characters and will adjust all weapons.
2) Change the script to do a foreach loop through all the BaseWep. HERE is a post with an example showing a foreach loop through all BaseWep.

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   #11 Reply With Quote
Necros99
Junior Member
 
Join Date: Jan 2011
Posts: 28

Old April 15th, 2014, 06:34 AM
@ShadowChemosh

You have been extremely help, and I have the initial script working as intended by the author. I am wondering, instead of displaying the sDice as extra damage, is it possible to display it as base damage?

I assume it would be applied as a modification to:

if (nDice <> 0) then
field[wDamExtra].text = "+" & sDice
endif

but every time I try replacing "wDamExtra", I run into parsing errors. I assumed it would be some variation of:

if (nDice <> 0) then
field[wMain].text = sDice
endif

Any assistance you could provide would be greatly appreciated.

P.S. I am still working within the weapon definition (as opposed to the Mechanic)

Last edited by Necros99; April 15th, 2014 at 07:29 AM.
Necros99 is offline   #12 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 15th, 2014, 11:27 AM
Their is two fields you will have to change so that you can get it to display correctly. These are the "Fixed" damage fields. I think its called "wFixDamage" and "wFixRanDam" fields used for setting the melee and ranged damage.

To make sure you can check the Vital Strike feat add as the very bottom of its code it sets the two fields correctly.

If you don't want to use the "extra damage" field you just have to totally rebuild the full value of the dice including any pluses then. That was why Matt went the way he did as it was easier.

So your code will need to figure out the dice current value and the amount of "plus". So if the weapon does 1d8+3 you will need to store that as three independent values (ie 1,8,3). This way you can multiple the "1" of 1d8+3 only by the amount of extra dice. You will also need to know which values to pull the pluses from as 1 handed vs 2-handed do different damage plus amounts so you have to pull from different sections of the damage table.

Then string it all back together again so you get say 2d8+3 if you where to double the dice. For example code I recommend looking at the Vital Strike feat I did as I am doing all that. The only difference is its already doing a foreach loop. So the parts of the script doing the "eachpick" you could leave off if you are running directly on the weapon for now.

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   #13 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old April 15th, 2014, 12:06 PM
Quote:
Originally Posted by ShadowChemosh View Post
So looks like Matt forgot to give the timing which is very important. This has to run at Final/9999999999 to work correctly.

Once you have this working all you have to do is make the following changes:
1) Add the script to Mechanic so it runs for all characters and will adjust all weapons.
2) Change the script to do a foreach loop through all the BaseWep. HERE is a post with an example showing a foreach loop through all BaseWep.
Sorry about that. Yes, the timing is very important. In fact, I run mine at Render/99999 just to make sure it's at the very end.

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)
Matt Droz is offline   #14 Reply With Quote
Necros99
Junior Member
 
Join Date: Jan 2011
Posts: 28

Old April 16th, 2014, 07:58 AM
I got the scripting to work, when included within a weapon. Thank you so much for that assistance.

When I tried use the scripting as a Mechanic (thus affecting weapons I hadn't rebuilt), I get an error on loading:

"Attempt to access field 'abValue' that does not exist for thing 'LvlDmgMult'
Location: 'eval' script for Thing 'LvlDmgMult' (Eval Script '#1') near line 9
- - -
Attempt to access field 'abValue' that does not exist for thing 'LvlDmgMult'
Location: 'eval' script for Thing 'LvlDmgMult' (Eval Script '#1') near line 44
- - -"

This repeats several times in the error display pop-up

What I find strange is that I used the abValue field without any problems when the script was placed on an individual weapon.

C999_Equipment.user has the sample working weapon config
C999_General.user has the sample non-working mechanic config

Portfolio will load with just C999_Equipment.user. I get the above errors with just C999_General.user
Attached Files
File Type: email C999_Equipment.user (2.7 KB, 0 views)
File Type: email C999_General.user (2.2 KB, 0 views)
Necros99 is offline   #15 Reply With Quote
Necros99
Junior Member
 
Join Date: Jan 2011
Posts: 28

Old April 16th, 2014, 10:44 AM
I resolved the issue by removing all reference's to "field[abValue].value" and just using the defined variable "lvlcnt".

Thank you again for all your help.
Necros99 is offline   #16 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 16th, 2014, 10:54 AM
Quote:
Originally Posted by Necros99 View Post
I resolved the issue by removing all reference's to "field[abValue].value" and just using the defined variable "lvlcnt".

Thank you again for all your help.
Nice! What you found is that the variable abValue is not part of all Things. Mechanics and Simple Things do not carry abValue. Adjustments didn't either for a long time either.

So using a local variable is the correct answer in this case.

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   #17 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 07:56 AM.


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