![]() |
Quote:
Quote:
I will correct it in the archive. |
Corrected ;)
|
thanks cclaerhout!
Just an update on what I'm doing... Remember I spoke of installing this mod more than once to play different games? Well, I took cclaerhout's 2.0 xml file version of the script (the one WITHOUT the user interface), here in this post: https://vborg.vbsupport.ru/showpost....8&postcount=69 and replaced all instances of "dice" with "playcard". Then I installed it and it created a new game using [playcard] as the bbcode. (I also changed the maximum number of images from 30 to 52 in the xml file). I found a nice set of public domain card images to use here: http://www.greywyvern.com/webslavent?msg=183 I renamed them 1.png through 52.png. Then I had to change the playcard template to $points.png instead of $points.gif since the images are a different format. Then I used Eikin's drop down script to code a menu to choose how many cards to draw out of the deck. I'm also going to do the same thing with "alphadice"...that is, install a version of the game that rolls alphabet letters instead of numbers. The possibilities for games are endless. My forum is not an RPG. But users could do something like this....roll a dice (a number) and an alphabet dice (a letter)...then you have to make up that number of words beginning with that letter that pertain to the tv show (my forum is about a tv show). So, roll a 5 and a B...5 words that start with B about the tv show. We could play boggle with the alphabet or hold lotteries with numbers. Just lots of variations for games to come up with. My toolbar menu is attached (it would only show in the Games forum, using cclaerhout's array code). First there's the "dice" game, then "alphadice", then "playcard". This is just a mock-up...I'll try and get better images. Because each game (dice, alphadice and cards) has a set number of "faces" in my setup (my dice have 6 sides, there are 26 letters in the alphabet, and 52 cards in a deck) so my drop down menu only contains the number of rolls to make (or cards to draw). So long story short, I now have several games and combinations of games to play on my forum. The only thing I need is an adjustment to the card script that would allow only ONE instance of each card per thread (there can't be two aces of hearts in a game). So....[insert pleading voice here] can anyone help me to tweak the script for that game so only one instance of each card is drawn per thread? I am SO CLOSE to having a complete game feature for my members to use...just need that one final element. Anyone? |
So does this work now?(Not RPG dice)
|
As far as I know all the bugs are worked out.
Another question... Any idea how I use text instead of images for the results of the dice roll? I think someone mentioned they were doing this. I get as far as creating 1.txt, 2.txt, 3.txt etc. files but then I don't know how to modify the templates so it uses the text in those files instead of an image url. Any ideas? |
I don't know if anyone needs this, but I believe we concluded that the number of dice faces could only go up to 100 (if you altered the code from the original 30 to 100). However, I think I just made mine able to go higher. Here's how:
In dice_process_data change this: Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult); Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult); and then change this line further down to however fany faces you want (where my 999 is): Code:
if ($faces[$i] >= 2 && $faces[$i] <= 999) It seems to work on my board. Does that seem like correct code? |
Yeah, that's it... I was only interested in taking it to 100 as that is the most my members needed and added the extra '?[0-9]' in another post for code change. and you *may* actually want to add another '?[0-9]' in there. If a person were to roll more than 1 die of 999 faces you'd probably need the extra integer placing... for the resulting points....
|
Is the first post in a thread issue fixed and is the mod file for download finished? As in I don't need to feed through the thread here in order to make it work.
|
it depends on if you want the basic one or the one with the fancy interface. For the basic use THIS ONE
you may still need to go in and change the 30 for the 'faces' to 100 or whatever it is you may need as well as adding the extra '?[0-9]' as described above in Emmy2's post; for the fancy interface one cclaerhaut made look at post #117 on page 8 of this thread. be sure to upload the dice images too :D |
Quote:
|
All times are GMT. The time now is 04:12 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|