Junior Member
Join Date: Nov 2005
Posts: 28
|
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 |
#1 |
Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Grenoble, France
Posts: 167
|
Quote:
- First, with a live script 'race.orks' availlable when the race is orks. with minimum and maximum sets to 4. - Then, with a live script !race.orks with range 0-5. Garfunkel |
|
#2 |
Junior Member
Join Date: Nov 2005
Posts: 28
|
Thank you for your reply.
I thought of this as well. If I have 23 races, then I simply have to code 23 links that display the minimum and maximum. When I code, I can unroll my loop of 3 instructions 1 to 100 and use a series of 100 instructions. It's just not very clean is it? I mean, I can use stats to set the minimum and maximum for validation -- using exclusion groups, but I cannot use those same stats to set up the minimum and maximum displayed to the user. This appears to be an short coming of AB 3.1 interface. I can configure the validation for the correct behavior, but not the UI -- at least, not with the same mechanism. I think this is a good candidate for feature extension within AB. Regards, Todd |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
OK, I'm not sure what you're describing here, so you're going to have to explain the example you cite below.
The whole concept of options and links is that you can define the option ONCE and the links will inherit everything from the option. Via links, you can use the option with different characteristics in different situations, only needing to override the exception cases within the link. For all the game systems I'm familiar with, this approach works exceptionally well. The option remains the same, but each link can customize the behavior if it needs to. It provides significant flexibility while also minimizing the overhead incurred by the data file author. The fact that you have 23 different races and need a separate link to the same option for each race is very NON-standard. If you have 23 races, each with a completely different set of minimum/maximum pairs (highly unlikely), then you would define ONE option and 23 different links to that option (one per race). Each link would have a Live tagexpr that limits the link to the race(s) it applies to, and each link would specify the overridden minimum and maximum. If you truly need 23 different links, then I agree this is not optimal, but please remember you're implementing a very odd situation and AB *CAN* actually handle it. I'm guessing what you'll likely end up with is 6-10 different links, with re-use of the same combinations for various races. Please explain what you mean in your example below and I'll do my best to provide a useful answer. I have no idea what you mean by unrolling a loop of 3 instructions to use a series of 100 instructions. -Rob At 11:48 PM 1/13/2006, you wrote: Quote:
|
|
#4 |
Junior Member
Join Date: Nov 2005
Posts: 28
|
I forgot to thank you for your help, Rob. Your input is always appreciated.
|
#5 |
|
|