Tabletop Simulator

Tabletop Simulator

[Tool][Asset] XML Projector
54 Comments
YamiJustin Apr 13 @ 8:30am 
A fix has been found by Tjockman for the issue(s) stated below: if the projector ever attempts to load an incompatible or broken image, it'll begin spamming an error message. You can fix this issue by being the host or admin and typing "!Projector Reload" and that should end the issues. There is also this: script you can add to the projector to add a reload button: --add this line to the bottom of the onload function
self.addContextMenuItem("Reset Projector", projectorReset)

-- copy and paste this function outside of the onload function.
function projectorReset(player_color, menu_position)
proj.assets = resetCustomAssets()
Global.UI.setCustomAssets(proj.assets)
end
YamiJustin Apr 13 @ 6:59am 
I agree with LivingDeadman, that there seems to be an issue with the projector at some point. For me, I have no issues on my main PC, but for logging on on my Mac account, or my brother using his pc, or random people, they get an error that repeats every 5 seconds saying "load image failed unsupported image: unknown". I have no way to figure out a fix for this myself
Sonoflear Mar 31 @ 9:49pm 
Needs updated? even the tokens you have on the table to test it dont work
The Sezenians Mar 20 @ 5:34pm 
Is it possible to change the opacity of the projection?
LivingDeadman Apr 13, 2024 @ 8:04pm 
If you ever load an image up on this projector and then it later breaks, the save of that table will forever be fucked as long as you have any version of the projector on it. It will continually try to load the broken image and pop up annoying errors every 5 seconds.
Tim Aug 16, 2022 @ 10:11am 
Really cool functionality, but unfortunately causes horrible screen lockups every few moments.
Sirzento / Nico Jul 19, 2022 @ 8:46am 
Any idea how it can be that when spawning in the projector on my table the script will throw image errors but on every other table it just works fine?
Adil3tr Jan 30, 2022 @ 9:26am 
This is so cool
Crimsontree Dec 21, 2021 @ 7:04am 
The Projector works fine when I load it into my saved table. However, when I load my table again with the Projector already on it, the Projector no longer works.
xDragonSword Nov 27, 2021 @ 6:50am 
the mod is not showing up in game. where do i find the projector?
Janothia Oct 20, 2021 @ 11:36am 
Is there any workshop item that does this (what the projector does) for specific colors?

I would not mind to have one for each color. So I can project an image for one player specific.. although the postioning of the image should be in one of the corners. I have som lua experience, but this is still a little too much.

The idea is to create a HUD-like projection for my RPG table... some state, target, red card warning or anything that needs attention.

PS. Card projection would be a nice feature.
mordekain Jun 10, 2021 @ 8:18am 
Iove this mod, is there a way to support projecting cards?
[+]bzegers Apr 12, 2021 @ 4:00am 
@[auteur] Sorry about the late reply, i have been busy. The update works and i have no issues atm. Thank you.
stups Apr 3, 2021 @ 7:36am 
Found a really weird bug and I'm not sure it's your code or TTS itself.

If I put a copy previously show item on the projector the picture doesn't show and there is an error message.

Here is a video of this behavior.

https://youtu.be/AHfjA6IuIwU

I duplicated the items with CTRL-C and CTRL-V. This also persists in reloads of the save game. I got rid of the error by manually removing the assets from the save game JSON file.
Me, I'm Counting  [author] Mar 19, 2021 @ 2:27pm 
@[+]bzegers: I've pushed a small update that should fix the issue. Please let me know if it works for you now.
[+]bzegers Mar 19, 2021 @ 3:07am 
error in script (global) function <ui.setxmltable>: table was null
This keeps spamming on my screen today.
I have used the projector succesfully for a few weeks and today this started to happen.
When i remove the projector it stops.
When i add a new projector it starts again.
Writter Feb 19, 2021 @ 9:15am 
Yeah i just noticed that it worked after some DNS changes ! Thanks you so much ^^
Me, I'm Counting  [author] Feb 19, 2021 @ 7:00am 
@CHarL|3 Some of the demo tiles are missing due to the artist Jacek Yerka's website going offline. The projector itself works absolutely fine still.
Writter Feb 19, 2021 @ 6:19am 
The projector image is missing
MetalDude Feb 9, 2021 @ 3:39am 
Hello! I dont know if your working on a current project but this guy has a Request! this projector is amazing, but is it possible to make it project two images at the same time? as if they were having a conversation? it would be a cool way to converse in my dnd runs.
NahtreX Nov 28, 2020 @ 10:58am 
Hey! Is it possible to make it project cards? could you point me as to how?
DeuxSabres Nov 8, 2020 @ 4:11am 
This is genious ! :-)
Me, I'm Counting  [author] Nov 7, 2020 @ 6:26pm 
Still working fine for me. Make sure the asset is locked in place if you're having problems clicking the button. If you're getting errors then post them so I have something to go on.
mekhet Nov 5, 2020 @ 9:13am 
is it broken, allways i spawn it, i get an script error global
ImaTarget Aug 7, 2020 @ 1:10pm 
Is there any way to tell if it works? I put images on it and click the button but for me as the GM nothing is happening. And I'd rather not trial and error during game session. This sounds exactly like the tool I need.
motte Jul 4, 2020 @ 9:02am 
Could it be that one of the links is broken???? Every time I load the projector it gives me 1-2 image error warning message that repeat all the time. Would be nice if you can fix that, because it is an awesome mod. I like it so much :steamhappy:
Ray Jun 29, 2020 @ 8:13pm 
Howdy, and thank you for the addon. It has been a great way for our DM to introduce slides while delivering setting, particularly in a story rich game where visual aids have such an impact.

Sadly we've run into a bug or conflict: when the projector object is present in session - while not in a container - it prevents all Players but the DM from typing into chat, like a global squelch. As soon as it is removed, or stowed in a container, typing resumes without issue.
Me, I'm Counting  [author] Dec 9, 2019 @ 12:04pm 
@Amuzet Good catch, forgot that property was in the JSON. I'll have a play at some point with cropping/offsetting images too and see if I can get all cards working.
Amuzet Dec 8, 2019 @ 12:08pm 
yes there is it takes a bit:

if Object.tag=='Card' then
local json=Object.getJSON()
if json:find('NumWidth":1,') and json:find('NumHeight":1,) then
do whatever it is your projector does with UI

the NumWidth/Height is how Tabletop cuts up the texture into cards, i have a mod that spawns 1x1 cards
Me, I'm Counting  [author] Dec 6, 2019 @ 3:04pm 
@Amuzet There's no way to see if a card images only contains a single image.
Amuzet Dec 6, 2019 @ 11:42am 
Seeing this you could add functionality for cards by checking if the card is 1x1 card sheet, then displaying the image if it is.
Since cards can be spawned like tokens
Me, I'm Counting  [author] Aug 20, 2019 @ 8:14pm 
@KyussGaming Re card support: I don't think so. The textures for cards are composite images of all cards in the deck. There's no way to crop the image within the game. It might be possible by manually declaring sizes and offset and fiddling with overflows, but the (already pretty wonky) xml might be messed up on smaller screens. I'll have a look at this and see.
Me, I'm Counting  [author] Aug 20, 2019 @ 8:12pm 
@webtable That is how the BattleAtlas mod is powered :) Sadly it means running (and paying for) an external server to process and serve the images. I'm not currently looking to host any additional external services, and would ideally like to find a service I can use that I don't have to host. I wrote a node-based image manipulation API a while back that will store the results on imgur and return the ID, but I would still need somewhere to host and run it, unless I started asking for donations or ran a patreon or something to pay for the extra resources it would eat up being a public API.
webtable Aug 20, 2019 @ 4:20pm 
TTS scripting is fairly powerful. This power is increased greatly with the WebRequest function in the API. For example, if TTS can't properly crop an image you can create a web server that will do it for you and use the WebRequest to request the operation.
KyussGaming Jul 17, 2019 @ 2:37pm 
I'm a huge fan of this! I use it in My D&D Games all the time. Question, will there be any support for Cards to be projected?
Echo-3301 Jul 1, 2019 @ 8:31am 
Greetings! I'm new to the TTS and I have a question - how can I add this projector to my game?
Inuki Jun 11, 2019 @ 7:48pm 
Nevermind, I seem to have fixed it with a completely fresh rebuild of my table.
I think the error came about in connection to a .webp image that had been converted to a .jpeg in photoshop if that is helpful.
Inuki Jun 11, 2019 @ 5:57pm 
I have used the projector for a little while but am getting an odd error now.
"Error in script (global) function <UI.setXmlTable>: table was null"

If I delete the projector and then import a new one the error stops, but if a load a saved game with a projector present on the table I will get the error again, which repeats about every 10 seconds.

The error started while I was going through my hand outs, which are a mix of tokens and tiles.

Have I screwed something up that I can fix on my end? Thanks for your time.
Neceris May 19, 2019 @ 6:15am 
Thank you , you are amazing.
Me, I'm Counting  [author] May 18, 2019 @ 10:18pm 
@Neceris: I have added support for Custom Figurines.

Note, to show the (optional) secondary/rear image you must flip the Figurine upside down.
Neceris May 18, 2019 @ 12:29pm 
Could you update it to show the images on Figurines? i host dnd and some times its hard to see the character art and this seems like a great tool to help with that as well if the party is talking to someone special etc etc etc, id hope not to convert into tiles to do it
Me, I'm Counting  [author] May 18, 2019 @ 8:17am 
@Jeffery Because the game itself has far more options for manipulating an image than they give us via the API. There is no way to crop an image in-game, all we can do is get the URL for the images involved. The top image would be fine, but the face image would simply be the giant composite. I can't then crop it, or hide parts of it, or mask it. I can just show that image. If you know of a free, non-auth image cropping API then it's possible I could do something with that.
Jeffery May 17, 2019 @ 10:45pm 
If cards are a composite image like you say, how come when you ALT + Cursor over something it shows the correct side of the card only? If you found out how that function works would you be able to implement the same sort of thing for cards on your projector? Just a thought.
Mira May 16, 2019 @ 1:38am 
Rock on, haha.
Me, I'm Counting  [author] May 15, 2019 @ 6:09pm 
@Obi you're welcome to use it, I'm glad you like it. I've always been a fan of using Riker Ipsum instead of the regular boring lorem.
Mira May 15, 2019 @ 1:35pm 
Hilarious you have some Trek in that, I'm definitely using this for my Trek Game. Might add it to the Trek board I have on here if you don't mind (with credit, naturally). This is massively useful.
motte May 15, 2019 @ 2:11am 
Sadly it is that way,... I only hoped you may be smarter than me and have a better solution :steammocking: But still awsome idea and great mod. I will use it often to tell stories in Kingdom Death Monster or show Tiles in my teaching games.
Me, I'm Counting  [author] May 14, 2019 @ 8:57pm 
@motte I don't think it's possible, no, sorry. Most cards use a composite image with several cards in one. It wouldn't be straightforward to only show a particular portion of that image I'm afraid.
Me, I'm Counting  [author] May 14, 2019 @ 8:56pm 
@EUDOXIO This can be done quite easily.

If you open up the Projectors Lua script and look for lines 12 to 21 it's possible to change all the colors used.

Try changing the `title_text_color` and the `desc_text_color` to any valid RGBA string. For white you would set them to `rgba(1,1,1,1)`.
motte May 14, 2019 @ 6:30pm 
I like it,... but is it possible to also show Cards??? Most of the games I teach could benefit from it when the projector also show cards to all. But great work so far.:lunar2019coolpig: