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

CombatMaster 2.0

November 20 (4 years ago)

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)

November 20 (4 years ago)
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. 

November 20 (4 years ago)

Edited November 20 (4 years ago)


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.

November 20 (4 years ago)

@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.  

November 21 (4 years ago)

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.

November 21 (4 years ago)


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 ... ?

November 21 (4 years ago)

Yep

November 21 (4 years ago)


Loupaile said:

Yep

What version r u running?


November 21 (4 years ago)

2.37, installed manually

November 21 (4 years ago)
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.  

November 21 (4 years ago)

Edited November 21 (4 years ago)

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

November 21 (4 years ago)

Edited November 21 (4 years ago)

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 :


November 21 (4 years ago)
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

November 21 (4 years ago)

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

November 21 (4 years ago)

Edited November 21 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Version 2.38 found here: https://github.com/vicberg/CombatMaster

Fixed

This was a strange bug.  Changes were made for Pathfinder and Shaped.  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.  Concentration is being set now for bless, etc.  

November 21 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter
Duration of 1 means it will be removed the very next round
November 21 (4 years ago)

Replaced the version, still not working.

Can you verify that its the good configuration i have ?


November 21 (4 years ago)

Edited November 21 (4 years ago)
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.  Hypnotic lasts for 10 rounds.  So that should be 10/-1.  I just did it for hypnotic and it worked fine.  Once spell was captured and put into CM, then I casted it again and it auto-assigned concentration and asked for a target.  It assigned hypnotic to the target.  Concentration Spell itself should be set to false.  That may be your issue.  You can't concentrate on concentration.  You concentrate on another spell.  


Victor B. said:

Concentration Spell itself should be set to false.  That may be your issue.  You can't concentrate on concentration.  You concentrate on another spell.  

That's what I was (poorly) trying to say earlier. The Concentration spell itself should be set to false.




November 21 (4 years ago)

Edited November 21 (4 years ago)

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.

November 21 (4 years ago)

Edited November 21 (4 years ago)
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.  Something is off.  

November 21 (4 years ago)

No changes


November 21 (4 years ago)

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!

November 21 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Fixed.  CT and CT and StatusInfo were disabled.  Possibly smashed session state, or issue was the config for Concentration Menu.

November 21 (4 years ago)

Edited November 21 (4 years ago)


Victor B. said:

Fixed.  CT and CT and StatusInfo were disabled.  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 <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)
    at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>: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 ?

November 21 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Reset your session state.  Add the spell back in and then try again.  Delete the CT/Status Info APIs from your other game

November 21 (4 years ago)

Edited November 21 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Also under concentration, make sure you SET OGL character sheet to be safe,  It defaults to OGL, but click on it anyways and select it again.  Also make sure the CM API version is correct

November 21 (4 years ago)

Edited November 21 (4 years ago)

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 <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)
    at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>: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)
November 21 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Invite me to this game.  

November 22 (4 years ago)

Edited November 22 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

@Loupaille was having genuine issues not related to config.  Because I've got everything already setup, doesn't happen for me.  I'm wondering if a default is somehow wrong causing this.  I just clicked on all of his configs and it started working.  I'm going to have to fix this for new installations

November 22 (4 years ago)
Version 2.38 found here: https://github.com/vicberg/CombatMaster
Fixed
This was a strange bug.  Changes were made for Pathfinder and Shaped.  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.  Concentration is being set now for bless, etc.  


@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.

November 22 (4 years ago)

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.

November 22 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Bless works.  



November 22 (4 years ago)

Edited November 22 (4 years ago)

Hmmm. Not for me... I will check that OGL is linked properly, delete my manual instance if Bless, and see if that works. 


EDIT -- Interesting.  It is working now.  How very strange. I didn't do anything different.  Just logged in, and it worked fine.

November 22 (4 years ago)

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  ?

November 22 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

No limits found so far.  

November 23 (4 years ago)


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  ?



I know, for the sheets, there was a notice that Shaped used to give around 80 regarding system performance and load times.  But this is sheet relative, not API.  Not sure if OGL has the same issue.  Never tried to add every cleric spell available into OGL like I once did Shaped ;-) lol.

November 23 (4 years ago)

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 ? 

{{!token-mod {{--api-as playeridentifier}} {{--set controlledby|-Squall|-Teferi}} }}
November 24 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

You need the token id added

November 24 (4 years ago)

Edited November 24 (4 years ago)


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: 

{{!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 ?

November 24 (4 years ago)

Edited November 24 (4 years ago)
Victor B.
Pro
Sheet Author
API Scripter

That's looks pretty good to me.  You'll want the opposites for the removes, but yes.  

November 24 (4 years ago)


Victor B. said:

That's looks pretty good to me.  You'll want the opposites for the removes, but yes.  


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}} }}
November 26 (4 years ago)


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