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

Seeking Method to Export ASCII Battlemap Data from Roll20 for AI Bot

Hey all, I'm currently working on developing an AI bot designed to understand and interact with battlemaps autonomously. To do this, I am seeking a way to export an ASCII representation of my Roll20 battlemaps. This would ideally map token locations and differentiate between empty and filled spaces, providing a straightforward and accessible data structure for the bot to interpret. The end goal is to have this ASCII map data sent to either a local text file on my computer or directly to a Discord bot. This would provide the necessary input for the AI bot to comprehend the current state of the battlemap and make decisions accordingly. I'm not expecting amazingly strategic play, and at first only plan to use it on a familiar. Making the ASCII map seems relatively straightforward using a script but exporting it seems more of a challenge.  I am hopeful that there might be a viable method to achieve this, even if it requires some scripting or unconventional workarounds. Has anyone attempted a similar project or does anyone have suggestions on how I might be able to achieve this? Any insights, experiences, or guidance would be very much appreciated! Thanks!
1685919365

Edited 1685919396
GiGs
Pro
Sheet Author
API Scripter
There's no wayto do this natively inRoll20. In fact,Roll20 is set up to make it as hard as possible to export things programatically. One of the reasons they get licensed products on Roll20 is showing their commitment to security (and anything that breaches copyright). It is possible to bypass this, but generally not with tools native to Roll20 (You'd have to use a browser extension built for the purpose, for instance).
GiGs said: It is possible to bypass this, but generally not with tools native to Roll20 (You'd have to use a browser extension built for the purpose, for instance). Got it, yeah that makes sense. I was naively hoping that there may have been a pipeline opened up since the new export to HTML for character sheets feature that I saw was recently added. Any recommendations for a browser extension that could do this relatively easily, with how Roll20 works?
1685922747

Edited 1685922791
GiGs
Pro
Sheet Author
API Scripter
Sorry, I don't know of any browser extensions to help. It's such a niche demand, I think you might need to build it yourself.