Tabletop Simulator

Tabletop Simulator

Not enough ratings
Rulebook / Image Viewer (Custom UI, draggable, resizable, zoomable)
 
Rate  
Favorite
Favorited
Unfavorite
Number of Players: 1, 2, 3, 4, 4+
File Size
Posted
Updated
0.039 MB
May 12, 2018 @ 7:45am
Sep 20, 2018 @ 8:13am
7 Change Notes ( view )

Subscribe to download
Rulebook / Image Viewer (Custom UI, draggable, resizable, zoomable)

Subscribed
Unsubscribe
Description
This is a custom object and UI that you can import into your mods to show the rules!

There's a video above you can watch to see what it does.
The UI brings up a UI panel that you can drag, resize, hide, and which shows you rule pages that you can zoom into and scroll around, all with nifty animations! Should there be a problem (or for some other reason) and you wanted to stretch the image but not the panel, there's a checkmark at the top that lets you do that (new buttons will appear).

----
Included are different colors of the rulebook so it can fit your mod a bit better. Imo, I'd recommend adding the logo of the game on top of the image too, or the cover of the rulebook if you have that, but this is up to you. (the "expansion rulebook" shows an example of this)

----
Here's how you want to import this into your mod:
1. Copy the UI code and add it to your mod's (make sure that no names of buttons, functions or images are the same as whatever was already in your mod). The UI code is under Scripting, and you'll see a tab called UI.
2. Copy the rulebook object into your mod (the one with the "Show Rules button"). If you want to change its color, copy the texture from one of the other books and change the main one (right-click >> Custom >> copy the Diffuse URL >> paste it on the main one's Diffuse)
3. Copy the UI Assets into your mod: The UI Assets window is accessed by clicking Scripting, and clicking the button in the top right. There you'll see the entire list of images the UI can use. Sadly, there's no faster way to do this (currently) than to go onto each UI Asset, copy its URL and add it back into your mod's UI Assets manually.
4. Add your content: Rename the book object to whatever you want. At the top of the Rulebook's code, there's a list of UI images that you can change. You can add/remove them as you want, and they determine the number and order of your rule images that will get displayed (NOTE: The names listed there should be the names of the UI Assets you want to display).

NOTE: the UI XML has 2 sets of panels and such as an example of how to have multiple rulebooks in your mod. You only need to copy what's above <!-- Expansion rules Panel --> if you only plan to have 1 rulebook in your mod.

-----
Thanks to HourEleven for his book model.
< >
31 Comments
Khardor Apr 4, 2019 @ 7:05pm 
This mod is great, and it opens possibilities with different rulesets.

I wish to add a 3rd rulebook to my mod, and after that maybe more, just to sort different rulesets. I managed to add a 3rd book which works with the panel and showing the rule pictures properly, except, that the 2nd book now always shows the pages of the 3rd book.

I think somehow the Pagelists get confused. Is there a way to sort those lists to their respective rulebooks?
Obi Mar 31, 2019 @ 4:58am 
Thanks for the quick response!
I'll shoot them a message when I have a moment.

I'm a bit new to UI work, but if you have any idea of a kind of 'framework' guide to doing the tedious bits, I'd gladly go through that and then return the modified work back over haha.
Unreal Ed  [author] Mar 31, 2019 @ 4:22am 
hmmm.. that's very weird. I'll look but I have no idea what could be causing it, and it sounds more like a problem with TTS itself. You should ask the devs over on the official TTS discord.

I did look, but the only way to do it is to have a whole other set of panels, elements, etc that is only revealed to that player, and have one for each color of player. Then you just make the button detect the color of who pressed it to reveal the correct one. It's not hard to do, but it's tedious so I never got around to it. But maybe I should
Obi Mar 31, 2019 @ 3:59am 
Hey, Unreal Ed.
First, Thanks for this mod. Its excellent.
Second: Getting a strange bug where, if I have all the arrow/zoom/resize UI elements in, the script breaks all my global UI scripts and refuses to display them to other players. It won't display them to me until I reload the game, but it never displays for the players....until I delete those elements

Third: Were you ever able to get it showing to only one player working?
darleth Sep 20, 2018 @ 11:47am 
Perfect...thanks a lot.
Unreal Ed  [author] Sep 20, 2018 @ 8:17am 
Ok, so when I changed my resolution to 1920x1080, I also saw that problem on my end. I reduced the size of the text in the input fields (from 14 to 13) and that made them appear on my end. Tell me if it's fixed for you.

Thanks for mentioning this btw. I wouldn't have expected that to be a potential problem. Now I'll know to check different resolutions for when I do UI work. And thankfully, it would SEEM that the problem only happens as resolution goes DOWN and not UP, so I don't need to buy a 4k monitor to fully test my UIs
darleth Sep 20, 2018 @ 4:01am 
Yes my resolution is 1920x1080 and yes page change.

Is it possible to fix it?

Thanks
Unreal Ed  [author] Sep 19, 2018 @ 4:26pm 
OH! I have an idea! What resolution do you play the game at? 1920x1080? And if you click in the page number box and type in 3 or 4, does the page change when you click out?

If so it might be because I play at 1440p, so I could see that for some reason the text on your machine is too big for the input field where the numbers should be displayed
darleth Sep 19, 2018 @ 10:23am 
In this mod...

https://imgur.com/eFc5ryh
Unreal Ed  [author] Sep 19, 2018 @ 8:16am 
You don't see it in the rules in THIS mod? or when you're trying to import it?

Page number should be automated based on the number of items in the pageList table at the top of the rulebook's script. Idk what could be making %age go wrong tho...