View Single Post
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 27th, 2017, 09:37 PM
Quote:
Originally Posted by Quintain View Post
Question:

There are several mythic abilities that deal with psionic focus that makes the focus test positive when tested for certain abilities even if it is expended.

I'd like to implement a new tag called "Hero.isPsiFocused". Which would count as being psionically focused without interfering with the psionic focus tags.

Can you modify whatever psionic focus test procedure you made to do this test?

Naturally, my implementation is encountering some issues -- here's my code --

Error: The data files could not be loaded due to errors. Hero Lab will now attempt to load them in recovery mode. Once loaded, you can access the editor as normal to correct any errors.

The following errors occurred:

Syntax error in 'eval' script for Thing 'fmyDeepFoc' (Eval Script '#1') on line 14
-> Invalid syntax for tag template

Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

~ if mythic power >= 1 or Power Point Pool >=1 then considered focused.

    var vPwrPts as number
    vPwrPts = #resleft[resPowerPt]

    if (vPwrPts >= 1) Then
       ~ Character is Psionically Focused
       perform hero.assign[Hero.isPsiFocus]
    Endif

    if (hero.child[trkMythic].field[trkLeft].value >= 1) Then
       ~ Character is Psionically Focused
       perform hero.assign[Hero.isPsiFocus]
    Endif
I presume that I need to create the Hero tag ahead of time -- I'm not positive on how to do this. --

Edit: I found that the name for the hero tag was too long -- I changed to Hero.isPsiFocus, and it compiled successfully. Compiled, but not working -- when I tried to add the tag in the tags menu, it erred on something like dynamic tag not found:



Timing issue?
Hero.? tag group is controlled by LW you can NOT just try and create a new tag using a script. Only LW can add new tags to the Hero.? group. This is why we the community has custom tags created in .1st files.

I went ahead and created a new tag group MythicPsi.? and added the tag PsiFocus to it. In addition I modified the PUPsiFocus procedure call to look for this tag. So do a new pull from GitHub and then change your script to assign MythicPsi.PsiFocus.

Of course looking around I see dozens of abilities that are not correctly calling PUPsiFocus to test. Meaning we will have to now correct all those scripts. Sigh...

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #12 Reply With Quote