Comments (6)
Yeah, I'd have no problem with that. Beyond20 was created because one of my players thought D&D Beyond was awesome (I agree) and wanted to use it and our game is on Roll20. Since I couldn't find an existing way to do that, I wrote Beyond20.
If there are other needs out there, I don't see why Beyond20 wouldn't fulfill those needs. I already have in the TODO a plan to have a dice roller so you could roll the dice in the D&D Beyond window directly, in case someone doesn't use Roll20 and just wants to roll dice. If FoundryVTT (which looks awesome btw and I can't wait for it to become stable/usable) has a way to send rolls to it (which seems like it does), then it should be very easy to add support for it.
You're free to give it a try btw (if you can). The D&D Beyond module parses all the info and just sends messages to the background script which itself forwards it to the roll20 script.
For example, for a skill check, this is the message that gets sent :
Or a more complicated one, a weapon attack with multiple damages :
(note the 'roll' value in the object is just a fallback value if unable to parse/recognize the type of roll it is)
The script in roll20 just receives that message and decides on how to display it, build a string to send and calls postChatMessage which just sets the textarea value and calls submit on the "Send" button (simplified version of the function in roll20.pyj which doesn't handle the 'speaking as'):
def postChatMessage(message, character=None):
chat = document.getElementById("textchat-input")
txt = chat.getElementsByTagName("textarea")[0]
btn = chat.getElementsByTagName("button")[0]
txt.value = message
btn.click()
Adding support for FoundryVTT should be very easy, it will all depend on how fancy you want it to look. For the weapon attack for example, it could just do something like this :
postChatMessage("/roll 1d20 " + request["to-hit"] )
for i in request.damages.length:
postChatMessage("/roll " + request["damages"][i] + "\n" + request["damage-types"][i] + " damage")
Most of the code in roll20.pyj is about using the nice templates basically.
It even looks like FoundryVTT has a dice API which could make it even easier to do rolls : http://foundryvtt.com/pages/api/dice.html
Note: I'm giving this information cause I saw your profile says you're a web developer, so I figured you might want to do it yourself. If you don't want to, can't, then I'd be happy to do it myself, it's just going to be a low priority for me right now.
from beyond20.
Unfortunately, I do not have much experience with something like this. But, the information you provided really helped me to understand what is happening behind the scenes!
from beyond20.
Oh my bad, I saw "web designer" in your profile and I thought it was "web developer"! Two very different fields! :D
from beyond20.
Ah, no problem! 👌
from beyond20.
Research note for future implementation :
speakas = game.actors.entities.find(function(actor) { return actor.data.name == "Symrael";})
ChatMessage.create({"content": "Attack : " + await new Roll("1d20 + 5").render() +
"\nDamage : " + await new Roll("1d8 + 3").render() +
"Piercing",
user: game.user._id,
speaker: ChatMessage.getSpeaker({actor: speakas}),
whisper: ChatMessage.getWhisperIDs("GM")})
from beyond20.
Support for FVTT is done as of 0.3 (out on firefox, pending review on chrome webstore).
Thanks!
from beyond20.
Related Issues (20)
- Rage damage not being added to custom attacks HOT 2
- Native rolls not working with V11 Foundry and DND 2.3.0 HOT 7
- Chat errors on character inputs HOT 4
- Blood Curse of the eyeless bug (Blood hunter feature) HOT 3
- Missing space at damage type description of magical Items HOT 1
- Investigate why Chaos Bolt spell includes damage with no defined type HOT 4
- D20 at Advantage Summing instead of Choosing a Value HOT 2
- Cleric: Death Domain: Circle of Mortality is labeled HOT 1
- Bladesong concentration-check improvement suggestion
- Blood Hunter's crimson rite, a potential improvement, clarifying damage types. HOT 1
- Classes page handler should limit its roll button check to the contents and ignore comments section HOT 2
- Hunter's Mark MIA? Sheet scan incomplete? Or just user over-expectations? HOT 2
- [Proposal] Add Roll History Button for Individual Character Sheets HOT 5
- Third whisper setting, where d20 roll is public, but the rest is only to the GM. HOT 1
- Add a display image to vtt to images from source books
- Barbarian: Wild Magic / Wild Surge HOT 1
- A digital dice roll with adv/disadv of a skill/save that has +0 modifier does not get sent HOT 2
- Evaluate native rolls support with dnd5e 3.x
- Hook versatile damage digital dice buttons and make it do a two handed damage roll. HOT 1
- Visual representation for toggled rage
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 beyond20.