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

Combat Master errors (or alternatives)

I'm a new Pro user (my first post :)! I am just trying to find the best options to speed up combat. I like the idea of "Combat Master" but it eventually errors out in some way or other. If I create a new game it works fine but sooner or later it breaks and I'm not able to track down why (See example error below). I tried ''Combat Tracker" but that has issues and seems to be not used much any more. I'm happy just using Turnmarker1 and GroupInit etc to get most of the same fuctionality but Combat Master seems pretty slick when it works and would really speed things along. Are there any other good solutions that I haven't come across yet? What do people use? Mod Output Console Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.  More info...  If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was:  TypeError: Cannot read properties of null (reading 'match') TypeError: Cannot read properties of null (reading 'match') at getCleanImgsrc (apiscript.js:18458:28) at getOrCreateMarker (apiscript.js:18935:121) at removeMarkers (apiscript.js:18981:9) at stopCombat (apiscript.js:18676:9) at commandHandler (apiscript.js:17422:17) at apiscript.js:17276:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1323:7) at inputHandler (apiscript.js:17271:23) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:181:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:181:1), <anonymous>:70:8)
1735059277
The Aaron
Roll20 Production Team
API Scripter
I can try and track down that specific issue, but from the error I can tell it's because you're using a marketplace image somewhere it doesn't expect one. 
1735062685

Edited 1735063537
It looks like you have reconfigured the tokenmarker. If you want to use another tokenmarker than the default, You have to make sure that image is uploaded to your art library and then use the address of the uploaded image (like <a href="https://files.d20.io/images/" rel="nofollow">https://files.d20.io/images/</a>...) you can acquire this url by - dropping the image on a page, - select the image, - Press Shift-Z - Right click on the large image and then get the address from context menu (depends on the browser: Copy Image Address or Copy Image Link). - this adress can be entered into combatmaster via the turnorder setup menu, item 'marker'
Hah thanks its working! Now I feel like what the... I hit reset on Combat Master and then got the url with&nbsp; the shift-z method&nbsp; and now its working. Before I used an api I found somewhere in my travels (see below) I think by the Aaron?!? It pops the url of a selected art into the chat. It gives as slighly different path than you get through the shift-z method for some reason: <a href="https://files.d20.io/images/419787476/GaXuQr_7cvqyifY_-9-7AQ/original.png?17331837125" rel="nofollow">https://files.d20.io/images/419787476/GaXuQr_7cvqyifY_-9-7AQ/original.png?17331837125</a> <a href="https://files.d20.io/images/419787476/GaXuQr_7cvqyifY_-9-7AQ/thumb.png?1733183712" rel="nofollow">https://files.d20.io/images/419787476/GaXuQr_7cvqyifY_-9-7AQ/thumb.png?1733183712</a> Anyway... funny story is they both work now! haha&nbsp; Perhaps I messed something up before and the reset fixed it. Thanks for the help! I'm looking forward to trying it. Here is that geturl script I used if curious (not sure where I found it): /* !user-image */ on('ready',function(){ &nbsp; &nbsp; 'use strict'; &nbsp; &nbsp; var getCleanImgsrc = function (imgsrc) { &nbsp; &nbsp; &nbsp; &nbsp;var parts = imgsrc.match(/(.*\/images\/.*)(thumb|med|original|max)(.*)$/); &nbsp; &nbsp; &nbsp; &nbsp;if(parts) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return parts[1]+'thumb'+parts[3]; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp; &nbsp; &nbsp; &nbsp;return; &nbsp; &nbsp; }; &nbsp; &nbsp; on('chat:message',function(msg){ &nbsp; &nbsp; &nbsp; &nbsp; if('api' === msg.type &amp;&amp; msg.content.match(/^!user-image/) &amp;&amp; playerIsGM(msg.playerid) ){&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let who=getObj('player',msg.playerid).get('_displayname'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output = _.chain(msg.selected) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .map( s =&gt; getObj('graphic',s._id)) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .reject(_.isUndefined) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .map( o =&gt; o.get('imgsrc') ) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .map( getCleanImgsrc ) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .reject(_.isUndefined) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .map(u =&gt; `&lt;div&gt;&lt;img src="${u}" style="max-width: 3em;max-height: 3em;border:1px solid #333; background-color: #999; border-radius: .2em;"&gt;&lt;code&gt;${u}&lt;/code&gt;&lt;/div&gt;`) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .value() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .join('') || `&lt;span style="color: #aa3333; font-weight:bold;"&gt;No selected tokens have images in a user library.&lt;/span&gt;` &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendChat('UserImage',`/w "${who}" &lt;div&gt;${output}&lt;/div&gt;`); &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; }); });
Been playing around with it and still no errors :) Sorry for the noobness. Thanks for taking the time Martijin and The Aaron (you are a god in the roll20 pantheon -&nbsp; you've had your hand in at least half of the scripts I've been using!) Have a great last week of 2024 all!&nbsp;
1735112885
The Aaron
Roll20 Production Team
API Scripter
Awesome! &nbsp; Yeah, I wrote that little script a while ago. Either method works. The difference in the URL has to do with how the image is stored on Roll20's CDN. Up until recently, you always had to use the thumb version, which is why my script switches it to that url path. I rolled out a patch to the API server a few weeks ago to where it will now just correct the URL as needed (and findObjs() will match whichever version your specify).&nbsp;
Thanks!