Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Cannot Get This Working! (http://forums.wolflair.com/showthread.php?t=56426)

chaoscowboy August 17th, 2016 01:01 PM

Cannot Get This Working!
 
Hello again HL forums, I've got a tricky bit of eval scripting that I cannot seem to get working. I've got a race that is sort of 'build your own anthropomorphic' type deal from the Thunderscape Campaign setting, and they get their choice of claw or bite or gore attack, which I've copied the mechanics from 'claw attack' additional ability from tiefling. Then they get their pick of three abilities from a list.

One of which increases the damage rating of their natural attacks (from race), one of which makes their natural attacks (from race) 19-20/x2. I'm having difficulty coding this. I tried looking at how the script works to increase weapon damage of all natural weapons when you increase the size but it hasn't worked with my modifications. I've added a tag Helper.FerranNaturalWeapon to all the natural weapon abilities from the race, and went with something to this effect:

Code:

~change the size of our natural weapons
      var searchexpr as string
      searchexpr = "tagis[Helper.FeralNaturalWeapon]"     
   
      foreach pick in hero from BaseNatWep where searchexpr
        perform eachpick.assign[Helper.DamageUp]
      nexteach

I've tried variations of this, not using tagis, not doing it as a variable, it always comes back that it's not a valid expression. I also don't even know how I'm going to do the crit change.

Aaron August 17th, 2016 01:12 PM

1 - How did you define a new Helper tag? I didn't think that tag group was open to users defining new tags. Perhaps use a Custom tag instead?

2 - The tag ID is way too long. Like most things it needs to be 10 characters or less. "FeralNaturalWeapon" is 8 too much.

3 - where you're setting the string variable, just set it to the tag name.

chaoscowboy August 17th, 2016 01:20 PM

Note: most of what I 'know' is through trial and error copying existing code, modifying it, googling, kind of trying to make it work.

1. I just added it? I thought it was just that, a helper, anyone can create. Under the bootstrap I manually typed that in.

2. wFeran is a good one I guess.

3. So how do I create a custom tag?

Aaron August 17th, 2016 03:42 PM

Don't sweat it, everyone has to start somewhere, and you're starting about where I did.

Almost everything in the editor has a "General Information" section at the bottom. One of the buttons there is "User Tags", click on that and the first option is "New tag". Check that and click "OK". It'll pop up a new window where you can choose the Tag Unique ID (which has to be 10 characters or less), the Tag name (which is what is fetched when tagnames is called for the tag) and the Tag abbreviation (similarly, called by tagabbrevs). All tags created here have the Custom tag group.

So if you're going to go with Custom.wFeran for your tag, make sure you define it on one thing, then bootstrap the weapons with the tag, then alter the script you posted above to look like this:

Code:

~change the size of our natural weapons
      var searchexpr as string
      searchexpr = "Custom.wFeran"     
   
      foreach pick in hero from BaseNatWep where searchexpr
        perform eachpick.assign[Helper.DamageUp]
        nexteach



All times are GMT -8. The time now is 03:17 PM.

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