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
DarkHost
Member
 
Join Date: Mar 2006
Posts: 39

Old March 17th, 2006, 04:38 PM
First, I am assuming that since the value is displayed, the total army/roster point cost is a roster statistic internally calculated by AB. If so, what is the syntax for accessing the total point cost of an army/roster?

If my assumption is incorrect, then what is the proper way to reference a Stat Calc/Stat Id in a Rule script?

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

Old March 17th, 2006, 05:36 PM
The roster size cam be accessed in the rule scripts with two expressions:

roster.activesize for the currently used points
roster.usersize for the user set number of points

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   #2 Reply With Quote
DarkHost
Member
 
Join Date: Mar 2006
Posts: 39

Old March 17th, 2006, 05:54 PM
Thanks dude!
DarkHost is offline   #3 Reply With Quote
InquisitorValdez
Junior Member
 
Join Date: Aug 2005
Posts: 19

Old March 21st, 2006, 10:44 PM
If I have a situation where only one third of my force can be units of tag Spec.Third, then how do I work get army builder to keep track of the total points cost of all these units, so I can then compare it to the roster.usersize tag in a validation rule?
InquisitorValdez is offline   #4 Reply With Quote
harkan
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Posts: 345

Old March 22nd, 2006, 01:16 AM
create a statcalc that totals up the points value of any unit that has the relevant tag, then reference the statcalc within the rule by using:

statcalc[id] where id is the unique id of the statcalc

The statcalc maybe along the lines of:

test expression: spec.Third

tally expression: @value = @value + cost[total]
harkan is offline   #5 Reply With Quote
InquisitorValdez
Junior Member
 
Join Date: Aug 2005
Posts: 19

Old March 22nd, 2006, 11:29 AM
OK Thanks. Will try that once I've had a good nights sleep!
InquisitorValdez is offline   #6 Reply With Quote
InquisitorValdez
Junior Member
 
Join Date: Aug 2005
Posts: 19

Old March 23rd, 2006, 08:13 AM
Thanks for that! Works like a charm!
InquisitorValdez is offline   #7 Reply With Quote
Destrin
Senior Member
 
Join Date: Jan 2012
Posts: 122

Old April 16th, 2014, 06:36 AM
Quote:
Originally Posted by HakujinGrande View Post
roster.activesize for the currently used points
I appreciate I'm necromancing and ancient thread here, but is this still valid in 3.4c? I'm working on an override that is supposed to change a tag for a unit when the total number of points in the roster exceeds 800...but roster.activesize doesn't appear to work.

In the debug viewer, I cans see roster.size is set to the user size but if a user sets unlimited, that's not that useful for me!
Destrin is offline   #8 Reply With Quote
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old April 16th, 2014, 11:31 AM
this still applies but bear in mind the warning in the AB kit manual:

Quote:
Returns the current total size of the roster. The total roster size is not tallied until the roster has been fully evaluated, so this target will not contain a useful value within entity and option evaluation scripts. Example: "this.activesize".
roster.activesize is calculated after the rest so that any script in a pre/post links won't trigger on a roster.activesize wouldn't be triggered - you'll have to try and work something else out.

It may be worth trying to have a specific tag for this unit and then put a script in the Global Script section under Roster Done that checks for the tagged unit and then checks roster.activesize and if the criteria meet then the tag is changed - the only problem though is if the change of tag under this criteria is supposed to change other costs/function this may not trigger

My own Warlord Games gallery and the home of the Warlord Games datafiles:

http://www.facebook.com/ABDataFileWarlordGames
Harkan_again is offline   #9 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 08:36 AM.


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