• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Insert User Text in Eval Script

pholtus

Active member
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.
 
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.
 
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.
 
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]
 
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.
 
Back
Top