Starfinder Playlist
  1. #1

    CombatManager.requestActivation does not trigger hooks

    Hello,
    I am trying to listen in for turn end/start events through the CombatManager. So far I have had success with setCustomTurnStart and setCustomTurnEnd, but I recently discovered that the activation flag (in the lower left of the CT, which you can drag/drop to set a turn) does not trigger any hooks. This function, requestActivation, seems to only be used by this drag/drop flag.

    I can understand why it might not go through all the work of finding the actors for turn end/start, like how nextActor does, but wouldn't it make sense to at least call onInitChangeEvent? If not that, would it be possible to add another hook, such as onActivationEvent?

  2. #2
    If you manually adjust the actor round, we have no way of determining what the user is trying to do with regards to round start and round end activity (i.e. rewinding for missed actions, skipping forward in time, just setting up different targeting, ....). In fact, we don't even know that the user wants to "change" the initiative, per se. So, we assume and do nothing other than change the active state.

    What are you trying to accomplish?

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    What are you trying to accomplish?
    I'm setting up a targeting extension with the aim of making every turn consistent, which helps (anecdotally, from the five games I run) with novice players or just those that don't use the CT. Really it's just selecting the token at turn start and clearing targets at turn end.

    I'm already hooked into the round start event so this isn't a really big problem, since my ext will eventually get to run anyway and get things cleaned up for the next round, but a hook like onActivationEvent or running onTurnStartEvent from requestActivation would be nice for the token selection piece. It makes sense to me to still call onTurnStartEvent since the now-activated node is effectively starting their turn.

  4. #4
    Take a look at Celestian's Has Initiative Indicator.

  5. #5
    Quote Originally Posted by Dire Weasel View Post
    Take a look at Celestian's Has Initiative Indicator.
    Great rec, thanks. I use that extension and am disappointed I didn't think of looking at it

    It's very amusing: all celestian is doing is adding a handler to the CT node active state, effectively creating their own onActivationEvent hook:
    Code:
    DB.addHandler("combattracker.list.*.active", "onUpdate", updateInititiativeIndicator);
    If this isn't something FG sees as valuable, I could definitely do the same.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in