[ABD] Dicemod

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.
MalkContent
Registered User
Posts: 203
Joined: Mon Aug 18, 2008 10:00 am

Re: [BETA] Dicemod

Post by MalkContent »

joeldodenhoff wrote:I went through all of the settings and permissions in both the UCP and ACP again. I also read further back into the MOD discussion. After that I added "var_dump("this works");" (without the quotes) as instructed to see if permissions have been set. I get an error message for a few seconds before it goes back to my roll testing post and shows a post with no text at all. The error is as follows:

string(10) "this works"
Warning: Cannot modify header information - headers already sent by (output started at /home/joeldodenhoff/dndodenhoff.com/posting.php:1155) in /home/joeldodenhoff/dndodenhoff.com/includes/functions.php on line 4688

Warning: Cannot modify header information - headers already sent by (output started at /home/joeldodenhoff/dndodenhoff.com/posting.php:1155) in /home/joeldodenhoff/dndodenhoff.com/includes/functions.php on line 4690

Warning: Cannot modify header information - headers already sent by (output started at /home/joeldodenhoff/dndodenhoff.com/posting.php:1155) in /home/joeldodenhoff/dndodenhoff.com/includes/functions.php on line 4691

Ideas?
Did you check your posting.php and includes/functions.php at the given lines?
I would review any of those files which has dicemod code around those lines and doublecheck that you followed the install instructions correctly. You probably stumbled upon a problem I had myself, because the <string(10) "this works"> is a remnant of my testing and I remember having trouble with "Cannot modify header information" at some point. Unless you have a conflict with other mods, you very likely have inserted code from dicemod on the wrong position or forgot something.
squizm
Registered User
Posts: 1
Joined: Thu May 23, 2013 2:40 pm

Re: [BETA] Dicemod

Post by squizm »

Is it possible to allow for more than one type of D6, D8, D12?

I'm trying to create a skin that will allow for the Star Wars RPG dice system to be used. Here is a picture of the dice http://store.fantasyflightgames.com/pro ... ?SKU=SWE04.

I'd like to be able to type something like:

[dice]2green[/dice][dice]1yellow[/dice]

Any tips on where I should start would be greatly appreciated.

Thanks!
Gygy
Registered User
Posts: 1
Joined: Sat May 25, 2013 2:49 pm

Re: [BETA] Dicemod

Post by Gygy »

Hello everyone, I have a question about this mod: Dicemod. I don't understand the "allowed math depth" function in the board. What is its use ?
Mr. Brooks
Registered User
Posts: 38
Joined: Fri Aug 26, 2011 3:54 pm

Re: [BETA] Dicemod

Post by Mr. Brooks »

Anyone know how to change the message:
[player] rolled 3d6 and got a total of 10
to:
[player] rolled 3 6-sided dice and got a total of 10
I've been trying to tweak the language/en/common.php but all I've done so far is put a background and border for the diceroll.
Mr. Brooks
Registered User
Posts: 38
Joined: Fri Aug 26, 2011 3:54 pm

Re: [BETA] Dicemod

Post by Mr. Brooks »

Mr. Brooks wrote:Anyone know how to change the message:
[player] rolled 3d6 and got a total of 10
to:
[player] rolled 3 6-sided dice and got a total of 10
I've been trying to tweak the language/en/common.php but all I've done so far is put a background and border for the diceroll.
Nvm, I got it. If anyone is interested to know how, I'll post it.
messiahcide
Registered User
Posts: 11
Joined: Sat Jun 15, 2013 2:48 am

Re: [BETA] Dicemod

Post by messiahcide »

Mr. Brooks can you post how you made that change? I'm interested in implementing it.

Also, if anyone knows how, can someone explain how to enable the dice mod in a post's preview?

-and/or-

how to get it to work in Mchat?
Mr. Brooks
Registered User
Posts: 38
Joined: Fri Aug 26, 2011 3:54 pm

Re: [BETA] Dicemod

Post by Mr. Brooks »

messiahcide wrote:Mr. Brooks can you post how you made that change? I'm interested in implementing it.
I highly advice saving a backup before making these changes. I don't want to be responsible for messing up your board. XD

includes/bbcode.php
Find:

Code: Select all

				$dice_abbr = preg_replace('/x/' , $dice_abbr , $dice_roll['math_string']);
Add after:

Code: Select all

				$dice_roll['math_nox'] = preg_replace('/x/', '', $dice_roll['math_string']);

Find:

Code: Select all

				$needles = array('>','<','[%u]','[%d]','[%t]','[%l]');
				$replace = array('>','<',$dice_roller['username'],$dice_abbr,floatval($dice_roll['total']),$urllink);
Replace with:

Code: Select all

				$needles = array('>','<','[%u]','[%d]','[%t]','[%l]','[%x]','[%y]','[%z]');
				$replace = array('>','<',$dice_roller['username'],$dice_abbr,floatval($dice_roll['total']),$urllink,$dice_roll['numdice'],$dice_roll['numsides'],$dice_roll['math_nox']);
language/en/common.php
Find

Code: Select all

	'PATTERN_ROLL_TOTAL'		=>	' and got a total of <b>[%t]</b>',
	'PATTERN_ROLL_STRING'	 =>	'[%u] rolled [%d]',
Replace With:

Code: Select all

	'PATTERN_ROLL_TOTAL'		=>	' and got a total of <b>[%t]</b>',
	'PATTERN_ROLL_STRING'	 =>	'<b>[%u]</b> rolled <b>[%x] [%y]-sided dice</b> ([%z])',
messiahcide
Registered User
Posts: 11
Joined: Sat Jun 15, 2013 2:48 am

Re: [BETA] Dicemod

Post by messiahcide »

Thanks Mr Brooks. I got it to work on a test board and it worked. :D

Thought i'd add something for everyone:

Image

Made this animated gif to use for the Abbcodes module.
Mr. Brooks
Registered User
Posts: 38
Joined: Fri Aug 26, 2011 3:54 pm

Re: [BETA] Dicemod

Post by Mr. Brooks »

I have a few questions:
1. How I can roll more than 255 sides?
2. How can I make it so that dice will generate a zero?
3. How can I make it display the total 005 instead of 5 for example.
messiahcide wrote:Thanks Mr Brooks. I got it to work on a test board and it worked. :D
No prob. Glad it didn't mess up.
vipaka
Registered User
Posts: 492
Joined: Sun Aug 28, 2011 7:25 pm
Contact:

Re: [BETA] Dicemod

Post by vipaka »

Just a quick post in case anyone else has struggled to get this mod working.

I reinstalled this mod on a vanilla board (0.8.8b and 3.0.11) for testing since it looked like nobody was having any problems with it anymore. It was doing the whole show the bbcode text [dice]4d6[/dice] thing for each dice use in posts again, so I investigated to find the root of the problem. Turns out the permissions for the forums weren't translating to the posting, but if you update them manually in the database it works perfectly. You will still need to set user/group permissions normally, but no matter how many times you set the forum permissions it will not change the database values, you will have to do it manually. I suspect this to be an error in the php for the acp forum permissions, but am too lazy to find the exact line that's causing the problem since there is a workaround.

All previous errors with offset, bbcode parsing, and everything else are gone. The mod works wonderfully with this one workaround. Its a great dice mod to have, props to the mod author.
Curious about my work? See it for yourself.
Image
mrpaulie
Registered User
Posts: 1
Joined: Sat Jul 13, 2013 8:45 am

Re: [BETA] Dicemod

Post by mrpaulie »

With a fresh install I am unable to get the mod to work because when I navigate to the "Forums" tab in the ACP I get the error "Parse error: syntax error, unexpected '}' in /home/content/73/11420873/html/board/cache/ctpl_admin_acp_forums.html.php on line 107". If I clear the cache I get one instance of the error "Parse error: syntax error, unexpected '}' in /home/content/73/11420873/html/board/includes/template.php(230) : eval()'d code on line 107" and then the error reverts to the previously mentioned error when additional attempts are made.

This is driving me just a little mad. Can anyone help?
messiahcide
Registered User
Posts: 11
Joined: Sat Jun 15, 2013 2:48 am

Re: [BETA] Dicemod

Post by messiahcide »

mrpaulie, did you follow the instructions in the install file for the manual edits?

I got this mod to run on fairly quickly (0.8.8b and 3.0.11) without any errors like that.
Jmmm
Registered User
Posts: 1
Joined: Wed Aug 21, 2013 1:02 pm

Re: [BETA] Dicemod

Post by Jmmm »

vipaka can you specify (for a noob :oops: ) which database exactly should be manually updated?
Checked all the installation routine and all the changes but still got [dice]4d6[/dice] on rolls.
User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [BETA] Dicemod

Post by prototech »

This topic has been marked as [ABD] - Abandoned as the mod author has not been active recently. If the MOD author wishes to continue development, please PM anyone on the MOD Team to request this topic be unlocked.

Notice!
We do not recommend that a user of the phpBB software install this mod, or any other mod that is marked as “abandoned” or “in development”, on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Modifications Team
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.
Locked

Return to “[3.0.x] Abandoned MODs”