Roll20
Forum rules
No cyber-bullying, no racism, no spam! Keep discussions civil and respectful or you will be banned!
No cyber-bullying, no racism, no spam! Keep discussions civil and respectful or you will be banned!
Re: Roll20
Heya, we had a game Friday night and it was a lot more bug filled than the Tuesday night game. Could number of players be affecting the stability of the script? Looking at the log I had a lot of 'blarg' and variable issues. How is the error handling for things like overdrawing your bag? There many instances where certain runes just weren't responding (orphaned on the playmat).
As for rgs3, I posted 2 layout variations on my Patreon this month, and did quite a bit of rework after veteran feedback. After the next version drops and I gather vet feedback I will make the pdf an open beta for ironing out language and presentation.
As for rgs3, I posted 2 layout variations on my Patreon this month, and did quite a bit of rework after veteran feedback. After the next version drops and I gather vet feedback I will make the pdf an open beta for ironing out language and presentation.
Re: Roll20
Sounds like the best next step to get integration. From their website:jstomel wrote:I'm looking at getting started on designing a character sheet for FotN. Any advice on how to make sure it is compatible with RGS 3.0? I don't want to put in a bunch of work on something that is going to be obsoleted soon.
"Game List
When filling out a user profile, creating a game, or making a Looking for Group listing, Roll20 users can choose from a preexisting list of games that they’re interested in. If you would like your game added to our games list, it first needs a Character Sheet. If you have a game on Roll20 that doesn’t require a Character Sheet (such as For the Queen or Dialect) please reach out to us through our web form with the subject line “Game List.”"
https://roll20.zendesk.com/hc/en-us/art ... Creator-HQ
Re: Roll20
Sorry about the 'blarg'. it was something I was using for debugging to tell me that it was correctly identifying that no runes were selected and I forgot to comment it out. I don't have any error handling for overdrawing, it will likely cause the script to crash and you will have to restart it. If a rune gets orphaned on the playmat you can delete it without any repercussions. I have reworked things to have a separate map where all the playmats are located and runes will automatically wyrd to the playmats map. There is a publicly available script that allows players switch between a different map and the main one quickly, so this cleaned up things nicely. My next goal for the script is to get it to automatically ignore runes in the wounds, death, and drain piles and to add some error checking, but I have also been trying to learn html/css for making a character sheet (I have a bare bones template almost worked out, hence the question about RGS 3.0). This weekend I will try to record a video showing how to get everything set up and how to use everything and post a link to it here.andrew wrote:Heya, we had a game Friday night and it was a lot more bug filled than the Tuesday night game. Could number of players be affecting the stability of the script? Looking at the log I had a lot of 'blarg' and variable issues. How is the error handling for things like overdrawing your bag? There many instances where certain runes just weren't responding (orphaned on the playmat).
As for rgs3, I posted 2 layout variations on my Patreon this month, and did quite a bit of rework after veteran feedback. After the next version drops and I gather vet feedback I will make the pdf an open beta for ironing out language and presentation.
Do you remember what the variable errors were? If I can replicate them, I will try to fix them. Sorry it didn't work well for you on tuesday

Clarification: If I join your patreon at $10, I get to access the beta for RGS 3.0?
Re: Roll20
I have refactored the !cleanup script. It should now automatically ignore any runes in wound, death, or drain. It will still ignore any selected runes so you can keep your maintain chains out there. It will NOT ignore runes in stun, so if you don't have enough recovery to heal them all you will have to select them if you want them to stay out (if people want it to ignore stun, that is an easy fix, just let me know. This script relies on you using a playmat named "$character playmat", same as the wyrd script did. When making a macro or ability, I recommend having the script just run twice (enter the command in twice in the macro). For some reason it will ignore runes the first time it is run if they are new to the table (gives a 'card was not on table' message). since there is no harm in running it twice, that is an easy fix that works.
Edit: fixed a bug in vertical placement of playmats not at the top of the map
Code: Select all
on('chat:message', (msg) => {
if ('api' === msg.type && /!cleanup\b/i.test(msg.content)) {
log('start');
const args = msg.content.split(/\s+--/);
let theDeck = findObjs({
_type: "deck",
name: args[1]
})[0];
//test if deck exists
if (!theDeck) {
sendChat('cleanup', '/w gm Create a deck named ' + args[1]);
return;
}
//Playmat graphic must be named $character_name+" playmat"
let playmat = findObjs({
_type: "graphic",
name: args[1]+" playmat"
})[0];
//Check to make sure the playmat exists
if (!playmat) {
sendChat('Cleanup', '/w gm You need to name ' + args[1] + ' playmat');
return;
}
//get the info for cards in play
let cards = cardInfo({type: "play", deckid: theDeck.id})
//get an array of IDs of selected cards
let selectedArray = []
if (msg.selected) {
selectedArray = msg.selected.map(getID);
} else {
selectedArray = [];
}
if (cards) {
//get an array of IDs of cards in play
let cardIDs = cards.map(getID);
} else {
sendChat('Cleanup', '/w '+args[1]+' You dont have any cards in play');
return;
}
//for each card
for (let card of cards) {
//if it isn't in wounded and isn't selected
if (!woundCheck(playmat, card) && !selectedArray.includes(card.id)) {
//pick up the card
pickUpCard(card.cardid);
}
}
//return all the picked up cards and shuffle
recallCards(theDeck.id, 'hand');
shuffleDeck(theDeck.id);
}
});
function getID(value) {
if (value._id) {
return value._id;
} else if (value.id) {
return value.id
}
}
function woundCheck(playmat, card) {
let cardObj = findObjs({
id: card.id
})[0];
let leftBound = playmat.get('left')-playmat.get('width')/2;
let bottomBound = playmat.get('top')+playmat.get('height')/2;
let topBound = playmat.get('top')-playmat.get('height')/2;
if (leftBound < cardObj.get('left') &&
cardObj.get('left') < leftBound + playmat.get('width') &&
cardObj.get('top') < bottomBound &&
0.6*playmat.get('height')+topBound < cardObj.get('top')) {
return true;
} else {
return false;
}
}
Last edited by jstomel on Thu Apr 30, 2020 12:40 pm, edited 1 time in total.
Re: Roll20
Updated wyrd script. Changelog:
1) This version will wyrd the runes to the playmat even if the playmat is on a different map than the player. This is useful to keep all of the playmats organized on a separate map when you are using the MapChange script that allows players to change the map they are viewing. MapChange is available in the Roll20 script library
2) Added error checking to prevent attempting to draw from an empty deck. Now the script will whisper to the player that their bag is empty and exit instead of crashing the script server and forcing a restart
3) Corrected the spelling from 'weird' to 'wyrd'. If you have this script as part of a macro or character ability you will need to update the command in the macro/ability
1) This version will wyrd the runes to the playmat even if the playmat is on a different map than the player. This is useful to keep all of the playmats organized on a separate map when you are using the MapChange script that allows players to change the map they are viewing. MapChange is available in the Roll20 script library
2) Added error checking to prevent attempting to draw from an empty deck. Now the script will whisper to the player that their bag is empty and exit instead of crashing the script server and forcing a restart
3) Corrected the spelling from 'weird' to 'wyrd'. If you have this script as part of a macro or character ability you will need to update the command in the macro/ability
Code: Select all
on('chat:message', (msg) => {
if ('api' === msg.type && /!wyrd\b/i.test(msg.content)) {
const args = msg.content.split(/\s+--/);
//getid of deck
//deck must have the same name as the character
let theDeck = findObjs({
_type: "deck",
name: args[1]
})[0];
//test if deck exists
if (!theDeck) {
sendChat('Wyrd', '/w gm Create a deck named ' + args[1]);
return;
}
//Playmat graphic must be named $character_name+" playmat"
let playmat = findObjs({
_type: "graphic",
name: args[1]+" playmat"
})[0];
//Check to make sure the playmat exists
if (!playmat) {
sendChat('Wyrd', '/w gm You need to name ' + args[1] + ' playmat');
return;
}
let pageID = findObjs({
name: "Playmats"
})[0].id;
// Get the deck ID and list of cards in it
let deckID = theDeck.id;
let deckCards = theDeck.get('_currentDeck');
var i;
// Do a number of times equal to the character's destiny
for (i = 0; i < args[2]; i++) {
//If the number of cards in the deck isn't zero
if (cardInfo({type: "deck", deckid: theDeck.id}).length) {
//Draw a card
let card = findObjs({
_id: drawCard(deckID)
})[0];
//Put the card on the playmat, will stagger cards so they don't all stack on top of eachother
//These numbers are scaled to put the cards into the in hand area on my playmat. If you change
//the playmat size you will need to change them
playCardToTable(card.id, {left: playmat.get("left")+i*20-70, top: playmat.get("top")-110, pageid: pageID});
//I don't know why this works, but it seems necessary to change the "controlledby" property
let cardObj = findObjs({
cardid: card.id
})[0];
//Make it so that anyone can control the cards. If you change "all" to args[1] it should limit
//control to the initiating player
cardObj.set("controlledby", "all");
} else {
//If the deck is empty send a message to the player and exit
sendChat('Wyrd', '/w '+args[1]+' your bag is empty');
return;
}
}
}
});
Re: Roll20
Thanks so much for the new versions of the scripts. Joe is eager to set them up for our 2 weekly games. Yeah with some lag, the overdraw was by far the biggest culprit of the crash.jstomel wrote:Sorry about the 'blarg'. it was something I was using for debugging to tell me that it was correctly identifying that no runes were selected and I forgot to comment it out. I don't have any error handling for overdrawing, it will likely cause the script to crash and you will have to restart it. If a rune gets orphaned on the playmat you can delete it without any repercussions. I have reworked things to have a separate map where all the playmats are located and runes will automatically wyrd to the playmats map. There is a publicly available script that allows players switch between a different map and the main one quickly, so this cleaned up things nicely. My next goal for the script is to get it to automatically ignore runes in the wounds, death, and drain piles and to add some error checking, but I have also been trying to learn html/css for making a character sheet (I have a bare bones template almost worked out, hence the question about RGS 3.0). This weekend I will try to record a video showing how to get everything set up and how to use everything and post a link to it here.andrew wrote:Heya, we had a game Friday night and it was a lot more bug filled than the Tuesday night game. Could number of players be affecting the stability of the script? Looking at the log I had a lot of 'blarg' and variable issues. How is the error handling for things like overdrawing your bag? There many instances where certain runes just weren't responding (orphaned on the playmat).
As for rgs3, I posted 2 layout variations on my Patreon this month, and did quite a bit of rework after veteran feedback. After the next version drops and I gather vet feedback I will make the pdf an open beta for ironing out language and presentation.
Do you remember what the variable errors were? If I can replicate them, I will try to fix them. Sorry it didn't work well for you on tuesday
Clarification: If I join your patreon at $10, I get to access the beta for RGS 3.0?
As for RGS 3, if you're a backer of CfFT&M you've received a snapshot copy today. It'll be the only one for KS backers, but as it evolves it gets posted on Patreon (at the $10 level) several times a month.
Re: Roll20
Not a backer of CfFT&M, it was from before I even knew this game existed. Did back tCoE, though, at the level where I get a copy of CfFT&M. I'm looking forward to it. I'm hoping to see some lios- and svart-alfar in there, as they will feature heavily in the saga I am running.andrew wrote:Thanks so much for the new versions of the scripts. Joe is eager to set them up for our 2 weekly games. Yeah with some lag, the overdraw was by far the biggest culprit of the crash.
As for RGS 3, if you're a backer of CfFT&M you've received a snapshot copy today. It'll be the only one for KS backers, but as it evolves it gets posted on Patreon (at the $10 level) several times a month.
Re: Roll20
I have put together a video (https://youtu.be/OVu11rmATcw) showing all the steps of how to set up the FotN scripts and character sheet I have developed. This as very much a beta version and still has some kinks to work out, but it is reasonably stable. I have also put all the necessary files in a zip available here (https://drive.google.com/file/d/1t9Ux9P ... sp=sharing). I will continue to update this thread when I make improvements.
Re: Roll20
Last 2 sessions were good but tonight has been a ton of script errors and restarts. Most of it was switching screens, but here's the Wyrd log:
TypeError: Cannot read property 'id' of undefined
TypeError: Cannot read property 'id' of undefined
at apiscript.js:119:38
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
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)
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"Card was not on the table."
"start"
"start"
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
Restarting sandbox due to script changes...
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"start"
"Card was not on the table."
"Skipping card, it's already been played to the tabletop."
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
TypeError: Cannot read property 'id' of undefined
TypeError: Cannot read property 'id' of undefined
at apiscript.js:119:38
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
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)
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"Card was not on the table."
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"start"
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"Card was not on the table."
"start"
"start"
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
Restarting sandbox due to script changes...
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
"start"
"start"
"Card was not on the table."
"Skipping card, it's already been played to the tabletop."
"start"
"Card was not on the table."
"Card was not on the table."
"start"
"start"
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Map Change Started"
"Blocked Players"
[]
"Maps Constructed"
"Map Change Ready"
Re: Roll20
I had some problems in my last game as well. It turned out that something had happened in role20 that messed with my decks and I had to go through and reupload the rune images for about half the runes for each character. Check that and see if it is the problem. Roll20 just dropped an update and I think it broke a few things.
I also know that roll20 had a forum post about problems with their API stability recently (https://app.roll20.net/forum/post/86553 ... st-8704844).
...
Just checked through my own logs and I encountered these problems recently, too. They went away when I fixed the deck issue. I don't know what caused the cards to become unlinked from the deck, but rebuilding them fixed it. I am currently working on getting conditions and derived values (total DF, total parry, total PF, etc) integrated into the character sheet, as well as some graphics. After that I am going to work on a script that will automatically build and/or rebuild decks. It could be used if there is ever this sort of error again, as well as to build custom initiative decks.
BTW, if you encounter problems, you can email me or have Jonathan contact me directly and that will be a faster way to get a response.
I also know that roll20 had a forum post about problems with their API stability recently (https://app.roll20.net/forum/post/86553 ... st-8704844).
...
Just checked through my own logs and I encountered these problems recently, too. They went away when I fixed the deck issue. I don't know what caused the cards to become unlinked from the deck, but rebuilding them fixed it. I am currently working on getting conditions and derived values (total DF, total parry, total PF, etc) integrated into the character sheet, as well as some graphics. After that I am going to work on a script that will automatically build and/or rebuild decks. It could be used if there is ever this sort of error again, as well as to build custom initiative decks.
BTW, if you encounter problems, you can email me or have Jonathan contact me directly and that will be a faster way to get a response.