![]() |
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:
|
Are all your tables in the vb database for your forum prefixed with mouldyskull?
My first thought when looking at the error message you show is that the '.' (period) between mouldyskull & thread should be a '_' (underscore). Do you have access to phpMyAdmin to where you can go add the dice fields manually? |
What's phpMyAdmin?
|
it would be nice if we can make it worked on vBshout box !!!
|
Quote:
|
Quote:
view the structure of the ***_thread and ***_post tables to be sure the 'dice' field was added. If not you need to add a field to each table and in both cases name the field 'dice' set them to mediumtxt and NOT NULL. |
Quote:
|
Quote:
By the way !! do you know why it doesn't work on vBshout box ?? we can use other bbcode but dice roller !!! |
Quote:
|
try looking in the admincp your host provides you, that's how I get to mine... i just click a link from there and it opens it.
|
Well I'm pretty sure I don't have an admincp from my host, I might try and install it though... Any other thoughts on how this could possibly be fixed?
|
The admincp I'm talking about is the same place you go to edit your webpages, where you see all the vbulletin files ... where they are located...
When you installed vbulletin you had to add the name of the d/b for your forum(s) in the config.php... whatever that value is you could use to set a direct path to your d/b in the xml file for this product. so wherever you saved the xml file on your computer, go to where it's listed, right click, open with>notepad (or whatever editor you use) then look for Code:
<installcode> Code:
<installcode> |
Okay I'll give that a shot, but not everyone runs thier web server through a control panel interface. Mines attached to my ~/ on my box's user account.
|
Okay thanks that did fix the problem, but it still won't let me post a roll on the first post of the forum. Any idea when / if that will be fixed?
|
the roll in first post of new thread is fixed if you used the xml file provided on page 5 of this thread, post #69
|
Quote:
|
It still looks like the 'dice' field has NOT been added into your _thread table... Are all your tables vbtablename? usually from my experience the tables are preceeded with ****_tablename
Are you able to run a MySQL query to add the fields yourself? Unless you have some way of accessing your vbulletin database and adding the 'dice' field yourself, or running the sql query, I'm not really sure what else to advise. I must admit, I'm still trying to get used to the product and plug-in process since switching to vB from phpbb2 (where EVERYTHING was a find/copy/paste-before/after/replace and adding tables/fields/etc was 'done by hand') While I'm glad for that learning experience the products and plug-ins are such a time saving convenience. |
Couple of bugs I noticed, if you preview a roll it deletes your roll syntax & if you edit a previous post with a roll it deletes your roll syntax. Any thoughts on if this is going to be fixed?
|
no it shouldn't be fixed... keeps a player from ummmm 'cheating' by editing the roll if they don't like the result ;)
|
Why not make it retain the syntax but reroll the values everytime the forum is edited or previewed then have the post say "Values were edited @ such and such time" and just have the preview values be rolled seperately from the submitted values. Makes sense to me that way you can't cheat.
|
This mod totally crashed my server.
I strongly advise against this mod until he cleans up all the bad code. |
Quote:
Odd, it works perfectly for me. |
Is the total amount of dice to be rolled still limited to 5? If not does anyone know what the max is? Also is there a way to disable the images? If say I just wanted it to have numerical outputs?
|
for disabling images just change the template to your suiting, may require some php skill for variables.
Iv been on vacation and it has sucked and is still sucking but thats the state of things, As for this code crashing a server, nothing iv seen has done so and no where iv set this up has it crashed. As for multiple dice fix, someone posted it earlier, page 1 or 2. |
Hello all -
I have installed this mod from the source files in the lead post. What I receive when I roll dice from the postbit with any editor (quick, new thread, reply, etc) is the code [dice0] in text in the postbit. This is obviously not the die image, but everything else in the postbit works. (Controls etc.) Can someone validate or post a reply with the latest code and the latest instructions? There are so many files flying through the topic in replies that I can't tell what is current and what isn't. Alternatively if anyone has seen the error I mention, help a brother out as this functionality would make my life much easier as a RPG site admin. Best regards, A note that my beta board is at http://www.sovereignrpg.com/community head to the Ona's workshop forum to see the test failures. |
Supposedly it's a feature so that you can't cheat, but it would make more sense to have the rolls marked "fixed" if you've edited the post and have the preview button generate a different set of values everytime you press it. So that the previewed rolls and the posted rolls are different.
|
Update -
It seems as if everything works on my forum with the exception of rendering the die images. Very strange. It's not a matter of custom image forum paths due to my skin as the same behavior happens with default skin. Is there any reason why png files wouldn't render on a VB installation using php? yes I have enabled php in my bbcode area. Thought of that. note this is on a 3.5.4 clean install Best, A Quote:
|
Did you physically upload the images to your forum(s)/images/dice folder?
I know that sounds like a silly question but some have been under the impression that installing the product puts the images where they are supposed to go..... but you have to ftp/upload the images separately to a dice folder in your vb images file on your server/host server.... I know the png images show up for all my users/members running IE, firefox and mozilla. As to the limitations of number of dice for the 'original' hack being 5.... The only limit I've personally had is for over 9 dice. To change from 5 limit to 9 limit: open the xml file in an editor and FIND Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult); Code:
preg_match_all("/\[dice=([1-9])\]([0-9]?[0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult); |
The dice images in the Dice zip file only go up to 30, therefore if you are using 'faces' higher than 30 the image will not show up.
A blank blue gif is included in the 'blue' folder (after extracting the dice zip file) and a blank white gif is included in the 'white' folder, depending on which you use, for making numbers higher than 30 for faces 31-100. OR use this attached zip file for blue octagonal dice numbered 1-100 (originally attached to my post as Rukbat on page 3 or 4 of this thread...) they are in gif format hope this helps :D |
To answer your question Eq, yes I've uploaded the images.
This is complicated by the fact that I'm on the mac platform, though I've tested using Safari and Firefox and end up with the same end result. I see the php call, but no images. I opted to use RPG dice due to the dice panel. When I tested the original roller in this thread it worked fine. However, when that roller didn't display images I was able to pull the source path from the broken link and find where my issue was. With RPG dice, all I get is [dice0] or [dice1] and with no path I have nothing to go on. Any assistance would be greatly appreciated. Best regards, A |
Hmmm, no clue, I haven't used the RPG dice thingy. I *did* go to your dice test thread at your site and the images show up in the last few posts on my puter (Windows XP/Mozilla 1.7.13) *but* they are the funky original dice NOT the RPG dice cclaerhout did in the png format.
|
All times are GMT. The time now is 03:28 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:
|