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
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] Edge of the Empire Dice with Images in the Chat Window

Okay so I ran my first game with this today...  Oh my god, it makes it so smooth, and quick.  Sir Rhino you are a master, and thank you for the hard work you put into this coding! My only question is this, I had someone roll a Triumph during an initive roll, and it didn't count it as a success?  Did I miss read something in the rules, thought Triumph's always count as a success?
1453686886
[Deleted]
Sheet Author
API Scripter
It does count as a success and has every time I have run it for initiative. Can you post a screenshot of the results of that roll?
1453689218

Edited 1453689261
Roll: That's what was rolled, and the the Turn Order listed it as 2:1... and I just reliazed the Truimph is listed as a Success...  Looking it over now, home games I always had Triumphs count higher in Order.  Sorry.  Long day.  Saw the two success, and didn't see that it convereted the Triumph into it.  So take back what I said.. and say even more what an amazing job you did with this.
1454252518
[Deleted]
Sheet Author
API Scripter
I noticed a few hiccups in the wiki, and in the current version (4.0.2.17), so I did a minor update to both. <a href="https://wiki.roll20.net/SWRPG-API-Compatible" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible</a> Changes: Removed old Vehicle tabs (sorry if you liked them, I did not. Please migrate to the new tabs before using this version). This trimmed ~1000 lines from the code. Fixed a typo that made the companion inventory not display. Added pictures of the Character Sheets to the wiki via Imgur.
@Rhino - Really love the work you are doing with the sheet. I have a question: I am trying to get the NPC initiative roller in the GM command center to work. I put the name of an active character, flagged as NPC for initiative, in the "NPC Name" field, but when I click the corresponding button to roll it, I get the error "Please update character name field" Have tested this with multiple NPCs and get the same result. Any idea what is happening?
1454286685
[Deleted]
Sheet Author
API Scripter
The "name" field on the Character Info tab of the Character Sheet of the NPC. It also has to match the character sheet itself. (it is super crazy specific and has to match exactly).
GM Knowledge Rhino said: The "name" field on the Character Info tab of the Character Sheet of the NPC. It also has to match the character sheet itself. (it is super crazy specific and has to match exactly). Yeah, that was what I was trying to do. Match the Character Name field... ...with the NPC Name field... ...but still get the error: Not sure what I am doing wrong. This was an older game that I just upgraded to your HTML/CSS/JScript. The NPC in question pre-existed the upgrade. Don't know if that makes a difference.
1454292136
[Deleted]
Sheet Author
API Scripter
I figured out the issue, give me 2 minutes to update the code.
1454292439
[Deleted]
Sheet Author
API Scripter
Version 4.0.2.18 -&nbsp; <a href="https://jsfiddle.net/ugaepuw3/" rel="nofollow">https://jsfiddle.net/ugaepuw3/</a> There were literally 6 words and 6 colons missing that were causing the issue. Updated the Fiddle in the wiki as well.
Confirmed fix. I tried the new code and the initiative macros are now working! Thanks, Rhino.
1454358270

Edited 1454359128
Ok, I see references to "Game Master Sheet" and "GM Command Center" and "NPC Initiative roller". &nbsp;I have looked at the FAQ and while referencing the parts of a "Game Master Sheet" and a "Player Sheet" I am unable to find or create the "Game Master Sheet" as described. &nbsp;I have updated the HTML, the CSS, and Java Script as inidcated and I have a Pro account. &nbsp;What am I doing wrong? &nbsp;
1454362648

Edited 1454362942
[Deleted]
Sheet Author
API Scripter
The Game Master sheet is listed as a Character Sheet named "-DicePool" it is one of the remnants of the previous author and the last time I tried to replace it, it broke people's games. I will update the Wiki/FAQ to properly address this. When you run the API script for the first time it will auto create this sheet. If it did not auto create it, follow these steps to force it; Join the Game In another tab, Go to the API Script section of the Game Settings. Save any of the scripts, this will cause the Scripts to re-run and will auto create the GM Character Sheet.
1454379990

Edited 1454380022
GM Knowledge Rhino said: The Game Master sheet is listed as a Character Sheet named "-DicePool" it is one of the remnants of the previous author and the last time I tried to replace it, it broke people's games. I will update the Wiki/FAQ to properly address this. When you run the API script for the first time it will auto create this sheet. If it did not auto create it, follow these steps to force it; Join the Game In another tab, Go to the API Script section of the Game Settings. Save any of the scripts, this will cause the Scripts to re-run and will auto create the GM Character Sheet. Great! Got the other features to work by clicking on the "assignments and tasks" Thanks for the hard work on this!
1454540908
[Deleted]
Sheet Author
API Scripter
If I did the GitHub stuff right, I think I finally submitted this to the Roll20 Repository. We will see how that goes.
Anyone know how long until we should expect it to update the public sheets?
1454695065
[Deleted]
Sheet Author
API Scripter
Zero idea? No matter what it will not harm currently running games and their character sheets. I submitted it under a different name so that you will have a "new" option, and not a "removed" option. =)
What did you call it? I'll keep an eye out.
1454711681
[Deleted]
Sheet Author
API Scripter
I think I called it "Star Wars FFG API-Compatible" (I didn't like how all the old stuff only referred to Edge, and ignored Age/Force)
Okay, I'm going to be 'that guy' who is going to ask how does one implement and run the code? I would be outstandingly grateful if someone could direct me to an instruction on how to impliment this code and then run it, or provide me with one. (Sorry, computing is not something that comes easilly to me. D:)
1455021249
The Aaron
Pro
API Scripter
API scripts are installed in a Game. &nbsp;The Game's Creator must be at a Pro level subscription. &nbsp;Here is the section of the wiki that talks about installing them: &nbsp; <a href="https://wiki.roll20.net/API:Use_Guide#The_Script_E" rel="nofollow">https://wiki.roll20.net/API:Use_Guide#The_Script_E</a>...
1455025081
[Deleted]
Sheet Author
API Scripter
Lander B. said: Okay, I'm going to be 'that guy' who is going to ask how does one implement and run the code? I would be outstandingly grateful if someone could direct me to an instruction on how to impliment this code and then run it, or provide me with one. (Sorry, computing is not something that comes easilly to me. D:) There is a section of the wiki I wrote that explains how to use it. <a href="https://wiki.roll20.net/SWRPG-API-Compatible#Switc" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#Switc</a>... I got that question quite a few times, so I figured I would list an easy step by step answer to it.
I'm still interested in how long this will take to appear in the sheet list. I could copy it over as a custom, but I'm curious to see when it will push out.
1455120230

Edited 1455120349
Alicia
Sheet Author
Robert D. said: I'm still interested in how long this will take to appear in the sheet list. I could copy it over as a custom, but I'm curious to see when it will push out. From past experience the updates are pushed every couple of weeks to once a month. Looking at the oldest compatible pull request it looks like there may be another week of waiting. Even after the pull request is accepted it could be another couple of days before it's pushed to the server.
1455128439
[Deleted]
Sheet Author
API Scripter
While you guys are waiting for the "official" release to post, I worked on a few new goodies for those braving the custom sheet method. <a href="https://wiki.roll20.net/SWRPG-API-Compatible#Curre" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#Curre</a>... Changes are listed in the wiki, but basically added Roll Templates and a better display for Career/Specializations.
GM Knowledge Rhino said: Lander B. said: Okay, I'm going to be 'that guy' who is going to ask how does one implement and run the code? I would be outstandingly grateful if someone could direct me to an instruction on how to impliment this code and then run it, or provide me with one. (Sorry, computing is not something that comes easilly to me. D:) There is a section of the wiki I wrote that explains how to use it. <a href="https://wiki.roll20.net/SWRPG-API-Compatible#Switc" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#Switc</a>... I got that question quite a few times, so I figured I would list an easy step by step answer to it. Cheers for the help! I've managed to get all the sheets put in place however when I roll the dice, no images show up in the chat window. Do you have any idea why this might be?
1455191393
[Deleted]
Sheet Author
API Scripter
So there are&nbsp;3 reasons the dice won't show up. You let too much time pass between when you last saved the API Scripts and it has "gone to sleep". As listed in the top of <a href="https://wiki.roll20.net/SWRPG-API-Compatible#The_Game_Master_Sheet" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#The_Game_Master_Sheet</a> &gt; Join the Game &gt; In another tab, Go to the API Script section of the Game Settings. &gt; Save any of the scripts, this will cause the Scripts to re-run and will auto create the GM Character Sheet. You did not add the script portion. As listed in the section <a href="https://wiki.roll20.net/SWRPG-API-Compatible#If_you_have_a_current_game" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#If_you_have_a_current_game</a> Go back to the Campaign Settings page, and go back to the Settings Dropdown, but this time select API-Scripts If you already have scripts, click the New Script tab In the name section, type FFG-SWRPG-Dice-Roller.js or some other name that identifies it for you. Copy the "Javascript" section from the Fiddle website to the black section. Click Save Script at the bottom. You are using an incompatible browser If you are using any browser other than Chrome/Firefox (that are the browsers that Roll20 supports) then problems can occur and these are not supported by Roll20 or this sheet.
I tried the above on both of chrome and firefox, firefox being my main browser. However the result is the same, the box comes up to show that I've executed a command, but no symbols are being shown. Do you know a way around this or have you not seen this before?
...got a 4th reason? I've done all three of the things above (I believe) and I still get a blank result when I try and roll dice.
DarthGM. You and I were 1 second apart. Lol.
1455227162

Edited 1455227396
[Deleted]
Sheet Author
API Scripter
I was able to replicate the issue. In the future, the reason I gave you the wrong troubleshooting steps, is you failed to give me the error messages that were displayed and that lead it to taking longer to fix. The "issue" displayed in the API Output Console as a hiccup in the script. If this had been provided I could have fixed it when it first occurred. The API Output Console is for error handling and if it does not show the output below it is NOT loaded. "UPDATE/ADD ATTRIBUTES FOR:-----------------------&gt;-DicePool" "Update Attr: pcgm" "Update Attr: gmdicepool" The Fix: Re-paste the Script from my "known good" to an updated fiddle. Updated version number and the wiki. Go back to the wiki and paste in the new script.
1455237601
[Deleted]
Sheet Author
API Scripter
I added a troubleshooting section for installation. Also I added a suggestion on how to display the issue and the likely issues that can occur. So far it is pretty small with only 2 errors listed, but as issues pop up, I will update it with more (if any other issues happen). <a href="https://wiki.roll20.net/SWRPG-API-Compatible#Troub" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#Troub</a>...
Cheers for the help so far, apologies about the error item, I didn't know where to look. On the JSFiddle the version numbers are either 4.0.3.2 or 4.0.3.1 My API console output reads: "Update Attr: gmdicepool" Restarting sandbox due to script changes... Spinning up new sandbox... "UPDATE/ADD ATTRIBUTES FOR:-----------------------&gt;-DicePool" "Update Attr: pcgm" "Update Attr: gmdicepool" I was following the link in the Wiki, has this simply not updated yet and I am going to the wrong place, or does my illiteracy with coding proceed me?
1455285183
[Deleted]
Sheet Author
API Scripter
The fiddle is updated with the correct code, but the version numbers on the code items itself were wrong. As long as you got that output you are golden. Was the rolling still not working? (I will update the numbers on the files, but the code should work (I tested it).
1455290806

Edited 1455324762
[Deleted]
Sheet Author
API Scripter
Heh, so, for testing, I do all my initial updates to my "test" html/css/javascript. After I finished testing, I ported everything except the Roll Template HTML.&nbsp;The Script itself was working fine and processing the rolls, but the rolls were told to output via a Template that was not defined. I updated the disclaimer at the top of the page that clearly stated this was a work in progress to be more clear to hiccups that might happen when testing new features. =) NOTE: The version I submitted to be the new selectable API-Compatible sheet (that is currently under whatever review Roll20 does [I recommend not asking how long it will take to be made official as nobody knows]) had code that was before I messed with the Roll Templates and it is not affected by the hiccups here. Version updated in the wiki. Current code verified. Code of this Sheet = <a href="https://jsfiddle.net/kznot1sv/" rel="nofollow">https://jsfiddle.net/kznot1sv/</a> Current Version = Version 4.0.3.4 Pictures of this Sheet = <a href="http://imgur.com/a/xLSGm" rel="nofollow">http://imgur.com/a/xLSGm</a>
1455319479

Edited 1455320462
Hey, maybe an odd bug, but I notice the delete doesn't seem to be working within the page. I accidentally clicked twice and added a second specialization. Go to click 'modify' and the red trashcan, and it doesn't delete anymore (I know it was working in previous versions). EDIT: Ok, a little testing, it wouldn't delete the last line, if I deleted the first purchased specialization, it would delete both lines. Second EDIT: Some things the above edit works for, some things it doesn't (Talents and Abilities didn't delete at all)
1455322091

Edited 1455322516
[Deleted]
Sheet Author
API Scripter
Trying to replicate the issue was unsuccessful. I was able to add and delete talents. There may be an issue outside of the character sheet.
I'm getting the same output as listed earlier, I copied the code anew a moment ago, the images for the dice roll outcomes are still not appearing. :(
1455373482

Edited 1455374441
[Deleted]
Sheet Author
API Scripter
Lander B. said: I'm getting the same output as listed earlier, I copied the code anew a moment ago, the images for the dice roll outcomes are still not appearing. :( I just created a new campaign with the scripts in the most recent fiddle (and in the wiki) and it worked. I did notice the first time I copied the code it popped up an error, but it seemed to be due to a hiccup in the cut and paste from fiddle and not the code itself. When I went and recopied the javascript, it pasted fine the second time.
Rhino - the game update worked flawlessly. Thanks for putting the effort into it! Q: Does the manual dice-rolling function no longer work? When I try to manually enter dice (i.e. the old !eed 2B) it acts like it does something, but all we see is a blank area, followed by a roll: then blank.
1455471351
[Deleted]
Sheet Author
API Scripter
KCRift said: Rhino - the game update worked flawlessly. Thanks for putting the effort into it! Based on the question below, that seems not to be the case. KCRift said: Q: Does the manual dice-rolling function no longer work? When I try to manually enter dice (i.e. the old !eed 2B) it acts like it does something, but all we see is a blank area, followed by a roll: then blank. It seems like you need to go to the wiki and follow the troubleshooting steps. I have verified that !eed commands do still work without displaying blank. If you continue to experience issues, please revert to 4.0.2.18 as listed in the wiki.
Got it working.&nbsp; Marvelous script, Rhino!
Just so I'm clear (APIs are still a mystery to me).... I've been running my Edge games using the old version 2.6.&nbsp;&nbsp; And recently getting upset with some of the clunkyness - like having to&nbsp;re-save the API&nbsp;frequently b/c the dice roller stops working between&nbsp;weekly sessions.&nbsp; If I upload this new API, will it "break" anything??&nbsp;&nbsp;
1455575909
[Deleted]
Sheet Author
API Scripter
BK said: like having to&nbsp;re-save the API&nbsp;frequently b/c the dice roller stops working between&nbsp;weekly sessions.&nbsp; If I upload this new API, will it "break" anything??&nbsp;&nbsp; That is a Roll20 thing not a Script issue. Rather than let 1000000000 of Script sandboxes live forever, if they are not in use they turn off. I do not know of a method to "keep them on" outside of waking up a new sandbox. That being said, BK said: .&nbsp; If I upload this new API, will it "break" anything??&nbsp;&nbsp; I have done very little to the script itself, most of the work I have done is on the character sheet and fixing syntax errors within the script. As to "will it break anything", Until the version (4.0.2.18) is approved and made the "official" one, this is a custom script/sheet combo&nbsp;and must always be treated as everything able to go wrong. Even when it is approved whenever you are swapping from one sheet to another it should be done with the GM testing the new features in a separate campaign to ensure their other game will not be adversely affected. So, basically I do not have anything I can say or do, to guarantee no issues.
Thanks for all of this Rhino! These sheets are really easy to use and have sped up our games significantly! One question: I create custom sheets for all of my enemies and npc's---Is there a way to flag them as an NPC so that way all of their rolls are hidden from the players?
1455740293
[Deleted]
Sheet Author
API Scripter
Zenkiki said: One question: I create custom sheets for all of my enemies and npc's---Is there a way to flag them as an NPC so that way all of their rolls are hidden from the players? It is possible, but this RPG system isn't designed for that. If you rolled and got threat, it is normal for the Players to spend that, and if they don't know the context of the roll how can they properly contribute. So "yes it can be done", but "no it will not be added by me". I feel it is against the intent of the system.
Finally able to see the images however when I booted the system up today, I got this error. "ERROR: You cannot set the imgsrc or avatar of an object unless you use an image that is in your Roll20 Library. See the API documentation for more info." "UPDATE/ADD ATTRIBUTES FOR:-----------------------&gt;-DicePool" Thanks for all the help so far Rhino. :)
1456183404

Edited 1456183717
[Deleted]
Sheet Author
API Scripter
After futzing with the sheet with the Roll Templates for several days now I can say it was a ~80% successful endeavor to add them. I had a long drawn out list of all the "stuff that works and stuff that doesn't" but basically it is in progress still. It should not negatively affect gameplay to use the Roll Template method, but there are issues I have found. If you experience that the Templates cause too many issues, let me know and I will roll them back out until I can do more testing. On an unrelated note, the 4.0.2.18 version (the version prior to&nbsp;the Roll Templates)&nbsp;was merged into the Roll20 Official GitHub today, so that was good news. As to when this becomes available as a choice for the character sheet other than via a custom choice, I am unsure? Per a post above it could be a few days more for that to take place.
1456270635
[Deleted]
Sheet Author
API Scripter
Okay so I fixed all the Roll Templates! (I think) So a new version was posted (4.0.3.5) to the wiki&nbsp; <a href="https://wiki.roll20.net/SWRPG-API-Compatible#Curre" rel="nofollow">https://wiki.roll20.net/SWRPG-API-Compatible#Curre</a>... All this version does is; Fixed Roll Templates For companion Rolls Crew Skills on Space and Planetary vehicles Riding Beast Rolls GM Initiative Rolls This required basically rewriting the whole "drop down" sections for Crew Skills/GM Initiative. Basically due to trying to call the same bit of text 2 different ways I decided I was ice skating uphill and just eliminated the middle man. What this basically boiled down to, was the Roll Templates and the "rollPlayer" functions were calling the same thing ("skill:") The "rollPlayer" function is to roll on one character sheet a skill for another character sheet. So rather than trying to have both compete for the same text, I decoupled the RollTemplates need to call it, and it ended up finally displaying right. One note: On the GM Initiative Roller, I currently have it set to display the "type" of NPC (Minion/Rival/Nemesis) as part of the template. If this is something that isn't wanted, I will try to come up with a way to suppress this, or to give the option to suppress it.