Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+3)

Hello! I've discovered decker a few days ago and I've been experimenting and messing around on it, recently I discovered the bazaar of contraptions, they are so cool, but I'm not sure where I have to insert the code to put it on my deck.

I've been reading the documentation, tough I haven't finished yet (discovered decker right around finals week, whoops) I'm not sure if the answer is in the documentation, but if it is could someone point to me where to look? (I didn't what to clutter the contraption bazaar with my silly question but lmk if I should ask directly in there) 

(2 edits) (+3)

Not a silly question!

The short answer is you can use ctrl+v (or Edit > Paste Widget in the menu) while you're looking at a card.

The slightly longer answer is this:

Decker's image data, widgets (including contraptions) and even whole cards can be copied and pasted between decks very easily.

As an example: if you copy a plain button widget and then paste it somewhere else... you get a matching button.
But if you paste it into a text editor like notepad you get something that looks a little bit like the code blocks in the contraption bazaar:

%%WGT0{"w":[{"name":"button1","type":"button","size":[60,20],"pos":[230,164]}],"d":{}}

That's because this is what widgets look like when they're stored in your system's clipboard. They start with %%WGT and contain all the information about their size and scripts and data, etc.

So Decker will know that if there's a  %%WGT at the start of a string that you're pasting (that you copied from the bazaar) that means you're pasting a widget!

Just like it would recognize %%IMG as image data or %%CRD as being a whole card.

We're using the forums as a place to pass this easy kind of copy-and-paste clipboard data to each other in order to share our inventions and tools. Because it just works. :)

So, yeah, when you copy a contraption from the bazaar you can just paste it directly onto a card!

Have fun, and good luck with your finals!

(+2)

OMG thanks!! tbh i was literally reverse engineering by reading the code and copying the script parts but doing my own widgets, it was so time consuming, haha. This way is def more easy!! And thanks for the good wishes! have a lovely day.