Kruptein / PlanarAlly

A companion tool for when you travel into the planes.
https://www.planarally.io/
MIT License
392 stars 71 forks source link

Add virtual dice rolling #140

Open Langenfeld opened 5 years ago

Langenfeld commented 5 years ago

Add virtual dice rolling.

I would suggest to keep it as simple as possible. Just allow to select some dice e.g. 2D6 and 1D12, and share the resulting numbers with all players in the session. Selecting dice to reroll, calculating the sum or counting successes can be done by hand.

Goury commented 4 years ago

I'd like to suggest to make this feature really good if at all. I'd also suggest to implement some form of per-character stats that can be used in prepared dice rolls. Some better character management also would be nice to have.

Surely we don't need all this before dice roller can be implemented, but it's better to have this in mind than have unfavorable dice roller forever.

onaash27 commented 3 years ago

I agree with Langenfeld. The simplest way is the best way in this case. I made a bit of a mock up for the solution. However I am not a programmer so I don't know if this solution would work.

Basically the

idea is that the dice roller is part of the left panel to keep consistency. Just a simple form to write commands and few macros that people can set up. The roll would show up on everyone's screen for few seconds.

pa - roller

dthv commented 3 years ago

I, personally, am not convinced that a virtual dice roller is needed within PA. With an integrated dice roller, PA will be less system agnostic, since lots of RPG out there use custom dice (take the Star Wars TTRPG by FFG or the 2d20 line by Modiphius), regular dice with special meanings (e.g. Vampire 5e) and/or special notations (take Traveller's d66). I would not want players to back off of PA 'because it does not support system xyz' while this support is only relevant with regard to dice rolling.

Acording to the UNIX philosophy, a tool should only do one job and excel on it. PA's job is to provide a gameboard. It does (and should) not include VoIP/Web Conference functions, it has (and should have) no chat, etc. There are plenty of virtual dice rollers around, be they 'apps' for your phone, web services or bots to be used with Discord. I don't think PA should do that again in the foreseeable future.

In case it is integrated, it should be just a baremetal dice roller. The mock-up done by @onaash27 is fine, esp. with the popup of players' dice. The macro and comment functions ("Longsword attack") is, in my humbly opinion, not necessary; a log consisting of Player 1: 2d6+3 = 9 will do just fine.

Just my two cents, I appreciate the effort of the mock-up in particular.

onaash27 commented 3 years ago

Thanks for taking the time to look at it. I thought it would get buried, since this is an old Issue. While I agree with you that a tool should only do one job and excel on it I believe that a bare dice roller would increase the QoL and make PA truly excel at being a game board. From experience, playing ttrpgs requires quite a lot of focus and not having to juggle 5 tools and 3 internet tabs helps me. Especially as the forever DM. A dice roller would alleviate this strain since dice rolling is quite essential to ttrpgs and this way it would be connected to the game board.

Quick clarification for the mock-up I made

The macro and comment functions ("Longsword attack") is, in my humbly opinion, not necessary; a log consisting of Player 1: 2d6+3 = 9 will do just fine.

The Roll line is meant to be similar to, for example, Roll20's chat. However it would only serve for the dice commands (!r d20). The Longsword line was made in a similar vein as the Notes section of PA. I only meant it as a template where for example !r d20+6 would be saved as "Longsword". I never meant it as a chat log

Again, thanks for answering

dthv commented 3 years ago

From experience, playing ttrpgs requires quite a lot of focus and not having to juggle 5 tools and 3 internet tabs helps me. Especially as the forever DM.

I feel you, both as a fellow forever GM and a user, constantly juggling with tabs and PDF and stuff.

Yet, I still fear that it is a complex task to integrate a dice-roller into PA that is both bare-metal and universal. Already with only D20 in mind, one would need different calculation methods (just summing up vs. listing all dice for potential re-rolls) and at least the d% notation. Other systems use other methods, special dice (e.g. FFG's Star Wars, Modiphius' Star Trek Adventures), exploding dice (Shadowrun), different notation systems (Traveller). Then there's the problem of localization: Where I come from, rolling 1d20 would be noted 1w20 and I'd expect this to work in a localized version (except when I play a game that's not translated to my language in which case I'd want translated UI but english dice rolls…). Every of the abovementioned add layers of complexity to a 'bare metal' tool like a dice-roller.

In case there will be a dice roller, I'd rather not have a chatlike line with command prefixes and stuff. There should be an input that would react to parseable strings, broadcasting output. It should have a place in play mode at the tool bar on the lower right, not in the settings menue on the left. With regard to macros, I'm not sure whether to tie them to players, rather than to assets. When it comes to parsing the input with a system-agnostic approach in mind, I have no better idea than assigning templates tied to game-systems to the interpreter; something I would not want PA to do as one of its assets is that it (while designed with D&D in mind) is truly system-agnostic. Oh, and, by the way, I would want to have a log.

All this aside: It's ultimately @Kruptein 's decision and they've not dismissed this topic entirely. So it's definetly not off the table. (btw no need to thank me for answering, I'm just a user like you and in no way responsible for anything with regard to PA ;) ). We shall wait and see.

Kruptein commented 3 years ago

This topic is as is shown by both of you a thing of divided opinions.

I hear this request often enough, that some form of dice rolling should be available. @dthv has valid concerns regarding localization and how system agnostic this can be.

This and some form of basic chat are things that I see myself adding, but with options to disable them by the DM if they use other methods to accommodate these needs, so that there is no needless extra buttons that you never use. In the same vein I may add some configuration options to users to hide some tools if they feel like they don't need them.

One other approach is through some sort of plugin/addon/extension whatever you want to call it system. But there the question is, who is authorized to "install/add" these things, only the server owner, or can a GM enable things. Let alone how it would actually hook into the main code.


tl;dr Although dthv raises valid concerns, I think the short term benefits of providing an opt-in dice roller that might initially only support dX style dice outway waiting longer for some universal system. The concrete implementation is yet to be seen (whether this uses chat, or uses a dedicated dice tool for example)

dthv commented 3 years ago

I can see a tool that accepts cmd-line style input.

It should:

Of course, one could omit the x notation with a checkbox for showing each result and/or for summing up (or both?).

This still does not cover special dice or dice with special meanings. Yet, thinking of e.g. Vampire the Masquerade 5th (Modiphius) with its "hunger dice", one could simply do separate rolls, e.g. 3xd10 2xd20 for a pool of five d10 in total, two of them being "hunger dice". For special dice (cf. Star Trek or Star Wars, see above), one would still need need comparison tables. Or actual plugins which I, still having all my concerns about it, would prefer on the long run. They should be server-based, (de)activateable by each GM in their sessions and kept as separate as possible from PA's core to encourage development of system-based plugins. I don't know, maybe a python-script at the backend that PA calls?!

dthv commented 3 years ago

I'd also suggest to implement some form of per-character stats that can be used in prepared dice rolls.

In case of a commandline-tool, these could be simple inputs akin to trackers/auras, consisting of a shorthand and a PA-diceroller compatible statement, e.g.: Longsword and 1d20+10 1d8+6. They could be accessible like Trackers when an object is selected. Plus, predefined statements of every owned object could be accessible from within the dice-tool itself (e.g. from popups like the draw tool).

dthv commented 3 years ago

Oh, and: At least GMs (and maybe all players) should have a setting to keep rolls private from other players. They should still be logged, though.