vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Dungeons and Dragons Roll system (https://vborg.vbsupport.ru/showthread.php?t=216269)

wipedout 06-16-2009 11:31 AM

Dungeons and Dragons Roll system
 
Im currently looking for a dungeon and dragons type roll system for my forums. with different dices, D6, D20, etc. im currently hoping to get this done as a free thing, but im willing to pay a small fee if i get an offer (PM me) If such a system allready exist please direct me in the right direction cause i could not see it.

Im not sure how it would work to make this system "secure" to prevent cheating on the rolls, but i know i want a system where people cant just "cheat" their rolls.

Kentaurus 06-16-2009 12:53 PM

Quote:

Originally Posted by wipedout (Post 1830637)
Im currently looking for a dungeon and dragons type roll system for my forums. with different dices, D6, D20, etc. im currently hoping to get this done as a free thing, but im willing to pay a small fee if i get an offer (PM me) If such a system allready exist please direct me in the right direction cause i could not see it.

Im not sure how it would work to make this system "secure" to prevent cheating on the rolls, but i know i want a system where people cant just "cheat" their rolls.

Is this one good enough?
https://vborg.vbsupport.ru/showthrea...ight=dice+roll :)

Carnage 06-16-2009 01:15 PM

I have another way of doing it thats slightly better than that mod, however i've not got any code ready for release yet... (the method was devised so that I could expand the offering of board games from chess and draughts to other things that required dice)

The basic idea is to use something that remains constant all the time as a seed for srand. The simplest implementation would use the postid. This means that rand will always generate the same random number.

Pesudo code:

PHP Code:

srand($post['postid']);
$dicevalue rand(1,6); 

You could use that as the basis for replacing a bbcode with 'D6 result: $dicevalue'

Not 100% secure against cheating as someone could wait till a postid that gives them good results turns up, this can be countered by adding other variables into the srand eg userid or just a constant + value. The more obscure your function the harder it'll be to manipulate.

Advantages of this method are that you only need 1 plugin to the bbcode parser and it dosn't need any db edits.

wipedout 06-16-2009 04:50 PM

Quote:

Originally Posted by Carnage- (Post 1830675)
I have another way of doing it thats slightly better than that mod, however i've not got any code ready for release yet... (the method was devised so that I could expand the offering of board games from chess and draughts to other things that required dice)

The basic idea is to use something that remains constant all the time as a seed for srand. The simplest implementation would use the postid. This means that rand will always generate the same random number.

Pesudo code:

PHP Code:

srand($post['postid']);
$dicevalue rand(1,6); 

You could use that as the basis for replacing a bbcode with 'D6 result: $dicevalue'

Not 100% secure against cheating as someone could wait till a postid that gives them good results turns up, this can be countered by adding other variables into the srand eg userid or just a constant + value. The more obscure your function the harder it'll be to manipulate.

Advantages of this method are that you only need 1 plugin to the bbcode parser and it dosn't need any db edits.


Sounds to me like you got kind of a thing in your mind, something that doesnt involve sql queries would be a good bet for me, no need for unnecciary SQL queries.

Carnage 06-19-2009 02:25 PM

I'm just putting the finishing touches to a new release -> i'll see what i can do about making this as a bbcode in a bit.


All times are GMT. The time now is 08:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01020 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete