Tabletop Simulator

Tabletop Simulator

Not enough ratings
Figurines with limited gizmo controls.
   
Award
Favorite
Favorited
Unfavorite
Game Category: Strategy Games
Assets: Scripting
File Size
Posted
Updated
140.913 KB
16 Jan, 2017 @ 9:41am
19 Jan, 2017 @ 3:36am
18 Change Notes ( view )

Subscribe to download
Figurines with limited gizmo controls.

Description
Edit: According to DeJMan an update to TTS broke the camera mod and he won't be fixing it. This also means this mod is kinda useless. I'm leaving it up for the gizmo controls since those may still be useful.

This mod came about in order to ease line-of-sight checks for tabletop battlegames like Necromunda. It mainly contains two lua scripts, one attached to DeJMans working camera from his Toybox 2, the other attached to a custom figurine.
The camera script simply attaches some control buttons to the camera which allow some limited movement/rotation even when locked in place similar to gizmo controls but available to anybody. There is also a "reset" and a "return" button that usually do the same thing, return the camera to a top down view over the center of the table. This return position can be configured in the beginning of the script however. Finally there is a button that lets you hide the rest of the controls if desired.

The figurine script gives similar limited gizmo control over the figurine when it is locked in place (movement only, no rotation). At the same time a button will be visible that will identify the camera object. It will then be replaced by a "Summon" and an "Aim" button. The former summons the camera to act as a headcam, locking it and clipping it into the part of the figurine where the head would normally be. The latter will aim the camera directly at this figurine. This only works if the camera object has the Name "Camera" and is in fact a custom asset bundle (type "Generic"). It also needs the above mentioned script attached as that contains the summon/aim functionality.

Once summoned the "reset" button on the camera will reset to the default position/rotation relative to the figurine, "return" will still move it to the specified return position as well as clear the reset position.
The figurine script can in theory be attached to any object although the button positions might not work out and would have to be adjusted. The point that the camera is summoned to might also not work out and is currently configured in the camera script, I might change that at some point.

Now also features a script cloner that makes it easier to copy the script from the example figurines to others. You need to drop the figurine with the script on the cloner and hit "source" then drop whatever you want on the cloner and hit "target". The "Clone Script" button will then copy the lua script from the source to the target and it should work immediately. Also if the target is a bag object, the cloner will create a list of object ID's in the bag as targets instead for mass cloning. The objects need to be outside of the bag for the clone to work however since objects inside bags aren't really present as an object.

I have also added remote control functionality to the screen object, it connects to the camera in the same way as the figurine and then shows the gizmo controls of the camera. The controls are the same limited set that the camera has though, it might need some additional controls to fulfill its purpose.

Edit: Added side-strafing controls to the camera and a highlight button to the figurines. Sadly the camera view does not pick up the highlights. There is also a figurine with just the gizmo controls and no camera interaction. Also added an aim function to the figurines that will aim the camera at that figurine.

Based off the working camera contained in DeJMan's Toybox 2:
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=769644150
16 Comments
Agonos 15 Mar, 2021 @ 8:24am 
Hello. You should I think create a little video tutorial because I think everything is not very clear. Thank you
Deadlite 4 Feb, 2021 @ 5:13pm 
really wish it worked
shadowyblade 25 May, 2020 @ 10:15pm 
I'm probably doing it wrong, but I can't get the remote camera screen to connect to the camera. The camera itself seems to work, but I have no effective way to view its POV.
GamerESP 2 Jun, 2019 @ 6:16pm 
DONT WORK
UmmonTL  [author] 12 May, 2018 @ 2:59am 
You could modify the button positions and sizes for each car individually, the script functionality wouldn't be affected. The other option is to read the scale-vector of the object with getScale() and adjust the button positions and sizes accordingly by multiplying them with the inverse of the appropriate scale factor.
Slartibartfast 11 May, 2018 @ 1:26pm 
I figured it out, The various cars are scaled differently. Do you know if theres anyway to get a script to ignore scaling?
Slartibartfast 11 May, 2018 @ 12:02pm 
So I'm trying to use this mod on a bunch of car models, but for some reason when i copy the script over from one car to another, the buttons are drastically different sizes and positions. Any idea why that is?
Lux 13 May, 2017 @ 5:57pm 
any reply on 2 cameras for 1 table?
Frosty 28 Jan, 2017 @ 6:59pm 
No one can check line of sight like Gaston!
UmmonTL  [author] 21 Jan, 2017 @ 10:41am 
I have only added the lua scripts and have nothing to do with the creation of the camera itself so you'd have to ask DeJMan about it. As it is my scripts wouldn't really support it either.