Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
toddp
Junior Member
 
Join Date: Nov 2005
Posts: 28

Old December 4th, 2005, 03:34 PM
I am working on the Warmaster Ancients data files. I need to specify several unit restrictions, such as minimum 2 units per 1000 points, etc.

These restrictions encompass minimum 1, 2, 4, 8 and equivalent maximums.

In the past, there was the umin and umax directives. Previously, Army Builder 2.0, I was able to specify some generic text for several options and then inherit the restrictions and the text for each army list.

In Army Builder 3.0, it appears that the rule specification is associated only at the roster level. For example, if I have two units with a unit minimum, I have to write two rules. One to validate unit1 and a second for unit2.

I would like to define an option with a name like min2 and then evaluate the rule for min2 for each unit, by linking min2 to each unit.

Does anyone have any suggestions?

Regards,

Todd
toddp is offline   #1 Reply With Quote
Russell
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Location: Australia
Posts: 254

Old December 4th, 2005, 07:28 PM
Have a look at the tips and tricks section of the doco - Check out the Merge Rules section. I think that's what you're after.
Russell is offline   #2 Reply With Quote
HakujinGrande
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Santa Cruz, CA, US
Posts: 123

Old December 4th, 2005, 08:56 PM
Yes, sounds like a job for the new Merge rules context.

Space Marine Maintainer for AB3
Battlefleet Gothic Maintainer for AB3
40K: Space Wolves, 13th Company, Grey Knights, Deathwatch
BFG: Space Marine Fleet, Armageddon Fleet, Tau Fleet
HakujinGrande is offline   #3 Reply With Quote
Russell
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Location: Australia
Posts: 254

Old December 5th, 2005, 05:46 PM
BTW, this is a v3.1 feature, so its not available in v3.0!

:-)
Russell is offline   #4 Reply With Quote
HakujinGrande
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Santa Cruz, CA, US
Posts: 123

Old December 5th, 2005, 07:04 PM
People are still using 3.0??? :wink:

Space Marine Maintainer for AB3
Battlefleet Gothic Maintainer for AB3
40K: Space Wolves, 13th Company, Grey Knights, Deathwatch
BFG: Space Marine Fleet, Armageddon Fleet, Tau Fleet
HakujinGrande is offline   #5 Reply With Quote
toddp
Junior Member
 
Join Date: Nov 2005
Posts: 28

Old December 5th, 2005, 08:50 PM
Tried it out. This seems to work for maximums, but not for minimums.

For example, I started out testing the rule for Generals. There can be one and only one General. I wrote this merge scope rule:

if (tagvalue[misc.limitJust1] = 0) then
if (tagvalue[misc.limitmin?] > 0) then
@valid = 1
done
endif
else
~ limitJust1 is > 0
if (count[unit] = 1) then
@valid = 1
done
endif
endif


limitJust1 is the rule for the general. limitmin2 is a rule for another unit.

This rule is not evaluated for the empty roster. I have to add a unit before the merge rules will take effect.

How are you structuring minimums in your datafiles?
toddp is offline   #6 Reply With Quote
toddp
Junior Member
 
Join Date: Nov 2005
Posts: 28

Old December 6th, 2005, 06:27 AM
I slept on it. Generals may be a bad example, because every army has to have one. However, most armies have specific units which need to be included. Hence, merge rules would be perfect for this. However, they do not seem to be evaluated when the roster does not include one of these units -- exactly the wrong solution for the minimums.


A possible solution would be to use a global tag and roster rule would go off saying that a unit is required at a specific minimum. Next, a specific minimum tag and merge rule to evalate all of the minimums and maximums.

Am I thinking along the correct lines? I was hoping only to define one tag (because I am fundamentally lazy) but two tags would get the job done and be more maintainable than specific rules for every army.

Comments and recommendations are completely welcome.

Regards,

Todd
toddp is offline   #7 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old December 6th, 2005, 07:29 PM
At 10:27 AM 12/6/2005 -0500, you wrote:
>I slept on it. Generals may be a bad example, because every army has
>to have one. However, most armies have specific units which need to
>be included. Hence, merge rules would be perfect for this. However,
>they do not seem to be evaluated when the roster does not include
>one of these units -- exactly the wrong solution for the minimums.
>
>
>A possible solution would be to use a global tag and roster rule
>would go off saying that a unit is required at a specific minimum.
>Next, a specific minimum tag and merge rule to evalate all of the
>minimums and maximums.
>
>Am I thinking along the correct lines? I was hoping only to define
>one tag (because I am fundamentally lazy) but two tags would get the
>job done and be more maintainable than specific rules for every army.


I'm not sure that merge rules would be so good for limiting minimums
- since, as you've seen, they don't get evaluated when there are none
of the unit in the roster.

For imposing a minimum limit, why not just use a roster scope rule?
All it needs to do is check that the minimum number of 'I am the
general' tags are present in the entire roster, and it can work out
validity based on that. As long as the tag group with the 'general'
tag is marked as accrued, the rule can see it - you don't need to use
global tags at all.

I don't think a merge scope rule is appropriate for calculating
minimum entity counts - for maximums it definitely is.


Hope this helps,



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
Colen is offline   #8 Reply With Quote
toddp
Junior Member
 
Join Date: Nov 2005
Posts: 28

Old December 6th, 2005, 08:14 PM
I've been playing with this for a bit now. I realized that General was a bad example. The issue is with most units in the ruleset have specific maximums depending upon the race.

In some ways, I was hoping to use a common mechanism for both minimums and maximums. This would reduce the maintenance on the files. This helps provide some consistency in the output and less work for me (did I mention that I'm lazy?).

For the roster scope rules to work for each army, I have to add a tag and a rule to each army. Given that I have to do that much work, then I may as well use this roster tag for checking the minimum for each unit -- skip the merge rules entirely for minimums. Although, I still like the symmetry...

I'll let you know. Thank you for the help.

Regards,

Todd
toddp is offline   #9 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old December 8th, 2005, 12:33 AM
You do NOT need to add your own custom tags for tracking min/max details. Instead, you can use the "identity" tag that can be automatically generated by AB. By designating a unit as having an "identity" tag, an appropriate tag is created by AB and added to the roster for every instance of that unit in the roster. The tag is implicitly defined as "accrued", so you'll readily have the total number of tags of a given type available. No additional tags need to be defined.

To determine maximums for the roster, the "merge" scope is the optimal mechanism to use. For units that have a maximum, you can define a "limit" tag with the appropriate limit, and the merge rule can impose the proper limit based on that tag. There is a detailed example of how to do this within the Kit docs.

For minimums, the only rules that will always fire are those with "roster" scope. All other rules are fired only for each instance of the corresponding scope. That means that a rule with "merge" scope will be evaluated for every unique unit in roster, but an empty roster will have nothing to evaluate. So you need to define rules with "roster" scope in order to enforce minimums. There is no way to write a generic rule that tests an arbitrary number of conditions, so you'll either need to write a separate rule for each requirement or a smaller number of rules that each monitor multiple requirements. Since "minimum" rules are not that prevalent, this shouldn't be too much work.

Hope this helps,
Rob

At 09:14 PM 12/6/2005, you wrote:

Quote:
I've been playing with this for a bit now. I realized that General was a bad example. The issue is with most units in the ruleset have specific maximums depending upon the race.

In some ways, I was hoping to use a common mechanism for both minimums and maximums. This would reduce the maintenance on the files. This helps provide some consistency in the output and less work for me (did I mention that I'm lazy?).

For the roster scope rules to work for each army, I have to add a tag and a rule to each army. Given that I have to do that much work, then I may as well use this roster tag for checking the minimum for each unit -- skip the merge rules entirely for minimums. Although, I still like the symmetry...

I'll let you know. Thank you for the help.

Regards,

Todd
rob is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:35 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.