Tabletop Simulator

Tabletop Simulator

96 个评价
Universal Counter Tokens
2
   
奖励
收藏
已收藏
取消收藏
Assets: Scripting
标签: Misc, Templates
文件大小
发表于
更新日期
32.317 KB
2016 年 6 月 16 日 下午 2:10
2017 年 8 月 26 日 下午 3:32
6 项改动说明 ( 查看 )

订阅以下载
Universal Counter Tokens

描述
Counter tokens that can be easily customized for use in your games.You can use any image you like for the counter. The counter can be resized to any scale and it works with undo/redo/loading without losing its count!

I designed this for use with any game that uses tokens to keep track of things like health, mana, sanity, poison, etc. Sometimes it is tiresome to exchange tokens back and forth with the 'bank' and you wish you could just have a simple counter instead without those bulky counters that are part of the Tools in the game. The font size will resize if you go over 100, and there are both +/- 1 and +/- 5 buttons. I also added the functionality so that, if you enter any number into the description of the token and then click on the display, it will set the display to that number.

How to use your own image for the token:
  • Right click the token
  • Select "Custom"
  • Replace the URL with one of your own (500x500 image is ideal)
  • Without changing other settings, select "Import"

I hope you fine folks find some good uses for it. I've commented the code. If you're looking for a LUA example that shows you how to create/edit buttons or use the onSave() function, this could help. Cheers.
热门讨论 查看全部(1)
1
2020 年 10 月 23 日 下午 11:56
Negativ values
Sirzento / Nico
50 条留言
iMaxed0ut 1 月 8 日 上午 9:16 
This is an amazing counter token! If there a way to have a second counter on the back side of the token? I have a game where the unit can be upgraded and that is indicated by flipping the token over. I'd like to be able to flip the token, then continue to track health without having a set of base tokens on one bag then upgraded tokens in another. I thought maybe I could repeat the code and then edit the positions, but I'm not knowledgeable enough in LUA coding to know how to do that...
Sean2111 2023 年 12 月 15 日 上午 12:28 
This is great.
I used my own image and saved to the cloud ,thought maybe for the best.
Then I made this counter really small.
Then I attached a Miniature Model (W40k infantry) to the counter.
Put the counter to rear of model.

Now I can still use the buttons ,and at present using for range. So I know this particular infantry man can shoot so far for example.

Works good.
Iron-Claw 2023 年 7 月 6 日 下午 3:05 
Yes, same here. So far it has always worked fine for the host, but sometimes the client players report that the numbers overlap for them and/or the buttons don‘t work. When this happens, saving and reloading the game seems to fix it. Also, rewinding time also fixed it at least in one case. Strange… not sure whether this behaviour is caused by a TTS bug or a mod bug (or both :).
Minesteper 2022 年 2 月 25 日 上午 11:01 
does anyone else have any problems with the counters it seems fine to me but my players say the the numbers overalap on top of each other
MarcusRaven 2021 年 7 月 5 日 上午 10:25 
Is it possible to have two counters on the same token?
BeautifulMountAiryLodge 2021 年 3 月 6 日 下午 12:11 
This is fantastic! Thanks!
Becbunzen 2021 年 1 月 30 日 上午 10:42 
The counters seem broken with the update to TTS yesterday. Are you getting errors too?
Nogge 2020 年 12 月 27 日 上午 11:41 
These counters are exactly what I was looking for, for a mod I'm putting together of a dying game.

Would it be alright if I use these in it, giving credit and linking here of course?
rULmismo 2020 年 11 月 7 日 上午 2:43 
Thanks four your guides and assets. I am trying to use your counter in a script, but when access the getvalue() or increment() methods I always get a NIL result error.
It puzzles me that it works right if I use an standard TTS counter, but not with custom counters I tried. Any suggestion what I am doing worng?
Keanu Weebs 2020 年 7 月 13 日 上午 2:36 
Any thoughts on how to add multiple counters to a single image? I am trying to edit a counter for armor and structure for a battletech game.