Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Sorry to be a pain but I can't figure out how to got the CritMin tag to change.
|
#11 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
If the former: Code:
perform delete[CritMin.20] perform assign[CritMin.19] |
|
#12 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
My goal was to create a new material that you can select from customize weapon and having that lower you crit threat and change + to hit and damage.
I had no idea how to work with tags. I found this thread http://forums.wolflair.com/showthrea...t=threat+range And got a bit confused to be honest. I kept getting error by following Mathias suggestion. |
#13 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#14 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Here is the script. I just copied from Mathias post and modified it.
Code:
var crit as number if (tagcount[wCritMin.?] > 0) then crit = field[chosen].chosen.tagmin[wCritMin.?] else done endif ~now, we'll subtract one from the value we looked up: crit -= 1 ~and create a tag for that new value: var newcrittag as string newcrittag = "wCritMin." & crit ~Weapons are assumed to have exactly one wCritMin tag, ~so we'll delete anything that already exists, ~and then assign the new tag: perform field[chosen].chosen.delete[wCritMin.?] perform field[chosen].chosen.assignstr[newcrittag] |
#15 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#16 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Ah the script is on the new material I am using and yes I am getting an error.
Syntax error in "eval" script for Thing 'mRedstl' (Eval Script '#2') on line 4 -> Non-existent filed 'chosen' by script |
#17 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Try the following and let me know what you get: Code:
var crit as number if (container.parent.tagcount[wCritMin.?] > 0) then crit = container.parent.tagmin[wCritMin.?] endif ~now, we'll subtract one from the value we looked up: crit -= 1 ~and create a tag for that new value: var newcrittag as string newcrittag = "wCritMin." & crit ~Weapons are assumed to have exactly one wCritMin tag, ~so we'll delete anything that already exists, ~and then assign the new tag: perform container.parent.delete[wCritMin.?] perform container.parent.assignstr[newcrittag] Last edited by Sendric; November 5th, 2020 at 08:56 AM. |
|
#18 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
I'm getting a Invalid syntax for tag template error when I try to use Red Steel as the Material Used when creating a custom weapon. I am making the weapon in Hero Lab under Magic, Custom & Masterwork weapon area. Just to clarify.
|
#19 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#20 |
|
|