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
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 31st, 2007, 10:10 PM
Since the game system I'm working on limits rosters to no more items than characters, I'm using a seperate profile to collect the item count and contain the @valid statement to test that you don't have more items than characters.

The items on characters work fine - it's the items that can be chosen on their own that are giving me trouble.

The example files included with AB seem to be doing exactly what I'm trying to do, but I noticed that the Wargear profile there doesn't actually collect anything. No matter how many items I select (and the roster even puts one in by default), nothing shows up in the profile (I did notice that the profile is only valid under a certain ruleset).
Mathias is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old April 14th, 2007, 09:18 AM
I apologize for the bump, but I think this one was missed the first time around.
Mathias is offline   #2 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old April 22nd, 2007, 04:31 AM
At 11:10 PM 3/31/2007, you wrote:
Quote:
Since the game system I'm working on limits rosters to no more items than characters, I'm using a seperate profile to collect the item count and contain the @valid statement to test that you don't have more items than characters.

The items on characters work fine - it's the items that can be chosen on their own that are giving me trouble.

The example files included with AB seem to be doing exactly what I'm trying to do, but I noticed that the Wargear profile there doesn't actually collect anything. No matter how many items I select (and the roster even puts one in by default), nothing shows up in the profile (I did notice that the profile is only valid under a certain ruleset).
Thanks for your patience on this. I completely missed this the first time, and your bump got my attention, but we had to get a Hero Lab release out the door last night first.

If you are tallying up ALL the items in the entire roster, the easiest way to do this is to write a roster scope validation rule that simply accesses the total number of items.

I'm assuming you want something a little more complicated than that, though. So the next best technique would be to create a roster stat. You can set the tagexpr to only identify the items that you want to process. Then the Tally script isn't even necessary, because you'll automatically get a count of all the items that satisfy the tagexpr. You can then use the roster stat in a profile and anywhere else you might want to use it (e.g. other validation rules).

Within a profile, you'll need to jump through a bunch of hoops. The reason is that profiles only process UNITS. An independently selected item that is not a child of a unit will NOT be processed. So the easiest solution for having a profile to display the information is to just use a roster stat to tally up the number and then use that value within the FinalTest script of the profile via the "statcalc[id]" target reference.

Hope this helps,
Rob
rob is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old April 22nd, 2007, 09:11 AM
Thank you, I got it working. Just a note, you may want to add some of this to the manual, or make it more obvious, and you may want to alter the example files so that their version of this rule actually works.
Mathias is offline   #4 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 03:12 AM.


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