Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#11 |
Junior Member
Join Date: Jan 2011
Posts: 28
|
@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. |
#12 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#13 |
Senior Member
Join Date: Apr 2010
Posts: 152
|
Quote:
Matt Droz Community material (Forgotten Realms & Non-SRD/Retro) |
|
#14 |
Junior Member
Join Date: Jan 2011
Posts: 28
|
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 |
#15 |
Junior Member
Join Date: Jan 2011
Posts: 28
|
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. |
#16 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
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. |
|
#17 |
Thread Tools | |
Display Modes | |
|
|