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

Is API something that I should learn for my project?

1452895902

Edited 1452895962
A friend of mine is interested in playing a game so I'm making an effort to learn more about Roll20. All that I really feel like I want is the capacity for a massive overworld and I'm presently finding the tools for accomplishing this to be quite limiting. For example, I can be content with using a small map size which is far more convenient to work with, although the ruler can't measure smaller distances than the squares which define the space, and attempting to use a ruler on a larger map over long distances can be impossible. I'm presently thinking about an overworld, as well as an underworld which I would have to be capable of accurately gauging the location of precise tiles to sync with the overworld. Essentially I want to very rigorously track overworld movement, and I think in an ideal setting for that I would be able to click on a tile and gather its location data. I was hoping that I would be able to use the ruler to track movements between squares but that doesn't seem to be the case. I mean, I suppose ideally I would learn API anyway- but it just seems incredibly overwhelming. I've attempted to learn more about programming languages in the past and it's never sank in with me. If I could use API I'm assuming that I would be capable of doing even more than that, like removing a lot of manual note-taking, such as a calendar for example. It seems like there's a lot that can be done and it would be super convenient, but like, I'd have to learn Javascript, and then I'd have to figure out how that interfaces with Roll20, and that totally seems way over my head for the near foreseeable future. Someone told me that Javascript is easy. Besides API is there anything else that I'm missing that would allow for me to create in advance to a campaign an entire world and every place within it that can be reasonably tracked?
1452905550
Lithl
Pro
Sheet Author
API Scripter
First, you can have the ruler not  snap to the grid squares by holding Alt while measuring. You can also change the grid size in the page settings, as well as what distance each square represents. Second, the API cannot simply detect clicks in the interface. The API can react to messages being sent to the chat, to objects (including things like characters and handouts) being created or deleted, and to objects being changed. You could have a token for every grid square on the map (or depending on your use-case, a token for every important location on the overworld), have those tokens represent characters, and have those characters with abilities set as token actions. Then, clicking the token (which would appear to be part of the map) would bring up a button in the top-left corner of the VTT that would execute some macro. That macro could whisper the relevant information, post the information to chat in general, or execute some API script via an API !command. Another option would be to have larger images used for the token and set to the size of a grid square. Anyone with control over the token can press Z while selecting the token to zoom in to the image, or as the GM could could hit Shift+Z to zoom into the token for all players. That might not look the greatest on your overworld map, though. None of the above really requires  the API. However, if you want a setup where the players can select tokens on the map grid to zoom in with Z or execute token actions, you might want an API script to prevent them from moving those tokens around.
1452906200

Edited 1452906428
Ah- that little trick that I didn't know could make a huge difference. Thanks a lot. It even has a decimal point- that's perfect. Tracking players might still be an obstacle. I'll have to get a bit creative with that. Maybe I'll just bust out the grid paper, hmm...