• 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

Adding bonus spells per day via custom ability – ranger issue

Hi everyone,


I’m currently working on a custom “hunter’s bond” feature and trying to grant additional spells per day through a custom ability.


So far, I’ve experimented with the following approach:



perform hero.child[ar......].setfocus
focus.field[cvCastTot].matrixvalue[0,0] -= 4
...
perform state.clearfocus


The issue is that hero.child[] doesn’t seem to recognize identifiers like "ranger" or "cHelpRgr", so I can’t properly target the class.


I also attempted to add secondary spells using this:




perform hero.child[cHelpRgr].setfocus
focus.field[cSecSpName].text = "domain spells"
focus.field[cSecSplReq].value += 1
perform state.clearfocus



However, this doesn’t actually grant access to secondary spells. It feels like I’m missing a step that enables them to appear or become usable. I also tried using the ClsScAllSp tag, but it doesn’t seem to function with custom abilities.


At this point, I’m considering whether implementing this as a domain might be a cleaner solution. The problem is that I’m not sure how to restrict a domain so that only rangers can access it.


If anyone has suggestions or a better approach, I’d really appreciate the guidance.


Thanks in advance!
 
Hi everyone,


I’m currently working on a custom “hunter’s bond” feature and trying to grant additional spells per day through a custom ability.


So far, I’ve experimented with the following approach:



perform hero.child[ar......].setfocus
focus.field[cvCastTot].matrixvalue[0,0] -= 4
...
perform state.clearfocus


The issue is that hero.child[] doesn’t seem to recognize identifiers like "ranger" or "cHelpRgr", so I can’t properly target the class.


I also attempted to add secondary spells using this:

geometry dash


perform hero.child[cHelpRgr].setfocus
focus.field[cSecSpName].text = "domain spells"
focus.field[cSecSplReq].value += 1
perform state.clearfocus



However, this doesn’t actually grant access to secondary spells. It feels like I’m missing a step that enables them to appear or become usable. I also tried using the ClsScAllSp tag, but it doesn’t seem to function with custom abilities.


At this point, I’m considering whether implementing this as a domain might be a cleaner solution. The problem is that I’m not sure how to restrict a domain so that only rangers can access it.


If anyone has suggestions or a better approach, I’d really appreciate the guidance.


Thanks in advance!
Using a domain might be the cleaner approach. Have you tried checking whether the class helper needs to be referenced indirectly, since <span>hero.child[]</span> often doesn't point to the class the way you'd expect?
 
Last edited:
Hi everyone,


I’m currently working on a custom “hunter’s bond” feature and trying to grant additional spells per day through a custom ability.


So far, I’ve experimented with the following approach:



perform hero.child[ar......].setfocus
focus.field[cvCastTot].matrixvalue[0,0] -= 4
...
perform state.clearfocus


The issue is that hero.child[] doesn’t seem to recognize identifiers like "ranger" or "cHelpRgr", so I can’t properly target the class.


I also attempted to add secondary spells using this:




perform hero.child[cHelpRgr].setfocus
focus.field[cSecSpName].text = "domain spells"
focus.field[cSecSplReq].value += 1
perform state.clearfocus



However, this doesn’t actually grant access to secondary spells. It feels like I’m missing a step that enables them to appear or become usable. I also tried using the ClsScAllSp tag, but it doesn’t seem to function with custom abilities.


At this point, I’m considering whether implementing this as a domain might be a cleaner solution. The problem is that I’m not sure how to restrict a domain so that only rangers can access it.


If anyone has suggestions or a better approach, I’d really appreciate the guidance.


Thanks in advance! sports games
I ran into something similar when working with custom class abilities. I think the main issue is that the class helper isn't necessarily the right place to modify <span>cvCastTot</span> directly, especially if the timing of the script is before the ranger's spellcasting fields are fully established.

For the secondary spells, simply setting <span>cSecSpName</span> and increasing <span>cSecSplReq</span> probably isn't enough—the appropriate spellcasting tags/links need to be in place for the UI to recognize the source.

I’d probably avoid turning it into a domain unless the feature is actually meant to behave like one. Have you tried adding the bonus through the ranger's existing spellcasting progression instead, using the timing of the custom ability to modify it after the class has finished setting up its casting values?
 
Back
Top