News:

A forum for users of LackeyCCG

Main Menu

Eval "among others"

Started by ThatGuy, September 04, 2025, 12:36:57 PM

Previous topic - Next topic

ThatGuy

Has anyone ever gotten an inclusive list of valid eval terms?

I am working on a plugin where booster packs have drop rates per position in the package is
  • card1 common
  • card2 common
  • card3 uncommon, rare
  • card4 rare, ultra
Etc
I don't need them to be in this order. But I am trying to work out a way that A has chances for the distribution I want and B offers small odds that cards might be foil.

I can probably work out the GREATERTHAN to do it. But I would really like to consider all my options.

Thank you for the help!

ThatGuy

Using a Combination of CONTAINS and GREATERTHAN, I think I can get close by adding some extra columns, that should let me define which cards are available for selection:

Foil Rarity Num Odds Card
0C1541267
0U286346
1U290346
0R388345
1R392345
0Sr4945
1Sr4965

Odds GREATERTHAN #
Card CONTAINS #


I haven't tested this yet, but my guess is it might work.

CrazyChucky

#2
I've been unable to discover additional available criteria. Notably, there doesn't appear to be a functioning ISLESSTHAN, and I haven't even been able to get ISGREATERTHAN to work.

There are two main ways I know of to handle cases like this, where multiple card slots in the pack each have options. One would be to add a card data column named something like CardSlot. All your uncommons would list "3"; all your rares would list "3 4"; and all your ultras would list "4"; that way you could specify a crit like "CardSlot CONTAINS 3" and be guaranteed to get either an uncommon or a rare.

One limitation of this is that you can't alter the probabilities. If your set has, say, 80 uncommons and 20 rares, you'll always have an 80% chance of getting an uncommon for slot 3.

The other way to handle this is to use what Lackey calls Chances, each of which has a certain percentage of appearing, and includes whatever cards it should provide. The complicating factor is that Lackey only understands chances on the level of the entire pack, not for individual card slots. So in your case, the pack would have four total chances:
  • (2 commons and) 1 uncommon, 1 rare
  • (2 commons and) 1 uncommon, 1 ultra
  • (2 commons and) 2 rares
  • (2 commons and) 1 rare, 1 ultra

This way you could specify whatever probabilities you want for each of the for options (assuming you make them add up to 100%).

Calculating from the probabilities you want for each slot to the probabilities you ultimately need to specify at the top level can get onerous, especially if you've got multiple slots with multiple options. If you've ever tinkered with Python, you might find this tool I made useful:

https://lackeyccg.com/forum/index.php?topic=12713

I could probably stand to make an updated, improved version of that, now that I look at it...