Discovery Gaming Community
[FLHook] Dice rework - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Discovery Development (https://discoverygc.com/forums/forumdisplay.php?fid=7)
+--- Forum: Discovery Developers Forum (https://discoverygc.com/forums/forumdisplay.php?fid=183)
+---- Forum: Discovery Unofficial Development (https://discoverygc.com/forums/forumdisplay.php?fid=389)
+----- Forum: Discovery Mod FLHook Projects (https://discoverygc.com/forums/forumdisplay.php?fid=266)
+----- Thread: [FLHook] Dice rework (/showthread.php?tid=159279)



[FLHook] Dice rework - Remnant - 03-21-2018

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)

[Image: diceroll.png]
*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 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 @Alex. 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.





RE: [FLHook] Dice rework - JorgeRyan - 03-21-2018

Are you telling me we could start playing Daimyos and Dragons in the game now?

Sweet Smile


RE: [FLHook] Dice rework - Enkidu - 03-21-2018

You mean Donaus and Derilicts?


This will be a great feature. Huge potential in it to expand the casino role.


RE: [FLHook] Dice rework - Remnant - 03-21-2018

(03-21-2018, 02:38 AM)Tænì Wrote: This will be a great feature. Huge potential in it to expand the casino role.

If this is looked at from a Casino tool, would you say that it'd be appropriate to show the individual rolls to EVERYONE instead of just the roller, then?
That way if you have games where it requires 2 dice to be rolled, you'd want all players to see the individual dice values.

I hid that part initially as I didn't want to clutter up the chat too much, although I suppose if it's abused the admin team can deal with people.

Should I make an adjustment so everyone can see all of the text?


RE: [FLHook] Dice rework - Vexykin - 03-21-2018

I literally wished couple hours ago for somebody to remake the Casino RP on Discord. I remember times where there were Luxury Yachts in front on Manhattan doing very awesome Casino RP

This is giving me more hope Smile
Fyi, i don't like gambling that much...But i always saw that as an awesome Roleplaying way in Freelancer.

Keep it up!


RE: [FLHook] Dice rework - Enkidu - 03-21-2018

(03-21-2018, 04:25 AM)Remnant Wrote:
(03-21-2018, 02:38 AM)Tænì Wrote: This will be a great feature. Huge potential in it to expand the casino role.

If this is looked at from a Casino tool, would you say that it'd be appropriate to show the individual rolls to EVERYONE instead of just the roller, then?
That way if you have games where it requires 2 dice to be rolled, you'd want all players to see the individual dice values.

I hid that part initially as I didn't want to clutter up the chat too much, although I suppose if it's abused the admin team can deal with people.

Should I make an adjustment so everyone can see all of the text?

If everyone can see the roles, would also be good for a hypothetical Ingame D'n'D scenario. Say, resolving the outcome of an RP boarding Operation, which happens more often than you might think.


RE: [FLHook] Dice rework - Remnant - 03-21-2018

Alright. I'll swap the function out so it's visible to everyone.
If staff grumbles, maybe down the line I'll just let them set if it should be personal, or public in a config or something.