Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: DiceServ - dice rolling pseudo-client - Testers needed!  (Read 5915 times)

0 Members and 1 Guest are viewing this topic.

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
DiceServ - dice rolling pseudo-client - Testers needed!
« on: June 06, 2011, 12:04:53 AM »

I have created a module for Anope called DiceServ, inspired in part by the RPGServ module on the Caelestia.net IRC network (although I got my inspiration more from an older version running on MagicStar).  The module is a dice rolling pseudo-client.  It can do basic dice rolls, but it can also handle very complex syntax as well.  It has support for the math constants of e and pi, it supports many math functions, it can handle addition, subtraction, multiplication, division, powers (using ^), and modulus, it does implicit multiplication and unary minus (negative numbers), can handle percentile dice, can roll multiple sets at once, has an extended roll feature to display the individual results of each roll set, calc functions for non-rounding, specialized rollers for D&D3e character creation and Earthdawn's step system, ability to trigger through BotServ fantasy, and an ignore system to allow channel owners (as well as channel operators if enabled, applies to the whole network) to prevent abuse in their channels and Services Operators to prevent users from abusing it.

What I need is for people to use the module and test it out, from a user standpoint, from a channel owner and/or operator standpoint, and from a Services Operator standpoint.  I am also looking for suggestions in addition to bug fixes, both from coders and non-coders alike.  This includes if you want support for more specialized dice rolls or other math functions.

The module has been made in 6 flavors: Anope 1.8.x (I have been compiling with 1.8.0, and it should work with all versions of 1.8.x, it may work with 1.7.x but I do not support that), Anope 1.9.0 (including 1.9.0-p1), Anope 1.9.1 (including 1.9.1-p1), Anope 1.9.2 (including 1.9.2-p1 and 1.9.2-p2), Anope 1.9.3-p1 (but NOT including 1.9.3, that version is broken and DiceServ does not function with it), and Anope 1.9.4.  In case anyone wonders why I still have versions for many of the earlier 1.9.x releases, it's because I wish to have wide support for the module, and in addition, it allows me to see what's changed between the various 1.9.x versions.

(If you plan on loading the module after starting Anope, you can ignore the following, but keep it in mind in case you do decide to load it at startup later.) The 1.8.x version needs to be added to ModuleDelayedAutoload to function properly.  The 1.9.x versions can be loaded through the module blocks.  See the module's source code for a directive block in case you wish to change the default settings.

A big note: The 1.9.0 version may leak memory due to a lack of code events for handling nick and channel dropping correctly.  Anope 1.9.1 added events for those, and thus all 1.9.x versions past 1.9.0 are free of those memory leaks.

As mentioned in a lower post, some Linux distros do not include the math library in a default compile, but other *nix OSes such as FreeBSD do.  If the math library is not compiled into Anope as well as the module, Anope will crash when you try to use DiceServ due to unresolved dependencies.  To remedy this, you need to include -lm with the LDFLAGS when configuring Anope.  For 1.8.x and 1.9.0, this can be done via the environment.  For 1.9.1 and later, the library should be found automatically so nothing extra needs to be done for them.

The module may be downloaded from the following 6 URLs:

Anope 1.8.x: http://kirby.cyberbotx.com/diceserv_1.8.c
Anope 1.9.0: http://kirby.cyberbotx.com/diceserv_1.9.0.c
Anope 1.9.1: http://kirby.cyberbotx.com/diceserv_1.9.1.c
Anope 1.9.2: http://kirby.cyberbotx.com/diceserv_1.9.2.c
Anope 1.9.3: http://kirby.cyberbotx.com/diceserv_1.9.3.cpp
Anope 1.9.4: http://kirby.cyberbotx.com/diceserv_1.9.4.cpp

If I get enough feedback on this, I will release it on the module site, but I feel it needs testing before I release it there.
« Last Edit: June 08, 2011, 12:30:28 AM by Naram Qashat »
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #1 on: June 06, 2011, 07:09:09 AM »

Great post CBX, should also add here that this module is also used on SorceryNet for their Gameserv for users :)

Logged

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #2 on: June 07, 2011, 01:17:16 AM »

One major thing I need to mention, actually.  It seems that many Linux distros do not include the math library in a default compile (whereas FreeBSD automatically includes it).  So when configuring Anope, you need to tell it to include -lm with the LDFLAGS.  For 1.8.x and 1.9.0 this can be done by setting LDFLAGS via the environment, for 1.9.1 and up, it should be detected automatically so nothing extra needs to be done.  If you do NOT do this, then Anope will crash due to unresolved dependencies.  This is not a bug in the module but a symptom of shared libraries not resolving their dependencies when compiled.
« Last Edit: June 08, 2011, 12:30:57 AM by Naram Qashat »
Logged

Han

  • Contributor
  • *
  • Offline Offline
  • Posts: 34
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #3 on: June 07, 2011, 05:03:36 AM »

I had add an Alias for DiceServ in the Unreal conf.

#Diceserv
alias DiceServ { type services; };
alias DS { nick "DiceServ"; type services; };
It's easier to comunicate with the DiceServ now, imho

Greet Han`
Logged

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #4 on: June 07, 2011, 02:13:04 PM »

Well yeah, but that's to be assumed since any IRCd that supports aliases will need to have an alias set up to use DiceServ via either /diceserv or /ds, same as any other Anope service. :P
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #5 on: June 30, 2011, 03:42:50 PM »

I didn't see anything in your table that supports D&D's D20 system which uses NdN[+/-N] for example A very old silver dragon can have 40d12+400 Hit Points and does 24D8 damage.

I'm interested in the module for a uber secret project I'm working on, but want to insure this format is supported.

Dice available is also: d4,6,8,10,12,20,50 and 100
« Last Edit: June 30, 2011, 03:46:22 PM by katsklaw »
Logged

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #6 on: July 06, 2011, 07:44:41 PM »

I don't see why you would need a special command for that.  Standard dice rolls can be done via the ROLL and EXROLL commands.  So for instance, a simple D&D d20 skill check would be /ds roll 1d20+2 for instance.  Nothing special needed for that at all.  The only reason for the DND3ECHAR command is to speed up rolling up a D&D 3/3.5e character using the standard rules for it, and the only reason for the EARTHDAWN command is because it has special rules for it's rolling and I'm sure if anyone used DiceServ with Earthdawn they would rather use the step numbers instead of manually looking up the step table every time.
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: DiceServ - dice rolling pseudo-client - Testers needed!
« Reply #7 on: July 06, 2011, 08:03:39 PM »

So the answer is "yes" .. thanks.  ;)
Logged
Pages: [1]   Go Up