Comments (11)
Can you give the call stack that was produced with the error?
from roll20-api-scripts.
Incidentally, it likely won't work on those tokens as their graphics are in the Marketplace, not a user library:
Known bugs/issues: If the avatar image of the character is not in a user library (i.e: it's a marketplace image or from the Monster Manual, or the like),
due to limits placed upon the API, it can't set an avatar image. You will have to do that yourself.
from roll20-api-scripts.
How do I get the call stack that was produced?
Yes, I saw the note about the token, however when I copy the Orc on a new game with no module loaded it works fine and includes the token image.
from roll20-api-scripts.
Usually there is a callstack in red along with the error. However, that doesn't always happen with the possible infinite loop detection. The way that is detected is based on a watchdog event in the sandbox which is touched each time the script returns control to the sandbox. If control is not returned after some period of time, the sandbox kills the scripts.
What command are you running when it stops working? I'm guessing just !dupCharToken
which does several findObj() calls wrapping createObj() calls. Storm King's Thunder is a big Game, so those will probably be very expensive calls and cause the watchdog to trigger. The only way around that is to rewrite the script to defer as much work as possible. Even though that script is pretty short, it would take a while to do that task as it requires restructuring it into a much more asynchronous model of operation.
from roll20-api-scripts.
No call stack with the error.
You are correct in what I am running. As for rewriting the script that is beyond the time I would have. I would first have to teach myself roll20 scripting. So I guess it is back to pen and paper for the big group encounters.
from roll20-api-scripts.
Is there a reason that copying the existing orc tokens multiple times, or dragging in new orc tokens is insufficient to your needs?
from roll20-api-scripts.
from roll20-api-scripts.
I am the Author of the script, and just noticed this issue had been opened (wish somebody had contacted me on Roll20 PM).
Anyway, I have a few questions.
BWare96:
Did this happen when you when you were just trying to duplicate one token, or were you trying to make a fairly large number of Orcs?
Because one quick work around is to break a large batch into smaller batches.
!dupCharToken 2 (will make Orc 1 and Orc 2)
!dupCharToken 2 3 (will make Orc 3 and Orc 4)
!DupcharToken 2 5 (will make Orc 5 and Orc 6)
etc.
I would be very interested in knowing how many duplication's it did / did not happen on. ie: it happens when trying to make more than X orcs, but never when trying to make less than Y orcs.
Also, I am unfamiliar with "Storm King's Thunder" and am curious as to what you two consider a "big" game. How many characters are in the module. How many Attributes and Abilities would an Orc have?
shwjdk:
What are your ideas for rewriting?
The one thing I notice is that the script makes the new characters one at a time. For each newly created character it calls FindObj() looking for the original characters attributes and again looking for abilities. Thus for 10 new characters it makes 20 calls to FindObj(). Obviously it should be fairly straightforward to create all the new characters, then after all have been created, make one call to FindObj() to get all the attributes, and then do 10 CreateObj()s, etc.
However if the timeout is happening when just making one character, then this change would not save any time at all, it only saves time if making more than one character.
I would appreciate any advice you have.
from roll20-api-scripts.
OK, did testing on my own small campaign (just a few dozen characters, some with very few attributes).
My old code worked when making 36 or fewer copies of a certain character, but always gave the infinite loop detected error whenever trying to make 37 copies or more.
I pulled everything out of the one loop I talked about above that I could and the cutoff point improved slightly to somewhere between 42 and 45 copies. so there was a noticeable improvement, but not huge.
Any other ideas or tricks you could suggest?
from roll20-api-scripts.
OK, version 1.01 of DupCharToken went live yesterday, and like I said, there was some improvement, and I also updated the wiki page instructions to note that if this happens, to try making smaller batches.
Unless anybody has any specific suggestions on how the script can be further improved, I think this issue should probably be closed, but I can't figure out how to close it myself, I assume the creator or the administrator will need to do that.
from roll20-api-scripts.
Thank you Chris for the troubleshooting and tweaks to the code. Sorry it took so long to respond. It has been busy lately. I understand the limits and knowing what they are makes this a great tool. I will close the issue.
Brian
from roll20-api-scripts.
Related Issues (20)
- Add Burn Bryte It's A Trap theme to One-Click
- WildShape dependency is not working
- Critical Error - Carry Below While Initiative Tracker is Up
- TokenMod - Directional Low Light Fields Missing HOT 8
- [5th Edition OGL by Roll20 Companion] Spell Level undefined HOT 1
- API categorized as "hidden" still show up in API Script One-Click HOT 1
- HeroRoller doesn't work embedded in Character Sheets. HOT 3
- Shadowrun 5th Edition API Doesn't Populate Initiative Tracker HOT 2
- Remove older versions of script HOT 3
- Sandbox crash when lvlX_slots_expended is NaN (easy fix)
- Pull 1495 (for Initiative Tracker Plus) does not seem to have been merged properly. HOT 2
- Custom Token Markers not working with Status tracking
- chatSetAttr 1.10 not triggering sheet workers even though toggle is on
- Multi-world calendar is missing modern HOT 1
- Some Randomization
- Is One-Click update running slow? HOT 1
- Two Targets in chat don't work (one does) HOT 1
- Make scripts for sale on marketplace?
- Pull request #1772 been hanging around since 26/06/23 HOT 1
- Dungeon Alchemist Sends a message to all users when importing a new map.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roll20-api-scripts.