STAR TREK 2d20
  1. #1

    [Rulesets with effectmanager and IF operator] IF does not check targeted effects

    Hi

    At least for 3.5E/PF1 there is some edge case in the logic of effect operators, here IF. Assume I have an effect like IF: invisible, then this would not return true, if I have an invisible effect which is targeted. The reason is simple: The code for IF does not use any target information (if there is any), one should hopefully be able to easily fix it by adding the code information about targets for its code.

    For example, in the effect manager of 3.5E one has in the function of getEffectsByType the following piece of code:

    Code:
    if rEffectComp.type == "IF" then
        if not checkConditional(rActor, v, rEffectComp.remainder)
            break;
        end
    One should be able to account targeted conditions, as in my example above, by using the following code instead (rFilterActor is the code information about the target in that part of the code):

    Code:
    if rEffectComp.type == "IF" then
        if not checkConditional(rActor, v, rEffectComp.remainder, rFilterActor)
            break;
        end
    In my tests it looks like that this should work but there are several of such pieces of code in the effect manager. If there is no target information, then this should not cause any problem because the code already handles nil values well Only the function for effect activation on the start of a turn should not need this change (because there is no target information at all for such kind of stuff)

    I assume that it might be a similar problem for 5E and so on, which is why I posted it here Let me know if you see any problem with that suggestion of code change

    Best wishes

    Kelrugem

  2. #2
    My concern with attempting to do this at this time is that I would have to really dig into the code to make sure we wouldn't create any circular scenarios, which is why I believe it does not pass the actor currently.

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    My concern with attempting to do this at this time is that I would have to really dig into the code to make sure we wouldn't create any circular scenarios, which is why I believe it does not pass the actor currently.

    Regards,
    JPG
    Aah, that is a good point I will use it in my extension for my campaign; if I ever happen to see or face such a loop/circular problem, then I can let you know

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

Log in

Log in