03-21-2018, 02:29 AM
Hey there folks. At the moment, I can't tackle any large FLHook projects due to college classes, although I intend on tackling a few big projects as soon as summer rolls around. FLhook sounds like a scary way to keep busy.
Until then however, I'll tackle a few smaller projects that can be completed in a few hours. Because why not.
Dice Roll Rework
Basically: It's implementation of the classical 'xDy[+-]z' syntax for rolling dice. (1d20 | 4d8 | 1d100+3 | 40d20-3)
The command supports addition and subtraction as modifiers.
The regex which parses the command to see if you used the right syntax only allows up to 3 digit numbers for the dice size, and dice amount. It however allows up to 5 digits for the modifier value.
When will I see this ingame?
I can't say. There's just a few more bugs I want to fix before I make a github pull request. From there, it all depends on peer-reviewing, accepting the code changes, and giving the current admin team an updated version of playercntl.
I'll have the code changes up for the dev-team in a few hours, though.
Happy rolling!
If you've got any other ideas, toss toss this account a PM. Or post it somewhere.
Until then however, I'll tackle a few smaller projects that can be completed in a few hours. Because why not.
Dice Roll Rework
Basically: It's implementation of the classical 'xDy[+-]z' syntax for rolling dice. (1d20 | 4d8 | 1d100+3 | 40d20-3)
*Note: Only the user rolling the command gets the line explaining how everything was added up. No need to spam the chat with pointless numbers.
The line explaining how everything was tallied up is now displayed publicly as well.
That line will not be shown if it's too big. (ie: tons of dice being rolled at once)
The line explaining how everything was tallied up is now displayed publicly as well.
That line will not be shown if it's too big. (ie: tons of dice being rolled at once)
The command supports addition and subtraction as modifiers.
The regex which parses the command to see if you used the right syntax only allows up to 3 digit numbers for the dice size, and dice amount. It however allows up to 5 digits for the modifier value.
When will I see this ingame?
I can't say. There's just a few more bugs I want to fix before I make a github pull request. From there, it all depends on
I'll have the code changes up for the dev-team in a few hours, though.
Happy rolling!
If you've got any other ideas, toss toss this account a PM. Or post it somewhere.
Ps: Regex makes me sad.
Whoever wrote regex parsing was a madman.
Whoever wrote regex parsing was a madman.
Code:
wregex expr(L"(\\d{1,2})[Dd](\\d{1,3})(([+\\-*])?(\\d{1,5}))?");