• 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

An odd item behavior I'm trying to model

  • Thread starter Thread starter mgehl at cox.net
  • Start date Start date
M

mgehl at cox.net

Guest
In the B5W files, I've run into an interesting item behavior that I
can't figure how to control in AB.

A certain category of items (Hyach Specialists) is divided into three
categories. An item can cost 1, 2, or 3 slots, and a ship will have 0
or more slots available (although the average unit will only have 1 or 2
slots, so it's not too complex). That I can do.

The problem is that a unit must have diversity among the slots it
spends. For example, it can't have two items of the same category until
it has one of each of the others (basically, the counts can't vary by
more than +/-1). You are, however, allowed to take any slot-count you
want as the first item in a category. Examples: Filling both slots with
the same item is OK, and taking 2 2-slot items of different categories
is fine.

I do have attributes available for modification by the various items and
I can make more attribute slots.

For 2 and 3-slot ships, I can simply make sure the user doesn't take
more than one of any one category, but it becomes a lot more complex at
higher numbers. And, even if I figured out a scheme for 4, I'd still
need a scheme for 5, and 6, and ... So, what I'd really like is an
algorithm.

So, how can I do this (or can I not accomplish this)?


Mathias Gehl
mgehl@cox.net





------------------------ Yahoo! Groups Sponsor ---------------------~-->
Will You Find True Love?
Will You Meet the One?
Free Love Reading by phone!
http://us.click.yahoo.com/Deo18C/zDLEAA/Ey.GAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Back
Top