Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
May your rolls be chill this holiday season!
Create a free account

GROUP-CHECK Not working with PC characters

I was using Group-check and I noticed that the calculation for the PC is always wrong. This is the formula use when you set up using the 5e-OGL sheet:   Constitution Save  Constitution Saving Throw  [[d20 + ([[d0 + @{constitution_save_bonus}@{pbd_safe}]]*(1-@{npc})) [PC] + (@{npc_con_save}*@{npc}) [NPC]]]. When I use my macro with an NPC it works fine, but when I use a PC for some reason the @{npc} is always "1" intead of "0". The character I'm using is a PC I already did @{selected|npc} and it gives back "0". Has any body seeing this or I'm doing something wrong. Just in case I have use this Mod for more than 5 years, I have install the latest version in the one click, I also try it in two different games and I have the same result.
Posting the image of the result in chat. as you can see is using the NPC mod of 4 instead that the PC mod of 5
This bug was reported over 3 months ago . I haven't heard any update about it yet.
ok, Thanks
Jarren said: This bug was reported over 3 months ago . I haven't heard any update about it yet. This is absolutely friggin' horrible.  All I want for x-mas is GroupCheck, and GroupInit, AND Apply Damage.  Which is several things! I guess I am greedy?
Every week my players ask if these API scripts are working yet.  Every.  Week.  It is like a joke at this point.  A sad, sad, joke.
I'm not an expert in coding, but this is what I find out, from lines 1022 to 1028 this is the coding: processFormula = async (formula, special, charID) => {       const myGetAttrByName = async (attrName) => {           const result = await getSheetItem(charID, attrName);           if (attrName === "npc") return result !== 0 ? "1" : "0";           if (typeof result === "number") return String(result);           else return result || "";         }; In the line that says if " if (attrName === "npc") return result !== 0 ? "1" : "0"; " is taking the first value there and use it for @{npc}. I did a test and change this line to " if (attrName === "npc") return result !== 0 ? "0" : "1"; " and now @{npc} is = 0, but all the time, even if I use an npc. So to someone that now about javascript can check what is wrong with this code. 
Warlord said: I'm not an expert in coding, but this is what I find out, from lines 1022 to 1028 this is the coding: processFormula = async (formula, special, charID) =&gt; { &nbsp; &nbsp; &nbsp; const myGetAttrByName = async (attrName) =&gt; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const result = await getSheetItem(charID, attrName); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (attrName === "npc") return result !== 0 ? "1" : "0"; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (typeof result === "number") return String(result); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else return result || ""; &nbsp; &nbsp; &nbsp; &nbsp; }; In the line that says if " if (attrName === "npc") return result !== 0 ? "1" : "0"; " is taking the first value there and use it for @{npc}. I did a test and change this line to "&nbsp;if (attrName === "npc") return result !== 0 ? "0" : "1"; " and now @{npc} is = 0, but all the time, even if I use an npc. So to someone that now about javascript can check what is wrong with this code.&nbsp; I'm pretty sure this is coded this way because of the 'npc' attribute on the 2024 sheet being set to 'on' or '0' instead of '0' or '1'. Nicole B. &nbsp;said: Jarren &nbsp;said: Is the @{npc} attribute on the 2024 sheet going to be adjusted to match the 2014 sheet settings? Or is it too late to make that fix? <a href="https://app.roll20.net/forum/permalink/12508921/" rel="nofollow">https://app.roll20.net/forum/permalink/12508921/</a> The values for @{npc} are not consistent between the 2014 sheet and the 2024 sheet.&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;2014 PC @{npc} value is &nbsp;'0' &nbsp; &nbsp; 2024 PC&nbsp; @{npc} value is ' on' &nbsp;&nbsp;&nbsp;&nbsp;2014 NPC&nbsp; @{npc} value is ' 1' &nbsp; &nbsp;&nbsp; 2024 NPC @{npc value is '0' We're aware of this and working on it! I'll see if I can get to this fix this week with the new releases of token actions making macros more prominent.
ok, For does that are still using the 2014 sheet the latest version that works fine is 1.12. You can get it from the GitHub and install it manually, until the latest version gets fixed.
1764794100
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Cross-posted from&nbsp; this thread . This would probably be the best thread to refer to for any further announcements: Nic B. &nbsp;said: Howdy folks, Sorry that it has taken so long for us to respond to this thread. This was a particularly nasty bug to diagnose and resolve, but we absolutely should have responded in this thread sooner to acknowledge that there was a problem and that we were working to resolve it.&nbsp; However, good news; we have a fix in the work going through some quality assurance testing and we'll be releasing it as soon as we have the green light to do so. Thank you all for your detailed information in this thread, it was vital in us identifying the underlying issue and ultimately affecting a solution.
Thanks Keith