Junior Member
Join Date: Apr 2012
Posts: 26
|
I'm trying to modify the Masterwork Tool item to have user entered text for the specific aspect of a skill that is benefited by the tool. Currently, I have a script that says:
#situational[hero.childfound[skUseMagic],"+2 bonus to emulate Dwarven race",field[thingname].text] If I check the option, "User Text" in the editor, can I insert that text as a variable in my eval script? That would make this tool more more generically useful with UMD. In other words: #situational[hero.childfound[skUseMagic],"%UserText%",field[thingname].text] I suspect there's a variable for this, but I can't seem to find what it is. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In the develop menu, make sure that "Enable Data File Debugging" is turned on.
Now, add this item to a sample character, right-click it, and choose "Show Debug Fields for XXXXX". Now, studying that list of fields, watch which ones change when you change the user text. |
#2 |
Junior Member
Join Date: Apr 2012
Posts: 26
|
Excellent. It looks like I'm looking for domDomain then. Unfortunately, my script-fu is failing me.
#situational[hero.childfound[skUseMagic],"blar [domDomain]",field[thingname].text] doesn't quite work. Anything I surround with quotes gives that exact text right back. What syntax returns the value of domDomain when used inside quotes? Thank you again. |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Sort of looks like your use to PHP or something that does replacement in the middle of a string. HL does not do that. But it can use the & to concatenate two strings together.
Code:
#situational[hero.childfound[skUseMagic],"blar" & field[domDomain].text & "end Blar",field[thingname].text] 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. |
#4 |
Junior Member
Join Date: Apr 2012
Posts: 26
|
Thank you!
That was it. The big thing I was screwing up on was not adding "field" right before [domDomain]. I'm intrigued by the concatination script though. There are a few situational boons the wife picked up that would be enhanced by that. |
#5 |
|
|