Junior Member
Join Date: Nov 2005
Posts: 28
|
Thank you all very much for your help. I wanted to respond with the method that appears to work the best (at least for me).
1. Add id tag to all of my units, results in unitid.xxx generated for each unit. 2. Add a minimum rule to each army for each minimum unit. This rule only checks for the existence of the unit in the roster. This is a roster level rule. No real logic other than to say, archers are required. 3. Using a tag called limits.min2, limits.min4, etc. define tags for each size of minimum or max2, max4 for each size of maximum. These are defined in the data definition file in the groups. 4. Add a set of merge rules to my generic data file. These rules check that the unit count (actually model count in my case) meets a specific criterion. I would like to have one rule do everything, but I want to print out a meaningful value. I could not find a way to pass a numeric value into the message field. For example, the merge rule for limits.min2, states "2 units required." When the user starts up the list, these validation messages appear: Archers are required. Infantry is required. When the user places units of Archers and Infantry in the list, these validation messages appear: Infantry: 2 units per 1000 points. Archers: 4 units per 1000 points. If you have been following the thread, Generals are required in every army. I solved this with my tag for unit types. The General unit type tag: UnitType.General is validated within my generic data file as a roster level rule: if (tagcount[UnitType.General] = 1) then @valid = 1 endif Enforcing one general per army is required. Thank you all for your help getting me through a tough learning curve. Regards, Todd |
#11 |
Junior Member
Join Date: Nov 2005
Posts: 28
|
Forgot to add one other important item.
This makes the output for minimums and maximums the same without a lot of maintenance. I have to maintain only a handful of rules but automatically get the text for them, by attaching the appropriate tags. Regards, Todd |
#12 |
|
|