Hidden Information in Tabletop Simulator

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • Learn how to use zones in Tabletop Simulator to hide information from specific players. Watch to the end for a scripting example for implementing hidden zones that aren't visible while playing! Full Prototyping in Tabletop Simulator playlist here: • How to Prototype in Ta... .
    Tabletop Simulator Website: www.tabletopsimulator.com/
    SUBSCRIBE for more content that sparks growth in your journey as a game designer.
    0:00 Intro
    0:45 Hidden zones
    5:37 Moving and resizing zones
    6:53 Hand zones
    10:05 Scripting an "invisible" hidden zone
    17:39 Outro
  • ИгрыИгры

Комментарии • 46

  • @LudoLodge
    @LudoLodge  3 года назад +5

    IMPORTANT NOTE (pinned for visibility):
    For my example, I was working from a new TTS file that hadn't been saved yet, and you'll notice that when I hit "Save and Play" from the scripting editor at 16:22, it flashes the "Error no save found. You must load a save first" message. Since I hadn't saved the mod yet, it just applied the scripting changes without loading anything. However, if you are working from a mod that has been saved and loaded (which is going to be more common in the long run), it is important to understand that hitting "Save and Play" will first LOAD the last saved version of that mod, and THEN apply the changes. This means that any non-code additions to the game that haven't been saved yet will be lost when it loads the save file.
    Long story short, if you add a scripting zone, you will need to save the mod before saving code changes, ensuring that the scripting zone is in the save file. Then when you hit "Save and Play" from the scripting editor, you won't lose that scripting zone when it reloads.

  • @Dark_Peace
    @Dark_Peace 5 месяцев назад +1

    "But Tabletop Simulator is more powerful. It is not limited to the physical realm."
    That got very ominous

  • @ryanmscot
    @ryanmscot 3 года назад +4

    Just a heads up @Ludo Lodge, I believe the "See-Through" option on hidden zones only has an effect on the 'targeted' player. Since you were the white player toggling see-through on a white hidden zone, you saw no change. For any other player's view, the box would have toggled from a transparent cube to a fully opaque cube. This can be useful if you want to allow the art on the gameboard to be visible while hiding components for example.

  • @RefugeeOfReality
    @RefugeeOfReality 3 года назад +3

    The scripting part is spicy!
    I am setting up a Pen & Paper pool group table right now and I just got the Idea of implementing a tool for a player who uses an invisibility spell to ACTUALLY turn their character figurine invisible for the other players. This is gonna add some more depth to the gameplay! Thank you for this comprehensive guide!

  • @larrye
    @larrye 4 года назад +8

    I'd Love to see more on scripting.

  • @perryb.2732
    @perryb.2732 3 года назад

    Wow man, your videos are helping me so much, thank you. I'd be lost in the sauce, but thanks to your videos I actually have a really streamlined prototype for my board game that is really helping me test it

  • @DavidDaSilvaConceptions
    @DavidDaSilvaConceptions 4 года назад +1

    Thanks! that was very informative. I knew about hidden zones, but not about using scripted zones to make "invisible hidden zones"!

  • @PaulMB40
    @PaulMB40 3 года назад

    Thank you for this. Solved all my zone problems. Much appreciated!

  • @DipsticksOfficial
    @DipsticksOfficial 4 года назад +1

    Thanks, this video was an awesome introduction, and it helped me get rid of those ugly boxes lol. I made an invisible scripting zone on top of a "cauldron" that I locked to the table, and now I'm working on how to make the cauldron produce specific potions depending on what ingredients are dropped in... either way, there is no ugly translucent box around the cauldron, so thanks again!

  • @mesmith7015
    @mesmith7015 2 года назад

    This was exactly what I was looking for. Thank you!

  • @ddade11
    @ddade11 3 года назад

    Oh yes! This video is what I have been searching for! Thank you , thank you! I have a hidden planning phase in my game and I need a way to temporarily hide player setup between rounds. I had overlooked the scripting zones because I had not found anything on them. I think this is my answer. Move the zones up during hidden setup and then move them down to reveal the decisions. Tie that to a button and Bob's your uncle!

  • @lbwstrategygaming
    @lbwstrategygaming Год назад

    Thanks for the info, love it, going to use it for RPG's

  • @St34mPunkPrivateer
    @St34mPunkPrivateer 2 года назад

    adding comment cause this was a nice overview of a simple mechanic!

  • @GavinAndMartin
    @GavinAndMartin 3 года назад

    Hi! I think you’re just brilliant and extremely pedagogic. I wonder if you would like to make a video showing how to script a button for toggling a hidden zone on/off. It would be desirable if it is the same button which you press to turn on the hidden zone and, when you press it again, turn off the hidden zone. A kind of screen when dealing with hidden bidding.

  • @Lasrin
    @Lasrin 3 года назад

    Brilliant! I can make a model with a state that is invisible to the players, but I can still see it!

  • @rorobear1940
    @rorobear1940 Год назад

    Thanks a lot for this wonderful tutorial. Is it possible to have a hand of cards where some of the cards are hidden and some of them are “reverse hidden”, aka facing outward from the player holding them?
    Is it possible to assign two hands per player, one where the cards are hidden and the other where cards are reverse hidden?

  • @andreasthedude3843
    @andreasthedude3843 4 года назад +1

    Thank you for this helpful video. I'm very interested in seeing more of this topic. Keep up the good work!
    Maybe I learn it by watching the following content or you have the solution to my problem:
    Beeing the host of a game, I deleted a counter by accident when i wanted to change the number i typed in. Respawning it from saved objects didn't fix the function of it.
    It was a Standard tts-Counter with some buttons attached to it, to move player money from and to the bank. And it had a button to pay a certain amount of money to players depending on the number of Share cards in their hand.
    You can see it in the workshop module of 18Chesapeake. Is there a way of protecting game pieces from beeing deleted by the Host or promoted players? Or is there a way of regaining the scripted function of such a piece? Also would love to See, how to implement such a function in a game. Thanks for your excellent Work so far. Really enjoying the stuff.

  • @erikmisiego2676
    @erikmisiego2676 2 года назад

    great video

  • @BishNufc
    @BishNufc 3 года назад

    Hi Ryan. You can also change the opacity of hidden zones in the 'Configuration' menu (Menu Button-->configuration-->interface-->Misc settings) where there are options to show and hide hidden zone opacity values. Setting these to zero makes the zones invisible to either the owner and/or every other player, it does show the zones' outline however when you drag something into it.
    Edit - However this effect is applied to every module you play (i.e. it is Global) so if you need different settings for individual modules then your scripting zone example may need to be used.
    I bet there is a function that changes the capacity in LUA :)

    • @LudoLodge
      @LudoLodge  3 года назад

      Interesting! I didn't see an opacity parameter for zones on a quick scan through the API, but perhaps there is a way to do it!

    • @damonmosier3651
      @damonmosier3651 3 года назад

      @@LudoLodge Is there a way to set invisible zones for teams instead of colors? Like the "Spade" or "Hearts" teams. I know you can set a zone to be a hidden zone for a particular color, and then anyone on that team can see it, but that only works if someone is playing as THE color specified. I'd rather specify a team and then anyone of any color can see it if they just join that team.

  • @natesyourmom
    @natesyourmom 3 года назад

    Excellent video and series, I really appreciate the time and effort you put into this! One question: why at 5:17 does it look this game is being played in prison? :)

    • @RyanLangewisch
      @RyanLangewisch 3 года назад

      Ha! Didn't notice before, but when you open a new file in TTS it just selects a random background. 😂

  • @josemariaalvarezcejudo404
    @josemariaalvarezcejudo404 6 месяцев назад

    Great tutorials! I'd like to make a mod about the Resistance (werewolf too), you know, the spies (wolves) know each other but not the rest. How can I make a script to do that? When they receive the spy card, they get a text? Is there a better way? Thanks un advance!

  • @Jhakaro
    @Jhakaro 3 года назад +1

    I want to place in two hidden zones, one on each side of the board for the beginning of play. Think of it like setting up pieces without the other being able to see until the main game actually starts. I have tried multiple times to absolutely no avail and feel like pulling my hair out to be honest. I've set it to work where one side, let's say white, can't see what's placed inside the other's zone (green) but for some reason, the green player can still see what's placed in White's zone. The code is the exact same save for the replaced ({"Green"}) instead of white and the new code for the scripting zone identifier itself. I've double checked everything and it's still just not working. Any help is much appreciated.

    • @damonmosier3651
      @damonmosier3651 3 года назад

      hah I came here to say I am having the exact same problem. It seems like one scripting zone overrides the other one or something. Like only the last one in the LUA code works and all previous ones do not. I've tested this by adding the "--" in front of each line of code to turn them "off" and run one or the other, but they can't seem to both work at the same time.
      The only thing I can think of is putting all of the scripting zones within the same "onObjectEnterScriptingZone" function and then maybe using the "if", "elseif" functions to see if you can stack them that way? But I haven't tried it yet.

    • @noahfeldman3377
      @noahfeldman3377 2 года назад

      Just tried out the elseif and it works. I was having the same problem

  • @caioteixeira1541
    @caioteixeira1541 2 года назад

    Is there a way to do it, but instead of triggering when the obj "enter or leaves" the zone make it trigger if the object is "INSIDE" the zone?
    Because lets say you make a zone that is visible only to player Blue, if you have previously saved objects inside the zone it will not trigger the script because it never "entered" the zone.
    Thanks for the help

    • @LudoLodge
      @LudoLodge  2 года назад +1

      I suppose at the very beginning of the game you could check for objects in the zone, but then after that those objects will only change if the enter or leave event is triggered. You can use the getObjects() function on the zone to get all the objects currently in that zone.

    • @caioteixeira1541
      @caioteixeira1541 2 года назад

      @@LudoLodge ty I'll try with that function and see how it goes

    • @LudoLodge
      @LudoLodge  2 года назад +1

      Here is the documentation for that function that might be helpful: api.tabletopsimulator.com/object/#getobjects-zones

  • @gabrieldespres4410
    @gabrieldespres4410 4 года назад

    Thank you for that! But it keeps showing "Error in script, unexpected symbol". I wrote the exact same thing as you and it does not work... :-( Do you have an idea why?

    • @LudoLodge
      @LudoLodge  4 года назад

      That error indicates that there is some kind of syntax error; that is, text that doesn't follow the rules of the programming language (Lua). If you paste the full contents of your script here or link to it, I'd be happy to take a look and see if I notice something.

    • @gabrieldespres4410
      @gabrieldespres4410 4 года назад

      Yeah, sure! Here it is:
      --[[ Lua code. See documentation: api.tabletopsimulator.com/ --]]
      --[[ The onLoad event is called after the game save finishes loading. --]]
      function onLoad()
      --[[ print('onLoad!') --]]
      end
      --[[ The onUpdate event is called once per frame. --]]
      function onUpdate()
      --[[ print('onUpdate loop!') --]]
      end
      function onObjectEnterScriptingZone(zone, obj)
      if zone.getGUID() == '1295c3' then
      obj.setInvisibleTo ((Red))
      end
      function onObjectLeaveScriptingZone(zone, obj)
      if zone.getGUID() == '1295c3' then
      obj.setInvisibleTo(())
      end

    • @LudoLodge
      @LudoLodge  4 года назад

      @@gabrieldespres4410 Ah caught it! The inside of the setInvisibleTo() function should use curly braces, i.e. obj.setInvisibleTo ({Red}).
      Hopefully changing that it both places fixes it for you!

    • @gabrieldespres4410
      @gabrieldespres4410 4 года назад

      It did not work :( It keeps saying that there is an error near "(", but when I deleate the function, same. When I deleate the first part (the one that is there by default) same error message. I don't understand. But thank you for your support, I appreciate! Last question, would it be possible to set a specific object invisible, no matter where it is on the table?

    • @LudoLodge
      @LudoLodge  4 года назад

      @@gabrieldespres4410 Ah sorry, it sounds like another syntax error, but hard to say what it might be without seeing it. Best I can recommend is to very carefully check it against the code in the video.
      SetInvisibleTo() is a function that is called on an object (in this example, it is the object that is passed into the onObjectEnterScriptingZone() function). If you pass all of the player colors to that function, then it will be invisible to all of those players. The location of the object will have no impact (the only reason it does in the example is because we explicitly set the visibility back when it leaves the scripting zone).
      All of this can be a little confusing without prior programming experience, but I am planning on eventually doing some more introductory tutorials for scripting functionality. Just wanted to touch on it in this video since it was related to the topic of zones. :)

  • @Konstrukto_spons
    @Konstrukto_spons 3 года назад

    for some reason my code doesn't seem to work either, that is to say, once I click 'save and play' my scripting zone disappears and the code doesn't function
    which makes sense with no scripting zone present...
    here's my code:
    function onObjectEnterScriptingZone(zone, obj)
    if zone.getGUID() == '660b6d' then
    obj.setInvisibleTo ({"Blue", "Purple", "Yellow"})
    end
    end
    function onObjectLeaveScriptingZone (zone, obj)
    if zone.getGUID() == '660b6d' then
    obj.setInvisibleTo ({})
    end
    end

    • @LudoLodge
      @LudoLodge  3 года назад +2

      You bring up something that I really should have mentioned in the video! For my example, I was working from a new TTS file that hadn't been saved yet, and you'll notice that when I hit "Save and Play" from the scripting editor, it flashes the "Error no save found. You must load a save first" message. Since I hadn't saved the mod yet, it just applied the scripting changes without loading anything. However, if you are working from a mod that has been saved and loaded (which is going to be more common in the long run), it is important to understand that hitting "Save and Play" will first LOAD the last saved version of that mod, and THEN apply the changes. This means that any non-code additions to the game that haven't been saved yet will be lost when it loads the save file.
      Long story short, once you add your scripting zone, you are going to want to first save the mod. This ensures that the scripting zone is in the save file. Then when you hit "Save and Play" from the scripting editor, you won't lose that scripting zone when it reloads. Hope that helps!

    • @Konstrukto_spons
      @Konstrukto_spons 3 года назад

      @@LudoLodge I'm going to try that, thanks!

    • @Konstrukto_spons
      @Konstrukto_spons 3 года назад

      Worked like a charm, and hovering over the save &play button actually mentions it as well
      There's another issue I encountered with this though
      The game I have up on TTS has up to four players, and I would like to have a hidden zone for each of them
      Repeating the code a second time annuls the first time though, even though one color differs and another object is mentioned
      I tried a few times, experimented with saving first etc., unfortunately to no avail

    • @LudoLodge
      @LudoLodge  3 года назад

      @@Konstrukto_spons So for each of the scripting zone events, you will need to duplicate the "if" statement four times, with each one checking for a different GUID, one for each of your scripting zones. If that doesn't help, feel free to paste your code here and I can see if I spot anything.

    • @Konstrukto_spons
      @Konstrukto_spons 3 года назад

      @@LudoLodge so what you're saying is that instead of repeating the code four times, I should just repeat the 'if' statement four times within the code?