Skip to main content

The Power of Pride Bundle 2026 — $10 PWYC Edition
On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(4 edits) (+2)

Re-posting the two widgets currently available from the main post, so that this thread can be better organized overall. The steps for creating ‘spoiler text’ can be found here. ^^

Export Deck Palette as .HEX

Widget preview
This is just a regular button with two lines of code attached, utilizing line 194 from pdf.deck. It can be used to export patterns 32-47 as a 16-color HEX file. Change ‘range 16’ to ‘range 14’ and ‘deck.patterns[32+i]’ to ‘deck.patterns[33+i]’ if you’d like to exclude black and white.

As a reminder, you can click and drag .HEX files directly into an active deck to change the patterns used. If you want an easy way to save and swap between pattern sets, you can use the Palette Storage contraption I uploaded to the Contraption Bazaar.

%%WGT0{"w":[{"name":"emexhex","type":"button","size":[185,19],"pos":[133,186],"script":"on click do\n colors:each i in range 16 \"%06H\" format deck.patterns[32+i] end\n write[array[0 \"u8\"].cat[\"\\n\" fuse colors] \".hex\"]\nend","text":"Export Deck Palette as .HEX"}],"d":{}}
emDeck Exporter

Widget preview
A toolbox contraption to make it easier to export decks at a non-standard size, with an added field to view the global script as a convenience.

%%WGT0{"w":[{"name":"emDeck","type":"contraption","size":[178,210],"pos":[193,68],"def":"emDeck","widgets":{"t":{},"h1":{},"h":{},"w1":{},"w":{},"s1":{},"scr":{},"crd":{},"nm":{},"a1":{},"auth":{},"t2":{},"crd1":{},"export":{},"e1":{},"lock":{},"limg":{},"crd2":{},"init":{}}}],"d":{"emDeck":{"name":"emDeck","size":[178,210],"margin":[0,0,0,0],"description":"Configuration and deck export, all in one place!","version":1,"script":"on view do\n if !init.value\n  i:app.render[deck.card]\n  w.value:i.size[0]\n  h.value:i.size[1]\n  crd.value:deck.card.name\n  nm.value:deck.name\n  auth.value:deck.author\n  scr.value:deck.script\n  lock.brush:deck.locked\n  lock.paste[limg.images[lock.brush]]\n  init.value:1\n end\nend\n\non export do\n file:\"\\n\\n\" split deck.encoded\n d:\"\\n\" split file[0]\n lc:\"\" fuse \"locked:\",lock.brush\n each v k in d\n  if v like \"size*\" d[k]:\"\" fuse \"size:[\",(\",\" fuse w.text,h.text),\"]\" end\n  if v like \"card*\" d[k]:\"\" fuse \"card:\",deck.cards[crd.text].index end\n  if v like \"locked*\" d[k]:lc show[v] l:1 end\n end \n if !l d[count d]:lc end\n file[0]:\"\\n\" fuse d\n file:\"\\n\\n\" fuse file\n write[newdeck[file]]\nend\n\non pickcrd do\n r:alert[\"start deck from card ____\" \"choose\" deck.cards]\n crd.text:r.name\nend","image":"%%IMG3ALIA0gZAkXBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAMKHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOqXMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUHkGAQ==","widgets":{"t":{"type":"field","size":[176,208],"pos":[1,1],"locked":1,"font":"menu","pattern":34,"show":"invert","border":1,"value":"emDeck Exporter"},"h1":{"type":"field","size":[90,16],"pos":[87,163],"locked":1,"font":"mono","pattern":34,"show":"invert","border":0,"value":"height"},"h":{"type":"field","size":[48,16],"pos":[129,163],"volatile":1,"pattern":34,"border":0,"style":"code"},"w1":{"type":"field","size":[84,16],"pos":[2,163],"locked":1,"font":"mono","pattern":34,"show":"invert","border":0,"value":"width"},"w":{"type":"field","size":[48,16],"pos":[37,163],"volatile":1,"pattern":34,"border":0,"style":"code"},"s1":{"type":"field","size":[176,16],"pos":[1,65],"locked":1,"font":"mono","pattern":34,"show":"invert","border":1,"align":"center","value":"global deck script"},"scr":{"type":"field","size":[176,64],"pos":[1,81],"volatile":1,"script":"on change val do\n deck.script:me.text\nend","pattern":34,"border":0,"scrollbar":0,"style":"code"},"crd":{"type":"field","size":[92,16],"pos":[69,146],"volatile":1,"pattern":34,"border":0,"style":"code"},"nm":{"type":"field","size":[176,16],"pos":[1,33],"volatile":1,"script":"on change val do\n deck.name:me.text\nend","pattern":34,"border":0,"style":"code"},"a1":{"type":"field","size":[47,16],"pos":[2,49],"locked":1,"font":"mono","pattern":34,"show":"invert","border":0,"value":"author"},"auth":{"type":"field","size":[128,14],"pos":[49,50],"volatile":1,"script":"on change val do\n deck.author:me.text\nend","pattern":34,"border":0,"style":"code"},"t2":{"type":"field","size":[176,16],"pos":[1,17],"locked":1,"font":"mono","pattern":34,"show":"invert","border":1,"align":"center","value":"deck name"},"crd1":{"type":"field","size":[66,16],"pos":[2,146],"locked":1,"font":"mono","pattern":34,"show":"invert","border":0,"value":"start card"},"export":{"type":"field","size":[80,16],"pos":[94,190],"locked":1,"font":"menu","pattern":34,"show":"invert","border":1,"align":"center","value":"Save As..."},"e1":{"type":"button","size":[80,16],"pos":[94,190],"script":"on click do\n export[]\nend","style":"invisible"},"lock":{"type":"canvas","size":[23,17],"pos":[3,190],"locked":1,"volatile":1,"script":"on click pos do\n me.brush:!me.brush\n me.paste[limg.images[me.brush]]\nend\n\non drag pos do\n \nend\n\non release pos do\n \nend","show":"transparent","border":0,"brush":1,"scale":1},"limg":{"type":"field","size":[8,8],"pos":[1,213],"locked":1,"show":"none","value":{"text":["","i","i"],"font":["","",""],"arg":["","%%IMG3ABcAEQZAkXBILBqPyKRyCGo6QUvicxoVOpnNqigrhVa5WON0HB1Tl08sOJm2XtHps5IqZ5vfcLN2z18GAQ==","%%IMG3ABcAEQZAkXBILBqPyKQRxGyClEWnFDpsVplUIZa4pXa1T690Ch2Tlc7rF5kGr4/TczLeRputYnN2z98HAQ=="]}},"crd2":{"type":"canvas","size":[14,15],"pos":[162,146],"locked":1,"script":"on click pos do\n pickcrd[]\nend\n\non drag pos do\n \nend\n\non release pos do\n \nend","border":0,"image":"%%IMG3AA4ADwZAkXBILBqPQoByiQQQnUeoaMkcSqnKpxWrTXKtW2p3+vViq8Zzs4xsu4M=","scale":1},"init":{"type":"button","size":[8,8],"pos":[2,-14],"locked":1,"volatile":1,"show":"none","style":"check"}}}}}