Giter Site home page Giter Site logo

roll20 / roll20-api-scripts Goto Github PK

View Code? Open in Web Editor NEW
382.0 382.0 563.0 84.57 MB

API Scripts created by the community for use in Roll20 VTT. Submit a ticket at roll20.net/help if critical hotfixes are to be requested.

Home Page: https://roll20.net/

License: MIT License

JavaScript 94.16% HTML 5.46% Shell 0.01% Rich Text Format 0.38%
hacktoberfest

roll20-api-scripts's Issues

GroupInitiative --ids command not working?

!group-init
works fine

!group-init --ids token1 token2
does nothing. help menu doesn't show up, nothing changes in the turn tracker. doesn't seem to matter if the names I type are tokens on the grid or not.
I tried a bunch of variants on the syntax to see if I was typing something wrong but nothing changes. What am I missing? Am I doing the syntax wrong and just haven't tried the right thing? Is a token's ID not its name?

I just want a macro that rolls initiative for all my players, I don't want to have to select all their tokens every time.

Cannot one click install script COFantasy

When trying to one-click install the COFantasy script, the API crashes with error message:

SyntaxError: Invalid or unexpected token

When importing (using the "Import" button, instead of "Add script" button) everything works just fine.

[5e Battlemaster] - doesn't seem to work

I created a new game, invited a player, assigned the 5E Roll20 Character Sheet, created a character for that player, dragged the token out onto the battle map, assigned it to the player, dragged some kobolds onto the map, added a turn for each token, then typed !combat start... and nothing happened. Then I cycle through the turns and... nothing happens.

What am I doing wrong?

PageSize: +N does not differ from -N

The command !pagesize x +1 does the same as !pagesize x -1 they both add a column. The first should add a column, and the last should remove one, right?

Genesys Dice Roller

The Success & advantage image for the ability dice (green D8) is incorrect.
It's set up on line 1265 of the script with the https://i.imgur.com/v4cUwLN.png url, which is the success & advantage side of the proficiency dice (yellow D12).

Fumbler - Custom table - Unexpected token l in JSON

When I create a custom sheet with custom Fumbler table, the parser fails with the following:

The fumble chart handout has errors: Unexpected token l in JSON at position 2

Sample custom sheet:
[{low: 1, high: 50, result: "sad", effect: "I fall down"},{low: 51, high: 99, result: "verysad", effect: "something bad"}]

TokenLock failing when the Initiative counter is empty.

The TokenLock script immediately crashes if a token is moved and the turnorder window is empty. (both versions, 0.2.3 and 0.2.4).

The problem is on line 204:
&& ( !state.TokenLock.config.allowMoveOnTurn || (( (JSON.parse(Campaign().get('turnorder'))||[{id:false}])[0].id) !== obj.id) )

JSON.parse(Campaign().get('turnorder'))||[{id:false}] will never return [{id:false}], so a "TypeError: Cannot read property 'id' of undefined" is thrown every time a token is moved when the turnorder window is empty.

PCGenPFImport API Output Console First argument contains undefined in property 'name'

For reference, the error message generated was: Error: Firebase.set failed: First argument contains undefined in property 'name'
Error: Firebase.set failed: First argument contains undefined in property 'name'
at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:49)
at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207)
at Aa (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462)
at J.set (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:98)
at createObj (/home/node/d20-api-server/api.js:2703:26)
at apiscript.js:126:27
at eval (eval at (/home/node/d20-api-server/api.js:151:1), :65:16)
at Object.publish (eval at (/home/node/d20-api-server/api.js:151:1), :70:8)
at /home/node/d20-api-server/api.js:1634:12
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560

How do I install this in Roll20?

The readme doesn't actually have an install section. It just says "this will be installed when you run this script" but it doesn't say how to run the script.

Adding arg for type of Critical

Hello, thanks for this script.

Is it possible to add args after !critical to choose which type of critical ? (Like !critical pierce if I want the pierce one).

Thank you :)

Brandys

Typo causes announcer GM chat error

"Line 142: sendChat(accouncer, '/w gm Trap Notes:
' + effect.notes);"

Getting error due to the name accouncer being incorrect, should be announcer.

MapChange dependent on SplitArgs?

I've just started using API scripts so it's possible I'm doing this all wrong but I encountered an error adding MapChange script to my game's API scripts: "splitArgs is not a function". I found splitArgs in MapChange's parent folder, added that code as well and it appears to be working.

https://wiki.roll20.net/Script:MapChange lists no dependencies, but it should perhaps list splitArgs?

Bugs with ammo tracking and weight

If you adjust the amount of the linked ammo resource, it does not adjust the total weight for the character.

Also, if you set the weight of the ammo to something less than 1, like .5, weight calculations will fail after you adjust the amount of ammo. For example: create a set of 20 arrows and link them to a bow with a weight of .05 each (per PHB). Fire one arrow, and it correctly subtracts the weight. Now add the arrow back by changing the quantity from 19 to 20. Fire again, and it will subtract the ammo but not the total weight for the character.

API categorized as "hidden" still show up in API Script One-Click

Some time ago, I submitted #1106, which was supposed to remove two redundant API from being listed in the API Script One-Click menu, but it seems adding the "hidden" parameter to scripts in the approved.yaml doesn't actually hide them in the menu, like it does with Character Sheets in the Character sheet Repo's approved.yaml.

I noticed that two other APIs (5e Shaped Companion Script, True Page Copy) also have the hidden parameter, but are likewise still visible in the API menu.

Could it be fixed so that the "hidden"-parameter works for API scripts like how it does for character sheets, or does scripts need to be removed form the repo/from approved.yaml to no longer be visible?

@samus was the last one to merge changes in the repo, maybe you can take it up with the other Devs?

Turnmarker script triggers blood status FX when it's token's turn.

Hi,

I love using Status FX while gaming! During my last session when the Turnmarker script highlights the token, it triggers the blood status FX. I've been using the two scripts in conjunction for about a year with no issues up until this point. Please let me know if you need more information or would like to see for yourself on the roll20 server. Willing to help in any way I can in order to figure out/resolve the issue. Thanks!

UPDATE: RESOLVED. No errors from Status FX. the Turnmarker token on the map layer had the red icon on so Status FX was just doing its job. I just disabled it no blood effect. Thanks again for the great script!

invalid byte sequence in UTF-8 - MythicGM

Received a report for someone who used my API, MythicGM they are getting the following error when they go into the script section of their campaign.
ArgumentError: invalid byte sequence in UTF-8

When I tired to use it does the same thing. Also clicking import does not work. However when you take the code and manually attach it to game it works just fine.

So something is broken on the roll20 side of things that when the script is being added to games.

Genesys - Images broken

Related to: Roll20/roll20-character-sheets#4590

The creator of the genesys character sheet seems to have deleted his imgur and we've lost all the images. I'm moving the images over to the character sheet repo.

I'll be fixing the issue here as well since they're both closely related.

Question: should I make a copy of the images that are used here or referencing the ones in the characte sheet the preferred course of action?

[Failed to read dependiencies; ignore]Exalted Successes: TypeError resulting in Error Lock

I'm getting the following error message when trying to use the Exalted Successes script:

`

Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info...

For reference, the error message generated was: TypeError: bshields.sendChat is not a function
TypeError: bshields.sendChat is not a function
at handleInput (apiscript.js:46:22)
at eval (eval at (/home/node/d20-api-server/api.js:143:34), :65:16)
at Object.publish (eval at (/home/node/d20-api-server/api.js:143:34), :70:8)
at /home/node/d20-api-server/api.js:1393: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 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
`

GroupCheck is not in approved.yaml

Hey, I think you may have overlooked adding GroupCheck to the approved scripts when I first added it... it's been in the repository for a while now, but hasn't been approved so far. Anything wrong on my side, or did you overlook it?

PCGenPFImport export doesn't work properly

I suspect that this is due to the new version of PCGen since the original creation of the script, but when I try to export my character from PCGen using the csheet_pathfinder_roll20.txt.ftl script, I get the following error:

14:12:12.387 INFO main Main:140 Starting PCGen v6.07.05
14:12:12.500 INFO main LanguageBundle:133 Initialising language bundle with locale en_US.
14:12:19.432 WARNING Plugin-loading-thread PluginClassLoader:153 Plugin not found in Function-GETFACT.jar
14:12:49.149 INFO Thread-6 SourceFileLoader:555 Loading game Pathfinder_RPG and sources [Advanced Player's Guide, Ultimate Equipment, Ultimate Combat, Ultimate Magic, Advanced Class Guide, Advanced Race Guide, Inner Sea World Guide, Pathfinder RPG for Players, Ultimate Campaign, Weapon Master's Handbook, Inner Sea Primer, Adventurer's Armory, Inner Sea Gods, Inner Sea Magic, Inner Sea Combat, Blood of Angels].
14:13:16.204 INFO AWT-EventQueue-0 CharacterManager:200 Loaded character Lucien - C:\Users\eplossl\Documents\Pathfinder\Lucien (fixed).pcg
14:14:03.490 SEVERE AWT-EventQueue-0 ExportHandler:344 Error exporting character using template C:\Users\eplossl\AppData\Local\PCGen\6.07.05\outputsheets\d20\fantasy\htmlxml\csheet_pathfinder_roll20.txt.ftl
freemarker.core.ParseException: Syntax error in template "csheet_pathfinder_roll20.txt.ftl" in line 742, column 116:
Encountered "<", but was expecting one of:
<STRING_LITERAL>
<RAW_STRING>
"false"
"true"


"."
"+"
"-"
"!"
"["
"("
")"
"{"

at freemarker.core.FMParser.generateParseException(FMParser.java:6358)
at freemarker.core.FMParser.jj_consume_token(FMParser.java:6217)
at freemarker.core.FMParser.MethodArgs(FMParser.java:1339)
at freemarker.core.FMParser.AddSubExpression(FMParser.java:1092)
at freemarker.core.FMParser.PrimaryExpression(FMParser.java:588)
at freemarker.core.FMParser.UnaryExpression(FMParser.java:634)
at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:749)
at freemarker.core.FMParser.AdditiveExpression(FMParser.java:701)
at freemarker.core.FMParser.RangeExpression(FMParser.java:881)
at freemarker.core.FMParser.RelationalExpression(FMParser.java:829)
at freemarker.core.FMParser.EqualityExpression(FMParser.java:792)
at freemarker.core.FMParser.AndExpression(FMParser.java:948)
at freemarker.core.FMParser.OrExpression(FMParser.java:970)
at freemarker.core.FMParser.Expression(FMParser.java:529)
at freemarker.core.FMParser.StringOutput(FMParser.java:1503)
at freemarker.core.FMParser.MixedContentElements(FMParser.java:3642)
at freemarker.core.FMParser.Root(FMParser.java:4275)
at freemarker.template.Template.(Template.java:248)
at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:549)
at freemarker.cache.TemplateCache.getTemplateInternal(TemplateCache.java:439)
at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:292)
at freemarker.template.Configuration.getTemplate(Configuration.java:2518)
at freemarker.template.Configuration.getTemplate(Configuration.java:2367)
at pcgen.io.ExportHandler.exportCharacterUsingFreemarker(ExportHandler.java:318)
at pcgen.io.ExportHandler.write(ExportHandler.java:222)
at pcgen.gui2.facade.CharacterFacadeImpl.export(CharacterFacadeImpl.java:2656)
at pcgen.system.BatchExporter.exportCharacterToNonPDF(BatchExporter.java:287)
at pcgen.gui2.dialog.ExportDialog.printToFile(ExportDialog.java:514)
at pcgen.gui2.dialog.ExportDialog.export(ExportDialog.java:414)
at pcgen.gui2.dialog.ExportDialog.doExport(ExportDialog.java:269)
at pcgen.gui2.dialog.ExportDialog.actionPerformed(ExportDialog.java:259)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at pcgen.gui2.dialog.ExportDialog.showExportDialog(ExportDialog.java:102)
at pcgen.gui2.PCGenActionMap$ExportAction.actionPerformed(PCGenActionMap.java:842)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I'm currently running PCGen version 6.07.05. I have not yet updated to 6.07.08, but that's on my list of things to do.

Remove ItsATrap_theme_5E_OGL and Shaped.

Can we remove the 5E OGL and 5E Shaped It's A Trap theme scripts from the source tree, please? I've deprecated them long ago in favor of the 5E Generic It's a Trap theme, but I still get bothered from time to time by users who install and try to use them (even though they explicitly tell the user that they should use 5E Generic instead).

Please check approved.yaml

My two scripts were corrected last week but not included in One Click. It looks like they are still manually commented out in the approved.yaml

Rest and Recovery
Token Action Maker

WildShape dependency is not working

I submitted a script (WildShape) for one click install together with another script needed as dependency (WildHelpers), but it's not working properly (i.e. is not running at all), it's complaining that it cannot find a class defined in the dependency script (WildHelpers).

Are dependencies supposed to be installed automatically?

Looking at the approved.yaml i see that WildShape has been added there but WildHelpers hasn't for some reason so i can't install that manually either

TempHPandStatus fails to load

I pasted the TempHPandStatus.js file into the API and when the sandbox resets it files to list the version number indicating the script has loaded.

Other scripts are working.

The code does not actually work in a game session either.

image

2.3 Error on !flip

TypeError: msg.content.trim(...).splitArgs is not a function
TypeError: msg.content.trim(...).splitArgs is not a function
at handleInput (apiscript.js:39:39)
at eval (eval at (/home/node/d20-api-server/api.js:105:34), :65:16)
at Object.publish (eval at (/home/node/d20-api-server/api.js:105:34), :70:8)
at /home/node/d20-api-server/api.js:1197: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 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

FFG-SWRPG-Dice-Roller Domain has expired

The domain containing all the assets for this API addon has expired, I can't find any contact details for the team building it though. An alternative source should be found for the images.

Request for features

  • Option to mute output for the gm whisper (just a note that a transfer, add, etc. happened without the total coin amounts for each character in the transfer, for example)
  • Option to enable PCs to use pay, add, etc, commands.

[LazyExperience] Doesn't work for tokens already on the map

Hi,

I've got a weird situation where I have two instances of the same D&D Adventure. LazyExperience is working perfectly on one and wasn't working at all (or so I thought) on the other. Same API-scripts and character sheet installed in both.

Today I discovered that it is actually working but only for tokens newly added to the maps. Any tokens that are part of the actual adventure and already on the map it just doesn't trigger xp when they get marked as dead.

I'm not sure if that's a bug, or something I've done wrong?
Is there a solution that doesn't involve me having to manually re instance all tokens in the adventure?

TokenLock

Not sure if you're still updating these scripts for Roll20, I'm just curious if it would be possible to update TokenLock? When I lock the tokens and then test it by moving a token that is assigned to someone it crashes the API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.