Tabletop Simulator

Tabletop Simulator

Mtg sticker module
12 Comments
BigBigBadBoi 2 Jan @ 2:15pm 
the "Stickers" spawned with this are just wooden things with the description of the sticker on them. also does not support name/art stickers
Darling Valk 11 Apr, 2024 @ 1:03am 
I just wanted to play my glorpgoop deck but I don't understand how to work this.
zachstover  [author] 4 Mar, 2024 @ 4:47pm 
It is designed to work with the oops I called a pie module loader
zachstover  [author] 4 Mar, 2024 @ 4:46pm 
I haven't seen any reason that it would have broken
Caine 2 Mar, 2024 @ 8:55am 
Does this work in modern times?
zachstover  [author] 17 Mar, 2023 @ 11:19am 
fixed the pow/toughmess bug for the base power
Oops I Baked a Pie 17 Mar, 2023 @ 7:03am 
Note that you need to correct for the base power and base toughness of a card.
Currently: if you apply a 3/3 sticker to a 1/2 creature, you'll get a 4/5 creature
The pastebin script takes care of that tho ^.^
Oops I Baked a Pie 16 Mar, 2023 @ 8:35pm 
positionToWorld is the right command, not "global"

the api doesn't do much to explain it too well but it's something:
https://api.tabletopsimulator.com/object/#positiontoworld

quick example that should explain how they work better:

worldPos = cardObj.getPosition()
locPos = cardObj.positionToLocal(worldPos) -- should be [0,0,0]
locPos.z = locPos.z + 2 -- should be [0,0,2]
newWorldPos = cardObj.positionToWorld(locPos)

here, you should be able to just do something fast like:

newWorldPos = cardObj.positionToWorld(vector(0,0,2))

oooh, also get the rotation to match up as well if that isn't already the case
zachstover  [author] 16 Mar, 2023 @ 4:27pm 
toggled visibility, and added the power and toughness setting.

can you give me more information on the poisionlocal and position global variables so i can use them to have the sticker spawn relative
Oops I Baked a Pie 15 Mar, 2023 @ 6:50pm 
oooh, setting pow/tou buttons by dropping an object onto a card is something I've had to to before
here's a script snippet from that - should help!
https://pastebin.com/CDFfTJDc
zachstover  [author] 15 Mar, 2023 @ 2:08pm 
great suggestions, i'm also working on making the power and toughness stickers set the power and toughness of the card
Oops I Baked a Pie 15 Mar, 2023 @ 9:24am 
Love it!

small quality of life suggestions:

add 'visible=false' to the module properties (since the menu toggle button does not actually do anything)

make position of spawned sticker-puck be relative to the card's position using
positionToLocal() and positionToGlobal()

I think some text somewhere (maybe the label on the sticker-puck?) should hint that the thing needs to be dropped onto a card