-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any examples to get me started #1
Comments
Oh man, I'm sorry but this was really just something I split out to clean up some of my own projects. You're welcome to use it but it's actually a pretty involved setup because in order to be able to use a node modules in roll20 you need to compile everything together with webpack or browserify. If you know your way around node, fulp, npm, etc, then you could check out https://github.com/symposion/roll20-shaped-scripts for examples of how I put everything together. In particular you want to look at the browserify stuff in the gulpfile and entry-point.js. Unless you're intending to start a really big project in Roll20, it may not be worthwhile investing the time; the Shaped Sheet support script is 6.5k lines now and has unit tests and a CI system - if you're just doing a little light hacking to support your games you're going to spend more time understanding the code and getting it working than you will save by using it! The other alternative would be to just take logger.js and copy-paste into your own script. You'll need to strip out the You instantiate a Logger instance with a name, which is used subsequently to identify it for control from the chat window. The only command that it responds to is:
Where TRACE can be one of ERROR, WARN, INFO, DEBUG, TRACE. You put logging statements into your code by calling the relevant methods on your logger instance - e.g. The only exception is TRACE level, which isn't intended for direct usage, but instead is used as part of a call-tracing system. If you call One other thing to be aware of is that the logger tries to indent the TRACE output according to the call stack. This works fine until you throw an exception. You should ensure that all of your main entry points (i.e. any event handlers that will be called directly by Roll20) set If none of the above makes any sense, I'm afraid this probably isn't the tool for you; it was written basically for my own use, the only reason it's published on npm is because it made it easier for me to modularise my code, and there were a couple of other advanced Roll20 scripters who were considering using a similar module structure. Although I'm happy to give you some pointers/clarify a few things occasionally, I don't have the time to lead you through using it step-by-step; from here you'll need to read the code yourself and try to understand roughly how it works if you want to use it. Good luck! |
Hey do you have any examples on how to get me started with this, what do I need to pass to it.
The text was updated successfully, but these errors were encountered: