Advertisement:

Author Topic: Dice Roller  (Read 79821 times)

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #80 on: October 03, 2011, 09:41:09 AM »
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!

Offline Prime32

  • Newbie
  • *
  • Posts: 8
Re: Dice Roller
« Reply #81 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:
Code: [Select]
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6
Which would result in
Quote
Attack 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
Quote
Attack 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.

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #82 on: December 09, 2011, 10:16:06 PM »
^ 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:
Code: [Select]
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6
Which would result in
Quote
Attack 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
Quote
Attack 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?

Offline Apllicmz

  • SMF Hero
  • ******
  • Posts: 2,641
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Dice Roller
« Reply #83 on: December 27, 2011, 01:13:13 AM »
Nice mod
when Update dont forget portuguese





Offline Prime32

  • Newbie
  • *
  • Posts: 8
Re: Dice Roller
« Reply #84 on: December 27, 2011, 03:31:27 PM »
^ 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:
Code: [Select]
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6
Which would result in
Quote
Attack 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
Quote
Attack 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:
Code: [Select]
$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:
Code: [Select]
$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] : ';

Offline Cereus

  • Jr. Member
  • **
  • Posts: 105
  • Gender: Male
  • Leal e Bom (Justo)
    • ezemdamasceno on Facebook
    • @ezemdamasceno on Twitter
    • NERDestinos
Re: Dice Roller
« Reply #85 on: January 14, 2012, 10:18:22 PM »
Updated to 2.0.2 and added Portuguese Brazilian.

Hugs.

Offline Cereus

  • Jr. Member
  • **
  • Posts: 105
  • Gender: Male
  • Leal e Bom (Justo)
    • ezemdamasceno on Facebook
    • @ezemdamasceno on Twitter
    • NERDestinos
Re: Dice Roller
« Reply #86 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.

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #87 on: January 14, 2012, 10:57:39 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?

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #88 on: January 14, 2012, 10:58:30 PM »
common.xml inside the ZIP, this is the relevant line:
Code: [Select]
$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:
Code: [Select]
$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?

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #89 on: January 14, 2012, 11:04:47 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.

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #90 on: January 14, 2012, 11:09:17 PM »
common.xml inside the ZIP, this is the relevant line:
Code: [Select]
$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:
Code: [Select]
$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!

Offline Xarcell

  • SMF Hero
  • ******
  • Posts: 1,684
  • Gender: Male
  • SMF-DP Supporter
Re: Dice Roller
« Reply #91 on: January 23, 2012, 11:07:49 AM »
Here are some better images to use with it...

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Dice Roller
« Reply #92 on: January 23, 2012, 12:16:21 PM »
Yeah, sorry my original images sucked so bad.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Xarcell

  • SMF Hero
  • ******
  • Posts: 1,684
  • Gender: Male
  • SMF-DP Supporter
Re: Dice Roller
« Reply #93 on: January 23, 2012, 03:41:55 PM »
I have a suggestion for whoever is keeping up with this mod. Use
Code: [Select]
class="diceroller" instead of
Code: [Select]
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.

Offline Michael Pfaff

  • Semi-Newbie
  • *
  • Posts: 78
Re: Dice Roller
« Reply #94 on: March 27, 2012, 09:19:55 AM »
Here are some better images to use with it...

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

Offline Mv.c9

  • Newbie
  • *
  • Posts: 9
Re: Dice Roller
« Reply #95 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:

Code: [Select]
$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

  • Guest
Re: Dice Roller
« Reply #96 on: April 21, 2012, 02:16:25 PM »
I have a 2.0.2 version, but when I install the latest version i get the following error:

Code: [Select]
$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?

Offline Cereus

  • Jr. Member
  • **
  • Posts: 105
  • Gender: Male
  • Leal e Bom (Justo)
    • ezemdamasceno on Facebook
    • @ezemdamasceno on Twitter
    • NERDestinos
Dice Roller updated to 2.0.2 + PT-BR
« Reply #97 on: April 21, 2012, 10:07:36 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.
« Last Edit: April 21, 2012, 10:28:15 PM by Arkhan Holycross »

Offline Mv.c9

  • Newbie
  • *
  • Posts: 9
Re: Dice Roller updated to 2.0.2 + PT-BR
« Reply #98 on: April 23, 2012, 01:33:36 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//index.php [nonactive]

Offline Cereus

  • Jr. Member
  • **
  • Posts: 105
  • Gender: Male
  • Leal e Bom (Justo)
    • ezemdamasceno on Facebook
    • @ezemdamasceno on Twitter
    • NERDestinos
Re: Dice Roller
« Reply #99 on: April 23, 2012, 11:42:44 PM »
What happens in default theme?