Victor B. said: Concentration is already built into CombatMaster but shouldn't conflict with Concentration script I actually hadn't even noticed that option (which is weird as long as I've been using CM) until a few days ago. I haven't tested it, but it looked as though it only gave a reminder to manually roll a con save. Is that the case? Because I spent some hours looking for any information about editing any of the three below APIs to use a non-standard token marker, I figured I'd post my finished work. So I solely use the " Easy to Read Token Marker " set, but this should work for any marker set. I added the following API manually to find the #:Name of each of the tokens. Run "!markernames" and it'll output them all into chat (publically if it matters to you). Also note that I had to copy the github code for each of the below API's I was trying to modify and manually add it as a new API. Normally I'd have to remember to check for version updates and redo these changes, but the creator hasn't been on Roll20 in 2 years, so I doubt there will be any. Also-also, after introducing the new code, I had to run the different API's config command in the Roll20 chat and click the "Reset" at the bottom, then my custom changes showed correctly. You will, however, have to restart the API sandbox after resetting them, then you're good to go!! Install the MarkerNames API into your game and run !markernames in the game's chat. Make note (copy/paste into notepad or whatever) the "243651:Concentrating" marker you want to use (note that in the API, it'll have to be rearranged to "Concentrating::243651" with two colons) Grab the github code for the desired API ( Here is the GitHub repository of RobinKuiper's APIs, all of the ones I wanted to customize came from them) Paste it into a new API script in your campaign With your cursor in the API code window, you can Ctrl+F to search for something specific from the appropriate code at the bottom of this post (just copy/paste) within it to easily find the sections mentioned below these steps, example: setDefaults = (reset) => {
const defaults = {
config: {
command: 'concentration', 6. Run the API's config command, usually with no tokens selected ("!inspiration", "!concentration", & "!dead config" for the ones below) 7. Click the Reset option at the bottom of the config options 8. Restart the API Sandbox. MarkerNames on("ready", () => {
const tokenMarkers = JSON.parse(Campaign().get("token_markers"));
const getChatMessageFromTokenMarkers = markers => {
let chatMessage = '';
_.each(markers, marker => {
chatMessage += `<p><img src='${marker.url}'> ${marker.id}: ${marker.name}</p>`;
});
return chatMessage;
};
on("chat:message", msg => {
if(msg.content.split(" ")[0].toLowerCase() === '!markernames') {
let chatMessage = getChatMessageFromTokenMarkers(tokenMarkers);
sendChat("Token Markers", chatMessage);
} else if(msg.content.split(" ")[0].toLowerCase() === '!markerids') {
const markerName = msg.content.split(" ")[1].toLowerCase();
let results = [];
_.each(tokenMarkers, marker => {
if(marker.name.toLowerCase() === markerName) results.push(marker);
});
log(results);
let chatMessage = getChatMessageFromTokenMarkers(results);
chatMessage = chatMessage || 'Unable to find any matching token markers'
sendChat("Token Markers", chatMessage);
} else if(msg.content.split(" ")[0].toLowerCase() === '!settokenmarker') {
const markerName = msg.content.split(" ")[1].toLowerCase();
if (!msg.selected && msg.selected[0]._type == "graphic") return;
obj = getObj(msg.selected[0]._type, msg.selected[0]._id);
currentMarkers = obj.get("statusmarkers").split(',');
currentMarkers.push(markerName);
obj.set("statusmarkers", currentMarkers.join(','));
} else if(msg.content.split(" ")[0].toLowerCase() === '!gettokenmarkers') {
if (!msg.selected) return;
if (msg.selected[0]._type !== "graphic") return;
obj = getObj(msg.selected[0]._type, msg.selected[0]._id);
currentMarkers = obj.get("statusmarkers");
sendChat("Token Markers", currentMarkers);
}
});
}); Concentration API setDefaults = (reset) => {
const defaults = {
config: {
command: 'concentration',
statusmarker: 'Concentrating::243651',
bar: 1,
send_reminder_to: 'everyone', // character,gm,
auto_add_concentration_marker: true,
auto_roll_save: true,
advantage: false,
bonus_attribute: 'constitution_save_bonus',
show_roll_button: true
},
advantages: {}
}; InspirationTracker API setDefaults = (reset) => {
const defaults = {
config: {
command: 'inspiration',
statusmarker: 'BardicInspiration::243623',
fx: true,
fx_type: 'nova-holy'
}
}; DeathTracker API setDefaults = (reset) => {
const defaults = {
config: {
command: 'dead',
death_statusmarker: 'dead',
half_statusmarker: 'Bloodied::243574',
massive_damage: true,
bar: 1,
firsttime: (reset) ? false : true,
pc_unconscious_statusmarker: 'Dying::243507',
change_player_tint: false,
change_npc_tint: false,
fx: true,
fx_type: 'splatter-blood',
heal_fx: false,
heal_fx_type: 'glow-holy'
}
};
I'm a 20-year IT tech but still sucking my thumb when it comes to coding, but if anyone reading this can't figure it out, please feel free to PM me. Hopefully these instructions will keep someone else from spending hours searching 2-year-old posts and then still needing to take the time from the code geniuses like Kilter and Victor above, which I sincerely appreciate their help!!