Results 1 to 12 of 12

Thread: TTS Random DeviantArt Deck Creator

  1. #1

    Talking TTS Random DeviantArt Deck Creator

    TTS Deviant Deck Developer (v1.3)


    This is a tool that will take random Deviants from DeviantArt and turn them into usable TTS decks.




    Screenshot of console


    Screenshot of outputted image


    Some examples of games you can use this for are DiXit, Aye, Dark Overlord, perhaps even Codenames. See if you can find other uses.

    The .zip file will come with a folder named "Default". This is a basic template for creating decks. This will work to generate a deck, the only thing it needs is a BackURL to put on the back of the cards which you can specify in the included .JSON file.

    FILE ADDITIONS:


    You can use as many different folders as you like. Each folder is another configuration the program can pick up and it will ask you which one you would like to use when you open the program.

    If you add in a hidden.jpg file into the folder, it will use that image as the hidden image (the image shown when you view it face up in another player's hand). Every other image in the deck image will be scaled based around the hidden image. If you don't want a hidden image, you can provide an empty image with the dimensions you want and turn use_hidden_card off in the configuration.

    If you add a thumbnail.png file into the folder, it will try to supply that thumbnail along with the saved deck (if save_to_chest is switched on). It might be that TTS only accepts .PNG thumbnails with a 128px * 128px dimension. I haven't tried other sizes yet. If you want a realistic looking thumbnail, save one hidden deck with no thumbnail, drag it into the game and then Save to Chest. TTS will generate a new one for you to use. Then just copy that image into the folder and rename it to thumbnail.

    File Name Description
    title_exclusions.txt This is a text file with words or phrases you want filtered out of the Deviant's title, each on its own line. This is not case-sensitive. Any match is filtered out of the deck.
    desc_exclusions.txt This is a text file with words or phrases you want filtered out of the Deviant's description, each on its own line. This is not case-sensitive. Any match is filtered out of the deck.
    tag_exclusions.txt This is a text file with words or phrases you want filtered out of the Deviant's tags, each on its own line. This is not case-sensitive. Any match is filtered out of the deck.
    exclusions.txt This is a text file with words or phrases you want filtered out of the Deviant's title, description and tags, each on its own line. This is not case-sensitive. Any match is filtered out of the deck.
    title_inclusions.txt This is a text file with words or phrases you want in the Deviant's title, each on its own line. This is not case-sensitive. At least one match is needed to be put in the deck.
    desc_inclusions.txt This is a text file with words or phrases you want in the Deviant's description, each on its own line. This is not case-sensitive. At least one match is needed to be put in the deck.
    tag_inclusions.txt This is a text file with words or phrases you want in the Deviant's tags, each on its own line. This is not case-sensitive. At least one match is needed to be put in the deck.
    inclusions.txt This is a text file with words or phrases you want in the Deviant's title, description or tags, each on its own line. This is not case-sensitive. At least one match is needed to be put in the deck.
    If you right click a Deviant's page and click on 'View page source', you can find the list of tags the program filters within keywords content:

    Code:
    <meta name="keywords" content="Tag1, Tag2, Tag3...">



    The default size for the cards is 670 x 1050 pixels.
    The card backgrounds are based on the colour of the top left pixel of each image.

    The title text uses the font: Arial Rounded MT Bold
    The link text uses the font: Arial

    There are some images this tool won't use from DeviantArt:
    • The minimum size for an image is 200px by 200px. This is to filter out small images.
    • The image is constrained to where the height of the image can't be more than twice the size of the width and vice versa. This prevents any long comic strip type posts from ending up in the deck which are unreadable.
    • Any mature content which require a login or date of birth validation are filtered out.


    CONFIGURATION:


    Boolean values will accept '1', 'yes', 'true' and 'on' for a True value and '0', 'no', 'false' and 'off' for a False value.

    Setting Type Default Description
    upload_to_imgur Boolean no Changes whether the program uploads the completed deck image to imgur or not.
    upload_to_pygy Boolean yes Changes whether the program uploads the completed deck image to pi.gy or not (This is spelt wrong in the program, whoops! This will be fixed in a future update or just removed altogether if pi.gy doesn't return).
    save_image Boolean no Changes whether the program saves the completed deck image or not.
    use_title Boolean yes Changes whether the program uses the title text on each card or not.
    use_link Boolean yes Changes whether the program uses the links on the bottom right of each card or not.
    use_hidden_card Boolean yes Changes whether the program uses a hidden card, otherwise it will fill in the last space with a new random card.
    deck_size_x Integer 10 Changes the amount of cards on the X axis.
    deck_size_y Integer 7 Changes the amount of cards on the Y axis.
    save_to_chest Integer yes Changes whether or not it saves the completed deck to your chest.
    dir_path Path Manually sets the directory path for your Saved Objects folder. Change this if the program is having difficulty finding it by default.


    DOWNLOAD THE LATEST VERSION HERE


    ~ Markimus

    P.S. If you're feeling generous, you can donate to me here:


    Last edited by Mark; 02-28-2018 at 06:10 PM.

  2. #2
    Suggestion: Add a way to let the program do a search (either just a regular search, possibly with sorting options, or a tag search) and then pull images from just that to generate a deck.

    Also, if you add the name and artist on the top, maybe add the short url (the fav.me one) at the bottom.

  3. #3
    Quote Originally Posted by m2pt5 View Post
    Suggestion: Add a way to let the program do a search (either just a regular search, possibly with sorting options, or a tag search) and then pull images from just that to generate a deck.

    Also, if you add the name and artist on the top, maybe add the short url (the fav.me one) at the bottom.
    Thanks for the suggestions! I'll see what I can do.

  4. #4
    Here's a preview of the upcoming version 1.1. It's still just uses random images. Getting specific images from a custom search would require an overhaul.

    Changelog:
    • Added title text and short URL.
    • Configuration file allows you to adjust the save options and the card options (whether to use the title/short URL or not).
    • Images that are too small for the card will now stretch to fit proportionately.




    EDIT: May also add configurable deck dimensions so you can adjust it from 10 by 7 to say, 6 by 6, as well as a way to use no hidden image.
    Last edited by Mark; 05-06-2017 at 05:25 PM.

  5. #5
    this is cool!
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  6. #6
    Version 1.1 is up! Let me know what you think.

    I have an idea of how I'm going to do the custom search, but it may be quite a bit slower than the normal deck developer. For example, if I wanted to find frog cards for my amazing frog adventure game I'd search each random image's page for the word 'frog' and only return it if it finds that phrase. Then we will have decks filled with frogs. We shall see.

  7. #7
    I sent you a PM about all this.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  8. #8
    I was looking for a new place to store images and I found this: pi.gy

    Looks like it will accept anything under 10Mb which means that deck images should get through just fine. The problem with the direct imgur upload is that decks are appearing blurry as they're being uploaded anonymously.

    Example:


    It looks okay from just looking at the deck image as a whole, though they are actually kind of lame in game with the blurriness of the image on each card and you can't make out the long links as it's blurred too much.

    Another thing I'm possibly going to work on is a way to automatically save the completed deck to your Saved Objects (thanks Tragic!), so you won't even have to take time to spawn one in any more. I can optimise the .JSON file a lot and TTS will still spawn it in perfectly.

  9. #9
    Version 1.2 is out! Lots of changes and additions!

    Changelog:
    • New image host at pi.gy! Now cards will look much clearer than before. (If you have trouble with this, feel free to switch back to using imgur.)
    • Folders! Create as many configurations as you like and choose the one you want when you load up the program.
    • With the save-to-chest option, you can now save the deck directly to your Saved Objects once a deck has been completed! The .json file can be edited and changed so that you can save a different size, colour or whatever you fancy.
    • Add a 128*128px thumbnail.png to your folder to save the deck object with a thumbnail.
    • The Windows exclamation sound plays when a deck has been successfully saved to your chest.


    I have no idea if this works for other OSes. It's unlikely, though do let me know. Assume Windows only support for now.

  10. #10
    Updated to version 1.3!

    Changelog:
    • Added the ability to add image exclusions and inclusions to your folder. More info can be found in the parent thread.
    • Fixed a bug where pressing Enter to re-run the program to create another deck with identical parameters would produce two copies of that deck, instead of just one.
    • New program icon.

  11. #11
    Pi.gy is disabled apparently. Switch to imgur for now, at the cost of slightly lower quality cards.

    Also, could someone please move this thread to Original Content?

  12. #12
    Anyone else having issues with this? Just reinstalled Windows and getting an error.

    Code:
    Exception in thread Thread-5:
    Traceback (most recent call last):
      File "threading.py", line 916, in _bootstrap_inner
      File "threading.py", line 864, in run
      File "Script1.py", line 263, in make_card
      File "site-packages\PIL\ImageFont.py", line 238, in truetype
      File "site-packages\PIL\ImageFont.py", line 127, in __init__
    OSError: cannot open resource
    Maybe something wrong with how my system is set up?

    EDIT: The Arial MT Rounded Bold font wasn't installed. This is the font used for the card text, so it's trying to retrieve something that isn't there.

    EDIT 2: You can download the font from here:
    https://www.dafontfree.net/freefonts...ld-f100343.htm
    Sorry for it not working immediately out the box.
    Last edited by Mark; 04-10-2018 at 08:18 PM.

Similar Threads

  1. Naming random zones
    By Unreal_Ed in forum Suggestions
    Replies: 4
    Last Post: 12-29-2016, 05:14 PM
  2. [SOLVED] random crashes with a R370 GPU
    By jexbe in forum Technical Support
    Replies: 5
    Last Post: 08-09-2016, 03:32 PM
  3. Replies: 9
    Last Post: 07-23-2016, 11:48 AM
  4. Custom Soul Card Creator
    By Kimiko in forum Battle For Souls
    Replies: 0
    Last Post: 05-10-2016, 05:39 PM
  5. Random Map generater
    By cgg1 in forum Suggestions
    Replies: 0
    Last Post: 03-23-2015, 06:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •