STAR TREK 2d20
Page 10 of 11 First ... 891011 Last
  1. #91
    Thank you! This is an essential extension.
    Would it be possible for Stealth Tracker to automatically detect dim light and apply disad to passive perception checks?

  2. #92
    Quote Originally Posted by Xerophilex View Post
    Thank you! This is an essential extension.
    Would it be possible for Stealth Tracker to automatically detect dim light and apply disad to passive perception checks?
    You are welcome! I use it in my games too. I'm running on Classic though... so for your feature request I might have to base it off of an effect (like Dim Light that could be put by Aura Effects) in FGC rather than from the LoS systems in FGU if I want to maintain some type of feature parity between the two. I'll think about it and see what we can do.

  3. #93
    G'day. This looks awesome!
    Does it work/Could it work for d&d 4E?
    It is in my extension folder, but doesn't show up in the FGU load screen.

  4. #94
    Quote Originally Posted by Maldev View Post
    G'day. This looks awesome!
    Does it work/Could it work for d&d 4E?
    It is in my extension folder, but doesn't show up in the FGU load screen.
    Yeah, it's for 5E. I don't know the 4E stealth rules and I'd have to look into what would be involved with a 4E port. I'll try a couple of things (like enable it on 4E) but there's some 5E stuff in there that probably won't agree with that plan. We'll see what happens. Thanks for the suggestion.

  5. #95
    Thanks for the quick reply.
    4E has Passive Perception built in, but as you say it's tricky if you are not familiar with the ruleset.
    Any love for 4E is always appreciated, cheers

  6. #96
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38
    Hey Justin -

    I think there may be a conflict between StealhTracker and "Crits and Fumbles" (my extension). I'm very new to FG and LUA, so I'm not sure how to avoid it.

    I think it might be because of the way this StealthTracker function works:

    Code:
    	ActionSkill_onRoll = ActionSkill.onRoll
    	ActionSkill.onRoll = onRollSkill
    
    function onRollSkill(rSource, rTarget, rRoll)
            . . .
    	-- Call the default action that happens when a skill roll occurs in the ruleset.
    	ActionSkill_onRoll(rSource, rTarget, rRoll)
            . . .
    end
    and this C&F function:

    Code:
       ActionsManager.registerResultHandler("skill", my_onRoll); -- skill checks
    
    function my_onRoll(rSource, rTarget, rRoll) -- override to enhance SKILL check
       ActionSkill.onRoll(rSource, rTarget, rRoll); -- call super
       . . .
    end
    Any ideas what I (or you) could change?

    Thanks!

    -J

  7. #97
    I'm sure we can figure something out! I'll take a peek and let ya know. Thanks, Justin

  8. #98
    I loaded up your extension with mine and wasn't able to see the symptom of the problem with a Stealth roll, even when waiting for a 1 to come up. So I came back here and looked at your post again... I noticed that you are registering as a result handler. You might consider using an override instead. Based on the comment in your my_onRoll() function, you might be trying to do just that. If so, follow the approach of storing the original function to be overridden (ActionSkill_onRoll = ActionSkill.onRoll) and then replacing it with your function (ActionSkill.onRoll = my_onRoll). Then, like you have in your my_onRoll(), call the overridden method when you need to pass through to the default/original behavior. You can do your logic before or afterwards... I recommend afterwards since you were registered as a result handler anyway. Then you would no longer need the registerResultHandler call. There are prolly other ways to do it but that's what first came to mind. Lemme know if you need anything else. Good luck!

  9. #99
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38
    Thanks. I loaded both extensions, and even when I roll a 20, mine does not get called.

    So I changed my code as you suggested, and I think it's working now, thanks!

    Code:
    local ActionSkill_onRoll
    
    function onInit()
       ActionSkill_onRoll = ActionSkill.onRoll
       ActionSkill.onRoll = onRollSkill
    end
    
    function onRollSkill(rSource, rTarget, rRoll) -- override to enhance SKILL check
       ActionSkill_onRoll(rSource, rTarget, rRoll); -- call super
        . . . - do my stuff
     end
    Last edited by jkeller; June 11th, 2023 at 18:04.

  10. #100
    Looks about right at a glance. I'm not sure what's up but I'll check it out in more detail today and see what's wrong. Sorry for the issues... talk soon.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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
  •  
DICE PACKS BUNDLE

Log in

Log in