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 .
×
Advertisement Create a free account

CombatMaster 2.0

1605902406
New issue!  It seems the Spell listener keeps breaking the script.  Every time it detects a new spell (condition) and prompts to add or ignore, when you click Add New Spell, it breaks the sandbox and spits this error: TypeError: Cannot read property 'description' of undefined TypeError: Cannot read property 'description' of undefined at sendConditionMenu (apiscript.js:22933:30) at addSpell (apiscript.js:25013:9) at commandHandler (apiscript.js:22489:17) at apiscript.js:22236:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9) at inputHandler (apiscript.js:22231:23)
1605902476
Victor B.
Pro
Sheet Author
API Scripter
I'm seeing that also.  But it's not for every spell.  Roll20 maintains spells totally differently when sending to chat.  I'll look into it. 
1605908452

Edited 1605908587
I can't get concentration icons to pop up on their own. The spells get detected and added, then when i lauch them again it only adds the red default icon and the spell as a condition to the token. By the way, the default when adding spell is always duration=1, direction=-1, it would be better to have 0, 0 as a default.
1605908557
@Victor for what it's worth, I tried to manually add the spell (Bless) to the spell condition list, but the spell does not trigger it through the sheet trigger. Don't know if that helps.
Loupaile said: I can't get concentration icons to pop up on their own. The spells get detected and added, then when i lauch them again it only adds the red default icon and the spell as a condition to the token. By the way, the default when adding spell is always duration=1, direction=-1, it would be better to have 0, 0 as a default. You need to have Concentration itself as a spell in CM and make sure Concentration is set to false on that spell.  
1605964745
Tried it, didnt work, did you mean like that : It just places the red point. Tried it on chrome and firefox, vtt on and off, same result.
Loupaile said: Tried it, didnt work, did you mean like that : It just places the red point. Tried it on chrome and firefox, vtt on and off, same result. And the player ribbon = the current page ... ?
1605966084
Yep
Loupaile said: Yep What version r u running?
1605967379
2.37, installed manually
1605967406
Victor B.
Pro
Sheet Author
API Scripter
Verify that concentration wasn't auto-added to the caster.  You might not be seeing the icon on the token.  That's working for me.  Caster casts concentration, ask for targets, concentration auto-added to caster.  That being said, Roll20 announced that there was going to be some behind the scenes changes to char sheet.  I'm wondering if something did change just enough to throw off CM.  I'll check when I have time.  This was all working fine.  Not sure what's going on.  
1605968160

Edited 1605968178
yeah i'm in the thread where changes are being made.  do u want the link vic?
1605968259

Edited 1605968296
Addind the concentration icon (the cup) to the token add the concentration condition to it, it even ask for saving throws when i change their hp but no concetration added when i launch a concentration spell gif as proof :
1605968745
Victor B.
Pro
Sheet Author
API Scripter
@Loupaile, it was there and was removed.  What do you have duration and direction set to.  For a typical 5e spell, duration should be 10 and direction -1
1605969598
Defautl one, its duration 1 and direction -1, but in the gif i didnt pass a turn. I think it get removed because its added when I add the icon and RE-added when i click on "select origin" checkmark
1605973678

Edited 1605973700
Victor B.
Pro
Sheet Author
API Scripter
Version 2.38 found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed This was a strange bug.&nbsp; Changes were made for Pathfinder and Shaped.&nbsp; A variable wasn't being set for OGL, and that was working, so I wonder if I made fixes to the wrong version for 2.37.&nbsp; Concentration is being set now for bless, etc.&nbsp;&nbsp;
1605974431
Victor B.
Pro
Sheet Author
API Scripter
Duration of 1 means it will be removed the very next round
1605976970
Replaced the version, still not working. Can you verify that its the good configuration i have ?
1605979769

Edited 1605979803
Victor B.
Pro
Sheet Author
API Scripter
The 1/-1 for hypnotic will only keep concentration/target on for one round and then auto remove.&nbsp; Hypnotic lasts for 10 rounds.&nbsp; So that should be 10/-1.&nbsp; I just did it for hypnotic and it worked fine.&nbsp; Once spell was captured and put into CM, then I casted it again and it auto-assigned concentration and asked for a target.&nbsp; It assigned hypnotic to the target.&nbsp; Concentration Spell itself should be set to false.&nbsp; That may be your issue.&nbsp; You can't concentrate on concentration.&nbsp; You concentrate on another spell.&nbsp;&nbsp;
Victor B. said: Concentration Spell itself should be set to false.&nbsp; That may be your issue.&nbsp; You can't concentrate on concentration.&nbsp; You concentrate on another spell.&nbsp;&nbsp; That's what I was (poorly) trying to say earlier. The Concentration spell itself should be set to false.
1605980657

Edited 1605981261
changed concentration condition to concentration: false changed hypnotic pattern duration to 10 Same result, spell icon appears, no concentration icon, even after confirming the caster. Except from the changed configurations in my images, I have the default configuration. So i don't know what is causing this I can get you in the campaign if you want to look by yourself.
Loupaile said: changed concentration condition to concentration: false changed hypnotic pattern duration to 10 Same result, spell icon appears, no concentration icon, even after confirming the caster. Except from the changed configurations in my images, I have the default configuration. So i don't know what is causing this I can get you in the campaign if you want to look by yourself. You've got the Concentration spell set to Override=true. Change it to false and see what happens.
1605982401

Edited 1605982490
Victor B.
Pro
Sheet Author
API Scripter
@loupaile, send me a PM and invite me to game and promote me to GM once I've joined.&nbsp; Something is off.&nbsp;&nbsp;
1605982655
No changes
1605982757
cass
Pro
Hi Amazing API, I am trying to set it up and can't figure out what I am doing wrong with the Override option. It says in the help that it should prompt a query command to set a custom duration but for me it doesn't, it just proceeds like Override was set on false. Also something that I was thinking while toying with this: if feasible it would be neat to be able to set the condition duration by manually setting or changing the numeral on the icon while hovering the mouse over it. Right now, if I manually change the number it will reset immediately to the default value.
Loupaile said: No changes Ok, that is weird. Hopefully Victor can fix your problems!
1605983850
Victor B.
Pro
Sheet Author
API Scripter
Fixed.&nbsp; CT and CT and StatusInfo were disabled.&nbsp; Possibly smashed session state, or issue was the config for Concentration Menu.
1605984859

Edited 1605985176
Victor B. said: Fixed.&nbsp; CT and CT and StatusInfo were disabled.&nbsp; Possibly smashed session state, or issue was the config for Concentration Menu. I think its the CT/Statusinfo bits that makes CM crash, I exported/imported the configuration into my other campaigns and checked it but when i confirm the caster after casting, the API crash TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at handleSpellCast (apiscript.js:11057:104) at inputHandler (apiscript.js:8245:21) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1661:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) How did you delete the hidden configuration from CT/Statusinfo ?
1605985335
Victor B.
Pro
Sheet Author
API Scripter
Reset your session state.&nbsp; Add the spell back in and then try again.&nbsp; Delete the CT/Status Info APIs from your other game
1605985377

Edited 1605985403
Victor B.
Pro
Sheet Author
API Scripter
Also under concentration, make sure you SET OGL character sheet to be safe,&nbsp; It defaults to OGL, but click on it anyways and select it again.&nbsp; Also make sure the CM API version is correct
1605985665

Edited 1605986039
How do you reset the session state ? Clear the chat archive? Edit: Cleared chat archive rechecked OGL in spell importation deleted CT and Status info from API updated CM API version Well, still crashed but this time its when i import the spell, before confirming the caster : TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at handleSpellCast (apiscript.js:11059:104) at inputHandler (apiscript.js:8246:21) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1661:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
1605986135
Victor B.
Pro
Sheet Author
API Scripter
Invite me to this game.&nbsp;&nbsp;
1606005927

Edited 1606005955
Victor B.
Pro
Sheet Author
API Scripter
@Loupaille was having genuine issues not related to config.&nbsp; Because I've got everything already setup, doesn't happen for me.&nbsp; I'm wondering if a default is somehow wrong causing this.&nbsp; I just clicked on all of his configs and it started working.&nbsp; I'm going to have to fix this for new installations
1606007475
Version 2.38 found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed This was a strange bug.&nbsp; Changes were made for Pathfinder and Shaped.&nbsp; A variable wasn't being set for OGL, and that was working, so I wonder if I made fixes to the wrong version for 2.37.&nbsp; Concentration is being set now for bless, etc.&nbsp;&nbsp; @Victor any word on the spell auto-add issue? I tried manually updating to v2.38 (was on v2.36). I saw mention of the Bless spell concentration issue fixed with that update. Sadly, this did not fix my issue. It is the Bless spell that keeps breaking my sandbox.
1606017857
We just ran using 2.37 5e ogl and it ran pretty well, the only hiccups we had seemed to be lag return issues with the server. I may have fumbled some of the configs, some spells worked right away and some did not, but I am blaming my ham fisted attempts at set up at this point.
1606020458
Victor B.
Pro
Sheet Author
API Scripter
Bless works.&nbsp;&nbsp;
1606051808

Edited 1606058736
Hmmm. Not for me... I will check that OGL is linked properly, delete my manual instance if Bless, and see if that works.&nbsp; EDIT -- Interesting.&nbsp; It is working now.&nbsp; How very strange. I didn't do anything different.&nbsp; Just logged in, and it worked fine.
I know it's a bit early for such thoughts .... just wonder if there is a known cap on how many spells as condition can be entered, 50, 100&nbsp; ?
1606074868
Victor B.
Pro
Sheet Author
API Scripter
No limits found so far.&nbsp;&nbsp;
Alessandro said: I know it's a bit early for such thoughts .... just wonder if there is a known cap on how many spells as condition can be entered, 50, 100&nbsp; ? I know, for the sheets, there was a notice that Shaped used to give around 80 regarding system performance and load times.&nbsp; But this is sheet relative, not API.&nbsp; Not sure if OGL has the same issue.&nbsp; Never tried to add every cleric spell available into OGL like I once did Shaped ;-) lol.
1606150287
hi! i'm trying to set this command on Remove api, but i think i'm not understanding correctly how am i supposed to do this, am i missing something ?&nbsp; {{!token-mod {{--api-as playeridentifier}} {{--set controlledby|-Squall|-Teferi}} }}
1606177029
Victor B.
Pro
Sheet Author
API Scripter
You need the token id added
1606228954

Edited 1606228973
Victor B. said: You need the token id added Cool, thanks that did the trick! i was wondering, is it possible to combine multiple api call on Add and Remove ? like this let's say:&nbsp; {{!modattr {{--charid characterident}} {{--silent}} {{--difesa|6}} }} {{!token-mod {{--api-as playeridentifier}} {{--ids tokenidentifier}} {{ --set currentside|3}} {{--set bar1_value|-[[@{Samurai Jack|Hp}/2]]}} }} those two both in Add and Remove ?
1606234785

Edited 1606234820
Victor B.
Pro
Sheet Author
API Scripter
That's looks pretty good to me.&nbsp; You'll want the opposites for the removes, but yes.&nbsp;&nbsp;
1606237167
Victor B. said: That's looks pretty good to me.&nbsp; You'll want the opposites for the removes, but yes.&nbsp;&nbsp; i tried to put them both like this: {{!modattr {{--charid characterident}} {{--silent}} {{--difesa|6}} }} {{!token-mod {{--api-as playeridentifier}} {{--ids tokenidentifier}} {{ --set currentside|3}} {{--set bar1_value|-[[@{Samurai Jack|Hp}/2]]}} }} and also like this: {{!modattr {{--charid characterident}} {{--silent}} {{--difesa|6}} }} {{!token-mod {{--api-as playeridentifier}} {{--ids tokenidentifier}} {{ --set currentside|3}} {{--set bar1_value|-[[@{Samurai Jack|Hp}/2]]}} }} inside the Api Add but only the firs line remain. like the picture below
@andrea, when I use 2 different API calls for a condition, I enter the first in the API section, then I make a macro with the second one and enter it for the Macro section. Create a macro and fill it with this: !token-mod --api-as playeridentifier --ids tokenidentifier --set currentside|3 --set bar1_value|-[[@{Samurai Jack|Hp}/2]] In the condition Add API, set Macro to whatever you named the above macro. Then set API to your other command like this: {{!modattr {{--charid characterident}} {{--silent}} {{--difesa|6}} }}
1606400374
Persephone said: @andrea, when I use 2 different API calls for a condition, I enter the first in the API section, then I make a macro with the second one and enter it for the Macro section. Create a macro and fill it with this: !token-mod --api-as playeridentifier --ids tokenidentifier --set currentside|3 --set bar1_value|-[[@{Samurai Jack|Hp}/2]] In the condition Add API, set Macro to whatever you named the above macro. Then set API to your other command like this: {{!modattr {{--charid characterident}} {{--silent}} {{--difesa|6}} }} YESSSS!!! that's it! thank you so much!!!! this made my life way easier!! really, thanks!
@andrea, glad I could help =D