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
Steev42
Member
 
Join Date: Nov 2010
Posts: 70

Old June 16th, 2012, 06:33 PM
Is there a way to get the final damage string from a particular weapon, so as to include it as part of the livename of another special? I tried to take a look at Constrict, as it would usually have similar function, but it seems that there are multiple versions of that with the values entered by hand.
Steev42 is offline   #1 Reply With Quote
Steev42
Member
 
Join Date: Nov 2010
Posts: 70

Old June 26th, 2012, 01:14 PM
Ok, since there was no response, I'll try again.

Code:
var damage as string
damage = hero.childfound[wBite].field[wDamage].value
That code gives me a value of 7. I tried throwing .field[livename].text in place of the .value, and got an error about using a reserved word in a script.

Looking at the Pick Fields for the bite, the wDamage field has a value of 7 and a final of 2d6+6. Is it at all possible for me to pick up that Final value somehow?
Steev42 is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 26th, 2012, 01:19 PM
No - the text version isn't generated until after all scripts are finished running, so you can't access it with another script.
Mathias 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 June 26th, 2012, 02:31 PM
Quote:
Originally Posted by Mathias View Post
No - the text version isn't generated until after all scripts are finished running, so you can't access it with another script.
Maybe I am missing something but I think he could do a script to calculate this value for himself but your right in saying its not done for him.

He will have all the information he would just have to put it together. In example the 2d6 weapon would have a tag of "wMain.2d6_7" and you can easily strip off the _7 part of the string. Then you can get the final value of +6 bonus to damage from the weapon. Sorry I forget the field name or names as you may have to do some addition. So all of this would want to be done VERY late in the timing to make sure all the other scripts have run.

Then it would be just a case of putting the two pieces together into "2d6+6" and putting that as the livename of the other Thing.

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
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 11:30 PM.


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