Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Missooni

29
Posts
1
Topics
24
Followers
7
Following
A member registered Sep 05, 2025 · View creator page →

Creator of

Recent community posts

(1 edit)

Standalone toolboxes for more Decker developments..!


LALC ( Look A Little Closer! 

A read-only viewer that displays a list of every card in a deck, along with some general information about the widget interfaces that exist on any selected card.  Eventually I plan on having better support for canvases/grids.

%%WGT0{"w":[{"name":"LALC1","type":"contraption","size":[272,256],"pos":[114,44],"def":"LALC","widgets":{"tab4":{},"widgetz":{},"cardz":{},"c1":{},"w1":{},"t":{},"val":{},"path":{},"t2":{},"locked":{},"animated":{},"volatile":{},"p1":{},"s1":{},"pos":{},"size":{},"show":{},"sh1":{},"tab1":{},"tab2":{},"tab3":{},"to1":{},"to":{},"handler":{},"optype":{},"v1":{}}}],"d":{"LALC":{"name":"LALC","size":[272,256],"margin":[5,20,5,6],"description":"'Look A Little Closer!'\nA live, read-only viewer used to examine common attributes shared across all widgets.","version":1,"script":"on get_selected do path.text end\n\non view do\n card.show:\"transparent\"\n cardz.value:deck.cards\nend\n\non getwidgets x do\n widgetz.value:deck.cards[x].widgets\nend\n\non loadwidget do\n w:deck.cards[cardz.rowvalue.key].widgets[widgetz.rowvalue.key]\n if w.name \n  path.text:\"deck.cards[\\\"\",w.parent.name,\"\\\"]\",\".widgets\",\"[\\\"\",w.name,\"\\\"]\"\n  to.text:typeof w\n end\n if w.pos[0] pos.text:w.pos[0],\",\",w.pos[1] end\n if w.size[0] size.text:w.size[0],\",\",w.size[1] end\n show.text:w.show\n font.text:w.font\n locked.value:w.locked\n volatile.value:w.volatile\n animated.value:w.animated\n otxt:optype.text\n if to.text=\"canvas\" tab1.show:\"none\" tab2.show:\"none\" tab4.show:\"solid\" else\n tab1.show:\"solid\" tab2.show:\"solid\" tab4.show:\"none\" end\n if otxt=\"value\" val.value:w.value\n elseif otxt=\"text\" val.text:w.text\n elseif otxt=\"script\" val.text:w.script\n elseif otxt=\"encoded\" val.text:w.copy[].encoded end\nend\n","attributes":{"name":["selected"],"label":["selected"],"type":["string"]},"widgets":{"tab4":{"type":"button","size":[96,16],"pos":[112,240],"script":"on click do\n v1.text:me.text\n optype.text:\"encoded\"\nend","font":"body","pattern":0,"show":"none","text":"x.copy[].encoded","style":"rect"},"widgetz":{"type":"grid","size":[112,128],"pos":[0,128],"locked":1,"volatile":1,"script":"on click row do\n loadwidget[me.rowvalue.key]\nend","headers":0,"widths":[80,0]},"cardz":{"type":"grid","size":[112,80],"pos":[0,32],"locked":1,"volatile":1,"script":"on click row do\n\nend","headers":0,"bycell":0,"widths":[80,0]},"c1":{"type":"field","size":[112,16],"pos":[0,16],"locked":1,"font":"menu","show":"invert","border":1,"value":"Cards"},"w1":{"type":"field","size":[112,16],"pos":[0,112],"locked":1,"font":"menu","show":"invert","border":1,"value":"Widgets"},"t":{"type":"field","size":[272,16],"pos":[0,0],"locked":1,"script":"on change val do\n \nend","font":"menu","pattern":47,"show":"invert","border":0,"align":"right","value":"LALC"},"val":{"type":"field","size":[160,80],"pos":[112,160],"volatile":1,"script":"on change val do\n \nend","scrollbar":1},"path":{"type":"field","size":[160,32],"pos":[112,32],"volatile":1,"script":"on change val do\n \nend"},"t2":{"type":"field","size":[160,16],"pos":[112,16],"locked":1,"show":"invert","align":"center","value":"full widget path"},"locked":{"type":"button","size":[48,16],"pos":[112,64],"volatile":1,"font":"body","text":"locked","style":"check"},"animated":{"type":"button","size":[66,16],"pos":[158,64],"volatile":1,"font":"body","text":"animated","style":"check"},"volatile":{"type":"button","size":[54,16],"pos":[218,64],"volatile":1,"font":"body","text":"volatile","style":"check"},"p1":{"type":"field","size":[80,16],"pos":[112,80],"locked":1,"show":"invert","border":1,"align":"center","value":"x.pos"},"s1":{"type":"field","size":[80,16],"pos":[192,80],"locked":1,"show":"invert","border":1,"align":"center","value":"x.size"},"pos":{"type":"field","size":[80,16],"pos":[112,96],"volatile":1},"size":{"type":"field","size":[80,16],"pos":[192,96],"volatile":1},"show":{"type":"field","size":[80,16],"pos":[112,128],"volatile":1},"sh1":{"type":"field","size":[80,16],"pos":[112,112],"locked":1,"show":"invert","align":"center","value":"x.show"},"tab1":{"type":"button","size":[48,16],"pos":[112,240],"script":"on click do\n v1.text:me.text\n optype.text:\"value\"\nend","font":"body","pattern":0,"text":"x.value","style":"rect"},"tab2":{"type":"button","size":[48,16],"pos":[160,240],"script":"on click do\n v1.text:me.text\n optype.text:\"text\"\nend","font":"body","text":"x.text","style":"rect"},"tab3":{"type":"button","size":[64,16],"pos":[208,240],"script":"on click do\n v1.text:me.text\n optype.text:\"script\"\nend","font":"body","pattern":10,"text":"x.script","style":"rect"},"to1":{"type":"field","size":[80,16],"pos":[192,112],"locked":1,"show":"invert","align":"center","value":"typeof x"},"to":{"type":"field","size":[80,16],"pos":[192,128],"volatile":1},"handler":{"type":"field","size":[16,15],"pos":[-21,240],"locked":1,"animated":1,"volatile":1,"script":"on change val do\n \nend\n\non view do\n getwidgets[cardz.rowvalue.key]\n loadwidget[]\nend","show":"none"},"optype":{"type":"field","size":[32,32],"pos":[278,223],"locked":1,"volatile":1,"script":"on change val do\n \nend","show":"none"},"v1":{"type":"field","size":[160,16],"pos":[112,144],"locked":1,"show":"invert","align":"center","value":"x.value"}}}}}


QuickMod
A GUI for creating simple modules and edit existing modules from within Decker - I've even provided a placeholder script for adding functions!

%%WGT0{"w":[{"name":"QuickMod","type":"contraption","size":[368,208],"pos":[82,73],"def":"QuickMod","widgets":{"mods":{},"m1":{},"v1":{},"new":{},"delete":{},"rename":{},"d1":{},"s1":{},"script":{},"description":{},"version":{},"name":{},"s2":{}}}],"d":{"QuickMod":{"name":"QuickMod","size":[368,208],"margin":[0,0,0,0],"description":"A combination viewer/editor for simple modules. \nEditing the 'data' interface must still be done externally.","version":1,"script":"on view do\n mods.value:deck.modules\n if !(count deck.modules) loadmod[] delete.locked:1 rename.locked:1\n else loadmod[mods.rowvalue.key] delete.locked:0 rename.locked:0 end\nend\n\non namecheck x do\n n:alert[\"name module\" \"string\" x]\n while deck.modules[n]\n  n:alert[\"name already in use\" \"string\"]\n end\n if !n n:\"module\" else n end\nend\n\non newmod do\n deck.add[\"module\" namecheck[]]\n loadmod[n]\nend\n\non loadmod x do\n mod:deck.modules[x]\n version.text:mod.version\n description.text:mod.description\n script.text:mod.script\n name.text:mod.name\nend\n\nmod:deck.modules[name.text]\n\non updatemod x y do\n mod[x]:y\nend\n\non renamemod do\n mod.name:namecheck[mod.name]\nend\n\non deletemod do\n if name.text\n  if alert[\"permanently delete '\",name.text,\"' module?\" \"bool\"]\n   deck.remove[mod]\n  end\n end\nend\n\non addfunction do\n r:alert[\"name function\" \"string\"]\n mod.script:mod.script,\"\\nmod.\",r,\":   on _ do \\n# script\\nend\"\nend","widgets":{"mods":{"type":"grid","size":[128,176],"pos":[0,16],"volatile":1,"script":"on click row do\n loadmod[me.rowvalue.key]\nend","headers":0,"widths":[100,0]},"m1":{"type":"field","size":[128,16],"pos":[0,0],"locked":1,"font":"menu","show":"invert","border":0,"value":"Installed Modules"},"v1":{"type":"field","size":[48,16],"pos":[128,0],"locked":1,"show":"invert","style":"plain","value":"version"},"new":{"type":"button","size":[32,16],"pos":[0,192],"script":"on click do\n newmod[]\nend","font":"body","show":"invert","text":"new","style":"rect"},"delete":{"type":"button","size":[48,16],"pos":[80,192],"script":"on click do\n deletemod[]\nend","font":"body","show":"invert","text":"delete","style":"rect"},"rename":{"type":"button","size":[48,16],"pos":[32,192],"script":"on click do\n renamemod[]\nend","font":"body","show":"invert","text":"rename","style":"rect"},"d1":{"type":"field","size":[240,16],"pos":[128,16],"locked":1,"show":"invert","style":"plain","value":"description"},"s1":{"type":"field","size":[112,16],"pos":[128,80],"locked":1,"show":"invert","style":"plain","value":"script"},"script":{"type":"field","size":[240,112],"pos":[128,96],"volatile":1,"script":"on change val do\n updatemod[me.name val]\nend","scrollbar":1},"description":{"type":"field","size":[240,48],"pos":[128,32],"volatile":1,"script":"on change val do\n updatemod[me.name val]\nend","scrollbar":0},"version":{"type":"field","size":[192,16],"pos":[176,0],"volatile":1,"script":"on change val do\n updatemod[me.name val]\nend"},"name":{"type":"field","size":[16,8],"pos":[0,224],"locked":1,"show":"none","value":"credits"},"s2":{"type":"button","size":[128,16],"pos":[240,80],"script":"on click do\n addfunction[]\nend","font":"body","show":"invert","text":"+ add function","style":"rect"}}}}}

Updated the Sticker contraption to use the same 'constrain' script as the one in the 'rect' module, which is a lot more succinct. ^^

show[52 % 2] returns '2' instead of '0' - is that expected behavior for the modulo operation?

Thank you so much for making this!! So cool. :3

Aw yay!! I used to be someone looking in from the outside, seeing all the amazing stuff people were making in Decker (you especially!) and wanting to contribute - but at the time I had no experience at all with Lil. Thank you for being such a supportive voice in the community for me and everyone else. :3

Decker community · Created a new topic Em's Exports
(2 edits)
Howdy! I'm Emma, a squiggly squirrel living a GIF based world.
It's my dream to one day become a .PNG file, but it's going to be
a lot of hard work... Do you want to see some other projects I've
been working on in the meantime?


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":{}}


As I continue experimenting and (hopefully) improve my understanding of file structures, I'll update this post with more tools. Enjoy! - Missooni ♥

This response gave me more than enough information to work off of - thank you! ^^ I'll most likely look into BMP first and see if I can move my way up from there.

(1 edit)

Are there in-built functions for reading arrays from image interfaces? I have an interest in adding a 'save as .png' and 'save as .cur' to my deck, minart, but I'm not sure where to start when it comes to image conversion. Is this something that should be done externally?

(4 edits)

Here's some contraptions I had lying around, plus some new ones to celebrate the existence of the 1.66 Decker Gamepad interface. :3

1. Sticker

I noticed that ahmwma's deck, "Phinxel's Field Notes" had these amazingly cute stickers I wanted to use in one of my own decks, so I turned them into contraptions with attributes to change their sprites and constrain the dragging region within another widget.

%%WGT0{"w":[{"name":"Sticker","type":"contraption","size":[23,29],"pos":[240,128],"script":"on drag do\n if me.constrain\n   b:me.parent.widgets[me.constrain]\n   # 'constrain' script written Internet Janitor, from the 'rect' module.\n   me.pos:(b.pos+b.size-me.size)&b.pos|me.pos\n end\nend","show":"transparent","def":"Sticker","widgets":{"c":{"show":"transparent"},"is":{},"wc":{}}}],"d":{"Sticker":{"name":"Sticker","size":[23,29],"resizable":1,"margin":[1,1,1,1],"description":"Draggable, self-resizing  contraption that toggles between two images when pressed.\n\nCan be constrained if a widget name is provided under the 'constrain' attribute.\n\nInspired by stickers seen in 'Phinxel's Field Notes' created by ahmwma","version":2,"script":"# Code for making stickers draggable was repurposed from the 'follower' contraption found in path.deck.\n\non get_sprites do is.value end\non set_sprites x do is.value:x end\non get_constrain do wc.text end\non set_constrain x do wc.text:x end\n\non click pos do\n update_view[1]\nend\n\non drag pos do\n if !card.locked\n  card.pos:pointer.pos-c.size/2\n  c.pos:0,0\n  card.event[\"drag\"]\n end\nend\n\non release pos do\n update_view[]\n card.pos:card.pos+(0,1)\nend\n\non update_view x do\n if x then\n  i:last is.images\n else\n  i:first is.images\n end\n c.clear[]\n c.size:i.size\n c.paste[i]\n c.show:card.show\n card.size:c.size\nend\n\non view do\n update_view[]\nend","template":"on drag do\n if me.constrain\n   b:me.parent.widgets[me.constrain]\n   # 'constrain' script written Internet Janitor, from the 'rect' module.\n   me.pos:(b.pos+b.size-me.size)&b.pos|me.pos\n end\nend","attributes":{"name":["sprites","constrain"],"label":["sprites","constrain"],"type":["rich","string"]},"widgets":{"c":{"type":"canvas","size":[23,29],"pos":[0,0],"locked":1,"volatile":1,"border":0,"draggable":1,"scale":1},"is":{"type":"field","size":[18,18],"pos":[-2,-25],"locked":1,"show":"none","value":{"text":["","i","i"],"font":["","",""],"arg":["","%%IMG3ABcAHQZAgFAIKg6PyCSgyFQ6iSCX1PhEFl2prMtIfV5TKFRqywRVv2Hxdmp2stDhsUpF9kbBcdWK3k2+72Apenx9VlFSWXtSbEpXc497j4SGLiojlyOPIpsik1CVmJiPl5uTjqQhIqGhpWSnI5yrrISvm7KzrlGWt7KduaC8q75lwMGkhCx/xcHDba/MyELKu7zNR8+90UPT1KLaR8qVknRkLG5Mi4tM5k9/ZWXsVcnvIMlVSMn58UlB","%%IMG3ABcAGwZAgFAIKg6PyCSgyFQ6iSCX1PhEFl2prMtIfV5TKFRqywRVv2Hxdmp2stDhsUpF9kbBcdWK3k2+72Apenx9VlFSWXtSbEpXc497j4SGLiojlyOPIpsik1CVmJiPl5uTjqQhIqGhpWSnI5yrrISvm7KzrlGWt7KduaC8q75lwMGkhCx/xcHDba/MyEJ/ZUW9nlDUTJjNLEcsLeDg2XNk3U7h4kzlVUjpRebsSMnJSUE="]}},"wc":{"type":"field","size":[12,12],"pos":[21,-25],"locked":1,"show":"none","border":0,"style":"plain","align":"right"}}}}}


Note: I referenced the "follower" script from the path.deck module to make this contraption draggable, but I  could not reproduce the dragging behavior of the follower script without copy-pasting the exact canvas used. If you want to reproduce the steps to 'break' the follower contraption in a way that renders it undraggable, go to path.deck, specifically #followeranim, edit the follower contraption, then attempt to change the canvas script. At a glance, it doesn't look like the canvas has any scripts attached to it, so it will auto-fill with the default 'click' 'drag' 'release' functions, however, if you then save the canvas the contraption will not be draggable anymore. If you then go back and delete the entire script, it will still be permanently broken. I have found no way to fix this, other than copy-pasting the exact canvas used from path.deck.

2. Palette Storage

A resizable list to store and update color palettes, containing the default Decker palette when created. If you happen to change the colors in your deck manually or by importing a .hex file, you can give the new palette a name, add it to the list, then return to it any time using this contraption. If you click 'add' after specifying a name already listed, it will update that entry instead of making an entirely new one. By editing the contraption itself, you can specify more default palettes.

%%WGT0{"w":[{"name":"Palette Storage","type":"contraption","size":[100,100],"pos":[194,125],"def":"Palette Storage","widgets":{"s":{},"d":{},"t":{},"add":{},"delete":{}}}],"d":{"Palette Storage":{"name":"Palette Storage","size":[100,100],"resizable":1,"margin":[4,70,6,5],"description":"Adapted grid for storing and accessing color patterns sets.","version":1,"script":"on get_s do t.text end\non set_s x do \n t.text:x\n palz[x] \nend\n\np:32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47\n\non view do\n d.value:keys cols s.value\n w:add,delete,t,d\n w..show:card.show\nend\n\non palz x do\n if s.value[x]\n  each v k i in s.value[x]\n   patterns[p[i]]:v\n  end\n end\n card.event[\"change\"]\nend\n\non addz x do\n a:cols s.value\n a[x]:()\n each v in p\n  a[x]:a[x],patterns[v]\n end\n s.value:table a\n view[]\nend\n\non delz x do\n s.value:x drop s.value\n view[]\nend","attributes":{"name":["s"],"label":["selected"],"type":["string"]},"widgets":{"s":{"type":"grid","size":[100,22],"pos":[0,-31],"locked":1,"show":"none","value":{"default":[16777215,16776960,16737536,14417920,16711831,3539095,202,38911,43008,25856,6632960,9921846,12171705,8816262,4539717,0]}},"d":{"type":"grid","size":[100,71],"pos":[0,0],"locked":1,"volatile":1,"script":"on click row do\n v:me.rowvalue.value\n palz[v]\n t.text:v\nend","headers":0,"lines":1,"bycell":0},"t":{"type":"field","size":[100,13],"pos":[0,70],"volatile":1,"style":"plain"},"add":{"type":"button","size":[47,15],"pos":[2,84],"script":"on click do\n addz[t.text]\nend","font":"body","text":"add","style":"rect"},"delete":{"type":"button","size":[48,15],"pos":[50,84],"script":"on click do\n delz[t.text]\nend","font":"body","text":"delete","style":"rect"}}}}}

3. Gamepad Buttons

Scalable, vertical buttons that display the state of the action and cancel buttons introduced with the Decker 1.66 gamepad interface. They provide a visual interface for people without a keyboard or controller, and transmit the state of the buttons through boolean attributes 'action' and 'cancel'.  By observing the attributes of this widget instead of the global gamepad interface, mobile users or people on touch-screen exclusive devices are able to interact with elements in a deck as if they were using a keyboard.

%%WGT0{"w":[{"name":"Gamepad Buttons","type":"contraption","size":[48,55],"pos":[96,128],"def":"Gamepad Buttons","widgets":{"b1":{"size":[48,25]},"b2":{"size":[48,25],"pos":[0,30]},"handler":{},"action":{"size":[48,25]},"cancel":{"size":[48,25],"pos":[0,30]},"t1":{"size":[48,25]},"t2":{"size":[48,25],"pos":[0,30]},"locka":{"pos":[0,58]},"lockc":{"pos":[14,58]}}}],"d":{"Gamepad Buttons":{"name":"Gamepad Buttons","size":[48,104],"resizable":1,"margin":[2,2,2,2],"description":"Minimalistic, resizable buttons to add gamepad button functionality.","version":1,"script":"on get_action do action.brush end\non get_cancel do cancel.brush end","attributes":{"name":["action","cancel"],"label":["action","cancel"],"type":["bool","bool"]},"widgets":{"b1":{"type":"field","size":[48,48],"pos":[0,0],"locked":1,"pattern":12,"show":"invert"},"b2":{"type":"field","size":[48,48],"pos":[0,56],"locked":1,"pattern":9,"show":"invert"},"handler":{"type":"canvas","size":[8,8],"pos":[0,-8],"locked":1,"animated":1,"script":"t:(\"solid\",\"transparent\")\non view do\n if !locka.value\n  g1:gamepad.held[\"action\"]\n  action.brush:g1\n end\n if !lockc.value\n  g2:gamepad.held[\"cancel\"]\n  cancel.brush:g2\n end\n action.show:t[action.brush]\n cancel.show:t[cancel.brush]\nend","show":"none","scale":1},"action":{"type":"canvas","size":[48,48],"pos":[0,0],"locked":1,"script":"on click pos do\n locka.value:1\n me.brush:pointer.held\nend\n\non release pos do\n me.brush:pointer.held\n locka.value:0\nend","scale":1},"cancel":{"type":"canvas","size":[48,48],"pos":[0,56],"locked":1,"script":"on click pos do\n lockc.value:1\n me.brush:pointer.held\nend\n\non release pos do\n me.brush:pointer.held\n lockc.value:0\nend","scale":1},"t1":{"type":"field","size":[48,48],"pos":[0,0],"locked":1,"script":"on change val do\n \nend","font":"menu","show":"transparent","border":0,"style":"plain","value":"Z"},"t2":{"type":"field","size":[48,48],"pos":[0,56],"locked":1,"font":"menu","show":"transparent","border":0,"style":"plain","value":"X"},"locka":{"type":"slider","size":[8,8],"pos":[0,107],"locked":1,"show":"none","interval":[0,1]},"lockc":{"type":"slider","size":[8,8],"pos":[14,107],"locked":1,"show":"none","interval":[0,1]}}}}}

4. Gamepad Joystick

Similar to the previous contraption - except this one is meant to simulate a physical joystick. Exposes the attributes 'x' and 'y' for external scripts, observing both gamepad.dir and mouse inputs simultaneously.

%%WGT0{"w":[{"name":"Gamepad Joystick","type":"contraption","size":[100,100],"pos":[208,128],"def":"Gamepad Joystick","widgets":{"handler":{},"cir":{},"stick":{},"x":{},"y":{},"lock":{}}}],"d":{"Gamepad Joystick":{"name":"Gamepad Joystick","size":[100,100],"resizable":1,"margin":[0,0,0,0],"description":"Minimalistic, resizable joystick to add gamepad joystick functionality.","version":1,"script":"on get_x do x.value end\non get_y do y.value end\n\n# Circle drawing script provided on the Lil Playground\non view do\n cir.clear[]\n cir.pattern:1\n c:cir.size/2           # center of canvas\n r:.7*c                    # radius of the pattern\n a:(pi/0.5*16)*range 16    # angle per wedge\n p:flip c+r*flip unit a    # points around a circle\n each x i in p\n  cir.line[x p[(count p)%1+i]]\n end\n cir.pattern:34\n cir.paste[cir.fill[0,0].copy[].map[(34,0) dict (0,1)]]\n stick.size:cir.size/2\n stick.paste[cir.copy[].scale[.5].outline[(35,32)].map[(1,35) dict (13,47)]]\n center[]\nend\n\non center do stick.pos:cir.pos+(stick.size/2) end\non stickz input do\n cntr:cir.pos+(stick.size/2)\n diff:(cir.size/2)-(stick.size/2)\n if input=\"gp\"\n  x.value:gamepad.dir[0]\n  y.value:gamepad.dir[1]\n  stick.pos:(cntr[0]+(diff[0]*x.value)),(cntr[1]+(diff[1]*y.value))\n else\n  x.value:(stick.pos[0]/diff[0])-1\n  y.value:(stick.pos[1]/diff[1])-1\n end\nend","attributes":{"name":["x","y"],"label":["x","y"],"type":["number","number"]},"widgets":{"handler":{"type":"canvas","size":[8,8],"pos":[0,-16],"locked":1,"animated":1,"script":"on view do\n if !lock.value\n  stickz[\"gp\"]\n end\nend","show":"none","scale":1},"cir":{"type":"canvas","size":[100,100],"pos":[0,0],"locked":1,"pattern":34,"border":0,"image":"%%IMG3AGQAZAKEj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/quBP4f4I2AxCJReDEql0AkhAmFOhnR6nKasGqNWMD2y0WCx0ce+fzToddpG/sdpMHh8jl7ZqfD8vMX3+7y18ciCKhSmJeCyIeymGjiyFgS+UhCaWh5OSiiiRnSufkJ+pY5esdpeiqaijbE2rr6SoYqexZbC3aLu6W7a9XrGwUcfEVLLGx8zOSqLJXcXFQKHfY83cZs3SSdHbedDcl97Q3dGK74fTjdQr7e7HccQ4y3W4dbY+/2qjYqBOqk2cVRlwOIBiIQZLBHqIQKZzGkUOUhhzISK1q8iDGjxo0cO3r8CDKkyJEkS0osAA==","scale":1},"stick":{"type":"canvas","size":[50,50],"pos":[25,25],"script":"on click pos do\n lock.value:1\nend\n\non drag pos do\n  mx:(cir.size+cir.pos)-me.size\n  if me.pos[0]<mn[0] me.pos:mn[0],me.pos[1]="" end\n="" if="" me.pos[1]<mn[1]="" me.pos:me.pos[0],mn[1]="" me.pos[0]="">mx[0] me.pos:mx[0],me.pos[1] end\n  if me.pos[1]>mx[1] me.pos:me.pos[0],mx[1] end\n  stickz[]\nend\n\non release pos do\n center[]\n lock.value:0\nend","show":"transparent","border":0,"image":"%%IMG3ADIAMgZAgHBILBqPyKRyyWw6n9CodEqtWq9YKmjL7WaZ3Jd4TOZ+j6BxY81uj0FnYrpNrzde2/P2Ze+zxXBYaXx+hXeBVXOGi3iJhIuMiFGKkJFSlJWWT5iZho1OnJ2ekkqhooWfS6anfalJq6x2rkiwsXSzaI+2o6q6u364RbW/a8FyvsR1xkPDxMtCzb/PANG709Wx09DIycWktNzd2tThzt+v5dbn6N1/6+zt40bYvFrpmfLg1vnwp3jvk8SI4tdkTyVAcY6pUQYIoKAwZBo6TNjFTMKLGDNq3Mixo5Ig","draggable":1,"scale":1},"x":{"type":"slider","size":[8,8],"pos":[112,16],"locked":1,"show":"none","interval":[-1,1],"step":0.01},"y":{"type":"slider","size":[8,8],"pos":[112,0],"locked":1,"show":"none","interval":[-1,1],"step":0.01},"lock":{"type":"slider","size":[8,8],"pos":[0,112],"locked":1,"script":"on change val do\n \nend","show":"none","interval":[0,1]}}}}}</mn[0]>

I was actually using the old method until I saw how you were condensing scripts in the official decks - in fact, I didn't realize there were even more methods I could be chaining until I read your reply. Thank you! ^^

Editing images can be done in a single line of code, if you append the operations like so:

# This script:
i:me.copy[]
i.map[(39,35) dict (35,39)]
i.transform["horiz"]
me.paste[i]
# Can be condensed into one line:
me.paste[me.copy[].map[(39,35) dict (35,39)].transform["horiz"]]

If you use this particular script in tandem with a click event, you can make a canvas that swaps red with blue and flips when clicked.


yay 1.66 decker so cool thanx

Saw a comment that hinted at a potential update for this module, and since this is one of my favorites to play around with, I wanted to share a road bump I've ran into while using and playing decks that use dialogizer:

I really like that decks are usable on both mobile and desktop devices, because I like to swap between the two while I'm working. All of the decks that I've made use keyboard shortcuts to access almost everything, so I was really disappointed that dialogizer creates buttons I can't target, and additionally, doesn't allow you to progress the text using something like enter or space bar.

If possible, I would really love to see this feature in a future update, and if this change isn't something you'd be comfortable making, I'd also be appreciative for an individual solution. As always, thank you for putting in such good work making Decker.  ^^

Updated this contraption to fix a bug; Setting the HEX/RGB values through the text field would duplicate colors after clicking the palette, but this doesn't happen anymore. :3

Thank you! I'm really proud of this and seeing your rating pop up so quickly honestly made my day. :D

I hope you don't mind having a new Phinxel in your collection...spinny 2.5d phinxel
stackz .GIF: stackz3D source for Phinxel

The workaround worked perfectly for what I needed, thank you! ^^

I'm trying to rotate a square  360 degrees, and I currently have the following code attached to a slider:

on change val do
 r.rotate[(pi/4)*val]
end

But when it rotates 90 degrees, it looks slightly off compared to 180 and 270:

How would I go about fixing this? ^^;

(1 edit)

Thank you so much!! 

This was a lovely little break from life, thank you. ^^

Released a hotfix this morning to address a few things I missed after the update - some UI elements were layered incorrectly or nonfunctional.

Thank you for mentioning me in your zine, making awesome stuff, and helping other people feel seen!  

Yayy! Thank you so much mini-Phinxel.

The first palette is bundled in all Decker projects by default. I made the 'vivid' and 'pastel' palettes by tinting colors from that original set of sixteen, I'm really happy you like them.

The palette swapping is a feature from Decker itself - it's so cool!

Added in the most recent version! Thank you for the feedback. ^^

(1 edit)

Putting this line of code on the 'click' or 'release' event of a draggable canvas will copy the card background behind the canvas when fired. 

me.paste[me.parent.image.copy[me.pos me.size]]

(6 edits)

Another contraption! This one creates a pair of (configurable) canvases to magnify certain parts of your card. You can drag both of them around as you see fit.
Resize it to an area you'd like to use it on, then drag the small dashed square around to use the magnifying lens. This can help mobile users or people who are visually impaired see small components in your decks.


%%WGT0{"w":[{"name":"Magnifying Field","type":"contraption","size":[408,272],"pos":[39,43],"show":"transparent","def":"Magnifying Field","widgets":{"z":{"size":[116,116]},"l":{"size":[60,60],"pos":[122,3],"pattern":0},"zoom":{"size":[32,13],"pos":[368,-19]},"scale":{"size":[33,13],"pos":[322,-19],"value":"60"}}}],"d":{"Magnifying Field":{"name":"Magnifying Field","size":[162,106],"resizable":1,"margin":[0,0,0,0],"description":"Resizable contraption that displays large, zoomed in view within a square lens.","version":1,"script":"on set_scale x do scale.text:x end\non get_scale do scale.text end\non set_zoom x do zoom.text:x end\non get_zoom do zoom.text end\n\non view do\n card.show:\"transparent\"\n l.size:scale.text,scale.text\n l.clear[]\n l.pattern:23\n l.brush:0\n l.box[0,0 l.size]\n l.pattern:0\n z.scale:zoom.text\n z.size:(l.size-2)*zoom.text\n z.pos:3,3\n l.pos:(z.size[0]+6),3\nend\n\non secure x do\n mx:card.size-x.size\n if x.pos[0]<0 x.pos:0,x.pos[1] end\n if x.pos[1]<0 x.pos:x.pos[0],0 end\n if x.pos[0]>mx[0] x.pos:mx[0],x.pos[1] end\n if x.pos[1]>mx[1] x.pos:x.pos[0],mx[1] end\nend","attributes":{"name":["scale","zoom"],"label":["scale","zoom"],"type":["number","number"]},"widgets":{"z":{"type":"canvas","size":[96,96],"pos":[3,3],"volatile":1,"script":"on click pos do\n \nend\n\non drag pos do\n secure[me]\nend\n\non release pos do\n \nend","draggable":1,"scale":2},"l":{"type":"canvas","size":[50,50],"pos":[102,3],"locked":1,"volatile":1,"script":"on click pos do\n \nend\n\non drag pos do\n secure[me]\n z.clear[]\n z.paste[app.render[deck.card].copy[card.pos+me.pos+1 me.size-2]]\nend\n\non release pos do\n \nend","pattern":23,"show":"transparent","border":0,"draggable":1,"scale":1},"zoom":{"type":"field","size":[13,13],"pos":[146,-19],"locked":1,"show":"none","value":"2"},"scale":{"type":"field","size":[13,13],"pos":[128,-19],"locked":1,"show":"none","value":"50"}}}}}

That means so much to me - your work is absolutely amazing, thank you!

(1 edit)

Using  alert[] with type "choose" can be used to view (and navigate to) all available cards in a deck (since deck.cards returns a dictionary). This can be helpful for restricting navigation in a locked deck. 

 go[alert["Go to card:" "choose" deck.cards] "BoxIn"]


(5 edits)

RGB/Hex color adjusting contraption I made for a small project. :3

%%WGT0{"w":[{"name":"RGB/HEX Adjuster","type":"contraption","size":[162,79],"pos":[160,128],"def":"RGB/HEX Adjuster","widgets":{"rs":{},"gs":{},"p":{},"bs":{},"rgb":{},"canvas1":{},"hex":{}}}],"d":{"RGB/HEX Adjuster":{"name":"RGB/HEX Adjuster","size":[162,79],"margin":[0,0,0,0],"description":"Adjust color patterns by using their rgb and hex values.","version":2,"script":"on get_s do p.pattern end\non set_s x do setz[x] end\non get_rgb do rgb.text end\non set_rgb x do \n patterns[p.pattern]:\"%h\" parse convertRgbz[x]\n setz[p.pattern]\nend\non get_hex do hex.text end\non set_hex x do \n patterns[p.pattern]:\"%h\" parse x\n setz[p.pattern]\nend\n\non setz x do\n previewz[x]\n h:hexz[x]\n hex.text:h\n v:rgbz[h]\n rgb.text:v\n v:\",\" split v\n rs.value:v[0]\n gs.value:v[1]\n bs.value:v[2]\nend\n\non sliderz x y do\n c:(\"r\",\"g\",\"b\") dict (rs.value,gs.value,bs.value)\n c[y]:x\n c:\",\" fuse c\n rgb.text:c\n hex.text:convertRgbz[c]\n patterns[p.pattern]:\"%h\" parse hex.text\nend\n\non previewz x do\n p.clear\n p.pattern:x\n p.fill[]\nend\n\non hexz x do\n r:patterns[x]\n r:\"%h\" format r\n r:\"\" split r\n if !r[2] r:\"00\",r end\n if !r[4] r:\"00\",r end\n r:\"\" fuse r\nend\n\non convertRgbz x do\n  d:(10,11,12,13,14,15) dict (\"a\",\"b\",\"c\",\"d\",\"e\",\"f\")\n show[d]\n x:\",\" split x\n r:()\n each v i in x\n  i1:floor v/16\n  i2:((v/16)-i1)*16\n  if i1>9 i1:d[i1] end\n  if i2>9 i2:d[i2] end\n  r:r,i1,i2\n end\n \"\" fuse r\nend\n\non rgbz x do\n d:\"abcdef\" dict 10,11,12,13,14,15\n r:()\n each v i in 2 window \"\" split x\n  each v2 i2 in v\n   if d[v2]\n    v[i2]:d[v2]\n   end\n   v[i2]+0\n   r[i]:(v[0]*16)+v[1]\n  end\n end\n r:\",\" fuse r\nend","image":"%%IMG3AKIATwKMj6nL7Q+jnLQ6gLPevPsPhuJIlubZGejKtu4Lj2pM1/YNz/jO97zuCwqHJSDxiDwak8zmbemMSlfQqfX6qWK3Wy33K/WCx0kx+Sw0o9c7i/sNj8vnFbZdGbjrg+q9H9X3JyiTN2joEnioqKFysPgY0phXCFnJODlpqYkhSblZKQng+bmYSLpnenqXqsrG2or2CksmOwtWa8uFm4u1y2vl+xs2KuzXSVwci5lsvIzMPHYMbSc9vRZsTYSdnfbMfev9rRsu3kteDnyOPrx+tt1u8w5P0zlvLpppP1Wvv+/cz84RwCjyBlJRZ5APwoQ9CjIssvAhDocSRTDARyejxo0c59BCAK1QRILWdIwsI2qayIplErgDySzTSZQlU85EQlHPTZYvFLwUmGwnSqGQHOXMgS8kTyYdmzp9CvViNJ/FAhQA","attributes":{"name":["s","rgb","hex"],"label":["selected","rgb","hex"],"type":["number","string","string"]},"widgets":{"rs":{"type":"slider","size":[106,14],"pos":[7,18],"volatile":1,"script":"on change val do\n sliderz[val \"r\"]\nend","font":"mono","interval":[0,255],"style":"bar"},"gs":{"type":"slider","size":[106,14],"pos":[7,33],"volatile":1,"script":"on change val do\n  sliderz[val \"g\"]\nend","font":"mono","interval":[0,255],"style":"bar"},"p":{"type":"canvas","size":[44,44],"pos":[115,18],"locked":1,"volatile":1,"pattern":47,"scale":1},"bs":{"type":"slider","size":[106,14],"pos":[7,48],"volatile":1,"script":"on change val do\n sliderz[val \"b\"]\nend","font":"mono","interval":[0,255],"style":"bar"},"rgb":{"type":"field","size":[94,15],"pos":[68,64],"volatile":1,"script":"on change val do\n set_rgb[val]\nend","font":"mono","border":1,"style":"plain","align":"center"},"canvas1":{"type":"canvas","size":[160,14],"pos":[1,1],"locked":1,"script":"on sendz x do\n c:me[x]\n if c=0 c:32\n elseif c=1 c:47\n end\n setz[c]\nend\n\non click pos do\n sendz[pos]\nend\n\non drag pos do\n sendz[pos]\nend\n\non release pos do\n \nend","border":0,"image":"%%IMG2AKAADgEUIRQkFCUUKBQpFCwULRQBFCEUJBQlFCgUKRQsFC0UARQhFCQUJRQoFCkULBQtFAEUIRQkFCUUKBQpFCwULRQBFCEUJBQlFCgUKRQsFC0UARQhFCQUJRQoFCkULBQtFAEUIRQkFCUUKBQpFCwULRQAFCIUIxQmFCcUKhQrFC4UABQiFCMUJhQnFCoUKxQuFAAUIhQjFCYUJxQqFCsULhQAFCIUIxQmFCcUKhQrFC4UABQiFCMUJhQnFCoUKxQuFAAUIhQjFCYUJxQqFCsULhQAFCIUIxQmFCcUKhQrFC4U","scale":1},"hex":{"type":"field","size":[57,15],"pos":[6,64],"volatile":1,"script":"on change val do\n set_hex[val]\nend","font":"mono","border":1,"style":"plain","align":"center"}}}}}