• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

BaseSplPwr component issue?

ShadowChemosh

Well-known member
I have a custom archetype for the Witch that changes the patron spells into spell-like abilities. It has been working great until the last update. Now I get these errors for each spell that becomes a Spell-like ability.

Code:
Attempt to access 'focus' pick from script when no focus exists
Location: 'eval' script for Component 'BaseSplPwr' (Eval Script 'Calc sConcCheck and sOverSplRs') near line 12
- - -
Attempt to access 'focus' pick from script when no focus exists
Location: 'eval' script for Component 'BaseSplPwr' (Eval Script 'Calc sConcCheck and sOverSplRs') near line 13

Could Mathias or Aaron let me know what is happening at those lines in the script? Everything seems to be working as the spell appears as a Spell-Like ability on the Spell tab but I need to figure out how to stop these errors from showing. What is it trying to set the focus too?

Any thoughts of what I am missing would be helpful. :)
 
The setfocus just before those lines depends on StandardDC tags.

But there's another script that should be assigning StandardDC.aCHA tags to spell-like abilities if they don't have any StandardDC tags, so I don't know why your ability wouldn't have a tag for that.

I'm afraid I also don't know why it would have changed from something that was working.
 
The setfocus just before those lines depends on StandardDC tags.

But there's another script that should be assigning StandardDC.aCHA tags to spell-like abilities if they don't have any StandardDC tags, so I don't know why your ability wouldn't have a tag for that.

I'm afraid I also don't know why it would have changed from something that was working.
Well setting that tag caused the error to go away. So yeah!

Now I just have to figure out why it shows as "light gray" instead of "black" text on the "Spells" summary tab. Which it also didn't use to do.

I am not sure what exactly changed or "exactly" when. It was in the last few months but that covers allot of changes.

Update: Changing the timing from final down to PostLevel/90000 seems to have corrected the light gray text issue. So I am all good again.

Thanks! :D
 
When in the final phase were you? The StandardDC tags are assigned at Final/25000 (in "Calc sDC and sCL"), so if your script was telling the spells that they were spell-like abilities after that, the tag wouldn't have been automatically assigned.
 
When in the final phase were you? The StandardDC tags are assigned at Final/25000 (in "Calc sDC and sCL"), so if your script was telling the spells that they were spell-like abilities after that, the tag wouldn't have been automatically assigned.
Ahhhh. Yeah I was just past that at Final/30000. :( So that would be the issue.
 
I'd guess that in order to make something else work, the Calc sDC and sCL script was moved a little earlier than it had been, so it's now before your script. So I'd make sure to add Timing restrictions to your script to warn about this in the future.
 
I'd guess that in order to make something else work, the Calc sDC and sCL script was moved a little earlier than it had been, so it's now before your script. So I'd make sure to add Timing restrictions to your script to warn about this in the future.
Hmmm that is a good idea. I admit I don't add that allot but I can see here how it work out nicely.

In my case I override the sDC and sCL values so I was trying to make sure I was just past when these values are calculated. But maybe instead I can now simply change the StandardDC from CHA to INT..... Hmmmm

Thanks for the help
 
Sounds like you could also split your script - assign Helper.SpellLike in an early script, and overwrite the DCs in a later script. But if all you need to do is to change the attribute, changing the tag should handle that.

Edit: Or rather, assigning the tag before Calc sDC and sCL - if there is a StandardDC tag present, StandardDC.aCHA won't be assigned.
 
Sounds like you could also split your script - assign Helper.SpellLike in an early script, and overwrite the DCs in a later script. But if all you need to do is to change the attribute, changing the tag should handle that.
Yeah I just hate adding into "two" foreach loops if I can help it. As a patron (custom special) has 9 spells I need to change. Speaking of CPU stuff. Is it better to use a foreach loop or instead use 9 hero.findchild? Happen to know which is more overhead?

If I change the DC using Tags then I just need to make sure the CL is correct. Maybe just easier to just add in the difference, what HL calculates and what I need, instead of trying to override the value at Final timing.
 
Yeah I just hate adding into "two" foreach loops if I can help it. As a patron (custom special) has 9 spells I need to change. Speaking of CPU stuff. Is it better to use a foreach loop or instead use 9 hero.findchild? Happen to know which is more overhead?

If I change the DC using Tags then I just need to make sure the CL is correct. Maybe just easier to just add in the difference, what HL calculates and what I need, instead of trying to override the value at Final timing.

I think foreach and findchild are both around the same overhead to set up, or maybe slightly faster for findchild, if you've only got one thing to search for, so if you can do one foreach, that's better than 9 findchilds. It's setting up the list of things to search among that's the really time consuming thing.
 
If you're changing 9 spells all at once, I would actually build that into one foreach if you can? For example:

foreach pick in hero from BaseSpell where "thingid.spell1 | thingid.spell2 | thingid.spell3 | etc etc"
eachpick.field[sDC].value += 1
nexteach

It'll make your code look a lot nicer, and it'll be comparable performance to your 9 findchilds I think.

You can actually find out the performance of a script by going to Develop -> Floating Info Windows -> Show Task Performance. That info window shows you the evaluation time, in microseconds, of all scripts that ran last evaluation. When I'm doing profiling stuff, I typically do 3-5 runs of each to get a good average, then compare the averages against each other.
 
You can actually find out the performance of a script by going to Develop -> Floating Info Windows -> Show Task Performance. That info window shows you the evaluation time, in microseconds, of all scripts that ran last evaluation. When I'm doing profiling stuff, I typically do 3-5 runs of each to get a good average, then compare the averages against each other.

OK filing that away for future use. I had no idea.
 
If you're changing 9 spells all at once, I would actually build that into one foreach if you can? For example:

foreach pick in hero from BaseSpell where "thingid.spell1 | thingid.spell2 | thingid.spell3 | etc etc"
eachpick.field[sDC].value += 1
nexteach
That is pretty much what I have. Was just wondering if 9 findchilds would be faster as I was trying to prevent the need of two foreach loops at two different timings. I currently found a more "middle" ground timing and it all appears to be happy again. :)

You can actually find out the performance of a script by going to Develop -> Floating Info Windows -> Show Task Performance. That info window shows you the evaluation time, in microseconds, of all scripts that ran last evaluation. When I'm doing profiling stuff, I typically do 3-5 runs of each to get a good average, then compare the averages against each other.
Yeah with Andrew on this one. No idea that existed. Will be using that for some testing. Thanks Colen! :D
 
Back
Top