Comments (16)
Are you sure of your example?
As far as I understood, rolling 77 after 3 temp pass, should give a temp pass.
51-95
After one temp pass it becomes
46-100 or 41-95
Second one:
36-95.
DiceParser won't be able to store previous rolls or values.
But it is possible to pass modificaters and compute appropriate range
from diceparser.
I went ahead and closed this as I found another solution using DiceParcer and Google Sheets.
To clarify. The temp pass or temp fail regions would never increase. Receiving those rolls increase the full pass and full fail regions.
!d100i[>95]{"full pass %1"}i[>50]{"temp pass %1"}i[>5]{"temp fail %1"}{"full fail %1"}
This is the base that it's using.
Using Google sheets i can set up ifs statements regarding cells that players can input how many temp passes and temp fails they have received.
Thus is they 2 temp fails and 3 temp passes the Google sheet will output the following
!d100i[>65]{"full pass %1"}i[>50]{"temp pass %1"}i[>25]{"temp fail %1"}{"full fail %1"}
For my players to use on the DiceParcer Bot.
The original idea was to see if it was possible to only use DiceParcer. Using the Macro Feature that allows you to submit 2 values that end up replacing values in the Macro. - The regular-expression
I played around with this and was able to figure out how it assigns the values. with the \1 and \2 in the example provided on the Documentation.
However I was unable to figure out a way for it to edit roll result even with the ability to have the macro enter \1 and \2 as the number of times you have temp passed for failed
This is why I defaulted to using a combination of DiceParcer and Google Sheets.
from diceparser.
The provided snippets are of the Google Sheet and the three formulas used for how I got my desired outcome.
from diceparser.
You are on the right way. Give me some time and I will go back to you with macro that make the use of Google sheet less important and useful
from diceparser.
Take your time. Thank you.
from diceparser.
this macro:
!macro ninja([0-9+),([0-9+) d100;5+\1*5;96-\2*5;$1i[<$2]{"full fail $1"}i[<51]{"temp fail $1"}i[<$3]{"temp pass $1"}{"full pass $1"} 1
to call it : "ninja0,0", "ninja2,3" ....
from diceparser.
This is perfect. It took a moment to understand why it wasn't working though. Seems a ] was missing after both the 9s.
Once I fixed that it worked perfectly.
Thank you so much
from diceparser.
There seemed to be some minor issues. However your code gave me an accurate example of how I can use the macro function. Thus I was able to reverse engineer it and change to numbers I needed to accordingly.
And thanks to your help I now know how to do this in the future should I ever need something complex like this.
Thank you So much
You are awesome!
from diceparser.
!macro ninja([0-9]+),([0-9]+) d100;5+\1*10;95-\2*10;$1i[>$3]{"full pass $1"}i[>50]{"temp pass $1"}i[>$2]{"temp fail $1"}{"full fail $1"} 1
the different is that the change is suppose to be by 10 and not 5. And I've set them in greater than order. Personal preference.
Functions the same.
from diceparser.
I do have another question. Is it possible to set it so nothing above a certain number is accepted.
The way this works that that have any number above 4 would essentially break the code.
And if you can limit it would it be as follows.
ninja([0-4]+),([0-4]+)
or
ninja([0-4]),([0-4])
?
from diceparser.
I think it is:
ninja([0-4]),([0-4])
the + at the end means "At least one or more"
from diceparser.
Thanks
from diceparser.
!macro ninja([0-9]+),([0-9]+),([0-9]+) d100+\3;5+\1*10;95-\2*10;$1i[>$3]{"full pass $1"}i[>50]{"temp pass $1"}i[>$2]{"temp fail $1"}{"full fail $1"} 1
I've seem to run into another issue that I can't seem to get past. The issue occurs if it's ran as a macro. Or if I simplify it as a regular dice roll
!d100+10;5;95;$1i[>$3]{"full pass $1"}i[>50]{"temp pass $1"}i[>$2]{"temp fail $1"}{"full fail $1"}
It seems that any modification to the dice rolls breaks it. I've tested this using the $ command as well. To have the dice roll in the first instruction and then edit the value in the second. Doing either results in this break. Where is just lists the numbers. I've included two screenshots to show this off.
If it isn't possible to edit the roll let me know as this limits other possible macros. Such as tests of strengths between players both using their buffs.
from diceparser.
!1d100+10;5;95;$1i:[>$3]{"full pass $1"}{$1i:[>50]{"temp pass $1"}{$1i:[>$2]{"temp fail $1"}{"full fail $1"}}}
from diceparser.
With more details, as you put +10 at the end of dice roll, it change the result type from dicelist to number. And the bare if expects a dicelist as previous node.
The : asks the ifs to evaluate on number value
from diceparser.
Thanks.
This worked wonders and I was able to put it to work on other macros. I appreciate all your assistance!
from diceparser.
Related Issues (20)
- Macros activated from comment (#) and sentence display ("") HOT 1
- Exploding Doubles HOT 1
- No valid value at index HOT 5
- Question re: Syntax for an IF statement based on an Entered Number and a Dice Roll. HOT 2
- Bot stopped working with Discord's latest version HOT 6
- Prefix not working HOT 3
- All dice prefix commands not working HOT 3
- Diceparser not working with webhook
- DiceParser not working September 2022 HOT 1
- /r works but ! does not HOT 5
- Help Noob please! Bot Setup steps for RPG HOT 2
- Weird handling of numbers in lists
- Bot frequently does not respond
- Bot Not Responding In Any Server
- bot does not allow users below the rank of admin to roll HOT 3
- Broken example in HelpMe.md HOT 1
- List weight doesn't seem to work
- Dice Parse offline? HOT 2
- Ambiguous licensing HOT 1
- Discord bot privacy information
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 diceparser.