Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Making new material (http://forums.wolflair.com/showthread.php?t=64896)

Provos November 3rd, 2020 07:31 AM

Sorry to be a pain but I can't figure out how to got the CritMin tag to change.

Sendric November 3rd, 2020 09:07 AM

Quote:

Originally Posted by Provos (Post 291735)
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.

Provos November 3rd, 2020 10: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.

Sendric November 3rd, 2020 11:44 AM

Quote:

Originally Posted by Provos (Post 291740)
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.

Provos November 5th, 2020 04: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]


Sendric November 5th, 2020 05:57 AM

Quote:

Originally Posted by Provos (Post 291761)
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?

Provos November 5th, 2020 07: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

Sendric November 5th, 2020 08:52 AM

Quote:

Originally Posted by Provos (Post 291764)
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]


Provos November 5th, 2020 09: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.

Sendric November 5th, 2020 11:12 AM

Quote:

Originally Posted by Provos (Post 291767)
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?


All times are GMT -8. The time now is 11:34 PM.

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