That kind of thing would be pretty amazing... though I guess it's also important that beginners learn which bits are JS and which bits are Roll20. I was thinking about writing some code to emulate some of the API's functions (mostly for learning/fun), then realised I have no idea how to set it up properly. Would you just create a module and use export? Or is there a smarterer way?
One of the things I've struggled with a bit, since I don't know the fundamentals of programming, is actually setting up vscode to do what I want it to. For example, I installed underscore so I don't need to remove underscore methods from my code if I just want to do some console testing, via npm install underscore. But the underscore helpers will just error unless I have
const _ = require('underscore')
in the code. I did some searching on trying to get that into launch.json or something, but wasn't finding helpful results.
Can one of you clever people point me in the right direction for getting underscore working globally without having to chuck that line in manually? I'd also like to get a
const log = (text) => {console.log(text)}
functioning globally (or at least folder/workspace wide), so I don't need to keep pasting that either. I keep finding Google results which are way too technical for me. I'm assuming this would be helpful to other beginners like me :)
I did at least manage to get ESLint globals set up for all the Roll20 functions (pats self on back). It doesn't seem like setting up an IDE is done by many people with my painful lack of knowledge.
All in all, I feel like I'm learning to cook without understanding the utensils. The pumpkin soup smells great, but why are you stirring it with a cheese grater? And... probably don't use a plastic bowl on the gas burner next time, Oosh.
Oh... and I've only recently realised that .get() and .set() aren't Roll20 specific, and that Map objects are A Thing. I'm pretty sure that wasn't covered in Codecademy, or maybe I fell asleep in class.