tjakubo / Decker

Create decks and cards from scripts in Tabletop Simulator
MIT License
41 stars 7 forks source link

Create deck while setting hidden back image #2

Closed coljac closed 4 years ago

coljac commented 4 years ago

Firstly, this code is excellent and super useful.

The issue: when creating a custom deck manually, unless the "Back is Hidden" box is checked (counterintuitively), the last card image on the sheet is used as the hidden back, so that in hands or if hide_when_face_down is true the true card back is hidden.

This doesn't seem to be the case with Decks imported with Decker; is this a bug or feature, and if so how would I work around it? There's nothing obvious in the TTS API, or in the JSON representations of the respective objects.

tjakubo commented 4 years ago

I can't exactly reproduce the issue, because I think decks aren;t really behaving as explained in your post :)

With a deck with single back image:

With a deck with "unique backs" and a image sheet for backs:

I've created a save with all 4 combinations (unqiueBack/hiddenBack) decks imported and spawned by decker - if those would act any different between imported/ecker counterparts, please let me know :) You have to check the "hands" toggle on each decker-spawned card to put it in a hand for testing - but that's a different issue... TS_Save_6436.zip

coljac commented 4 years ago

Thanks for the speedy reply, this is helpful.

I may try and reproduce, but I had card sheets that were only partially populated and ended up with blank hidden faces, even when the last card on the sheet was the hidden card face. Once I generated sheets with the hidden card face in every blank space, this issue was resolved. I'm not quite sure what was going on here, but after I did this everything worked as above (and it was easy to discard any extras with Decker).

Yes, I modified the 'hand' flag easily enough. I've used decals to hide the backs in situations where the game doesn't do it automatically.

Using Decker I've now got our game fully imported and it works great, thanks again.