You've got to be one of the best teachers I've ever seen. Very structured and not skipping a thing. All that with a good flow. Well done sir!
@SuperWaistcoat3 жыл бұрын
Bruh, my project was to make a button that makes the die roll and I never thought I'd find a video so straightforward. Thank you!
@Spyderjav3 жыл бұрын
Dude, this is my first Intro to coding ever, and you made it totally accessible and easy to understand. The good people who developed TTS need to pay you to help game designers!
@jjsoety3 жыл бұрын
Outstanding series for learning scripting from scratch. I tried to digest the TTS wikis, but found that they assumed too much for the non-coder and skipped lesson one. But here you demystified the API calls and basic function design so anyone could understand. And from that basis, the entire library opens up. Then you went above that and showed practical game applications that anyone could apply. If I were TTS, I'd link your videos into the documentation, since they are a great showcase of the app and a great intro. Well done.
@SlendySWIRS3 жыл бұрын
Ryan: "Nothing I do in this session is gonna be particularly useful" Practically everyone who got up to this point: "I just got 19 minutes of proof against that statement" ;) But seriously, this video is so educational and so clearly explained at the same time which makes it a great tutorial for everyone! Absolutely recommended!
@mikeritter76293 жыл бұрын
29:33 i just love how realistic this tutorial is made, even the "standard protocol" of implementing new code is shown :D Jokes aside, very good video! It helped me a lot already
@PhonicNoteStudio4 жыл бұрын
My first introduction into Lua Scripting for Tabletop Simulator and it was a fantastic time of learning how it's all done. I first saw just how far it could go when someone made Catan a long while back, along with another person who added auto resource card distribution to their version, and it really sparked the interest in me to make my own stuff like that. I really liked the video and enjoyed going through the whole process and even having a few bumps and figuring it out on my own. Eventually, I started experimenting with some of the lines of code, trying to get the button to roll two dice at once. Haven't quite figured it out yet, though... I definitely intend to go through the rest of your videos to better learn how I can do more of this in the future. This was really helpful. Thanks a whole bunch for opening the door to a really fun experience.
@jasongravitt5565 Жыл бұрын
Best practices I wish I knew back when I started! Love it. Spot on job, I look forward to learning more.
@TheGrimmy3 ай бұрын
Oh thank goodness it's close enough to C# that I won't have a headache learning this! Thank you so much for spelling it all out :D
@middleclassjoe4 жыл бұрын
Great intro, Ryan. It’s the series I’ve been waiting for and I’m really looking forward for what’s coming next. A couple of things I’d like to see: Auto setups Exploding dice Auto score calculation
@LudoLodge4 жыл бұрын
Great suggestions Joe, thanks!
@middleclassjoe4 жыл бұрын
@@LudoLodge I'll add one more: Is there a way to turn off the auto rotation of cards as they move into and/or out of decks? (For games that use card rotation to represent various cards states). Thanks again for all your hard work.
@DarkshanubiMedia6 ай бұрын
Great video, looking forward to going through the rest of this playlist. I am building up to scripting my own board game, which would need to feature things like drawing cards equal to the remaining HP a player has. And somehow figuring out how to script damage tracking across the entire game. Hoping your videos can help me build the foundation I will need to tackle this.
@saxman75753 жыл бұрын
Just starting to learn different programming languages, I definitely appreciate hearing about the best practices upfront! I look forward to watching more of your videos and getting a lot more out of TTS!
@WegderPain Жыл бұрын
Really really well done tutorial! I am looking forward to the next videos
@Duke_Blitzein4 жыл бұрын
This is great! Thank you Ryan. I made my first button! and it's working. I got snagged for a little bit because I had (a) captial/s on the "F" and or "E" on function and end.
@bizdaretz86795 ай бұрын
30:41 No, you are incorrect.... I am **VERY** coding illiterate... and yet... I DO know how to work with FUNCTIONS (Thank you Minecraft) Your simple video here, has given me ideas for WHAT I should be doing to get TTS to do what I want it to do. So thank you, I am genuinely very grateful for this video.
@LudoLodge3 ай бұрын
So glad I could help! 🙂 -Ryan
@DaleHarty3 жыл бұрын
This is so very helpful and the way you presented the info is so elegant. Thanks so much.
@WhiteGaming58833 жыл бұрын
definitely awesome intro to scripting in TTS~!
@caryxiao16034 жыл бұрын
Pretty awesome introduction. I have always felt a little intimidated using Lua since I was a child because my little kid mind years ago tried to mod a game that's in Lua. Didn't realize it was that much similar to a lot of other programming languages I'm now used to writing in.
@andrewwilson8954 жыл бұрын
THANK YOU. I look forward to more scripting tutorials.
@koyapachi2 жыл бұрын
Very understandable. You are a great teacher!
@creepincat73993 жыл бұрын
Great introductory video. Thank you
@mrreddragon41643 жыл бұрын
Thanks for making these videos, they were a big help in getting me started in modding for TTS
@TheFowo3 жыл бұрын
Thanks for the series mate! I've been slowly learning scripting throughout last week to script my card game (ideally it'll go to my portfolio to secure that game design job one day). Found your channel today and looks like lots of useful information that will significantly speed up that process. Keep up the great work!
@mFurb9883 жыл бұрын
Wonderful, great first look at scripting of tabletop simulator thank you.
@bugwar5545Ай бұрын
Nice video. Thanks for making it.
@FerintoshFarmsPhotography2 жыл бұрын
I'm totally going to add function onload to randomize the POI's in the flashpoint mod i'm modding.
@LeeHeluo3 жыл бұрын
This tutorial is helpful and easy to understand for a noob like me haha, hope you will make more video about script OuO.
@marcusburnham99204 жыл бұрын
Hey Ryan, thank you so much for these videos. They're really well made and really useful.
@jesusmaldonado45964 жыл бұрын
Thanks for the video, it was really helpful and you're a very nice teacher.
@joerihessels82304 жыл бұрын
Thanks for the introduction Ryan! Looking forward to a tutorial on automatic setups :)
@tuff-luck49464 жыл бұрын
That was good, I’m well beyond beginner at this stage, but everything you explained was clear and easy to follow. Looking forward to some more advanced ideas. My current weakness is xml UI coding. It doesn’t come natural, and I just have to keep iterating until I achieve what I want. I can’t seem to visualize the code the way I can LUA.
@merezko43394 жыл бұрын
As do I buddy, I can't get my head around the XML, I've done some cool things for my card games but I still can't figure it out, if Ludo could do some tutorials on that I'm subscribed so I can watch those soon hopefully
@FabioSpelta3 жыл бұрын
@@merezko4339 lol you're the gui of the mtg importer
@merezko43393 жыл бұрын
@@FabioSpelta Yep that's me! the one with my face on it :D
@Denzarki5 ай бұрын
you say at the end there is nothing useful for me.. however the explaining putting object specific code onto the object is very useful.. I have taken over someone else's mod and kinda winging it learning what i need to do on the fly and i really didn't know when to move things out of global into the object.. Also the buttons.. anytime you google it tells you how to make a button using lua, i didn't know you could do it with UI so i can do that now and clean it up :) Thankyou
@LudoLodge3 ай бұрын
Glad I could help! 🙂 -Ryan
@tommcfly27312 жыл бұрын
Thanks, very useful.
@avennine Жыл бұрын
I am pretty clueless when it comes to scripting, and I had a question. I have 2 hidden zones. I want to bind a key (maybe the ''J'' key, I don't think that is normally used for anything else) that when pressed will change the position of both hidden zones (maybe below the table) so their contents are no longer hidden. and if pressed again, they will move back (making this a toggle switch). how do I do this? I know I prolly need to use addHotkey , but I can't understand how to structure the code and such.
@captaindragon4 жыл бұрын
pretty awesome introduction, if come with more projects, it should be better.
@Zaki-pi9kq3 жыл бұрын
thank you so much for these videos.
@wishmeheaven2 жыл бұрын
Thank you very much for this video. If I dream to be a programmer who able to combine my love to board games and programming capabilities does Lua is my best option? Or you recommend to learn other programming language? One that will actually companies in the world are looking for programmers in, and it is actually possible to fund your life with?
@rszarvas3 жыл бұрын
Great tutorial, thanks! It possible to change a specific custom model's color after clicking the button? I'd like to change a lightbulb color for 5 seconds after the button is pressed.
@pirincio201510 ай бұрын
Hi, I saw your video today: just a I hope useful note for everyone: Atom editor no longer support tabletop plugin.
@milesk24066 ай бұрын
Hey, great video. I want to add to my game a button that can either say "Start Turn" or "End Turn" depending on when it makes sense. But I want one for each player, and any player can only hit their "Start Turn" button once the player before them has hit their "End Turn" button, AND (unfortunately, this goes on), when a player hits their start turn button I want a card to be drawn from their deck into their hand, unless they have reached the hand limit or their deck is empty, in which I want their discard pile to be shuffled and made into their deck (and then a card is drawn). AND, when they hit the end turn button I want all of the dice that they have drawn from an infinite bag (which act as trackers of how many turns need to pass for an ability to activate) to move one number down, unless it has already reached the "0" side, in which it should do nothing. ...Any chance you could help me with that?
@King_Change3 жыл бұрын
I was pretty sure I typed the write sequence for the button code and then my button just wasn't clickable and the text was backwards and using some strange characters, do you somehow know why?
@King_Change3 жыл бұрын
Nevermind, my checker was upside down ;(
@stickmanster9142 жыл бұрын
@@King_Change Thank you so much for saying that! I was going crazy over that exact same problem
@johndragonrider88 Жыл бұрын
I had the same problem! Thank you so much!
@Noisymedal10 ай бұрын
I'm making a dungeon-generator for Tabletop Simulator as a university project and I'm running into a hurdle that I thought you might be able to help me with. I have thrown this problem at Reddit as well. As it stands, I'm capable of generating a board through a Json file by accessing image files on the local disk, but these dungeons are not visible in multiplayer. I can upload these images to the cloud in-engine, but that defeats the purpose of the generator. Is there a way I can prompt the user to upload the images upon load? I'm seeing a glimmer of hope in Lua scripting (for which I've grasped the very basics) but I can't seem a way to prompt the user with the option to upload the images to the cloud. Is there another example I can reference?
@Milhenar Жыл бұрын
Actually I think this is very helpful because I'm making a prototype of a The Stars Are Right game on TableTop and the middle zone needs to be randomized onLoad, I just need to know if this will apply to the entire zone of randomization :D
@ТсссПссс3 жыл бұрын
очень хорошо рассказал для новичков, что куда нажимать чтобы начать
@reissarud3 жыл бұрын
Thank you !
@mrluke06603 жыл бұрын
Hey Ryan, this video is great and has helped me on my way to setting up some cool basic tabletop stuff! I just have a question, can you make a button activate a pull-out slide (on a table) or other already scripted events? like making a secondary form of activation? Thanks!
@LudoLodge3 жыл бұрын
I'm not sure about the slide on the table, but in general, if you want to call a function on a different object, you will want to find that object by GUID and then use the "call" method: api.tabletopsimulator.com/object/#call
@pcuimac3 жыл бұрын
You need to isolate your mic from the desk. Every time you press buttons or put your hand on the desk, it makes a bump noise in the audio track.
@japanaman24 жыл бұрын
What would be useful currently is I want a marble to pass through a scripted zone and then when that happens trigger poker chip generation/deletion (basically payout, and deletion of chips) on betting spaces. and then if able to pay out directly to the hand of players sitting at the table rather then just making chips on the betting spaces.
@LudoLodge4 жыл бұрын
So first you would want to use the "onObjectEnterScriptingZone()" function and check if the object is the marble by comparing the GUID. If it is the marble, then you can create the chips at the appropriate places, and use the "deal()" function if you want the chips to go to specific players' hands. You can check out my tutorial on Card Auto-Refill for an example of generating chips at locations: kzbin.info/www/bejne/nYi1lGhuhrOSntE
@japanaman24 жыл бұрын
@@LudoLodge Thank you this helps a lot.
@dePokke4 жыл бұрын
Would it be possible to have tokens show a 'back side' to certain players, while showing the other side to the 'owner' of the token? And to add a 'show hidden' button so that in certain cases you can show the opponent the state that you are seeing? As in the many 'blockgames' (Hammer of the Scots, Sekigahara, ...) or as in the old classic 'Stratego' for instance? That would prevent players from simply rotating around the board to cheat and watch the front side.
@LudoLodge4 жыл бұрын
As far as I know, there isn't a way to do this with scripting. It really can just simulate how the game would be at the table, where you also technically can't prevent players from just looking at the other side. Maybe defining some custom saved cameras and then agreeing not to manipulate the camera would be close? But it likely boils down to the players agreeing to not cheat.
@dePokke4 жыл бұрын
Yes, that's what I feared. As a fan of the Columbia blockgames (and Sekigahara) I was thinking about this again when I saw your movie about 'invisble hiding zones' (?). So I was hoping that maybe you can have two of these zones over each other (one for each player) and both would see only the 'state' of counters in what their particular zone allows. Or using cards instead of tiles and having the so-called 'hand zone' spread out all over the map. So that the opponent can only see the backside of the card while the player who owns the card can see the front. But I did assume that this was wishful thinking as if it was possible someone would probably have done that before. Thanks for the reply and keep up the good work!
@dePokke4 жыл бұрын
[Quote: Maybe defining some custom saved cameras and then agreeing not to manipulate the camera would be close?] To continue on this: Would it be possible to trigger some warning if any of the seated players rotates their view so that they end up at the opponent's backside? Or even block such attempts in a script? That would have the same effect as hiding pieces from the non-owner.
@LudoLodge4 жыл бұрын
@@dePokke The short answer is that there is probably SOME way to accomplish that kind of thing with scripting, it's just a matter of how "hacky" or unconventional your approach would need to be. Hard to say for sure without really diving in and giving it a try, but let me know if you figure it out!
@bigal1154 жыл бұрын
Thank you for the turtorial. Just curious is it possible if you can play music as soon as the game is loaded?
@LudoLodge4 жыл бұрын
I haven't used the Music Player functionality myself, but it looks like there are functions for setting the audio clip and playing it (api.tabletopsimulator.com/musicplayer/), which you would just need to call in the onLoad() event for it to trigger when the game loads.
@connorjensen96993 жыл бұрын
great video!
@ShaharHarshuv Жыл бұрын
Am I actually expected to work with the built in code editor? It doesn't syntax-color the code, has no auto-completion features / syntax error checking, and it really struggles with large files. Is there any alternative?
@LudoLodge Жыл бұрын
There used to be an official Atom editor plugin that I did a tutorial for, but now Atom has been discontinued. However, it looks like this VS Code plugin is similar, and probably your best bet: github.com/rolandostar/tabletopsimulator-lua-vscode
@MadMax-mw3og Жыл бұрын
Hey man, Love your work, question: is it worth getting Atom, and whats the difference?
@LudoLodge Жыл бұрын
Hey, unfortunately Atom was discontinued, but you might check out Visual Studio Code as it has a similar plugin: github.com/rolandostar/tabletopsimulator-lua-vscode The main advantage is that it is just a lot nicer text editor than what is built into TTS, so it tends to be easier to work in without running into weird glitchy behavior.
@kareemkoh4 жыл бұрын
Would you be doing a tutorial of creating / importing figures like meeples, custom miniatures, etc.?
@LudoLodge4 жыл бұрын
I have it on my list to get to at some point!
@Fedetoro29 күн бұрын
You need to pay tabletop simulator in order to code with it?
@ciitrix35293 жыл бұрын
Nice video 😁
@adrianwaynereavill78993 жыл бұрын
Good video
@herrvorragend3254 жыл бұрын
thanks, appreciate it =)
@foodforthemoon74 жыл бұрын
How did you add the button? I can’t find buttons in any menu. Tx
@LudoLodge4 жыл бұрын
If you watch from 23:00, you can see how the button is added through scripting. 👍🏻
@BennettProductions992 жыл бұрын
I would love to know how to tie this kind of function to a hot key rather than a button
@LudoLodge2 жыл бұрын
TTS has got you covered! api.tabletopsimulator.com/base/#addhotkey
@zerobadideas4 жыл бұрын
I have programming experience, but for some reason I was hesitant to bother with TTS scripting. This was very informative, thank you. But I must be losing it, because I tried that simple "local die = getobjectbyid(guid)" and it returns a nil value. I can use getallobjects and use a for loop to list them, but if i try to get an id value, they somehow don't exist.
@LudoLodge4 жыл бұрын
I would double check that you specifically called getObjectFromGUID, that the GUID for sure matches the object, and that you put the GUID in quotes, e.g. getObjectFromGUID("a1b2c3").
@zerobadideas4 жыл бұрын
@@LudoLodge yeah, i don't know what it's deal was, but it seems to work fine now. User error, most certainly. Thanks for responding, though. I also didn't think I needed Atom, since I already have two text editors (np++ and vscode), but the integration with TTS is wonderful. I actually thought TTS was broken when I would right click an object an go to scripting and the scripting window didn't open (because it was opening new tabs in Atom) And I realized a good way (for me, at least) to get familiar with it all was to open a scripted mod for a game I'm familiar with and just read the code, so I went for the scripted Clank! mod. It's a little over-engineered, so that's perfect lol
@stopaskingme3 жыл бұрын
I have a question How to remove sript from object?
@LudoLodge3 жыл бұрын
I think technically every object always has a script attached, but you should be able to open the script editor for that object and just delete all of the code.
@agentskazzers3482 Жыл бұрын
Is it possible to make Ai Opponents?
@Alex-qf9js4 жыл бұрын
How to make fillable pdfs perhaps?
@LudoLodge4 жыл бұрын
I'm not sure I follow, do you mean like a user interface where the players can fill out a form?
@Alex-qf9js4 жыл бұрын
@@LudoLodge Character sheets for RPG groups is what I'm thinking but pretty sure that there are wider applications / implications.
@LudoLodge4 жыл бұрын
@@Alex-qf9js Got it, good idea!
@Tomatriox3 жыл бұрын
I have a prototype that I think is impossible to put in Tabletop simulator. I tried various things but nothing really works. It's 8 different D4 that are tumbling from face to face to go foward. The rotate anchor only remembers 1 position and don't care about what face is facing where, before and after tumbling. Here's a little video that shows how the pieces are moving on the board: kzbin.info/www/bejne/p5K8kGh4nrCEnKc
@good4usoul4 жыл бұрын
If you don't set a width and height to your button, you're gonna have a bad time.
@good4usoul4 жыл бұрын
If your fontsize is bigger than your height, you're gonna have a bad time.
@VielofDarkness3 жыл бұрын
Damn Dude, you took 10 minutes to actually get started with talking about how to do anything. It gets painful to sit through a bunch of chit chat, just to get to something helpful.
@LudoLodge3 жыл бұрын
It is meant to be an introduction for complete beginners, so hopefully the bookmarked chapters make it easy to skip ahead if you feel you already know the basics. :)
@ArdentSM3 жыл бұрын
*casually uses programming and scripting language interchangably*
@LudoLodge3 жыл бұрын
Scripting is still programming. :) Scripting languages are typically interpreted versus compiled, but that's getting a little into the weeds.
@ArdentSM3 жыл бұрын
@@LudoLodge yep! The first minute or so of the video taught me how to get to the scripting API site, aswell as how to open the editor. I now have atom installed, and haven't looked at most of the video, but that's all I needed. Thank you for being clear and concise, earned a like and subscribe :)