Tabletop Simulator

Tabletop Simulator

X-Wing Ship Mover
23 Comments
Leiderg Jun 26, 2017 @ 1:40pm 
I did everything right, created the scripting zone registered the 11 templates, then registered small ships, then large ones, but when I try to use to move a ship I get an error saying: Error calling Lua function Onclick...
Unreal Ed Sep 12, 2016 @ 5:41am 
Another bigger suggestion:

3. How to make registration much faster: Add a set of all the rulers with the mod. Those rulers would all have a script that looks for the "mover button" class when put into a scripting zone and pass along the info of which ruler they are. That way, you could register all the rulers in one go by moving all of them in scripting zone that contains the button instead of doing them one by one which is pretty annoying.
Unreal Ed Sep 12, 2016 @ 5:40am 
Been playing with this and it's so good! thank you for making it ! Here's 2 suggestions for improvements tho:

1. Pretty minor but, when registering the rulers, name them ("straight 1 registered", "bank 2 registered", etc) instead of just the generic names. That way you'll know if you made a mistake.

2. Replace the white piece that the button is on with something that can be recolored, so that each player can change his mover to his player color. Ideall, whatever object you choose, please also make it easier to grab the object without pressing the button. This suggestion should be pretty easy and useful.
Didero  [author] May 29, 2016 @ 8:39am 
Captain Sardonic: Sorry for the late response. The only thing I can think of is registering the rulers somehow went wrong. Did the straights work? Maybe they got confused too and acted as banks? Does this happen consistently, or just once?

Alph-Andruino: Could be that the script thinks your ships are the wrong way around. Which mod did you get your ship models from?
Alph-Andruino May 29, 2016 @ 8:32am 
I great mod, bu I have a little problem. I registered all rulles, and ships, this part is fine but when I use button, ships goes backward in place to move forward. Any idea?
Captain Sardonic May 22, 2016 @ 11:43am 
I really like this idea. Even though I registered everything in the correct order, the mover seems to treat my bank/turn rulers as straights. It'll move a model, but won't put it at the end of the ruler where it belongs. Any suggestions as to what I might be doing wrong and how to correct this?
Didero  [author] Mar 13, 2016 @ 11:12am 
Make sure you right-click the actual object, and not the button. It may require you to rotate the camera, even though I tried to make the object easy enough to select.
flobz Mar 13, 2016 @ 9:27am 
i select it and when i right click for the popup menu it hyst tries to activate the button
Didero  [author] Mar 13, 2016 @ 9:18am 
Hey, no need to apologize, this is a game bug and not your fault. All we can do is wait for a patch.
Though adding it to my Chest did work for me, what went wrong on your end?
flobz Mar 13, 2016 @ 8:51am 
Thats no prob just thought it was a issue with my end. i tried adding it to chest and it wouldnt let me add it via right click either lol sorry.
Didero  [author] Mar 13, 2016 @ 3:03am 
Hey, that's weird. Thanks for the heads-up, flobz, seems that got broken in a recent patch. For now you can load my mod, add the Mover to your chest, and spawn it into your game that way. The mover won't auto-update in your chest, but it's a decent workaround for now. I reported this bug on the official TTS forums, so it should be fixed soon. Sorry for the inconvenience!
flobz Mar 13, 2016 @ 1:15am 
This looks like a great mod but when i click on the down arrow in the workshop the arrow dissapears and nothing shows up?
Hylky™® Mar 8, 2016 @ 9:09am 
Thank you!
Didero  [author] Mar 8, 2016 @ 12:41am 
@Gene Selfish: I agree that registering the rulers is a bit clunky, but it does mean my script can work with every X-Wing mod without requiring editing on a mod maker's part. Since the rulers don't (always?) have a name or description in those mods, I can't use that to identify them. I did try to get at an object's texture URL as a way of identifying the rulers, but I couldn't find a way to retrieve that variable in a script, sadly. So the only solution would be to ask everybody who makes an X-Wing mod to tag their rulers, which is both not entirely fair and also hard to keep up, which would mean some mods would work and some won't.
I'm more than open to suggestions on how to make registering rulers less cumbersome though!
But glad to hear you like my script :)
Gene Selfish Mar 7, 2016 @ 2:44pm 
If it's possible to run this scan only when the button is pressed (and it should, just replace getAllObjects with getNearbyObjects and move it out of onload()), then you would also have the added benefit to allow drawing the templates from infinite bags, or copy & pasting them -- basically any operation that doesn't change their name.
This should also be possible with ships, provided that someone edits the mod you linked so that each ship is tagged, as, say, small_ship or large_ship with a dedicated script (in this case getName should be replaced by something like getVar('tag').

What do you think?
Gene Selfish Mar 7, 2016 @ 2:43pm 
Thank you Didero, excellent job!
I have a suggestion: as far as I understand, you're identifying the rulers by their GUID, which makes the process of registering them a little clunky.
I think a better solution would be to search them by name, or possibly by a tag assigned to them once and for all. In other words, you might have a scan function like this:

function onload()
objects = getAllObjects()
for j, w in ipairs(objects) do
if w.getName() == '3 bank' then...

...and so on.

[...]
darleth Mar 7, 2016 @ 2:56am 
Amazing work, I love it....
Didero  [author] Mar 7, 2016 @ 1:40am 
@Baryonyx: If the mod uses the exact same scale as the X-Wing mods, there's no reason my Mover script wouldn't work.

@Unreal Ed: Thanks! I've been working on this script for a while now, so it's nice to see it's appreciated :)
Also, I just realised that since you can also spawn individual objects from mods, that seems like a better way than using the Chest, because then you always have the latest version. I'll update the description.
Unreal Ed Mar 6, 2016 @ 11:41pm 
Seriously cool ! This is exactly the kind of scripting that TTS needs! Great job!

I'd recommend giving this mod and the button a version name like "X-Wing Mover v1.2" so that you'll be more easily be able to tell if you have the latest version in your chest or not
Unreal Ed Mar 6, 2016 @ 3:21pm 
It's funny coz I was JUST thinking about a mod like this yesterday
Baryonyx Mar 6, 2016 @ 1:39pm 
I suppose this would work with all other mods that use this system? Like this wings over the trenches for example.
LambMower Mar 6, 2016 @ 10:52am 
This mod is legit. 5/7