Tabletop Simulator

Tabletop Simulator

Not enough ratings
Universal Chip Converter 3.0
   
Award
Favorite
Favorited
Unfavorite
Assets: Scripting
Tags: Misc
File Size
Posted
Updated
38.247 KB
30 Oct, 2016 @ 11:29am
24 Mar, 2017 @ 2:09pm
5 Change Notes ( view )

Subscribe to download
Universal Chip Converter 3.0

Description
Button Scaling Fixed 3/24
The ability to add a scale to buttons means they can be snapped back into shape and into place.

What is it?
A script that converts poker chips up or down in value at the press of a button. Unlike others, and my other version, this script comes with many added features to prevent errors, make sorting and handling chips easier, protects the server from "chip lag" and does so with a level of polish I had yet to accomplish. And just like my other "Universal" scripts, it is meant to be picked up, put on your own table and set up with your own chips.

Features
The feature list for this one is quite extensive.
  • Separate Trade Up/Down buttons: Making it easier to get what you want out of the converter.
  • Customizable: At the top of the script are detailed instructions on how to set this script up on your own table, with your own chips and scripting zones. See below for a full list of things that can be customized with ease, even if you don't know scripting.
  • Works with multiple zones: Want each player to have their own converter? It is as easy as adding a scripting zone and putting the GUID for the zone into a list.
  • Chip Lag protection: The game can stutter, or even crash, then too many chips are being spawned and moved around at once. This script lets you put a hard limit on how many chips can be produced.
  • Limit chip stack height: Huge towers of chips causing an issue? The script can limit how many chips it places into a stack before starting a new one.
  • Separate stacks: Each new type of chip will go into its own pile.
  • Bag support: The bag support is there, but mildly limited. The bag can only contain as many separate items as you have spots to put them. The size of the chips in those stacks don't matter, although the overall chip conversion limit will still be a factor.
  • Trade Up flexibility: Choose if Trade Up moves the chips up one level of value at a time or if it just trades it up as much as is possible. For example, if you have 10 x $10 chips, you can choose if it converts those up into 2x$50 or 1x$100 with a single click.
  • Script on a token: The entire script is contained within a single token you can easily lock down and keep out to run all of the processes of the converter.
  • Works off of relative value: Some scripts can be limited in how high of a value chip you can use. There is no limit to value here, because each chip just has a value assigned to it relative to another chip. So 10 of chip A are worth 1 of chip B, as far as the script cares.

Customizable Elements
These are the different things you can modify with ease without any scripting knowledge.
  • Chips: You can add/remove different poker chips of any value.
  • Scripting zones: Add additional scripting zones to have multiple converters, or use just 1 to have a single converter. All scripting zones need to be the SAME SIZE AND SHAPE, because things like button placement are all based on that size/shape you select.
  • Button locations: Decide where all 3 buttons show up, relative to the scripting zone they are for.
  • Chip limit: Decide how many chips to allow the script to spawn at once. (default: 120)
  • Chip stack limit: Decide how many chips to allow in a stack before moving to the next stack. (default: 50)
  • Chip stack locations: Not all tables have the same size chip converter zones. This script splits chips out into different stacks. (default: 9 spots) You can change the amount of spots, and their location, based on how much room you have in your scripting zone to place them. All positions are relative to the center of the scripting zone.
  • Chip bag placement: Where the bag goes when it is used with the converter.
  • Trade Up behavior: Select if Trade Up trades the chips up 1 level of value per click or maximum value.
  • More: You can fine-tune other small things like which way the chips face when they are spawned.

Known Issues
These are some of the issues I know the script can have. They are fairly minor, and most have an easy solution.
  • The buttons don't all face the same way on different zones: This is because your scripting zones face a different direction from each other. Re-draw the scripting zones, but keep the direction you draw them uniform. (example: top left to bottom right)
  • Converting a few dozen single chips in Trade Up causes a messy chip stack: This is because the script places chips in the spaces available, each new chip going in a new space. But when it runs out of new spaces, it just keeps piling the, into the last space. The solution is to not do this anymore, dang it.
  • I get an error in my game chat and the script doesn't work: The error is caused by something you changed in the configuration section up top. Go back over each section you modified and compare it to the original chip. A missing comma could be the issue, or a mistaken GUID. It is also a good idea to save and check your work as you go. Adding 20 chips to the chip list? Do 5 first, and check to see if it is working.
  • I use your old converter. I don't want to do the whole chip list again: You can copy/paste your chip list over and it will still work, even though you may have noticed I stopped using the "tally" section from version 2.0. The tally section won't hurt anything.
  • When anybody uses a converter zone, it locks out ALL converter zones with the delay function: This is by design. It is to help avoid 2 or more players from doing very large conversions at once and, potentially, crashing the host with all of the spawned physics objects.
  • All the text is gone in Host > Scripting > The Token: This is due to the script's length once you start to add some text to what is there already. It is part of the underlying engine and I do not believe the devs can fix it. The solution is easy, though. The text is still there, but invisible. Put your cursor in the box, hit Control+A to select all then Control+C to copy it. You can then paste it into notepad (outside of the game) and edit the script there. Or, go to the Knowledge Base on Beserk's website and set up Atom (an external script editor that most scripters use, designed to work directly with TTS and avoid all the copy/pasting.

Final Words
I'm fairly proud of this converter. I think it fulfills many of the wants of users and does so in a fairly lightweight way. And it is flexible enough to be used in pretty much any setup. If you have issues, concerns, or wish to shower me in gifts, feel free to comment or add me on Steam.

UPDATE 11/3: Now the script will trade up to the maximum value instead of only trading up 1 level of value at a time. Like it the old way? There is a variable at the top you can change to disable the new feature.
9 Comments
Tnv Uy 30 Oct, 2022 @ 8:22pm 
Can you guys help me, i dont know why i did everything follow the instructions but it didnt work((
Jaemez 6 May, 2020 @ 3:02pm 
Thank you to MrStump for posting this. I learned a lot about scripting by playing with this and adding it to my saved poker table. I even figured out how to add a button for players to "buy in" and get a set of chips. Unfortunately, this has not helped me win at all.
playarchitect 28 Mar, 2020 @ 2:11pm 
@Cronoxliker - I had the same problem myself, but my workaround is to create a normal progression of color-ups (e.g. Red $1 > Red $5 > Red $25 > Blue $1 > Blue $5, etc.) in a single list. The trick is to set unreachable colorup numbers for the highest chip of each player's color.

In my case, every player's largest chip is $25, so I set the tierUp variable for the $25 chip for every color to 99999 - an amount that no player will ever reach or can be colored up using the converter table. You theoretically could earn 99999 Green $25 chips to color them up to a single Blue $1, but the limits on the number of chips on the converter is a hard cap on this. I hope this helps!
Cronoxliker 3 Jan, 2019 @ 1:26am 
Hey, nice mod im happy with it but i really need to have different chiplist's due i have 6 differents chips and each chips has 6 different denominations, i mean, 6 color each color have 6 denominations, due each player has a color, so, how can I make the script take in count the other chips without spawning from 100k one 100 chip from the other denominations, (for example 1 chip of 100k green will appear a 100 blue chip)
MrStump  [author] 7 Dec, 2016 @ 6:05pm 
Nice, I like it =)
Weaver 7 Dec, 2016 @ 1:28pm 
Made a table using this a while ago so I could teach some friends basic poker, and just got around to using it. It worked well, so I threw it up on the workshop for the heck of it. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=814118804
MrStump  [author] 25 Nov, 2016 @ 11:07am 
I just checked the default table and it is is working fine. So I assume that it ihas to do with the changes you made and how you made them. Add me on steam for some help, or just go to pastebin, post all of your code from the token, and link it here so I can take a look.
mcd573 24 Nov, 2016 @ 9:16pm 
I cannot trade up. I can trade down fine, just not trade up.
Instinct🌴 31 Oct, 2016 @ 11:23pm 
thanks man
:steamhappy:
keep up the good work learned alot of you!