Skip to main content

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

Nicely done!

One idea that might simplify this sort of deck in future projects would be to take advantage of Lil's ".." notation. Whenever you have a "path" to a deck part or attribute:

Cloak.widgets.FromCloakroom.show:"none"

A pair of dots next to one another act like a wildcard, substituting in each element of a list or dictionary. For example, you could hide every widget on the card "Cloak" like so:

Cloak.widgets..show:"none"

Often it's helpful to discriminate a bit more. We can write a "helper" function that queries a card for widgets whose name matches a glob-pattern and install it in the deck-level script (File -> Properties... -> Script...):

on find_wids card namePattern do
 extract value where key like namePattern from card.widgets
end

Then, instead of writing something like

Cloak.widgets.FromCloakroom.show:"none"
Cloak.widgets.FromCloakroom1.show:"none"
Cloak.widgets.FromCloakroom2.show:"none"
Cloak.widgets.FromCloakroom3.show:"none"

We could write

find_wids[Cloak "FromCloakroom*"]..show:"none"

Not only is this a bit shorter, it could make modifying the deck much easier: so long as you follow a consistent naming convention, you could add or remove more widgets without needing to update these scripts.

(+2)

Thank you!

Good to know! I do try to keep it as simple/basic as I can with the ports, but I’ll keep this one bookmarked for the next time I mess around with Decker, that’s super useful! Thanks for the notes!