# Testing the dice roller...



## Morrus (Sep 14, 2010)

This is a test.


----------



## weem (Sep 14, 2010)

More testing...


----------



## weem (Sep 14, 2010)

So, I did the first Roll and saved it. It appeared on the right as it should (before submitting the post). Under it (the roll) there is an option to delete the roll - when I clicked it, I got the following...

Error: 82


----------



## Morrus (Sep 14, 2010)

That doesn't happen now - install hadn't quite finished when you tried it.


----------



## Nebten (Sep 15, 2010)

testing to hit and damage rolls


----------



## LadyLaw (Sep 15, 2010)

Testing, 1, 2, 3...


----------



## renau1g (Sep 15, 2010)

There's no way to have them as an sblock is there? The box is pretty big .


----------



## Morrus (Sep 15, 2010)

renau1g said:


> There's no way to have them as an sblock is there? The box is pretty big .




This subject has already been discussed in a thread in which you have participated.


----------



## MichaelSomething (Sep 15, 2010)

I want to test this out!

Edit: adding a second roll doesn't mess with the first one it seems.  worth a shot.  

Question: Can this be added to blog post?  Just wondering.


----------



## Blackrat (Sep 15, 2010)

Ah, we can have it here now. Lets test some insane number...

EDIT: Nice. It handles large amounts of dice no problem. I don't see a way that anyone would need to roll that much dice at once, but it can do it


----------



## Theo R Cwithin (Sep 15, 2010)

*Dice block bug*

Some of the dice roll blocks look odd; I've attached an image snapped from a post above, in this thread.  Is anyone else seeing this problem?  Fwiw, I'm running an old browser (Firefox 2.0.0.20) on an old system (MacOS 10.3.9 PPC)







I've seen this in other places, too.  It seems to be related to especially large rolls, though I'm not sure if its the big die, the sum of many die, the number of digits in the result, or what.  I'll do some test rolls shortly to see if it can be narrowed down.


----------



## Theo R Cwithin (Sep 15, 2010)

dice roll test...


All look ok, except the following ones, which exhibit the behavior I posted about above:

- the duplicated on from the previous post (15d4+...)
- the "big roll one die" (403d8), which blocks off an even bigger section of the post.
- Aha! the Nd6 rolls at the end show bigger blocks with bigger numbers of dice rolled!


----------



## IronWolf (Sep 15, 2010)

the_orc_within said:


> Some of the dice roll blocks look odd; I've attached an image snapped from a post above, in this thread.  Is anyone else seeing this problem?  Fwiw, I'm running an old browser (Firefox 2.0.0.20) on an old system (MacOS 10.3.9 PPC)




The browser is approaching 2 years old which is a *really* long time in computer tech terms.  The newer versions of Firefox up to and including FireFox 3.6 support the system you are running I believe, is there a reason that you've chosen to remain on Firefox 2.x?


----------



## Theo R Cwithin (Sep 15, 2010)

IronWolf said:


> The browser is approaching 2 years old which is a *really* long time in computer tech terms.  The newer versions of Firefox up to and including FireFox 3.6 support the system you are running I believe, is there a reason that you've chosen to remain on Firefox 2.x?



Yes, I know it's ancient.    However, so is my OS.  Unfortunately, that version of Firefox is the latest one that supports the OS.  I can't upgrade my browser til I upgrade my computer.

That notwithstanding, the fact that the problem is tied to very specific dice rolls suggests it's something on the dice roller side being inserted into the the html, which is then being oddly interpreted on my end.  Ultimately, it's not terribly important. 

In any event, I'm about to crack open the page sourcecode to see if I can find anything.  Also, I'm still running experiments in my post above, BTW, to try to pin it down.  (Note that that post will slowly grow.  Apologies!  Let me know if it's a problem and I'll stop.)


----------



## Theo R Cwithin (Sep 15, 2010)

*Final "bug report" and some info.*

OK it looks like it's related to the number of dice that get rolled, whether they're all one die-type or several die types added together.  Here's a snapshot of my screen showing 20, 50 and 100d6, in which you can see the dice blocks getting larger with increasing number of dice rolled:






I looked at the source code, and I see thousands of lines like:

```
<img src="http://www.enworld.org/newsimages/dice/d6_4.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_4.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_6.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_6.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_1.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_5.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_6.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_3.png" /><br />
 <img src="http://www.enworld.org/newsimages/dice/d6_5.png" />
 <img src="http://www.enworld.org/newsimages/dice/d6_6.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_1.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_3.png" /> 
<img src="http://www.enworld.org/newsimages/dice/d6_1.png" />
```
As I mentioned above, I do have an old browser, so this is likely low-prority.  But all those strange <img>'s in the code look suspicious to me as they don't seem to correspond to anything on the screen except empty space, except that the bigger the dice blocks the more <img> tags there are.  I don't know if they're being generated on my side or on ENWorld's-- I don't know much about web coding.  

Anyway, I'm done with that.  Let me know if you want any more info, or if you can determine that it's clearly something on my end and not a hidden bug on ENWorld's.


----------



## IronWolf (Sep 15, 2010)

the_orc_within said:


> Yes, I know it's ancient.    However, so is my OS.  Unfortunately, that version of Firefox is the latest one that supports the OS.  I can't upgrade my browser til I upgrade my computer.




Ah - my fault.  I was caught up in verifying PPC support and missed that the 3.5 and 3.6 branches had a min requirement of OS X 10.4.


----------



## Hypersmurf (Sep 15, 2010)

the_orc_within said:


> But all those strange <img>'s in the code look suspicious to me as they don't seem to correspond to anything on the screen except empty space, except that the bigger the dice blocks the more <img> tags there are.  I don't know if they're being generated on my side or on ENWorld's-- I don't know much about web coding.




On anyone else's browser, each of those images is a little picture of a die of the appropriate size.  So if you roll 6d6, you get a picture of a d6 showing a 3, and two pictures showing a 5, and one showing a 2, etc, depending on the roll.

Does your browser handle .png images?

-Hyp.


----------



## Morrus (Sep 15, 2010)

the_orc_within said:


> OK it looks like it's related to the number of dice that get rolled, whether they're all one die-type or several die types added together. Here's a snapshot of my screen showing 20, 50 and 100d6, in which you can see the dice blocks getting larger with increasing number of dice rolled:
> 
> 
> 
> ...




That code is the basic HTML image code. The code is supposed to be there - each is an image of a dice.

Why they're not showing in your browser, I have no idea. I've never come across a browser that doesn't render <image> tags! They're being blocked by something on your end, because your code example shows you're being delivered the correct HTML.

For example, visit one of those URLs directly in your browser.  Any one of them at random, say:

http://www.enworld.org/newsimages/dice/d6_5.png

That's the URL of a picture of a d6 with the 5 showing up.


----------



## Theo R Cwithin (Sep 15, 2010)

Yes, I understand the <img> tags are images, and that it's strange they're not rendering; I'm pretty sure that's an issue on my end, since I can see other images.  What I thought was odd was that there are thousands and thousands of them.  However, it sounds like that's the intended behavior.

So just to clarify: 
(1) If I roll 230d8, I should see 230 individual images of d8s, each showing an individual roll?  
(2) And therefore the dice roll blocks are _supposed_ to be different sizes?

...Which would mean I blasted the previous page with a gazillion images?  Oops!   In any event, thanks for the responses and for helping me clear this up.


----------



## Morrus (Sep 15, 2010)

the_orc_within said:


> So just to clarify:
> (1) If I roll 230d8, I should see 230 individual images of d8s, each showing an individual roll?
> (2) And therefore the dice roll blocks are _supposed_ to be different sizes?




Yup!  Check out today's news page (assuming THAT image shows for you....!) to see an example of what you should be seeing.



> !...Which would mean I blasted the previous page with a gazillion images? Oops!  .




And yup! We'd really better put a limit on it!


----------



## Morrus (Sep 15, 2010)

I presume you can't see it, [MENTION=75712]the_orc_within[/MENTION], but your dice roll tab on your profile page is immense!  Hundreds and hundreds of dice images!


----------



## Theo R Cwithin (Sep 15, 2010)

Morrus said:


> I presume you can't see it, @the_orc_within, but your dice roll tab on your profile page is immense!  Hundreds and hundreds of dice images!



d'oh!  Thanks for the heads up, @Morrus.  Will they cycle off the bottom eventually, or are they there for good?  

I don't really pbp, so i doubt it'll be a problem for me.  However, if it is a problem on your end resource-wise, feel free to sweep them out, or delete all my posts/rolls from the previous page in this thread, or whatever works for you.

Sorry!   Now that I know what's going on, it won't happen again.  But really, sometimes it's _good_ to have an incompetent orc floundering around to test the system's limits, no?


----------



## Blackrat (Sep 16, 2010)

Morrus said:


> I presume you can't see it, [MENTION=75712]the_orc_within[/MENTION], but your dice roll tab on your profile page is immense!  Hundreds and hundreds of dice images!




Awesome! Well at least he proved the system can handle pretty large number of dice at once


----------



## King Nate (Sep 16, 2010)

Just testing it out

 Wow, I guess I can't cheat on the rolls. Not that I would, but I was able to cheat on other online forum dice rollers. Nice Job!


----------



## Merkuri (Sep 17, 2010)

Suggestion for the dice roller (apologies if this has been suggested before and I missed it): 

Instead of the large graphical interface you have now (or in addition to it) allow users to type in a dice "equation".  Many virtual tabletop programs work like this (OpenRPG and MapTool being two I've used... I think Invisible Castle also uses similar notation).  These are all valid "d-notation" equations:

1d20+7
1d5-3
2d10+1d6+7
1+1+1+3d12
1d6/2
(1d20+7)/2

Some programs also provide functions like max, min, floor, ceiling, droplowest that you can use like this:

max(1d20, 1d20) = roll 1d20 twice and take the highest
droplowest(4d6) = roll four d6s, drop the lowest d6, add up the rest
floor(1d20/2) = roll a d20, divide the result by 2, round down to the nearest whole number

You might be able to find a pre-created engine somewhere that'll parse all of this for you so you don't have to create it from scratch.

You could combine this with your current die roller interface by adding a "Advanced roll" option at the bottom, and make the user choose between a "basic roll" and the "advanced roll".


----------



## GandalfMithrandir (Sep 17, 2010)

Lots of dice MWAHAHAHA!


----------



## KerlanRayne (Sep 22, 2010)

Testing, 1.2.3.


----------

