Code Monkey home page Code Monkey logo

diceparser's Introduction


Table of Contents    Rolisteam | Downloads | Get Involved | Community | Translation | Road Map | License | CI System


build status

Rolisteam

Rolisteam helps you to manage a tabletop role playing game with remote friends/players. It provides many features to share maps, pictures and it also includes tool to communicate with your friends/players. The goal is to make Rolisteam-managed RPG games as good as RPG games around your table. To achieve it, we are working hard to provide you more and more features. Rolisteam is released under GPLv2.

Downloads

-Latest full release : https://rolisteam.org/download.html

Get Involved

Remarks and requests ? Feel free to add a new issues or clone the project and submit some pull requests. https://invent.kde.org/rolisteam/rolisteam/-/issues

Community

Want to discuss and share your resources ? Join our Discord ! https://discord.gg/MrMrQwX

Mailing list

We also use this mailing to speak technical issues or roadmap. https://mail.kde.org/mailman/listinfo/rolisteam

Facebook

https://www.facebook.com/rolisteam?_rdr=p

More details to contact us: https://rolisteam.org/contact.html

Documentation

Documentation can be found here : https://doc.rolisteam.org/

Build Rolisteam (Windows)

Please visit: https://doc.rolisteam.org/en/windowscomp.html to get information about rolisteam compilation.

Build Rolisteam (Mac OS X)

Please visit: https://doc.rolisteam.org/en/compmacos.html to get information about rolisteam compilation.

Build Rolisteam (Linux)

Please visit: https://doc.rolisteam.org/en/linuxcomp.html to get information about rolisteam compilation.

Official Web site

https://rolisteam.org/

Translation status

Rolisteam on Transiflex


Rolisteam translations

Road Map

https://docs.google.com/spreadsheets/d/18jDGViuOm6KjqEAumW1RU2qccQQ4-TxiXPtAg0X_M2o/edit#gid=769324568

License GPLv2 License

Rolisteam is free software, licensed under the GPLv2.

diceparser's People

Contributors

fahall avatar gissu avatar hermesiss avatar jftanner avatar liesinwait avatar patrickelectric avatar tcanabrava avatar yurchor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diceparser's Issues

how to roll several dices each is max of 2?

rule state sthat player rolls 3d10+2, and for each of that dices players throws 2 dice and select max.
e.g.
first roll: 4,2=4
second roll: 1,10=10
third roll: 9:9=9
and expected sum 4+10+9+2 = 25

i tried
!2d10k1;2d10k1;2d10k1;mk1
but no sesponse from bot

!2d10k1;2d10k1;2d10k1;$1+$2+$3+2
# 4,10,10,26
Details:[2d10k1;2d10k1;2d10k1;$1+$2+$3+2 (4 - 9 - 3 - 10 10 4)]

this work but it is pretty inconvinient to write (akso first 3 results are redundunt) , especially if there will be more dice. Is there more correct way to solve such problem?

Operator "a" don't stack

Hello,
In the dice system I use with friend, when a D10 make a 10, you re-roll it if you make a 10, and add the result. This operation is done endlessly.
Example: I need to roll 5 dices. I get:
1 2 10 10 10
I got some 10, I re-roll them:
- - 4 10 10
What a lucky bastard I am! Still some 10 to re-roll:
- - - 2 8
Now it's ended.
I would like to be able to have rolisteam displaying:
1 2 14 [10,4] 22 [10,10,2] 28 [10,10,8]

So I tried to do (I give the following command with 1d2 to make it more obvious to test:
!1d2a[=2](1d2)
The possible result are 1, 3 [2,1], 4 [2,2]
It's working so far. But if I try to make it chain, I wasn't able to do it:
!1d2a[=2](1d2a[=2](1d2))
This pattern never roll the third dice, even if I got 4 [2,2] witch should be either 5 [2,2,1] or 6 [2,2,2].

And even if it was working, it is still not optimum since this mean that I still need to re-write the pattern multiple time to be sure that a dice can be re-rolled enough time (I will create an alias anyway, so it's not such a big deal). Ideally I would love to have a A operator to apply the add on the result, so the following command would exactly match our dice system:
!1d10A[=10](1d10)

Feature Request: List Aliases

Is it possible to add !alias list to list aliases similar to !macro list? Right now, AFAIK, the only way to know what aliases are added are to remember them the old fashion way.

If it matters, I primary use the diceparser on discord. Let me know if I can provide any other info.

segmentation fault

hi,
I was trying a way to use dungeon and dragon critics (if the dice is 20, then add 10 to the result for example), and during that process, I've found the following command that create a segmentation fault:

./dice '8D20+10*@c[=20]'

I am on the commit 7ce5a4a (used by rolisteam current version).

Since the '@' in not explained in the documentation, I'm not sure of what it does, so I don't know if it is a syntax error, or a anything else.

Furthermore, is there a way to say "make action X if condition C", like "role 6 dices of 20 faces, then add 10 to the result for any 18 or more on the dices".

You can respond either in French or English, as you prefer!

On Discord, !macro doesn't work?

Bot looks amazing - but I can't get macros to work. I haven't changed prefix or anything, just invited it to the server.

Any ideas? I see Issue #19 looks related, but no resolution was given there.

diceerror

Problem with expression and 'c' operator

!d20c[>0]
As expected this is always 1 because result is always >= 1.
The same should be for
!d20+3c[>0]

but result is always 0

0

Details:[d20+3c[>0] ()]

It seems a bug. Also if it's written in equivalent form:

!d20+3;$1c[>0]

5,0

Details:[d20+3;$1c[>0] (2)]

Discord Compatibilty

Far as i can tell, the only thing that actually works for discord involving this is... rolling many dice at once.

Everything else, arithmetic, your various code modifiers, all of it seems broken and incapable of doing anything, even gave the bot full admin access, nothing.

Use code block on Discord to list macro

When you ask macro list, if you have a macro using several if*[condition], it results in a formatting text in italic, preventing you to copy the macro and modify it easily.

Warning with comments

Recently Diceparser is throwing warning messages due to extra comments, despite the comment being behind a # character:

image

image

also tried with space after #:

image

to confirm: Dec 18, @9 pm EST it was working fine, warnings started *am EST, Dec 19.
Seems something changed between there?

Discord: "playing" message?

Hi,
A relatively small request, I hope, but it'd be great if we could set a "playing" message when using DiceParser on Discord. It's not really important, but it'd be cool to have :)

More than single-digit regular expressions?

I have recently created a macro to simulate the stress-die mechanics of Ars Magica, but have not been able to make it work beyond [0-9]. Is it possible to code a macro to allow for double-digit regular expressions? I have tried using (.) in the macro, but it does not work.

Curly brace artifact in output code

For $X{Y}, where X>=10 && Y is any, an excess '}' is generated after normal output.

Example:
Expected output of $15{3} might be 006 but instead outputs 006}

Thanks

trim spaces

!macro ([0-9]+)s([0-9]+) \1d10;$1c[=10];$2i:[>0]{$2d5};$1+\2;"normal damage $4, critical damage $3" 1
!macro ([0-9]+)s([0-9]+) \1d10;$1c[=10];$2i:[>0]{$2d5};$1+\2;"normal damage $4, critical damage $3" 1

there is an extra space in first command (which is not very visible in discord text
if i run first command and then request macro list macro will be

id: 2 Pattern:  Command: ([0-9]+)s([0-9]+) \1d10;$1c[=10];$2i:[>0]{$2d5};$1+\2;"normal damage $4, critical damage $3" Regexp: True

instead of

id: 3 Pattern: ([0-9]+)s([0-9]+) Command: \1d10;$1c[=10];$2i:[>0]{$2d5};$1+\2;"normal damage $4, critical damage $3" Regexp: True

can you please trim spaces?

use of undeclared identifier 'diceList' in cli/main.cpp

I was interested in building this myself to use the CLI dice roller, but I ran into a problem compiling it:

$ make
[  1%] Automatic MOC and UIC for target irc
[  1%] Built target irc_autogen
[ 48%] Built target irc
[ 50%] Automatic MOC for target dice
[ 50%] Built target dice_autogen
[ 51%] Building CXX object cli/CMakeFiles/dice.dir/main.cpp.o
/Users/ryan/src/DiceParser/cli/main.cpp:309:40: error: use of undeclared identifier
      'diceList'
                resultStr.replace("%2",diceList.trimmed());
                                       ^
/Users/ryan/src/DiceParser/cli/main.cpp:347:20: warning: enumeration value 'BOT' not
      handled in switch [-Wswitch]
            switch(format)
                   ^
/Users/ryan/src/DiceParser/cli/main.cpp:347:20: note: add missing switch cases
            switch(format)
                   ^
1 warning and 1 error generated.
make[2]: *** [cli/CMakeFiles/dice.dir/main.cpp.o] Error 1
make[1]: *** [cli/CMakeFiles/dice.dir/all] Error 2
make: *** [all] Error 2

This appears to be in the startDiceParsing function. Looking at the code, I don't see a diceList variable declared anywhere in the function. Furthermore, the lines before and after this line refer to stringResult while this line refers to resultStr, which makes it look out of place. So I suspect that this is a mistake in the code. Unfortunately, I'm not familiar enough with the codebase to know how to fix this myself.

I'm using commit 48de810, the latest master at time of writing.

Bugs with multi-term expressions

When I roll an expression that has more than one kind of dice in it, the result doesn't clearly specify which type of dice is which:

$ dice 'd6+d8'
Result: 9 - details:[d6+d8 (d:(3) - d:(6))]

It looks like the d: terms are supposed to have a number after "d", and looking in DisplayToolBox::diceToText(), there seems to be code to interpolate the face numbers, so I'm not sure why they aren't showing.

In addition, it seems that multi-term expressions are not consistently evaluated correctly. For instance:

$ dice 'd4+d6+d8+d10+d12'
Result: 4 - details:[d4+d6+d8+d10+d12 (d:(2) - d:(2))]
$ dice '((3+4)*2)d6'
Result: 7 - details:[((3+4)*2)d6 ()]

In the first case, it appears that only the first 2 dice expressions are used, and in the second case, the "d6" term is ignored entirely. However, modifying these expressions by adding a leading constant term causes them to be evaluated correctly:

$ dice '0+d4+d6+d8+d10+d12'
Result: 23 - details:[0+d4+d6+d8+d10+d12 (d:(3) - d:(6) - d:(7) - d:(1) - d:(6))]
$ dice '(0+(3+4)*2)d6'
Result: 59 - details:[(0+(3+4)*2)d6 (3 5 4 2 6 3 5 6 5 6 5 2 6 1)]

[design question] how are stored aliases

Hello,

[ I'm not sure where I should post this ]

I try to search both in the code and the documentation, and I didn't found how alias are exactly stored. I think currently they are hard-coded (at least the are two aliases for l5r in cli/main.cpp (l.206), but since it's possible to directly add new one inside from rolisteam, I guess that their are other input ways.

Do you plan to implement a way to give an external text file that as an input of diceparser as one point? That way it would be really easy to import/export/modify/share aliases for rolisteam. I don't use the other channels (like slack and twitter) so I don't know if a text file it's a good universal solution for all the uses cases of diceparser. If you think it could be a good idea I can implement it, I just would like to know what format you prefer. I think it would make the code cleaner by removing all hard-coded aliases.

Since you handle two syntax (regular expression and standard replace, maybe an ini style is the best:

[ replace ]
# A comment.
l5r => D10k      # another comment
L5R => D10K
[ regex ]
(.*)wod(.*) =>\1d10e[=10]c[>=\2]-@c[=1]
[ replace ]
# you can use multiple time the same section
DF => D[-1-1]

Remarks:

  • For the section, I don't think that "replace" is ideal, but I don't have better ideas yet.
  • Maybe it's problematic to allow comments on the same line than aliases if we want to be able to use "#" in the alias (especially inside double quotes block).
  • I chose the double arrow as separator since currently this pattern is invalid in the grammar, so we don't have anything to escape. It's just a suggestion, maybe you have something better.
  • This is sincerely just a suggestion, if you have a better idea or if you already implemented something, please share it.

Request: Expand Functionality in $x to allow specifing number of digits for output

This is mostly in reaction to wanting better control over spacing in the outputs.
I will use my exact use-case as an example for this request:

I would like to be able to use this format
!4d6k3;4d6k3;4d6k3;4d6k3;4d6k3;4d6k3;"[$1, $2, $3, $4, $5, $6]"
But with the ability to specify # of digits in the output.
i.e. if $1 is 8, $1{2} would produce 08, allowing each item to be the same number of digits.

I'm currently using a work-around to place a '0' in front of a single digit output:
!4d6k3;4d6k3;4d6k3;4d6k3;4d6k3;4d6k3;$1i:[<10]{"0$1"}{"$1"};$2i:[<10]{"0$2"}{"$2"};$3i:[<10]{"0$3"}{"$3"};$4i:[<10]{"0$4"}{"$4"};$5i:[<10]{"0$5"}{"$5"};$6i:[<10]{"0$6"}{"$6"}
Unfortunately, doing it this way this prevents me from formatting my output to look like the example above [XX, XX, XX, XX, XX, XX]

Would it be possible to implement a way to arbitrarily increase the number of digits in an integer output?
Perhaps using the aforementioned format of $X{Y} where Y is the number of digits to display

Thank you

repeat instructions

Feature request:
Add the ability to reference groups of instructions rather than their results, or add the ability to repeat groups of instructions.

First, let me illustrate a situation in which this would be useful: right now it is possible to write something like (1d2)d8 to randomly roll either one or two d8. While the if operator grants a little more flexibility, it still doesn't generalise very well - if I wanted a macro AmacB to roll a D8 up to A times and add B to each result, I've got no idea how I'd accomplish this using the current system as nothing like A(d8+B) isn't a correct command, and I don't know beforehand how many if statements I'd need.
A simpler example: critical damage is ruled amongst our group to roll twice the dice and add twice the modifiers. I know this is simple enough to not really need a macro, but I still wanted to write one that could be used like 4d6+3crit that would simply duplicate all the previous instructions (4d6+8) then add both results.

In this case it was actually useful to grant two examples, because the simpler example could be solved with a simpler solution:
If we had a new variable notation, similar to $1, $2, ... that would re-run all the instructions rather than copying the result, the second example would be easily solved - plus it'd be useful shorthand in general (for example, a macro to run stats wouldn't need have the full command written out for each stat).
This still wouldn't solve the other problem though, for which I propose a new operator: the repeat operator. It is written after some (parenthesised) instructions and followed by a number (or something that evaluates to a number), and simply repeats these instructions and aggregates the results in a list. Bonus with this approach is that that list could then be further manipulated with dice operators such as keep to gain a lot of expressivity.

Note also that others have had similar problems before, such as #27 also essentially needed/wanted to get a list of results of 1d10+5 then perform dice operations on it.

In general this is a very good bot (and pretty well documented, props to that), which is the only reason I care enough to write this. There have been some other minor things that I might be writing issues for later, but this has been the one I'm missing the most.

Sincerely

  • Joren

For loop?

Is there a way to do a for loop?

20th anniversary WoD rules have 10s on specialties counting as 2 successes and 1s taking the whole dice away.

I.e. a 4d10 that throws 1,1,10,10

Should be 0 successes as the ones cancel the tens even if they have specialties.

What I tried doing was a for roll that for each one it would take one successful result starting from the lowest number to the highest

A Multiple Success/Failure Level Dice Roll?

Hi Guys

I wonder if someone can help with this dice roll dilemma of multiple success/failure levels?

In our game of Trudvang Chronicles RPG, the d20 is rolled against the following ...

1 (or 2 Hwitalja) = Perfect success.
≤ SV = Success.
> SV = Failure.
20 = Fatal failure.

... so, I'd like to reflect this in my dice roll, with the SV being passed as a changing parameter number?

Any refs to this at all or suggestions? I'd like the dice roll to display the txt message result, eg "Perfect success" if a 1 or 2 is rolled.

Advice/pointers appreciated ... Walts

Bug with comment

I've defined a macro and use a simple !1d20 # supercherie
Here is the response i got.
Capture d’écran 2019-12-11 à 10 24 54

Aliases are removed

This is a great bot for a game I'm running on discord, but whenever I create new alias commands they seem to stop working after a few days and I end up having to remake them. Is this intentional? It would be convenient if they could remain permanent until removed by the users

crash with "a" operator

Hello,
The following command make rolisteam crash on my pc (from rolisteam 1.8.2 on windows installed from your official installer):
!1a[=1]1

How add modifer to total sum in multi instruction?

Hello, i am looking how to resolve following problem.
player have to roll 2d10+5, on each roll of 10, extra d5 have to be thown and their sum recorded to.
without addition it is pretty simple

2d10;$1c[=10];$2d5
# 13,1,5
Details:[2d10;$1c[=10];$2d5 (10 3 - 5)]

I want to add extra +5 to sum of 2d10
!2d10+5;$1c[=10];$2d5
but bot dos not respond.

[syntax suggestion] about string result

Hello,
I saw that you added really recently the string result feature. It's a really great idea.

If I may do a suggestion, I don't think that the % syntax is really useful. For reference:

    %1 : last scalar result from each instruction.
    %2 : all dice results
    %3 : last scalar result from the last instruction.

However:

  • %1 can already be accessed with "$1, $2, $3" (if their is 3 instructions)
  • %2 is really useful, but don't get access to the details of each instructions
  • %3 can already be accessed with "$3" (if their is 3 instructions)

I suggest the following syntax modification: keep the $ syntax, and change the %syntax to give the detail of the corresponding instruction. Example:
2d6;3d4*10;4d20*100
Current Result:
Result: 8,50,4300 - details:[2d6;3d4*10;4d20*100 (4,41,1,317,15,8,3)]
By the way, it's buggy currently, their is no comma between instructions. Let's assume the current result is (EDIT: I fixed it in PR #9):
Result: 8,50,4300 - details:[2d6;3d4*10;4d20*100 (4,4,1,1,3,17,15,8,3)]
Then, the following query 2d6;3d4*10;4d20*100;"$1 [%1] - $2 [%2] - $3 [%3] would give:
8 [4,4] - 50 [1,1,3] - 4300 [17;15;8;3]
And the current result could be obtained with
Result: $1,$2,$3 - details:[%1,%2,%3]

As an addition, $0 could be the great total (4358 in our example) and %0 could be the details of all dices (%2 in the current syntax, %1,%2,%3 with my proposition).

I will try to implement this feature in the next days, but since it's not backward compatible, I preferred to contact you immediately. I generally never do non-backward change in interface, but since it was introduced extremely recently, I think it's still time to update the syntax.

DiceParser Installation ... an I missing something (for macro's to work?)

Just installed the DiceParser to my new channel, but the macro commands aren't working?

I've been playing about with macro's on someone else's channel and rather than muck
theirs up any more, have created a new one of my own to play about as I please.

So, one of the macro's I know works on the other channel, but doesn't work on my
channel for some reason ... am I missing something when I first installed it today?

Thanks, Walts

Core dump with "g" operator

Hello, I was reading the documentation, and I don't understand what the Group operator is supposed to do. Can you please explain me what it is supposed to do?

I tried to test it, but I always got a core dump:

#0  0x00007ffffddc6c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffffddca028 in __GI_abort () at abort.c:89
#2  0x00007ffffedd5655 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffffedd2454 in qt_assert(char const*, char const*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x000000000045e85a in QMap<long long, DieGroup>::first (this=0x7ffffffdda50) at /usr/include/qt5/QtCore/qmap.h:403
#5  0x000000000045c895 in GroupNode::getGroup (this=0x6afff0, values=...) at /home/robin/DiceParser/node/groupnode.cpp:266
#6  0x000000000045ba8c in GroupNode::run (this=0x6afff0, previous=0x6ad550) at /home/robin/DiceParser/node/groupnode.cpp:88
#7  0x000000000044e047 in DiceRollerNode::run (this=0x6ad550, previous=0x6ad030) at /home/robin/DiceParser/node/dicerollernode.cpp:61
#8  0x00000000004554ad in NumberNode::run (this=0x6ad030, previous=0x0) at /home/robin/DiceParser/node/numbernode.cpp:48
#9  0x0000000000433553 in DiceParser::start (this=0x7ffffffddf20) at /home/robin/DiceParser/diceparser.cpp:286
#10 0x0000000000464651 in startDiceParsing (cmds=..., treeFile=..., withColor=true, format=TERMINAL) at /home/robin/DiceParser/cli/main.cpp:213

Discord bot data into database

The bot takes about 5 G of ram because loading all its data. As it has 20 shard. 20 x its data = 5G.

I want to put prefix setting, macros and aliases into mysql database. It will reduce the memory usage and improve the concurrency and probably fix issue like #50

cancelations on small valaues

I have problem that following schema is often cancelled on discord bot
!Xd10;$1c[=10];$2d5

it generally works when X>=6, and does not work if X <6 or X>= 10
note there is no response for results 2,3,4,5 and that behaviour pretty consistent

- discord

Another macro issue

I've been able to add and remove macros thanks to your help, but now it seems that i can't get it to work with multiple instructions like shown here. Here is another image from my work
macro bug. Thanks so much for your quick turn around. You are amazing!

Comment & Result displayed on one line?

Is there a way to have the Comment & Result displayed on one line?

This was my die roll: !1d20i:[<11]{"Success: %1"}{"Fail: %1"} # Slough Perception (SV 10 + PER) Roll

... and this is how it came out, in two lines ...

Slough Perception (SV 10 + PER) Roll
Success: 5

... so, I'd be looking for this (one line) type of output ...

Slough Perception (SV 10 + PER) Roll :|: Success: 5

Feedback, thoughts, ideas always appreciated! ... Walts

Rollback?

Unsure if this was intended. The servers I use this on seem to have had their bots rolled back. Newer macros are missing from !macro list, some formulas don't seem to work, & recent changes/additions/improvements you've made are no longer there.

Sorry if you're already aware of this.
Thank you again for your efforts!

Command fails

./bin/dice 10d10e[>=8]

boolean validator does not work anymore.

./bin/dice 1d100000e[10-10000000000]

the second part of range is two big.

Discord: broken examples in HelpMe.md

I have tested in Discord all examples (except really large ones) from https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md
Some are broken

  • 10d10o (and others in Occurence) - Warning: Unexpected character at 5 - end of command was ignored "o" implemented missing feature
  • 4d6e6u6k3 - Warning: Unexpected character at 6 - end of command was ignored "6k3" fixed
  • 8d10;$1c[>6];$1c1;$2-$3i:[>0]{"%3 Success[%2]"}{i:[<0]{"Critical fail %3 [%2]"}{"Fail %3 [%2]"}}" - Warning: Unexpected character at 96 - end of command was ignored """ fixed

New Feature Request: Support for Tunnels and Trolls DARO/TARO

A feature to consider:
The game system Tunnels and Trolls has a thing similar to exploding dice, but slightly different. It's doubles and triples of the same value rolled get added and rolled over.

If possible, would be a nice feature to add.

Assistance with a Macro

I'm still rather new to DiceParser and I haven't quite figured out how to use it. From my understanding it can create some complex dice rolls and that's what I'm hoping for.

In a group I have we created a custom mind control effect with the following
Roll 1d100
1-5 : full fail
6-50 : temp fail
51-95 : temp pass
96-100 : full pass
However on each temp fail or temp pass it increased that full section by 10.
so 1 full pass changes the full pass to 86-100 and the temp pass to 51-85

I'm wondering if it would be possible to use a macro to list how many temp passes and fails you have thus far and have the string adjust what numbers would result in the new roll
thus when it's 0 for both and you roll a 51 it spits out Temp Pass.
But if you have it at 3 temp passes when you run the macro and roll a 77 it will spit out full pass and not temp pass.

This might be unrealistic. However I'm not quite sure as I'm unsure of the capabilities of the Macro Function.

Thank you for your time.
Also. If anyone has any good videos or sources to better explain the Macro Function I'd appreciate it. I can't seem to find any.

Discord: DiceParser not working in one server yet working in [4] others

I'm in this RP server with 20+ people and we use the bot in order to determine hits and damage similar to DnD. However, the bot has stopped working in one server in particular, while it still works in at least four other servers. It has been like this for four hours now.
We have tried kicking the bot, waiting a while, and adding it back into the server and it doesn't change anything. The support command still works but that seems to be the only thing. Is there a way to fix this issue?

Creating a list of constant: `m` give wrong results / core dumps, parenthesis with multiples sub-expression either

I was trying to write unit test, and I was searching a was trying to find the best way to have deterministic test (I would like to use constant instead of dices to test the operators).

I don't this issue need to be fixed now, I just would like to have a workaround.

$dice "3;4;5;1;ms"
zsh: segmentation fault (core dumped)  ./*/bin/dice "3;4;5;1;ms"

With d1 instead of constant it doesn't work either:

$dice "3d1;4d1;5d1;1d1;ms"
zsh: segmentation fault (core dumped)  ./*/bin/dice "3d1;4d1;5d1;1d1;ms"

I tried removing the ; before the m. The m operator dosen't do his job

$dice "3;4;5;1ms"
Result: 0 - details:[3;4;5;1ms ()]

At least the d1 version works (but it's obviously what I want to do)

$dice "3d1;4d1;5d1;1d1ms"
Result: 13 - details:[3d1;4d1;5d1;1d1ms (1 1 1 1 1 1 1 1 1 1 1 1 1)]

So I tried to do it with the L dice

$dice "L[3];L[4];L[5];L[1]"
3 ; 4 ; 5 ; 1
$dice "L[3];L[4];L[5];L[1];m"
zsh: segmentation fault (core dumped)  ./*/bin/dice "L[3];L[4];L[5];L[1];m"

But unfortunatly, m don't works with list, it look like

$dice "L[3];L[4];L[5];L[1]m"
1

Btw, I also tried to use parenthesis instead of m, and it's not working as expected

$dice "(3;4;5;1)s"
Result: 3,4,5,1 - details:[(3;4;5;1)s ()]

New feature: documented macros

Adding a new parameter to the macro recording command to add some text could help to ease macro readability.

Idea 1: adding just a comment

!macro F [-1-1]s 0 # Fudge

!macro list
id: 0 Pattern: F Command: [-1-1]s Regexp: False Comment: Fudge

Idea 2: adding specific keys and values

!macro F [-1-1]s 0 Name=Fudge

!macro list
id: 0 Pattern: F Command: [-1-1]s Regexp: False Name: Fudge

macro list & discord character limit

This is likely more of a Discord issue than a DiceParser issue, but it affects DiceParser.

!macro list no longer shows up on our server when the command is entered. This started happening after adding a macro to an already long list of macros. Removing that macro allows !macro list to display correctly again.

I have recently learned that Discord has a character limit of 2000, so this may very well be the reason that !macro list does not show after adding too many macros to the list, going past the cap.

I don't know if Discord will ever extend this limit. Would you be able to implement something to detect when !macro list is too long to display on Discord and instead output it across multiple messages?

Hey, I have a question about qtquickcompiler to ask

I saw you add a line #find_package(Qt5QuickCompiler) in CMakeLists.txt.
I am trying to import QtQuickCompiler into my project but I cannot find Qt5QuickCompiler.cmake
So weird, so i wanna know can you use that ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.