Pages

Sunday, September 2, 2018

Automatic List to HTML Translator

For new features and fewer (?) bugs, see here.






EDIT: Max Cantor has earned the 30xp bounty for finding a bug in the soup my code. If you have used this, add 1 to the number at the end of the code i.e. [Math.floor(Math.random() * 5)] > [Math.floor(Math.random() * 6)]. In addition, if you are using multiple generators on the same page, or on the same blog you are likely to run into issues. The new version will scramble some of the variables slightly, and should fix that issue.

EDIT 2: If you have multiple random tables that you would like linked together to one button, let me know! It takes only a few moments for me to get that up and running. Version 2 will have this as a feature, stay tuned!

EDIT 3: Version 2 is live! It's a bit more complicated and buggy than this one, but has options for concatenated and nested tables. If you liked this one, I would thoroughly recommend giving mark II a look.

26 comments:

  1. If you can find an actual error, let me know and get +30xp for your next character.

    ReplyDelete
  2. This is the greatest thing. How is this not being lauded from the rooftops?? I am gonna use the living shit out of this.
    Also, options for subtables would be most useful!
    Also, trying to figure out how to describe it... there was this table from Gardens of Ynn, it was a d20 table with 30+ entries, and it had you add 1 to your result for each level of depth you were in the dungeon, so your results would be noticeably different the deeper you got. Something like that would be very, very useful for a project I have in mind.

    ReplyDelete
    Replies
    1. The subtable options will be in version two!

      Delete
  3. I don't have much HTML or java experience but I hope to put this framework to good use! I agree with Saker, there is so much potential for simple automation tools in tabletop and it always surprises me that these things aren't more ubiquitous, especially given how popular random roll tables are.

    ReplyDelete
  4. Replies
    1. Thank you! Your kind words mean a lot to me :D

      Delete
  5. This is great. A step forward from Last Gasp's generators. Easier to use and embed. Thank you!

    ReplyDelete
    Replies
    1. Now now, the Last Gasp generators are actually well-made, this is a kludge cooked up over 48 hours! But I'm glad you like it all the same

      Delete
  6. The little buttons are much more satisfying than most alternatives! Very Nice!

    ReplyDelete
    Replies
    1. Thanks! I agree, which is why I made it that way XD

      Delete
  7. Anybody knows how does it work (if at all) on Wordpress?

    ReplyDelete
    Replies
    1. The generator uses java embedded in HTML, so as long as there's a way to add HTML/java/CSS code to wordpress, which I imagine there is, then you would just post that code into the wordpress.

      Delete
  8. Hi there. This is obviously great, and thank you! I have a question - is there any way to use an image as the header? That would be very cool.

    ReplyDelete
    Replies
    1. I haven't done a whole lot with image handling, but I know it's possible. Check out here for more info about javascript, HTML and images https://www.w3schools.com/html/html_images.asp

      Delete
  9. Max, this used to work for me, but now when I click "codify me" nothing happens.

    ReplyDelete
    Replies
    1. Hey Phil, Angus is actually the original creator and still the expert imo, but even so if you send me your code I can take a look.

      Delete
    2. Add me to this small list of folk who this page doesn't work for anymore. When you figure out an answer please post it here!

      Delete
    3. Phill and Jay have you tried using the new version:
      https://meanderingbanter.blogspot.com/2018/10/automatic-list-to-html-translator-v2.html

      I haven't used this original version in a while, but I used the new version for part of my superheroes post earlier today, and admittedly I played around with the code for a while so I don't remember if it worked as-is, but in any case it worked haha.

      If the new version doesn't work for you, feel free to send me your code and maybe I can see what's wrong.

      Delete
    4. The new version works for me. So I am using that right now.

      Delete
    5. This is also broken for me, using Firefox and Chrome on Linux (add-ons disabled as much as possible).

      Delete
    6. Hey Ian, I don't think the operating system should matter. I haven't tested this code on Firefox but have not had any issues on chrome. Have you tried using the 2.0 version (https://meanderingbanter.blogspot.com/2018/10/automatic-list-to-html-translator-v2.html)? If that also does not work, if you send me your code I could maybe take a look at it.

      Delete
    7. Nooo idea what happened but I managed to break something! I've updated this, should be fixed now

      Delete
  10. Hello Angus Warman ! It's cool. Can I use it on my own blog just to try ? Thanks

    ReplyDelete
    Replies
    1. For sure! Tell me how it goes

      Delete
    2. Thanks ! It works but wordpress regularly makes the trick by turning the button into a "simple button" wordpress (no more function). Then, I should find how to layout the results generated by the button (html tags, illustration, ...). I'm going to search but it's already a start. Thank you for the code ! https://jeremydemeure.be/generateur-destaminets-wip/

      Delete

Note: Only a member of this blog may post a comment.