Jump to content
sentry0

6E Mobile HTML5 App Export Template with Dice Rolling

Recommended Posts

Hi All,

 

I've been working on a little side project for myself and have created a mobile friendly export template with a built in die roller. 

 

This project is now out of beta and available at 

 

 

 

 

Share this post


Link to post
Share on other sites

I just updated my export file template...all dependencies are now embedded in the file.

 

If you want you can now view this file without installing a webserver on a mobile device.  You will need to install HTML viewer like Visor HTML and open your saved file using that app.  

Share this post


Link to post
Share on other sites

Another update.

  • Moved the die rolling menu to the main page so it's easier to get to (one less touch/click)
  • Added a logo to the main page
  • Reorganized the damage result page so it's easier to read
  • Damage roll results now show the STUNX, BODYX and NSTUN intelligently

Share this post


Link to post
Share on other sites

Latest update:

  • Dropped the Math.random() calls in favour for random numbers generated by a Mersenne Twister library
  • Added a "Roll Again" button to the "3d6 Roll" so you can make multiple checks quickly
  • Tweaked the spacing on the main page so it should display better on an iPhone

Share this post


Link to post
Share on other sites

Late to the draw here, but I'm attaching the die roller that was used on HERO Central -- you're welcome to use it, if desired.  Has functionality for handling pretty much all of HERO System die rolling...including killing attacks (with stun multiplier bonuses or negatives), explosions, etc.

dieRoller.html

Share this post


Link to post
Share on other sites

I looked at the die roller you supplied and I really like it although it is using Math.random()...I'll probably switch that to use the Mersenne Twister lib in the codebase.  I think I may replace the "Free Form Roll" tool with it to let people really make some unusual rolls and roll combinations using a text input field.  I will probably retro-fit the first 2 tools to use this lib as the back end but keep the frontend the same.

 

I think I should add a stun multiplier slider to my damage roll UI now that I'm thinking about it...

 

 

Share this post


Link to post
Share on other sites

While Math.random() doesn't do the trick for a cryptographically sound PRNG, it has a higher degree of entropy than actual dice -- i.e. as the PRNG for a die roller, it'll give "more random" results than actually rolling a good set of dice.

 

...which is why you don't want to use dice to generate cryptographic keys.

Share this post


Link to post
Share on other sites

That's interesting, I didn't know that.  I figure that a better random number generator isn't going to hurt anything per si but I could shave off 7k from the file size without the MT lib...

Share this post


Link to post
Share on other sites
8 minutes ago, C-Note said:

Looks awesome!  Question: Why do you need an HTML viewer?  Can't the exported html file be opened in your phone/tablet's default web browser (e.g. Chrome)?

 

Thanks 😀

 

I'm not sure why but Chrome wouldn't allow me to open the file properly.  I think it has something to do with the way Android is passing the file into Chrome...just a guess though.

 

The HTML viewer is not ideal (I'd much rather just use Chrome too) but it works.

Share this post


Link to post
Share on other sites

Figured it out.  Open Chrome and type the following URL:

file:///pathto/character.HTML

 

example:

file:///sdcard/Download/Tedric.HTML

 

You can then bookmark it.

 

I have no idea why Android uses "sdcard" as the path for internal storage.

Share this post


Link to post
Share on other sites

Love this!   My favorite export format.

Feature request:  A thumbnail of the exported character image on the "Character Info" page.  If not possible, a separate page with the character image.

Share this post


Link to post
Share on other sites
11 hours ago, C-Note said:

Love this!   My favorite export format.

Feature request:  A thumbnail of the exported character image on the "Character Info" page.  If not possible, a separate page with the character image.

 

It should be possible to add in a portrait...let me play around with it a bit and see what I can do 😀

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×