Comments (12)
Hi, quality!
I'm loath to intruduce a syntax that depends on punctuation too much.
roll20 is going the punctuation way and if we'd use the punctuation for something else then we're precluding ourselves from throwing compatibility bridges to roll20. For example, the []
syntax is used to embed extra information in the roll: https://wiki.roll20.net/Dice_Reference#Including_Additional_Information
roll20 seems to be a defacto standard for most people I've heard from, so branching the syntax in a different direction doesn't look attractive.
So to introduce a new syntax I'd rather go literal and functional way, like spelling /r repeat (4d6k3, 6)
.
(cf. https://app.roll20.net/forum/post/541966/repeat-roll-command ?)
This also includes the possibility of a command specifically tailored for D&D character creation, like /r char
(which can be specialized to different systems with /r char (fate)
).
If there is a roll20 syntax for repeating we could also emulate it, but I haven't found any with my cursory search.
How does that sound to you?
What would be your preference, implement the /r char
first or /r repeat ($dice, $n)
?
What seems to be better, /r repeat ($dice, $n)
or /r repeat ($n, $dice)
?
I'm also thinking of /r repeat_$n ($dice)
so as not to make people memorize the correct order of arguments.
from sidekick.
Sounds great. Yeah /r char
is cool because it's easy to remember/type/short... but /r repeat (dice, n)
seems right... and will save you from adding a ton of custom rolls. I feel like the repeat_n
is less intuitive, but I write code, so... bias?
from sidekick.
Great dice btw... very clean install. Where do you have this running?
from sidekick.
kk
Great dice btw... very clean install.
Thanks! I guess it goes down to proper docs.
Where do you have this running?
I've a couple of servers on server4you.de. The bot is a separate process, binary created with the Rust programming language. Currently it runs from a single server only, but given some spare time I'd like to implement a high availability setup where the bot's hosted on two servers.
from sidekick.
FWIW, I feel like the repeat argument makes more sense after the dice argument as in /r repeat ($dice, $n)
. I wonder if you could shorten/clarify that with /repeat ($dice, $n)
? Just a thought.
from sidekick.
I feel like the repeat argument makes more sense after the dice argument
Okay, got it.
I wonder if you could shorten/clarify that with /repeat ($dice, $n)? Just a thought.
That's a tough call. We're not the only bot around. Other bots might be using "repeat" in some form (Nadeko has ".repeat", for example).
I should think about it some more.
from sidekick.
Yeah, that's what I was afraid of. Plus, keeping all the functionality on the same command is less confusing I think. /r
is probably the way to go.
from sidekick.
Yeah, dice then repeat arg makes sense. I feel like maybe you want to keep
the /r
command... vs using /repeat
. But I could be talked into it. But
I like /r repeat (4d6d1, 6)
kinda thing.
On Mon, Nov 21, 2016 at 8:14 AM, Joe Bush [email protected] wrote:
FWIW, I feel like the repeat argument makes more sense after the dice
argument as in /r repeat ($dice, $n). I wonder if you could
shorten/clarify that with /repeat ($dice, $n)? Just a thought.β
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#11 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADJWWspJFor88Fgn-r8iqo-jSrB46n0Mks5rAac-gaJpZM4Kwgv2
.
from sidekick.
So I've stretched the code to its limits (given that I have two separate parsers, one for the dice and another for the math, and I wanted repeat
to be friendly with both), but it works.
Here's something straight from the unit test:
mock (&[1, 2, 3, 4]);
assert_eq! (dice ("repeat (1d20 + 1d20, 2)") .unwrap(), "(1)+(2) = 3, (3)+(4) = 7");
mock (&[1, 2, 3, 4]);
assert_eq! (dice ("repeat (2d6 > 3, 2)") .unwrap(), "(~~1~~ ~~2~~, 0 successes) = 0, (~~3~~ 4, 1 success) = 1");
mock (&[1, 2, 3, 4, 5]);
assert_eq! (dice ("1d20 + max (repeat (1d20 + 1d20, 2))") .unwrap(), "(1)+max(5,9) = 10");
mock (&[1, 2, 3, 4]);
assert_eq! (dice ("min (repeat (2d6 > 3, 2))") .unwrap(), "min(0,1) = 0");
In other words, you can do stuff like /r max (repeat (3d6, 2)) + min (repeat (3d6 > 3, 2))
.
from sidekick.
Great!
from sidekick.
Works great in discord... are you going to add this to the readme?
from sidekick.
Yep, I think I've added a short mention of it already.
from sidekick.
Related Issues (20)
- Rollbot down for at least 5 hours. HOT 1
- Option for Self-Hosting HOT 1
- No response HOT 2
- Bot not working HOT 2
- Bot is down HOT 4
- It is not working properly. HOT 5
- sidekick stopped responding HOT 1
- Online but No Response HOT 2
- Bot Down/Offline HOT 1
- [Feature request] Floor and ceiling for rolls
- initiative
- More Awesome Dice Roller Found [Feature Request]
- 3sec gif before showing roll result HOT 2
- Severs canβt connect to Sidekick HOT 1
- Sidekick offline for a day now HOT 2
- Open source Sidekick HOT 1
- Is it not coming back? HOT 1
- Merge Sidekick into another bot? HOT 5
- Development permanently halted?
- Source code? HOT 1
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 sidekick.