View Full Version : Dungeons and Dragons Roll system
wipedout
06-16-2009, 11:31 AM
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
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/showthread.php?t=113972&highlight=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:
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
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:
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.