Fantasy Grounds Fridays Pre
Page 1 of 2 12 Last
  1. #1
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507

    (Prototype) Extension for (dis)advantage

    Actual version: 3.3.12.1, also for FGU

    Hi

    I wrote some little extension to apply advantage and disadvantage to the next roll made/forced, simply give the PC or NPC the effect keladvantage and keldisadvantage, respectively The reason for the prefix "kel-" is simply that the effect will be automatically removed after the roll is made by searching for the pattern "keladvantage" and "keldisadvantage", respectively (to avoid that your informational effects are removed which may have the term "advantage" or "disadvantage"; I've added a separate version without this removal but the effects have still the same name)
    The rolls affected are the ones coming from the dice buttons in character sheets (physical dice also only), it does not work for "/die..." macros and not for the physical dice under the chat which one can drop over the chat (but drag&drop for the sheet-dice respects this, also with the manual rolls turned on). I tested a MoreCore custom macro and for that it worked, too, but no guarantee for that (Examples for 3.5/PF1: See below)
    The chat message has information about when (dis)advantage is used ([ADV] and [DISADV]).

    I edited the manager_actions.lua, especially the functions roll and resolveAction. So all rolls using these functions should be affected by that, I assume that e.g. the /die macros are not using them and therefore are not affected by this (but also probably due to that effects are connected to characters and NPCs and not directly to the host and client). At the top of that file are two new functions.

    For developers: I added the strings rRoll.adv and rRoll.disadv, with them you can try to code similar effects but then also just for the next roll of specific type like save and skill as one has in 5e But I didn't test that yet, define rRoll.adv = "true" and rRoll.adv = "true" and then you should be able to code advantage and disadvantage, respectively (as strings, not boolean; was too lazy to convert that :P I can change that of course if you want )

    This should work for many rulesets, but there is a reason why I wrote prototype: Making rolls is a complicated thing such that a general code does not always work, depending on the context. Thence, when you want to use that extension then always test it before Test the roll you want to give advantage to and test it against targets for attacks and so on; and give the effect only just right before the roll is made since some other buttons without actual dice count as a "roll", too, see an example in the list below (except when you have the version without automatic removal but then it's always applied :P). I tested 3.5e and had the following observations (see also the EDIT at the bottom):
    • It works for all (?) rolls except some parts of the damage roll. The damage roll has in its description the information about damage types and their distribution (rRoll.clauses). This gets doubled when one has some of the effects but their information is not removed afterwards (corresponding to the rules of advantage and disadvantage) because CoreRPG does not know anything about these informations, so no way to remove this information on that level, I guess. I will integrate this into my advanced effects extension for 3.5e/PF1 when I was able to solve that problem There the effects will then be without that prefix "kel-" because one can define effects there in such a way that they expire on the next roll, action and so on but attack rolls seem to work and the correct value seems to be taken for comparisons with ACs (similar for other rolls gladly, except damage)
    • Effects for adding additional dice to several rolls like initiative are respected, too
    • It's independent of the type and number of dice, gladly But: When you have more than one die as in 2d6 then there is no visual clue yet which dice are taken, it does not necessarily take the combination with the highest/smalles result but it's still correctly handled. E.g. for 2d6 every d6 gets a separate d6 partner so they build some pair. From this pair the highest/smallest number is taken, but you can not really see which dice are paired because all will have the same colour You have to trust my code then :P

    Let me know how it works for you and really test that extension before you use it in your campaign I made this because there was a user request for having (dis)advantage rolls for initiative in 3.5/PF1 and that seems to work

    Best,

    Kelrugem

    EDIT: works for 3.3.8 and already also for 3.3.9

    EDIT2: I now added a separate extension where you do not have the automatic removal. This fixed all the issues I have seen in 3.5e/PF1 (except that with damage because this is really not possible on CoreRPG level) But you have to think about removing the effect then again (I may find a better solution in my extension later) or you define the effect in such a way that it expires on the next roll but then the cast button and "save on me" problem comes back (so for these situations you need it without the automatic removal)

    Update: Now all the problems for 3.5 got fixed, except that damage rolls will not work properly while having this effect. This I can only solve in my 3.5e/PF1 version

    Update2: Added stacking rules for these effects It will first count all effects and will apply the one with the most effects (or standard roll when both effects have the same number)
    Attached Files Attached Files
    Last edited by Kelrugem; November 14th, 2020 at 00:19.

  2. #2
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    I now added a separate extension where you do not have the automatic removal. This fixed all the issues I have seen in 3.5e/PF1 (except that with damage because this is really not possible on CoreRPG level) But you have to think about removing the effect then again (I may find a better solution in my extension later) or you define the effect in such a way that it expires on the next roll but then the cast button and "save on me" problem comes back (so for these situations you need it without the automatic removal)
    Last edited by Kelrugem; October 10th, 2019 at 20:49.

  3. #3
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    Some other observation (edited this also into the first post):

    It's independent of the type and number of dice, gladly But: When you have more than one die as in 2d6 which are also of the same type, then there is no visual clue yet which dice are taken, it does not necessarily take the combination with the highest/smalles result but it's still correctly handled. E.g. for 2d6 every d6 gets a separate d6 partner so they build some pair. From this pair the highest/smallest number is taken, but you can not really see which dice are paired because all will have the same colour You have to trust my code then :P
    Last edited by Kelrugem; October 10th, 2019 at 21:55.

  4. #4

  5. #5
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    Hi

    Just here to say it does not need any update for 3.3.10

    Sorry, that I couldn't improve the extension yet, my PhD is at the moment very distracting I already have some ideas how to improve it to make it better for more rulesets But no idea when I have time for that

    Best,

    Kelrugem

    PS: I also realized after some testing that effects also count as "rolls", so, the best way at the moment is to apply the (dis)advantage effect right before the roll affected by that Then less quirks in general (but that should be easy to fix, I just need to check first whether there is some die in the roll)
    Last edited by Kelrugem; February 29th, 2020 at 23:16.

  6. #6
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    Hi

    Finally I updated that extension and now all the problems (with respect to 3.5e/PF1; I do not know other rulesets :P) got fixed Except damage rolls for 3.5e/PF1 while having these effects, this I can only fix in my 3.5e/PF1 version only

    The solution was: These effects now only get triggered when there is really some physical die involved. Thence, applying effects or pressing the cast button will not trigger them anymore avoiding basically all the problems mentioned above Gladly, this extension is now not a prototype anymore (as far as it is possible at the level of CoreRPG)

    I will soon add that to my 3.5e/Pf1 version and mention it in the threads there

  7. #7
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    New update

    I cleaned up a bit of the code (for improvements related to the damage roll of 3.5e; not important for most other rulesets, still the same as usual. When something changes then only in the better direction)

    And I implemented now stacking of these effects: It takes either advantage or disadvantage whichever effect is dominant in sense of numbers; when both have the same number of effects on a character then they will negate each other such that the roll will be a standard one

  8. #8

    .
    hey, @kelrugem -- i discovered last night that the kel(dis)advantage double-rolls every dice... atks (d20) as well as damage (or any die type).

    plz confirm if this is currently the case. if so, i had to remove effect for witch (mis)fortune as it was double-rolling everything X-D
    -----
    roll dice. it builds character.

  9. #9
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    Quote Originally Posted by tahl_liadon View Post

    .
    hey, @kelrugem -- i discovered last night that the kel(dis)advantage double-rolls every dice... atks (d20) as well as damage (or any die type).

    plz confirm if this is currently the case. if so, i had to remove effect for witch (mis)fortune as it was double-rolling everything X-D
    At the moment, the (dis)advantage effects affect everything, yes There is no way to tell the effect which roll it should affect This will come in the next release of save versus tags (by the way do not load the extension here when you also use save versus tags/full overlay package because the (dis)advantage effects are included there (it should not produce any error though to load both, it is simply not needed))

    Therefore the suggestion is to add that effect just before the roll to which it should be applied (and let it expire on next roll) I added this information in my effect pdf, too, to make it more clear that it affects everything

    (it was first designed as CoreRPG extensions and therefore it affects everything because there is no specific type of die in CoreRPG, then the only option is every die )

  10. #10
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    2,507
    Updated for 3.3.11

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Joshua Stream Pre

Log in

Log in