• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Limited combinations

  • Thread starter Thread starter cmanos at crt.xerox.com
  • Start date Start date
C

cmanos at crt.xerox.com

Guest
Hi Folks,

I'm working on some datafiles and I am trying to figure a way to
restrict items. A unit can take up to three items from a category,
thats easy to code. Now comes the hard part. The combinations of
the items cannot be repeated between units.

Anotherwords, the items are A, B, C, D, E and F.

Unit #1 has items A, B and C

no other units could take A, B, and C. They could take A and B, A
and C, A, and D, etc, but not A, B, C.

Any ideas how I would go about doing this?

Chris


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get your FREE credit report with a FREE CreditCheck
Monitoring Service trial
http://us.click.yahoo.com/Gi0tnD/bQ8CAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
At 12:53 11/10/01 +0000, you wrote:
>Hi Folks,
>
>I'm working on some datafiles and I am trying to figure a way to
>restrict items. A unit can take up to three items from a category,
>thats easy to code. Now comes the hard part. The combinations of
>the items cannot be repeated between units.
>
>Anotherwords, the items are A, B, C, D, E and F.
>
>Unit #1 has items A, B and C
>
>no other units could take A, B, and C. They could take A and B, A
>and C, A, and D, etc, but not A, B, C.
>
>Any ideas how I would go about doing this?

I don't think you can do this with just items... how about modelling them
with elements? I've never used them myself, but you can do things like make
sure no two units have the same combination IIRC.



--
Colen 'Skrillboy' McAlister, demandred@skrill.org
http://www.skrill.org/, http://www.incompetence-central.co.uk/
1 = 2, for large values of 1.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get your FREE credit report with a FREE CreditCheck
Monitoring Service trial
http://us.click.yahoo.com/Gi0tnD/bQ8CAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
You can probably achieve this with items using a brute-force approach, but
the combinatorics will be viscious, so I won't even offer the solution.
This is EXACTLY the kind of situation that elements were created to handle,
so I recommend using elements. For an example of how to do this, please
take a look at the WFB data files, where Dwarven runic items use this
technique.

Thanks, Rob


At 12:53 PM 10/11/2001 +0000, you wrote:
>Hi Folks,
>
>I'm working on some datafiles and I am trying to figure a way to
>restrict items. A unit can take up to three items from a category,
>thats easy to code. Now comes the hard part. The combinations of
>the items cannot be repeated between units.
>
>Anotherwords, the items are A, B, C, D, E and F.
>
>Unit #1 has items A, B and C
>
>no other units could take A, B, and C. They could take A and B, A
>and C, A, and D, etc, but not A, B, C.
>
>Any ideas how I would go about doing this?
>
>Chris


---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (650) 726-9689
Lone Wolf Development www.wolflair.com


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE COLLEGE MONEY
CLICK HERE to search
600,000 scholarships!
http://us.click.yahoo.com/Pv4pGD/4m7CAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Back
Top