Results 1 to 5 of 5

Thread: Loading remote saved object?

  1. #1

    Loading remote saved object?

    Hello! Is it possible to load a "saved object" JSON file from a remote source? I'm the developer for Ashes.live, a deck-building tool for Ashes: Rise of the Phoenixborn, and since most of the community uses TTS I'm looking into providing a way to load decks built on Ashes.live directly in TTS. It looks like I could probably do this via some sort of custom UI element that accepts a GUID, hits the Ashes.live API, and then programmatically spawns in the necessary cards in a deck. However, if there's a way to load a remote saved object, having Ashes.live just return the necessary JSON without all the Lua scripting shenanigans would be preferable for me.

  2. #2
    He man.... Hi from BGG!!! You ever see my Galaxy Defender mod! haha..

    Anyway... check out my LoTR LCG mod (search for dwarrowdelf) or my Call of Cthulhu mod... both of them have working deck builders that take exports from popular deck building websites.

    Dose ASHES have a online deck builder that the community uses.. and dose it export text files.. if so it would not be hard to build a simular deck builder in TTS using that export data.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  3. #3
    Hey Tragic!

    Quote Originally Posted by Tragic View Post
    Dose ASHES have a online deck builder that the community uses.. and dose it export text files.. if so it would not be hard to build a simular deck builder in TTS using that export data.

    Yep, my website Ashes.live is the de facto deckbuilder for the game, since the one Plaid Hat provided was...mmm...subpar, let us say (and is now completely gone, looks like). It would actually be trivial for me to directly export TTS saved object JSON from the site.

    I'll take a look at what your mods do, though! Just from digging around through the API docs it looks like I'll probably end up needing to parse text or JSON in Lua and construct objects on the fly in TTS rather than loading a saved object file remotely.

  4. #4
    Well, my mods.. what they do is read the text file and phrase it and then use the card names to pull the cards from bags...

    So.. say the deck reader reads "Spider if Many Legs x 3" or something like that on a line.. it splits that into "3" and "Spider of many Legs".. then the tricky part is that it uses a CLONE of the deck bag.... so I have bags with all the cards in them not in decks but as single cards. All named. Then the mod clones the bag, searches the bag for that card name, takes the card out of the bag and places it somewhere and then deletes the cloned bag.

    This way the "source" bags never actually change so you can run the deck builder as many times as you like and it will always draw cards.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  5. #5
    If you have a JSON in a format like TTS uses for storing objects (you can inspect a simple save to see how single objects are represented inside), you can spawn it super easily using spawnObjectJson function.

    Decks are slightly tricky though as they cross reference image data in multiple places in their JSON. You can try to decipher how decks JSON looks and try to replicate that, or use a tool like https://github.com/tjakubo2/Decker to spawn it in-game with just asset links.

    That's assuming you already figured out how to communicate with your site to get the data - essentially just WebRequest class.

    If you'd be stuck on details, feel free to ask or enquire on one of the TTS discord #scripting channels, you'd be able to get a much faster response there

Similar Threads

  1. Replies: 0
    Last Post: 05-20-2019, 11:41 AM
  2. [SUPPORT] Issue with textures and previews of saved objects not loading
    By soviman in forum Technical Support
    Replies: 14
    Last Post: 07-20-2018, 12:24 AM
  3. [SOLVED] Problem Loading A Saved Game
    By Ambermonk in forum Technical Support
    Replies: 2
    Last Post: 02-05-2016, 01:48 PM
  4. Keep persist tag when loading a saved game
    By kirby2u2 in forum Suggestions
    Replies: 0
    Last Post: 11-03-2015, 12:15 AM
  5. Custom Spawn points for loading Saved Objects
    By Lucky seven in forum Suggestions
    Replies: 2
    Last Post: 09-04-2015, 09:47 PM

Posting Permissions

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