Results 1 to 3 of 3

Thread: Thoughts on a new way to define custom decks.

  1. #1

    Thoughts on a new way to define custom decks.

    Edited to fix some spacing issues in the xml & file list*
    I've been playing around with TableTop Simulator's custom decks lately and found its a pretty large pain to really customize the decks. Currently its all done with a simple atlas that TTS cuts up and lays the images on the cards. There is an app from another user that helps making build these atlases a lot easier, but I think a more robust way to define our decks would be very nice(if not essential). 12v Air Compressor

    Just to brainstorm a little, what about letting Unity handle building the atlas out of individual images and an XML file to define the deck?
    An example(in no way complete):

    An Example Deck:
    File List:
    /my deck/
    /my deck/deck.xml
    /my deck/Images/
    /my deck/Images/back_image.png
    /my deck/Images/card_image1.png
    /my deck/Images/card_image2.png

    Deck XML:
    <Deck Id="My example deck" Height="100" Width="100" Shape="Hexagon" Interlocking="True">
    <ImageList>
    <Image Id="BackImage" Location="./Images/back_image.png" />
    <Image Id="AttackImage" Location="./Images/card_image1.png" />
    <Image Id="DefendImage" Location="./Images/card_image2.png" />
    </ImageList>
    <CardList>
    <Card Id="Attack!" FrontImage="AttackImage" BackImage="BackImage">
    <OnFlip Action="(card)=> card.target.hp--"/>
    </Card>
    <Card Id="Defend!" FrontImage="DefendImage" BackImage="BackImage"/>
    </CardList>
    <DeckActions>
    <OnCreate Action="(deck)=> deck.shuffle()"/>
    <OnEmpty Action="(deck) => deck.game.end()"/>
    </DeckActions>
    </Deck>

    I think something along these lines would make it much easier for tools to create the decks AND
    for the engine to have a way to create specific decks without all the waste. The benefits of having all this extra information in XML means the developer can extend the format as they go along to expose an API for rules or just extra data the engine might use. It would also make creating tools for creating decks more capable as well. Also there is no atlas creation being done by the user, so we just scan a list of cards in and just build a simple xml file. Maybe even just zip the whole thing and rename it with .TTSD or something so it can all be easily downloaded and organized.

    Thoughts?
    Last edited by isoman; 07-14-2019 at 09:33 AM.

  2. #2
    I tried using the UI to draw data on my cards on the fly. It works, with some limitations. The UI data doesn't display in some circumstances, for example the top card of a face up deck fails. (not a problem for my mod)
    The UI inputs block access to the game UI elements. I have UI buttons on a game board, and the mod save/load interface is blocked wherever a UI input is behind it. I hope this will be corrected!

    So, a standard card with custom display.

  3. #3
    Note: There is a bug in TTS where any UI elements that share the same screen space (regardless if they are visible or not) can cause the UI buttons not to work correctly. Thus if your UI data are buttons and you are stacking them, you may have issues.

    If your images are already in the cloud (you will need this so that you can play multi-player games) then you can edit the save game file and set your cards that way.

    1. Create one card in TTS.
    2. Copy that card until you have enough copies for your whole deck.
    3. Save game
    4. Edit your save game JSON file. You should find a section for each card in the save game. Edit the urls to point to your desired image urls.

    You might even be able to write a simple app that inserts card objects into the save game file with the desired images.

Similar Threads

  1. New thoughts on Snaps: Pegs and Sockets
    By FoaS in forum Suggestions
    Replies: 11
    Last Post: 08-10-2018, 10:41 AM
  2. [DISCUSSION] Thoughts from me and my nephew
    By TheRaven81 in forum Scuttle!
    Replies: 0
    Last Post: 03-25-2017, 08:10 PM
  3. Some thoughts after 2 months of playing...
    By BrashFink in forum General Discussion
    Replies: 1
    Last Post: 03-11-2015, 01:33 PM
  4. Replies: 0
    Last Post: 06-20-2014, 10:20 AM
  5. Thoughts on a new way to define custom decks.
    By Nut in forum General Discussion
    Replies: 1
    Last Post: 05-03-2014, 10:05 AM

Posting Permissions

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