Results 1 to 2 of 2

Thread: Passing and returning a value to/from an object with the tablet - Is this possible?

  1. #1

    Question Passing and returning a value to/from an object with the tablet - Is this possible?

    TLDR - a. What details from the tablet object are available for scripting?
    b. Is it possible to pass data back to the tablet URL with scripting?

    Explanation -
    So I am getting into scripting to see how much more customization and personalization I can add to games that traditionally haven't had so much opportunity for in their physical tabletop form.

    I'm using X-Wing (and the Heroes of the Aturi Cluster modified rules for inspiration) as my foundation and am attempting to introduce completely customizable ships via an editable character/vehicle sheet. Following through on the character sheet forum thread, I learned that the tablet is meant to serve as the platform for customizable character sheets but I need that sheet to pass a value to an object that defines its final stat values ... (i.e. - as a rough example, pass value 6322210101 for a ship with a 6 pilot skill, 3 attack, 2 agility, 2 hull, 2 shield, yes focus, no evade, yes target lock, no secondary turret slot and yes missile slot, respectively).

    Up until now, I've been trying to build ways to create these dynamic character sheets in TTS directly, so that the GUID above is generated on-the-fly and freely available. The idea is to take a ship model from the game and drop it on the character sheet, which would then transform that model into the specified ship with the values provided by the sheet and the appropriate state forms for that model (shields up, shields down, minor damage, major damage and destroyed).

    These values would be hidden in the object table and would only display when the ship is hovered over or selected and would replace the static bases which would be removed in this version of the game.

    I expect there are some values from the tablet object exposed to the script engine but I have not gathered fully what are and are not available. I know that if I can see the URL the tablet is returning I can produce a query string pointer to determine the desired value that way, but I want to make sure I'm not missing a built-in feature that can manage this more readily.

    I would also look to pass details back to the character sheet in the tablet as necessary. Using the modified rules, players can gain xp they can spend on their skills and ships with every successful attack and kill. I would like to automate this feature by sending these xp +1 conditions back to the tablet (as well as the ship kill counts) as they occur for a truly dynamic record of that player's progression in the game. Passing such details in the URL query string would be tedious to say the least.

  2. #2
    Join Date
    Mar 2016
    Posts
    182
    Unless they're undocumented, there aren't any other specific object functions for the tablet other than getValue() and setValue() for the URL. If you're going as deep as I think you're going, I'd recommend doing your character sheets as TTS objects, or you'll have to write a robust web app to interpret all of your encoded URLs.

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
  •