I am working on deck construction and variable unit cost system. My latest challenge is how to set the minimum option value when a specific race is selected.
Here's the structure:
1. The card deck is a unit.
2. Each card within the deck is an item
3. I have an option defined which mirrors each card.
4. I am defining an exclusion group for each option so I can use the @statmin and @statmax to set the minimum and maximum ranges for each card.
5. I have defined a linkset capturing the complete set of deck attributes.
For example, there is a card battle fury. The user can have 0 to 5 battle fury cards in his deck. If the user is creating his own race, he would select Unafilliated and up to 5 battle fury cards. However, if the user selects Orks, he would be required to have exactly 4 battle fury cards.
How I would like this to work:
a. The user selects race: Unafilliated. The unaffilliated card deck unit is added. The minimum and maximum battle fury attributes are set to 0 and 5 respectively.
b. The user selects race: Orks. The Orks card deck unit is added. The minimum and maximum battle fury attributes are both set to 4.
I have everything up to here working just fine. The unit overrides the minimum and maximum values and the exclusion groups validate the roster. Everything is hunky dory, except the value of the battle fury option for Orks starts at the value 0 and immediately shows that the value is invalid.
What I would really like is to send a hint to AB and set the minimum control value for the option to 4. I can do this if I don't use the link set and write individual option sets for each race. Yuck. What I really want to do is set the starting value based on the values of my minimum and maximum attributes. However within the link specification or the option specification I cannot reference stats.
Is there an evaluation script technique I am missing here?
Regards,
Todd
Here's the structure:
1. The card deck is a unit.
2. Each card within the deck is an item
3. I have an option defined which mirrors each card.
4. I am defining an exclusion group for each option so I can use the @statmin and @statmax to set the minimum and maximum ranges for each card.
5. I have defined a linkset capturing the complete set of deck attributes.
For example, there is a card battle fury. The user can have 0 to 5 battle fury cards in his deck. If the user is creating his own race, he would select Unafilliated and up to 5 battle fury cards. However, if the user selects Orks, he would be required to have exactly 4 battle fury cards.
How I would like this to work:
a. The user selects race: Unafilliated. The unaffilliated card deck unit is added. The minimum and maximum battle fury attributes are set to 0 and 5 respectively.
b. The user selects race: Orks. The Orks card deck unit is added. The minimum and maximum battle fury attributes are both set to 4.
I have everything up to here working just fine. The unit overrides the minimum and maximum values and the exclusion groups validate the roster. Everything is hunky dory, except the value of the battle fury option for Orks starts at the value 0 and immediately shows that the value is invalid.
What I would really like is to send a hint to AB and set the minimum control value for the option to 4. I can do this if I don't use the link set and write individual option sets for each race. Yuck. What I really want to do is set the starting value based on the values of my minimum and maximum attributes. However within the link specification or the option specification I cannot reference stats.
Is there an evaluation script technique I am missing here?
Regards,
Todd