[ABD] Dice MOD

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
coppro
Registered User
Posts: 84
Joined: Wed May 16, 2007 3:10 am

Re: [RC1] Dice MOD

Post by coppro »

golgoth wrote:Any ETA for the new version?
Hopefully soon. This is near the top of my mental list of things to do, but I'll probably end up spending a week on it once I really get started, and when I actually start is another matter altogether.

School starts again next week though, so I'll probably spend more time coding.
elazard wrote:well that mod looks great i just wanted to know if it s possible that the roll bbcode do always same i mean i just want to roll 2 dices with 6 faces each and not allow user to do other roll. Is it possible?
sorry if the question has already been answered but as you should see my english sucks so i may not have understood everything^^
If you mean you want to limit the types of dice people can roll, then no, this MOD doesn't do that. You could modify the regular expressions in message_parser.php to only accept certain values, though.

You probably shouldn't, though. There's no cost to differently-sized dice or complex expressions (besides the normal cost of evaluation, but small numbers don't save database space or anything).

I've also demoted the tag to Alpha, to make it clear that this MOD in its current form should not probably be used.
coppro
Registered User
Posts: 84
Joined: Wed May 16, 2007 3:10 am

Re: [ALPHA] Dice MOD

Post by coppro »

Progress update: I had a smarter idea: write the parser with some clever tricks of the regex engine.

I have partially finished the parser - I have finished the splitting and the handling of subexpressions, but it doesn't yet parse precendence. I haven't decided yet whether I'm going to handle precedence before or during the actual operator resolution. I think the former would be easier. Then I need to integrate with the rest of the forum, but that's really easy now.

As proof, here's sample input:

Code: Select all

[dice=Ability Scores]Strength:(4d6)$1  ,   Dexterity:(4 d 6
   )$1,Constitution:(4d6)$1,Intelligence:(4d6)$1[/dice]
And here's a var_export() of the parsed code:

Code: Select all

array (
  0 => 
  array (
    0 => 
    array (
      0 => '4',
      1 => 'd',
      2 => '6',
    ),
    1 => '$',
    2 => '1',
  ),
  1 => 
  array (
    0 => 
    array (
      0 => '4',
      1 => 'd',
      2 => '6',
    ),
    1 => '$',
    2 => '1',
  ),
  2 => 
  array (
    0 => 
    array (
      0 => '4',
      1 => 'd',
      2 => '6',
    ),
    1 => '$',
    2 => '1',
  ),
  3 => 
  array (
    0 => 
    array (
      0 => '4',
      1 => 'd',
      2 => '6',
    ),
    1 => '$',
    2 => '1',
  ),
)
array (
  0 => 'Strength',
  1 => 'Dexterity',
  2 => 'Constitution',
  3 => 'Intelligence',
)
Madhaus
Registered User
Posts: 11
Joined: Sat Nov 04, 2006 6:41 pm

Re: [ALPHA] Dice MOD

Post by Madhaus »

Thank you for the update, Coppro. It's nice to hear from SOMEONE when, normally, we don't hear from ANYONE.
CancelloCornorosso
Registered User
Posts: 19
Joined: Fri Aug 18, 2006 7:40 pm

Re: [ALPHA] Dice MOD

Post by CancelloCornorosso »

Thanks for the update, coppro.

I tought about a suggestion. If I am not mistaken, the sql code used in the atual version of the mod has the standard table prefix phpbb_ hardcoded, in that case it'd be great if the new version could clarify the point.

hope this helps
Harusame
Registered User
Posts: 1
Joined: Tue Feb 19, 2008 4:23 pm

Re: [ALPHA] Dice MOD

Post by Harusame »

coppro, update link to download mod, please!
Mod is really great and I want it on my phpbb3! =)
Maniii
Registered User
Posts: 26
Joined: Thu Feb 07, 2008 1:51 am
Location: France
Contact:

Re: [ALPHA] Dice MOD

Post by Maniii »

Many problems with Private messages...

Cause of : incudes/ucp/ucp_pm_viewmessage.php
I don't speak english, i try only :)
User avatar
maese
Registered User
Posts: 31
Joined: Tue Dec 14, 2004 4:34 pm
Location: ./Spain/Salamanca

Re: [ALPHA] Dice MOD

Post by maese »

Maniii wrote:Many problems with Private messages...

Cause of : incudes/ucp/ucp_pm_viewmessage.php

if you post the full error maybe we can help you ;)
golgoth
Registered User
Posts: 199
Joined: Tue Jul 18, 2006 11:36 pm

Re: [ALPHA] Dice MOD

Post by golgoth »

Maybe you should just wait for the new version... i hope it will come out soon.
User avatar
maese
Registered User
Posts: 31
Joined: Tue Dec 14, 2004 4:34 pm
Location: ./Spain/Salamanca

Re: [ALPHA] Dice MOD

Post by maese »

Yeah, this is another way xD but until then... could you post the error? (I'm a bit bored, man U.U)
Maniii
Registered User
Posts: 26
Joined: Thu Feb 07, 2008 1:51 am
Location: France
Contact:

Re: [ALPHA] Dice MOD

Post by Maniii »

maese wrote:if you post the full error maybe we can help you ;)
Humm.. traduction of http://tr.voila.fr/traduction_voila.php :
me wrote: - when private message am full, that they abolish messages to accept those attempt it, there remain shown " (2 new messages) ", 2 an example is...
- And before, when you delete OR when you go in your private message you had this error :

Code: Select all

Erreur générale
SQL ERROR [ mysql4 ]

Unknown column 'msg_id' in 'where clause' [1054]

SQL

DELETE FROM mania_rolls WHERE type = 'privmsg' AND msg_id IN (1081, 1154)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal_mysql->sql_error()

FILE: includes/functions_privmsgs.php
LINE: 1096
CALL: dbal_mysql->sql_query()

FILE: includes/functions_privmsgs.php
LINE: 240
CALL: delete_pm()

FILE: includes/ucp/ucp_pm.php
LINE: 357
CALL: clean_sentbox()

FILE: includes/functions_module.php
LINE: 471
CALL: ucp_pm->main()

FILE: ucp.php
LINE: 311
CALL: p_master->load_active()
golgoth wrote:Maybe you should just wait for the new version...
Yes it's sure !! :lol:
I don't speak english, i try only :)
myboy
Registered User
Posts: 5
Joined: Thu Nov 01, 2007 4:49 pm

Re: [ALPHA] Dice MOD

Post by myboy »

Maniii wrote:Many problems with Private messages...

Cause of : incudes/ucp/ucp_pm_viewmessage.php
I just skip this instructions about PMs files.. only works on the posts.. is enough for me until new version be released.

I hope that be soon.. :mrgreen:
coppro
Registered User
Posts: 84
Joined: Wed May 16, 2007 3:10 am

Re: [ALPHA] Dice MOD

Post by coppro »

I've had a busy month (it's been really cold, lots of schoolwork, I've been sick, etc.), but I finally finished the hardest part of this thing. I'd say that it'll hopefully be done in just another week or two!
User avatar
maese
Registered User
Posts: 31
Joined: Tue Dec 14, 2004 4:34 pm
Location: ./Spain/Salamanca

Re: [ALPHA] Dice MOD

Post by maese »

coppro wrote:I've had a busy month (it's been really cold, lots of schoolwork, I've been sick, etc.), but I finally finished the hardest part of this thing. I'd say that it'll hopefully be done in just another week or two!
:mrgreen: ñañañaaaa i can't wait for it! :D When is it going to be finished? ;)
pmdweb
Registered User
Posts: 5
Joined: Fri Dec 28, 2007 12:01 pm

Re: [ALPHA] Dice MOD

Post by pmdweb »

I waiting... hard to do... but I Still Waiting... ^^

Thanks Coppro.
virtuadept
Registered User
Posts: 1
Joined: Thu Mar 27, 2008 2:35 am

Re: [ALPHA] Dice MOD

Post by virtuadept »

coppro wrote:I've had a busy month (it's been really cold, lots of schoolwork, I've been sick, etc.), but I finally finished the hardest part of this thing. I'd say that it'll hopefully be done in just another week or two!
Count me as another interested party in this really cool mod. I plan to use it for a small play-by-post RPG hosted on my own site since RPOL is acting so flakey, or at least as a backup until RPOL is more stable. :ugeek:
Locked

Return to “[3.0.x] Abandoned MODs”