Recent Posts

Pages: [1] 2 3 ... 10
1
Neato tool, although I don't use pack feature any expansion that tackle lacky problems I can appreciate.
2
I don't know if anyone besides me will find this useful, but here goes! In short, this Python library is a tool to help generate drafting packs for Lackey, giving more intuitive control over what Lackey calls "chances"—the probability of different possible pack layouts.

Official documentation on Lackey pack definitions: http://www.lackeyccg.com/packdefinitions.html

The Problem

Let's use Magic as an example. A basic modern booster pack contains:

Code: [Select]
1 Rare
3 Uncommon
10 Common

(And 1 basic land, but those aren't drafted, so we'll ignore them)
However, about 1 in 8 packs has a mythic rare instead of a rare. Ideally you'd be able to write something like this:

Code: [Select]
13%: 1 Mythic, 87%: 1 Rare
3 Uncommon
10 Common

Unfortunately Lackey defines chances only on a per-pack basis, not on subsets of a pack like individual card slots. So your definition needs to look like this instead:

Code: [Select]
13%:
1 Mythic
3 Uncommon
10 Common
87%:
1 Rare
3 Uncommon
10 Common

So far that's only a little added repetition. But the problem becomes much more pronounced when you have multiple, or even nested, branching points within your configuration. Consider the Shadows Over Innistrad set: in addition to the rare/mythic split, one slot is either a common OR uncommon double-faced card, and another slot is either a regular common OR a rare OR or mythic double-faced card. Never mind the actual numbers... The basic idea should look like:

Code: [Select]
13%: 1 Mythic, 87%: 1 Rare
3 Uncommon
8 Common
%: 1 Common, %: 1 DFC Mythic, %: 1 DFC Rare
%: 1 DFC Common, %: 1 DFC Uncommon

But to work in Lackey, you have to calculate each of those branch points out to a list of TWELVE different possible configurations. I dunno about you, but I don't want to do that by hand. Which brings me to...

The Solution

Well, for me at least. And maybe for you too, if you know (or decide to learn) Python!

I've posted the entire file here as an attachment, lackeyPacks.py. I've also included my Magic-specific file that imports and uses the library, so you can see what it looks like in practice. I make no claim or warranty of any kind for either of these files. But my intention is that you can use the lackeyPacks.py file basically as-is; you should only need to edit "possibleFields" up at the top so it knows what fields you have in your card files. Then you can write your own equivalent of my magicPacks.py, that imports it, defines your packs, and writes your pack definition file(s).

Most of the defined classes correspond to XML tags in Lackey's pack definition files: Pack, Kind, Crit, and CommonCrit. Branch is basically the same as a chance; that is, a branch that contains only kinds is a chance. However, any given entry within a branch can instead be a branchpoint, which itself includes multiple branches. When you create a pack object, it automatically analyzes its entries and resolves all branchpoints until it has a list of chances that Lackey can understand.

Let's go through an example. In magicPacks.py, you can see I define some variables for criteria I'll need often:

Code: [Select]
mythic = Crit('Rarity', 'IS', 'M')
rare = Crit('Rarity', 'IS', 'R')
uncommon = Crit('Rarity', 'IS', 'U')
common = Crit('Rarity', 'IS', 'C')
land = Crit('Rarity', 'IS', 'L')

This makes defining kinds easy: "Kind(1, rare)" corresponds to a kind tag in the XML file telling Lackey to include one card whose rarity is rare.

Here's the entries for a default Magic pack:

Code: [Select]
defaultEntries = (
BranchPoint(
Branch(Kind(1, mythic), prob=13), #1/8
Branch(Kind(1, rare), prob=87),
),
Kind(3, uncommon),
Kind(10, common),
)

After that you can do something like:

Code: [Select]
Pack('The Excellent Card Set', 'booster', defaultEntries)
And that will generate a pack. You'll probably also want to define one or more commonCrits, such as specifying that all cards in the pack have to come from a certain set. I make myself a Booster class as a subclass of Pack, as shorthand to take care of some things like that that are the same for (almost) all Magic booster packs. But that's probably more trouble than it's worth if your plugin only has a few different packs.

The writePacksToFile function writes a collection of packs to a specified file, which should then be ready to put in your plugin!

Known Limitations

The biggest one is that Lackey does NOT understand probabilities with a decimal component. That is, it understands 57, but not 57.25. Including any probabilities like this makes Lackey glitch and always choose the first chance listed for the pack. This becomes a much bigger problem the more chances you have and the smaller each one gets, especially since no one single chance can have less than a 1% probability.

Trevor mentioned fixing this in this forum post; just in case he does someday, I've included a setting flag at the top of the file. Change "roundToIntegers" to False and the library should happily spit out much more accurate numbers for you.

The other is available evals. The doc mentions "IS, CONTAINS, DOESNTCONTAIN,ISGREATERTHAN, among others." I don't know what those others are, but I do know that I haven't been able to get ISGREATERTHAN to work. So I recommend sticking with those first three. If you somehow discover others, first, pleast post here and let me know! And second, the list can easily be edited at the top of the file.

3
Plugins & Plugin Creation Forum / MtG: Another Pack Update
« Last post by CrazyChucky on February 14, 2019, 08:41:21 pm »
I just updated the plugin's drafting packs. Two changes:
  • Rarities in the double-faced card slots for Innistrad and Shadows Over Innistrad blocks should now be (reasonably) accurate.
  • I organized the packs into sections and inserted a heading for each. I find it easier to read and search through now. How do you all like it? Anything you might prefer ordered differently?
4
Tabletop Games Forum / Re: Burning Planets ~ A free wargame
« Last post by The Hermit King on February 13, 2019, 04:07:07 pm »
Thanks to a friend that volunteered, now the rule book is available in russian too!
You can check other details of the new update in this page: https://www.thehermitking.com/update-2-to-burning-planets-free-set/

A note about the facebook profile I talked about in the last post, since you won't find it: after just 2 days facebook decided to block my account without even telling it. I have no clue why, I can say for sure I have done nothing against the rules, maybe some joker reported me, and even though I gave them a picture and an ID card to verify my identity after they asked for them, they didn't unlock me nor they said anything again. I tried with no luck to find help, they just ignore everything. So, since I cannot remake everything and get a new email address every 2 days, until I won't get them to stop ignoring and unlock my account, I'm not going to make another one.

5
Question 1:
No, there is no way to do it, you might as well have the face-down cards on your field.

Question 2:
I had this problem, I fixed it by making a backup and throwing all of the images into the general folder. For cardgeneralurls they should all save in general.
6
General Discussion Forum / Re: Idiot question on Lackey
« Last post by CrazyChucky on February 12, 2019, 09:09:07 pm »
There's a checkbox at Preferences -> Appearance -> General appearance preferences [the topmost heading] -> Lock window resizing bars
7
General Discussion Forum / Idiot question on Lackey
« Last post by Johnny Blaze on February 12, 2019, 02:15:58 pm »
. in Preferences on Lackey how do i unlock the window panes so i can size them.. im doing something wrong i cant remember how to do it
8
Plugins & Plugin Creation Forum / Re: Plugin Update List locations 5/20/2014
« Last post by Alastair on February 11, 2019, 05:50:44 pm »
Plugin = Star Wars LCG (The Card Game)
Maintainer = MasterJediAdam
Updatelist = https://dl.dropboxusercontent.com/s/k2kwk16dlo7dsm0/updatelist.txt
Since there are two links in the thread, this one is the most current. It is currently only missing the last two Force packs and the Legends (fan) cycle. Should be updated by month's end.

Added to the master list.
9
Plugins & Plugin Creation Forum / Re: Plugin Update List locations 5/20/2014
« Last post by MasterJediAdam on February 11, 2019, 03:08:02 pm »
Plugin = Star Wars LCG (The Card Game)
Maintainer = MasterJediAdam
Updatelist = https://dl.dropboxusercontent.com/s/k2kwk16dlo7dsm0/updatelist.txt
Since there are two links in the thread, this one is the most current. It is currently only missing the last two Force packs and the Legends (fan) cycle. Should be updated by month's end.
10
General Discussion Forum / Re: no menu options in opeing window
« Last post by xdarkgeox on February 09, 2019, 08:21:43 pm »
mind posting a screenshot of the incident?
Pages: [1] 2 3 ... 10