News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Dice Roller

Started by Colin, July 30, 2009, 09:52:06 PM

Previous topic - Next topic

Michael Pfaff

Will this mod work on a 2.0.1 forum? I've got a new install for an RPG community (louisvillednd.com), and we'd like to do some dice rolling on there.

Would appreciate any feedback on how to get this installed.

Thanks!

Prime32

^ Works just fine by emulating 2.0 RC3 (click Advanced at the bottom-right of the Package Manager). If it works on 2.0 it should work on 2.0.1.


Anyway, when I installed this mod, a dozen users immediately began experimenting with it and found a way to fake a result:
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6

Which would result in
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll 1d6 : 3, total 3
I got around this by editing the mod so that the description was bold italic. Hence
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll
1d6 : 3, total 3
which makes it obvious.

Apart from that, it's possible to edit out the "Tampered!" image.

Michael Pfaff

Quote from: Prime32 on November 24, 2011, 08:13:05 AM
^ Works just fine by emulating 2.0 RC3 (click Advanced at the bottom-right of the Package Manager). If it works on 2.0 it should work on 2.0.1.


Anyway, when I installed this mod, a dozen users immediately began experimenting with it and found a way to fake a result:
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6

Which would result in
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll 1d6 : 3, total 3
I got around this by editing the mod so that the description was bold italic. Hence
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll
1d6 : 3, total 3
which makes it obvious.

Apart from that, it's possible to edit out the "Tampered!" image.

Prime 32, where do I go to make this edit?

Apllicmz

Nice mod
when Update dont forget portuguese





Prime32

Quote from: Michael Pfaff on December 09, 2011, 10:16:06 PM
Quote from: Prime32 on November 24, 2011, 08:13:05 AM
^ Works just fine by emulating 2.0 RC3 (click Advanced at the bottom-right of the Package Manager). If it works on 2.0 it should work on 2.0.1.


Anyway, when I installed this mod, a dozen users immediately began experimenting with it and found a way to fake a result:
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6

Which would result in
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll 1d6 : 3, total 3
I got around this by editing the mod so that the description was bold italic. Hence
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll
1d6 : 3, total 3
which makes it obvious.

Apart from that, it's possible to edit out the "Tampered!" image.

Prime 32, where do I go to make this edit?
common.xml inside the ZIP, this is the relevant line:
$output .= (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . ' : ';
So insert some formatting tags like so:
$output .= '[b][i]' . (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . '[/i][/b] : ';

Cereus

Updated to 2.0.2 and added Portuguese Brazilian.

Hugs.

Cereus

I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Michael Pfaff

Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Michael Pfaff

Quote from: Prime32 on December 27, 2011, 03:31:27 PM
common.xml inside the ZIP, this is the relevant line:
$output .= (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . ' : ';
So insert some formatting tags like so:
$output .= '[b][i]' . (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . '[/i][/b] : ';

Thanks so much. So, I need to do this before I install, correct?

Is there any way to edit the output after install by modifying a subs file or something?

Michael Pfaff

Quote from: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Nvm. I think I got it. In the Subs-Editor, "'after' => '[/roll]'," was missing.

Michael Pfaff

Quote from: Michael Pfaff on January 14, 2012, 10:58:30 PM
Quote from: Prime32 on December 27, 2011, 03:31:27 PM
common.xml inside the ZIP, this is the relevant line:
$output .= (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . ' : ';
So insert some formatting tags like so:
$output .= '[b][i]' . (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . '[/i][/b] : ';

Thanks so much. So, I need to do this before I install, correct?

Is there any way to edit the output after install by modifying a subs file or something?

Prima32, nvm my friend. I found it in Subs-Post. Thanks for all of your help!

Xarcell

Here are some better images to use with it...

Arantor

Yeah, sorry my original images sucked so bad.
Holder of controversial views, all of which my own.


Xarcell

I have a suggestion for whoever is keeping up with this mod. Use class="diceroller" instead of style="font-size:x-small; background-color:#ffffff; margin:5px 20px; border:1px dashed black; filter:alpha(opacity=50); opacity:0.5;"

This way it will look better in custom theme, and no special effect in default theme. If the admin wishes to style it, he/she can simply add it to the index.css.

Thanks.

Michael Pfaff

Quote from: Xarcell on January 23, 2012, 11:07:49 AM
Here are some better images to use with it...

With 2.0, should these be saved in the theme image folder or default?

Mv.c9

I have a 2.0.2 version, but when I install the latest version i get the following error:

$txt['dice_rolled'] = 'Rolled'; $txt['dice_not_valid'] = 'is not a valid dice string!'; $txt['dice_invalid_both'] = '(cannot be both greater than %d and less than %d)'; $txt['dice_invalid_lower'] = '(cannot roll greater than %d on a %d sided die)'; $txt['dice_total'] = 'total'; $txt['dice_cheater'] = 'This dice roll has been tampered with!'; $txt['bbc_code_roll'] = 'Dice roll';

At the top of all my pages. Am I doing something wrong?

TheListener

Quote from: Mv.c9 on April 17, 2012, 06:56:46 AM
I have a 2.0.2 version, but when I install the latest version i get the following error:

$txt['dice_rolled'] = 'Rolled'; $txt['dice_not_valid'] = 'is not a valid dice string!'; $txt['dice_invalid_both'] = '(cannot be both greater than %d and less than %d)'; $txt['dice_invalid_lower'] = '(cannot roll greater than %d on a %d sided die)'; $txt['dice_total'] = 'total'; $txt['dice_cheater'] = 'This dice roll has been tampered with!'; $txt['bbc_code_roll'] = 'Dice roll';

At the top of all my pages. Am I doing something wrong?

I have locked your similar topic on the 2.0 board.

Any errors on install?

Cereus

#97
Quote from: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Yeah, for sure! I'll try to solve it.

Done! ASAIC!!

sigh... .sigh...

Tags

Dice Roller traduzido para português (pt-br).
Dice Roller translated to portuguese.

Mv.c9

Quote from: Arkhan Holycross on April 21, 2012, 10:07:36 PM
Quote from: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Yeah, for sure! I'll try to solve it.

Done! ASAIC!!

sigh... .sigh...

Tags

Dice Roller traduzido para português (pt-br).
Dice Roller translated to portuguese.

Thanks, but I still get this at the top of my theme;

Quote$txt['dice_rolled'] = 'Rolled'; $txt['dice_not_valid'] = 'is not a valid dice string!'; $txt['dice_invalid_both'] = '(cannot be both greater than %d and less than %d)'; $txt['dice_invalid_lower'] = '(cannot roll greater than %d on a %d sided die)'; $txt['dice_total'] = 'total'; $txt['dice_cheater'] = 'This dice roll has been tampered with!'; $txt['bbc_code_roll'] = 'Dice roll';

any ideas where is it coming from?
This is the forum: hxxp:forums.bloodlinesantitribu.com/ [nonactive]/index.php

Cereus

What happens in default theme?

Advertisement: