News:

A forum for users of LackeyCCG

Main Menu

Pack Definitions with OR

Started by Boontoe, July 15, 2011, 06:52:56 AM

Previous topic - Next topic

Boontoe

It seems by default the <crit> are all evaluated with AND, can we evalute with OR?

What I'm trying to do is made play-ready starter packs (Magic) that span a block, so I'd like the cards to come randomly from three different sets.  I know I can achieve this with a <eval>DOESNTCONTAIN</eval> for all the other sets but that'll make for an overly huge definition.

Hope I've been clear enough in what I'm asking, I can try and elaborate if not!

Boontoe

Oh and another question: do the chances need to be integers or can they be decimals?

Trevor

A pack generally is more fixed than that. If you want to have a card that could come from one of 3 sets, you could make 3 different chances set, one for each set.

It isn't ideal, but I think I made it to only accept integer chance values. I am changing that now.

Boontoe

Using chances for the sets won't achieve what I'm trying to achieve.  The closest using chances will get is to create single-set decks but randomly pick the set.  I'd like each card in the deck to be picked randomly and independently of the other cards.  Of course I appreciate that the pack generator is just designed to handle existing random packs, but I think it'd be pretty ace if it could also be used to create more interesting things.

Had more of a play around at the weekend with it and realised that ruling out other sets with <eval>DOESNTCONTAIN</eval> won't work because some of the set names (like 'an' for arabian nights) are contained in other sets (like plANechase).  Is there a full list of the different <eval> values that are usable?  It looks like there's an ISNOT but I couldn't get it to work; I tried the following simple definition and it returns nothing:

<packdefinitions version="1.0">

<pack>
<packtitle>Tester</packtitle>
<packimage>an</packimage>
<packformat>Test</packformat>
<packkind>Starter</packkind>
<packdoubles>yes</packdoubles>
<chance>
<prob>100</prob>
<kind>
<qty>200</qty>
<crit><field>Type</field><eval>ISNOT</eval><data>Instant</data></crit>
</kind>
</chance>
</pack>

</packdefinitions>

Trevor

I realize it's not a "good" way of doing it, but if you really want to, you can make an extra column in the data file that defines what is in each pack. Like "pack1" or something like that, and make a pack criterion for including that.

When I get the time, I'll allow OR comparisons in the packdefinitions, which is the proper way of doing this.

Boontoe

Ah yes, hadn't considered adding columns into the data files.  Cheers for the help.

Boontoe

Ok I'm back to scratching my head again - I've added a new data column but it doesn't work with criteria.

I've added a 'Block' column to the end of each of the set text files.
I've added COLUMN11:"Block" 1 to the plugininfo.txt

Is there anywhere else I need to change something?  The column appears in the deck editor panel and has appears to contain the right information, however when I try to use it as a criteria for a pack definition it gets ignored.

Boontoe

Ah nevermind, I've sidestepped the problem by changing the set names of a bunch of the sets in the data files and will be keeping it separate from the 'real' magic plugin.

Trevor

Quote from: Boontoe on July 20, 2011, 05:48:03 AM
Ah nevermind, I've sidestepped the problem by changing the set names of a bunch of the sets in the data files and will be keeping it separate from the 'real' magic plugin.
It's a bad idea to alter a plugin unless you are the plugin creator. This will likely cause errors.