• 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

More validation questions

  • Thread starter Thread starter jerrya at wellspringsolut
  • Start date Start date
J

jerrya at wellspringsolut

Guest
Ok all you AB wizards out there - here are some more questions. I'll use
Warhammer 40k as my reference again.

I need to limit the number of units that can have a specific option to three
regardless of composition group.

For example:

My composition groups are Professional, Regular and Militia = HQ, Elite,
Troop

I have 5 units for each composition group - 1, 2, 3, 4, 5 = Armored Fist
Squad, Sentinel, etc.

Each unit can be made up of a specific set of options unique to the
composition group. These options are really hidden units.

A roster might look as follows:

Unit 1 - Professional
Option - Tank * 2
Unit 2 - Regular
Option - Tank * 3
Unit 3 - Militia
Option - Infantry * 8
Unit 4 - Militia
Option - Infantry * 8, RPG * 2
Unit 5 - Militia
Option - Infantry * 8, HMG * 2

Note: Tank, Infantry, RPG and HMG are all unit options based on hidden unit
types.

For a given roster they may be limitations on how many of each type a roster
or unit may have. For example, the roster above has 5 tanks but only two
units have them. I need to create a validation rule that allows for just
such a case. Any number of tanks (i.e. options) within a single unit but
only two units can have tanks. I've tried using the "tlmt" and "ulmt" along
with "type" but that only seems to work on "units" not "unit options".
Anyone know how to do this?

Also, I need to restrict the total number of models that a unit has to no
more than 20. Again this is by using "unit options" which use "hidden
units". In the case above Unit 5 has two options selected, Infantry and HMG,
for a total of 10 models. A user could only add 10 more models. Again I have
tried using the obvious "unit" validation rules but they don't seem to work
for units created via a "unit option".

Thanks

Jerry

P.S. If this isn't very clear I can supply my army lists so you can see
first hand how I've created them.




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/kL8TtD/MkNDAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
At 09:59 28/11/2001 -0800, you wrote:
>Ok all you AB wizards out there - here are some more questions. I'll use
>Warhammer 40k as my reference again.
>
>I need to limit the number of units that can have a specific option to three
>regardless of composition group.

Have you tried the olmt: race attribute?

>Also, I need to restrict the total number of models that a unit has to no
>more than 20. Again this is by using "unit options" which use "hidden
>units". In the case above Unit 5 has two options selected, Infantry and HMG,
>for a total of 10 models. A user could only add 10 more models. Again I have
>tried using the obvious "unit" validation rules but they don't seem to work
>for units created via a "unit option".

Why not use a hidden stat? Give every child unit an option that adds # to a
'USize' stat of it's parent, then use lcmp to limit the stat to <= 20.


--
Colen 'Skrillboy' McAlister, demandred@skrill.org
http://www.skrill.org/, http://www.incompetence-central.co.uk/
1 = 2, for large values of 1.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/gwUrIA/MkNDAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Unfortunately, neither of these solve my problem. The way my roster works is
that the users add a unit and then select unit options to add other units as
children. They only select the unit option once and then increase the "model
count" of the unit with the "+". No matter how many models there are there
is always only one "option" for the child unit unit that was added. The
solutions below only work if more than one option is being used.

Is there a way to set the stat of a parent unit from a child unit and vice
versa? "Unit Options" have "stat" but I can't find anything like that for
"units". I've tried "calc" but that only allows me to change the stat of the
current unit not a parent or a child.

> -----Original Message-----
> From: Colen 'Skrillboy' McAlister [SMTP:demandred@skrill.org]
> Sent: Wednesday, November 28, 2001 12:42 PM
> To: armybuilder@yahoogroups.com
> Subject: Re: [AB] More validation questions
>
> At 09:59 28/11/2001 -0800, you wrote:
> >Ok all you AB wizards out there - here are some more questions. I'll use
> >Warhammer 40k as my reference again.
> >
> >I need to limit the number of units that can have a specific option to
> three
> >regardless of composition group.
>
> Have you tried the olmt: race attribute?
>
> >Also, I need to restrict the total number of models that a unit has to no
> >more than 20. Again this is by using "unit options" which use "hidden
> >units". In the case above Unit 5 has two options selected, Infantry and
> HMG,
> >for a total of 10 models. A user could only add 10 more models. Again I
> have
> >tried using the obvious "unit" validation rules but they don't seem to
> work
> >for units created via a "unit option".
>
> Why not use a hidden stat? Give every child unit an option that adds # to
> a
> 'USize' stat of it's parent, then use lcmp to limit the stat to <= 20.
>
>
> --
> Colen 'Skrillboy' McAlister, demandred@skrill.org
> <http://www.skrill.org/,> <http://www.incompetence-central.co.uk/>
> 1 = 2, for large values of 1.
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
> <http://rd.yahoo.com/M=214322.1753821.3271459.1261774/D=egroupweb/S=170505
> 9080:HM/A=860488/R=0/*http://registrar.godaddy.com/default.asp?isc=yaho350
> >
>
> <http://us.adserver.yahoo.com/l?M=214322.1753821.3271459.1261774/D=egroupm
> ail/S=1705059080:HM/A=860488/rand=363039964>
>
> To unsubscribe from this group, email
>
> armybuilder-unsubscribe@egroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/>.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/iHh8lD/MkNDAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Hi all,

Let me re-phrase my questions.

The main problem that I am having with AB though is trying to figure out how
to manage general organizational concepts for the game I am modeling. For
example, the system that I am creating has 5 composition groups and 5 units
within each composition group. The 5 units are simply placeholders and don't
represent models themselves - rather they have unit options which add child
units to the top-level unit. Starting at "race" this is how a roster would
look for my game system:

Relgious Faction (race)
Unit 1 - Professional (unit)
Infantry w/ Small Arms * 8 (unit added via a unit option)
Tank * 2
Unit 2 - Regular
Infantry w/ Small Arms * 6
Tank * 2
Unit 3 - Militia
Infantry w/ Small Arms * 4
Infantry w/ RPG * 2
Unit 4 - Militia
Infantry w/ Small Arms * 8
Unit 5 - Militia
Infantry w/ Small Arms * 8

In each case above where there is a multiplier at the end of the unit that
was arrived at by using the "+" in the AB editor. The unit option when
selected will add one unit of the type indicated and the user has to
increase the model count with the "+". For each model type there is only one
"unit option".

There are certain things that I am trying to do that I am finding
impossible. Here are the validations that I am trying to enforce that I
can't find a solution to.

1. Each top-level "unit" i.e. Unit 1, Unit 2, Unit 3, etc. cannot have more
than 20 child models. How do I calculate the number of child units within a
unit? For example, in the roster above Unit 1 has 10 models in it (8 + 2 =
10).

2. Only two top-level units are allowed to have "tanks" regardless of the
quantity in the specific unit. In the roster above Unit 1 and Unit 2 have
tanks, if I added a tank to Unit 3 the roster would be invalid.

3. If a top-level unit contains an RPG or HMG unit (model count is
unimportant) then there must be at least 4 models of type "Infantry w/ Small
Arms". I think that I can do this one with inter-unit dependency
validations, but I haven't tried it yet.

Things I have tried:

olmt - each unit only has one option of each type so things like
determing model count don't work.
stat attribute - unit option
tlmt - doesn't work on units added as a unit option/child of another
unit
calc - can't affect stats of child/parent unit
coun - unit attribute - I tried setting the top-level size to 20 and
then use "coun" in the child units but I can't prevent the user from
increasing the size of the top-level unit which must remain at 1.

Thanks
Jerry



------------------------ Yahoo! Groups Sponsor ---------------------~-->
International long-distance calling with CrystalVoice.
LOW rates world-wide. No monthly charge. FREE trial. Click Here.
http://us.click.yahoo.com/TeBmWC/h.SDAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
At 10:18 29/11/2001 -0800, you wrote:
>Unfortunately, neither of these solve my problem. The way my roster works is
>that the users add a unit and then select unit options to add other units as
>children. They only select the unit option once and then increase the "model
>count" of the unit with the "+". No matter how many models there are there
>is always only one "option" for the child unit unit that was added. The
>solutions below only work if more than one option is being used.
>
>Is there a way to set the stat of a parent unit from a child unit and vice
>versa? "Unit Options" have "stat" but I can't find anything like that for
>"units". I've tried "calc" but that only allows me to change the stat of the
>current unit not a parent or a child.

prnt: allows you to set the stat of a parent unit, chld: that of a child.

What I meant was that every child unit would have an attribute like:

prnt:USize+(#)

That would add the size of the child unit to the parent's USize stat.


--
Colen 'Skrillboy' McAlister, demandred@skrill.org
http://www.skrill.org/, http://www.incompetence-central.co.uk/
1 = 2, for large values of 1.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/f00vhB/MkNDAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Answers interspersed below in response to each specific question....

At 10:58 AM 11/29/2001 -0800, you wrote:
>Hi all,
>
>Let me re-phrase my questions.
>
>The main problem that I am having with AB though is trying to figure out how
>to manage general organizational concepts for the game I am modeling. For
>example, the system that I am creating has 5 composition groups and 5 units
>within each composition group. The 5 units are simply placeholders and don't
>represent models themselves - rather they have unit options which add child
>units to the top-level unit. Starting at "race" this is how a roster would
>look for my game system:
>
>Relgious Faction (race)
> Unit 1 - Professional (unit)
> Infantry w/ Small Arms * 8 (unit added via a unit option)
> Tank * 2
> Unit 2 - Regular
> Infantry w/ Small Arms * 6
> Tank * 2
> Unit 3 - Militia
> Infantry w/ Small Arms * 4
> Infantry w/ RPG * 2
> Unit 4 - Militia
> Infantry w/ Small Arms * 8
> Unit 5 - Militia
> Infantry w/ Small Arms * 8
>
>In each case above where there is a multiplier at the end of the unit that
>was arrived at by using the "+" in the AB editor. The unit option when
>selected will add one unit of the type indicated and the user has to
>increase the model count with the "+". For each model type there is only one
>"unit option".
>
>There are certain things that I am trying to do that I am finding
>impossible. Here are the validations that I am trying to enforce that I
>can't find a solution to.
>
>1. Each top-level "unit" i.e. Unit 1, Unit 2, Unit 3, etc. cannot have more
>than 20 child models. How do I calculate the number of child units within a
>unit? For example, in the roster above Unit 1 has 10 models in it (8 + 2 =
>10).

Colen offered the ideal solution. Create a hidden stat, which we'll call
"model". Create an option called "AddModels" that is hidden and uses the
"prnt:model+(#)". For each child unit, attach the "AddModels" option. The
net result is that each parent unit will have the total number of models in
the "model" stat. You can then use an "lcmp" attriubte to verify the limit
is satisfied.

>2. Only two top-level units are allowed to have "tanks" regardless of the
>quantity in the specific unit. In the roster above Unit 1 and Unit 2 have
>tanks, if I added a tank to Unit 3 the roster would be invalid.

Assign the type "Tank" to the tank units. Also assign the attribute "forc"
to tank units. Then use "tlmt" to enforce the maximum limit of two tank
units in the roster.

>3. If a top-level unit contains an RPG or HMG unit (model count is
>unimportant) then there must be at least 4 models of type "Infantry w/ Small
>Arms". I think that I can do this one with inter-unit dependency
>validations, but I haven't tried it yet.

If you assign the RPG/HMG as an option to the unit, use the "ocat" unit
attribute to impose a minimum relationship. If the RPG/HMG is a separate
child unit, use "tcon" within the parent unit to verify the model count
relationship.

>Things I have tried:
>
> tlmt - doesn't work on units added as a unit option/child of another
>unit

If you use the "forc" attribute on the child units, it will work on the
children.

This list of suggestions ought to help get you over the current road blocks
you've encountered.

Thanks, Rob

---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (650) 726-9689
Lone Wolf Development www.wolflair.com


------------------------ Yahoo! Groups Sponsor ---------------------~-->
PLAY Adversity AND WIN PRIZES!
Test your advertising trivia knowledge and win free products.
http://us.click.yahoo.com/bSZwRD/0AYDAA/9ZuFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Success!!!!!

Thanks to everyone that has been helping me the past couple of days.
Especially thanks to Rob. You filled in some missing pieces of information
that were preventing me from getting this stuff to work correctly.

Jerry

> -----Original Message-----
> From: Rob Bowes [SMTP:rob@wolflair.com]
> Sent: Friday, November 30, 2001 12:19 AM
> To: armybuilder@yahoogroups.com
> Subject: RE: [AB] More validation questions
>
> Answers interspersed below in response to each specific question....
>
> At 10:58 AM 11/29/2001 -0800, you wrote:
> >Hi all,
> >
> >Let me re-phrase my questions.
> >
> >The main problem that I am having with AB though is trying to figure out
> how
> >to manage general organizational concepts for the game I am modeling. For
> >example, the system that I am creating has 5 composition groups and 5
> units
> >within each composition group. The 5 units are simply placeholders and
> don't
> >represent models themselves - rather they have unit options which add
> child
> >units to the top-level unit. Starting at "race" this is how a roster
> would
> >look for my game system:
> >
> >Relgious Faction (race)
> > Unit 1 - Professional (unit)
> > Infantry w/ Small Arms * 8 (unit added via a unit
> option)
> > Tank * 2
> > Unit 2 - Regular
> > Infantry w/ Small Arms * 6
> > Tank * 2
> > Unit 3 - Militia
> > Infantry w/ Small Arms * 4
> > Infantry w/ RPG * 2
> > Unit 4 - Militia
> > Infantry w/ Small Arms * 8
> > Unit 5 - Militia
> > Infantry w/ Small Arms * 8
> >
> >In each case above where there is a multiplier at the end of the unit
> that
> >was arrived at by using the "+" in the AB editor. The unit option when
> >selected will add one unit of the type indicated and the user has to
> >increase the model count with the "+". For each model type there is only
> one
> >"unit option".
> >
> >There are certain things that I am trying to do that I am finding
> >impossible. Here are the validations that I am trying to enforce that I
> >can't find a solution to.
> >
> >1. Each top-level "unit" i.e. Unit 1, Unit 2, Unit 3, etc. cannot have
> more
> >than 20 child models. How do I calculate the number of child units within
> a
> >unit? For example, in the roster above Unit 1 has 10 models in it (8 + 2
> =
> >10).
>
> Colen offered the ideal solution. Create a hidden stat, which we'll call
> "model". Create an option called "AddModels" that is hidden and uses the
> "prnt:model+(#)". For each child unit, attach the "AddModels" option. The
> net result is that each parent unit will have the total number of models
> in
> the "model" stat. You can then use an "lcmp" attriubte to verify the limit
>
> is satisfied.
>
> >2. Only two top-level units are allowed to have "tanks" regardless of the
> >quantity in the specific unit. In the roster above Unit 1 and Unit 2 have
> >tanks, if I added a tank to Unit 3 the roster would be invalid.
>
> Assign the type "Tank" to the tank units. Also assign the attribute "forc"
>
> to tank units. Then use "tlmt" to enforce the maximum limit of two tank
> units in the roster.
>
> >3. If a top-level unit contains an RPG or HMG unit (model count is
> >unimportant) then there must be at least 4 models of type "Infantry w/
> Small
> >Arms". I think that I can do this one with inter-unit dependency
> >validations, but I haven't tried it yet.
>
> If you assign the RPG/HMG as an option to the unit, use the "ocat" unit
> attribute to impose a minimum relationship. If the RPG/HMG is a separate
> child unit, use "tcon" within the parent unit to verify the model count
> relationship.
>
> >Things I have tried:
> >
> > tlmt - doesn't work on units added as a unit option/child of
> another
> >unit
>
> If you use the "forc" attribute on the child units, it will work on the
> children.
>
> This list of suggestions ought to help get you over the current road
> blocks
> you've encountered.
>
> Thanks, Rob
>
> --------------------------------------------------------------------------
> -
> Rob Bowes (rob@wolflair.com) (650)
> 726-9689
> Lone Wolf Development
> www.wolflair.com
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
> <http://rd.yahoo.com/M=178320.1681224.3270152.1261774/D=egroupweb/S=170505
> 9080:HM/A=879173/R=0/*http://www.fastweb.com/ib/yahoo-76f>
>
> <http://us.adserver.yahoo.com/l?M=178320.1681224.3270152.1261774/D=egroupm
> ail/S=1705059080:HM/A=879173/rand=158622829>
>
> To unsubscribe from this group, email
>
> armybuilder-unsubscribe@egroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/>.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
PLAY Adversity AND WIN PRIZES!
Test your advertising trivia knowledge and win free products.
http://us.click.yahoo.com/bSZwRD/0AYDAA/9ZuFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Back
Top