• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community Discovery Development Discovery Developers Forum Discovery Unofficial Development Discovery Mod FLHook Projects
1 2 Next »
[FLHook] Dice rework

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

[FLHook] Dice rework
Offline Remnant
03-21-2018, 02:29 AM, (This post was last modified: 03-21-2018, 04:47 AM by Remnant.)
#1
Member
Posts: 2,206
Threads: 248
Joined: Apr 2012

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.


[+]Spoiler
Ps: Regex makes me sad.
Whoever wrote regex parsing was a madman.
Code:
wregex expr(L"(\\d{1,2})[Dd](\\d{1,3})(([+\\-*])?(\\d{1,5}))?");
Reply  


Messages In This Thread
[FLHook] Dice rework - by Remnant - 03-21-2018, 02:29 AM
RE: [FLHook] Dice rework - by JorgeRyan - 03-21-2018, 02:35 AM
RE: [FLHook] Dice rework - by Enkidu - 03-21-2018, 02:38 AM
RE: [FLHook] Dice rework - by Remnant - 03-21-2018, 04:25 AM
RE: [FLHook] Dice rework - by Enkidu - 03-21-2018, 04:43 AM
RE: [FLHook] Dice rework - by Vexykin - 03-21-2018, 04:42 AM
RE: [FLHook] Dice rework - by Remnant - 03-21-2018, 04:44 AM

  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2025 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode