Results 1 to 4 of 4

Thread: Wanting help with scripting. plz i know 0 lua.

  1. #1

    Wanting help with scripting. plz i know 0 lua.

    Hello. i have used TTS for a few years and love it. but now a friend wanted to change a board we use so i took on the task. (this may have been a bad idea). i took a workshop project and have made many changes. Now i have some basic knowledge of bringing in other objects changing the deck and stuff im working on new scripts for HP counters and gold counters. At the moment the HP simply looks at a zone wen something enters and reads the cards HP and displays a number. when it leaves it shows the number it had saved from the previous card that entered. you can click the counter to add or subtract from that number.

    On top of this there is a separate button to reset all the HP counters to the current monster HP. However it breaks the HP so if u add another monster is gets stuck on 0. u can still add or subtract but whats the point of having the script to set HP if it breaks wen u reset and have to do everything manually.tweakbox appvalley

    On to the coin counter.

    I HATE TO MANY COINS. i dont want to have to pick up and move coins all the time. i like tokens in IRL play but not in TTS. so im using a counter. the problem is its left click to go up and right to down....only one at a time. the game im using this for u can buy from the shop and everything cost 10. on top of that u can gain more then 1 coin at a time so i want a +/-5 option as well. i have seen some other counters on the workshop that do this but they are not as simple as i would like.

    there are some other things i have questions for but atm these are the main issues ppl are talking about. Can someone help me learn some basic LUA or TTS lua specifically so i can mod things. or at least sit in a discord call while we look at the board and work on it?

    Thanks in advance for any and all help from this script scrub!
    Last edited by mark77; 05-13-2019 at 03:32 PM.

  2. #2
    When I started in TTS I had zero programming experience.. and now I am able to make pretty decent mods.. even if my code is "Frankenstein" style.

    Things I did....

    • Programming is all basically the same : my little experience in programming tells me that the basic concepts of object orientated programming is pretty universal. LUA, C++, C#... w/e. Once you learn the basics of If / For / While etc etc you can apply that to everything. The actual "code" is all slightly different but by far the more important part, the way to "think" is practically identical. I would get a "basic -> intermediate" book like Programming in Lua, Fourth Edition. This will teach you all the fundamental stuff. TTS, at least at my level is not that complex.. once you learn most of the logic stuff like what a variable is, what a table is, for loops and all that you can jump right it. Also TTS allows you to use UNITY ASSET BUNDLES, these bundles are how the big boys do it. Unity uses C#.. not LUA. I mean you will need some basic lua to integrate it but when working in Unity you use C#.. I have been teaching myself C# and I found The C# Players Guide to be really helpful for a noob like myself.
    • Copy form the Pros Part 1 : Also do not hesitate to load up mods and look at how they do stuff. Once you get an idea of how things work you can edit other peoples stuff. Tons of my mods use snatched code form other mods. Once a mod is placed in the workshop it is public domain and you can do with it whatever you like. It is polite to make a note of them in your mod description though. For example if you look at my Yggrasil - 2nd Edition - (Includes Asgard Expansion + Promos) Mod there is a few counter tokens that you press buttons to add or subtract. If you look at the code you can see that they work by simple taking a value and adding or subtracting 1... but you could just change that 1 to 5 to make a button add or subtract 5 instead of one.. or copy the entire button code and change the positi9on to make a new button.. stuff like that.
    • Copy form the Pros Part 1 : TTS Reddit, and this forum has a bunch of people that will help you out. Unfortunately this forum has small amount of trafic nowadays but the Reddit seems to get fast answered. Also there are TTS dicsords and they also have active modding places were you can talk directly to top modders. Finally there is a website called Stack Exchange. This is a general purpose programming information exchange thing, there are a ton of "stacks" now covering everything from cooking to car matience.. but it started with sharing code.. you can find good usable code snips to put into your mod here for nearly everything and anything you can not find you can find an answer for. The thing is they are pretty hardcore, while it has a ton of beginner questions and hey are of course welcome, something the answers are bafflingly complex.
    • Ask Specifics : When I started I asked a lot of very basic and specific questions. How do I draw a card to a location?, How do I shuffle a bag and pull out 5 random tokens?" stuff like that. Try not to be to ambitious in your early mods and you ill find that you can ask for exactly what you want and you will usually get help on that one problem and this is a great way to learn. It also means after a while you have all the function you want in your mod.

    Hope that helps!
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  3. #3
    Alternate Suggestion: Have a look at the UI components. You should be able to create a UI textbox which will prompt for the HP or Coin change and then apply that to your variable which holds the value. This way you can add or subtract any value.

  4. #4
    This is a nice blog to watch out for and we provided information on time attendance system
    make sure you can check it out and keep on visiting our blog.

Similar Threads

  1. Wanting to use a Custom Tile or Custom Token as a bag
    By Creative Guy in forum General Discussion
    Replies: 3
    Last Post: 10-18-2017, 01:11 AM
  2. Replies: 4
    Last Post: 08-09-2016, 12: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