Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 248

Old November 3rd, 2020, 08:31 AM
Sorry to be a pain but I can't figure out how to got the CritMin tag to change.
Provos is online now   #11 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,958

Old November 3rd, 2020, 10:07 AM
Quote:
Originally Posted by Provos View Post
Sorry to be a pain but I can't figure out how to got the CritMin tag to change.
What's tripping you up? Assigning and deleting tags or figuring out what the current tag is before deleting it?

If the former:

Code:
perform delete[CritMin.20]
perform assign[CritMin.19]
If the latter, take a look at the Ki Critical class special in Oriental Adventures.
Sendric is offline   #12 Reply With Quote
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 248

Old November 3rd, 2020, 11:27 AM
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.
Provos is online now   #13 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,958

Old November 3rd, 2020, 12:44 PM
Quote:
Originally Posted by Provos View Post
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.
Please post the script you are trying to use.
Sendric is offline   #14 Reply With Quote
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 248

Old November 5th, 2020, 05:13 AM
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]
Provos is online now   #15 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,958

Old November 5th, 2020, 06:57 AM
Quote:
Originally Posted by Provos View Post
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]
Thanks. This script should work if it's on the weapon. If the script is on a material being applied to the weapon, it won't work. This is because it's looking at the tags on itself. Where is the script? Also, are you getting any errors?
Sendric is offline   #16 Reply With Quote
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 248

Old November 5th, 2020, 08:08 AM
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
Provos is online now   #17 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,958

Old November 5th, 2020, 09:52 AM
Quote:
Originally Posted by Provos View Post
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
Ah, yes, that makes sense. You'll need to tell the script to look at the parent. Also, the error is because the original script you copied is for something that has a chooser.

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 09:56 AM.
Sendric is offline   #18 Reply With Quote
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 248

Old November 5th, 2020, 10:52 AM
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.
Provos is online now   #19 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,958

Old November 5th, 2020, 12:12 PM
Quote:
Originally Posted by Provos View Post
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.
Can you paste the exact error?
Sendric is offline   #20 Reply With Quote
Reply

Thread Tools
Display Modes

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 10:36 PM.


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