Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder

Notices

Reply
 
Thread Tools Display Modes
HakujinGrande
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Santa Cruz, CA, US
Posts: 123

Old December 6th, 2005, 09:20 AM
I'm looking for an easier way to calculate the total number of models in a tree in such a way that it can be used in a Live script.

Each transport vehicle holds a certain number of troops, and the link needs to be disabled if the tree of units it too big. The problem is that in some instances the transport is purchased from the top unit in the tree, and in other cases by children units.

For example, a Space Marine Captain. He can purchase a Drop Pod (which holds ten). The Captain can also purchase a Command Squad numbering up to ten Marines. The Command Squad can in turn purchase a Rhino (which holds ten), or a Razorback (which holds 6). To further complicate things, a Chaplain or Librarian may be attached to the Command Squad. This ends up with a possible tree size of 12.

I made a statcalc that computes the number I need, but I guess statcalcs aren't available in Live scripts.

Any thoughts on the best way to accomplish this?

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   #1 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old December 6th, 2005, 07:32 PM
At 01:20 PM 12/6/2005 -0500, you wrote:
>I'm looking for an easier way to calculate the total number of
>models in a tree in such a way that it can be used in a Live script.
>
>Each transport vehicle holds a certain number of troops, and the
>link needs to be disabled if the tree of units it too big. The
>problem is that in some instances the transport is purchased from
>the top unit in the tree, and in other cases by children units.
>
>For example, a Space Marine Captain. He can purchase a Drop Pod
>(which holds ten). The Captain can also purchase a Command Squad
>numbering up to ten Marines. The Command Squad can in turn purchase
>a Rhino (which holds ten), or a Razorback (which holds 6). To
>further complicate things, a Chaplain or Librarian may be attached
>to the Command Squad. This ends up with a possible tree size of 12.
>
>I made a statcalc that computes the number I need, but I guess
>statcalcs aren't available in Live scripts.
>
>Any thoughts on the best way to accomplish this?


If the chaplain or librarian is attached, don't they count as
'upgrades' from normal models? Or can you have the full 9 + sergeant
+ chaplain + librarian? I was under the impression that Chaplains,
Librarians etc were bought as separate hero choices, not as children
of the command squad - has this changed?


Thanks,



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
Colen 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 6th, 2005, 09:18 PM
No, only the Apothecary, Standard Bearer, and Company Champion are upgrades from normal Command Squad members.
Basically, a Commander, Chaplain, or Librarian may take a Command Squad. A second Chaplain and/or Librarian may then be attached to another character's Command Squad. So yes, Commander / Chaplain / Librarian + Command Squad & Sergeant + Chaplain + Librarian, max size of 13.

It's all detailed on p21 of Codex: Space Marines, if you have it.

The second Chaplain or Librarian is currently implemented as a option off of the Command Squad.

Another scenario is Space Wolf characters. A Wolf Lord, for example, may take a unit of to 4 Fenrisian Wolves and/or 4-9 Wolf Guard Bodyguards.
Most of the transport options for this combo are bought from the Wolf Guard. So a potential max of 14 units.

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
harkan
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Posts: 345

Old December 7th, 2005, 06:51 AM
what about setting a stat on the top level unit, adding units adds to that stat. Live statement on the transport to enable it dependant on the val of the stat?
harkan 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 7th, 2005, 08:05 AM
But can you access the stat on the top level unit from a child unit?

The trick is that most of the transport options are bought from the child unit.

I'm currently using stats to track this, but it is very unwieldy all sorts of math in prelink scripts. I'm looking for something a bit more elegant.

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
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old December 8th, 2005, 01:07 AM
This is a classic example of what Colen and I envisioned, and it is therefore one of the key reasons we setup the "squads" mechanism within AB.

Since everything has to be evaluated by a computer, everything has to be processed via some sort of linear process. That process is the "Evaluation Sequence" that is detailed within the Kit docs. The problem with a linear process is that, at any point in the process, you can only test what has already been processed. This means that a link can only test the conditions that have been processed already. That consists of the links with an earlier priority.

If you can arrange the evaluation process sufficiently to guarantee that all counting of models is completed before the Live tagexpr on the link is checked, you can achieve the desired goal. Unfortunately, this means that the convenience mechanisms built into AB for tallying things cannot be used (e.g. accumulated stats, roster stats, etc.). The reason is that they are all processed AFTER all the links have been evaluated, and you need something that is handled on-the-fly.

Assuming you can ensure the evaluation order can process all children before the link gets tested, you can solve this with a private unit stat on the top-level unit. Each child unit will need to add its model count to that unit stat, and the top-level unit must add its count in its PreLinks script. Then you can write a Live tagexpr that can test against the value of the corresponding unit stat.

This technique WILL work for having the child unit retrieve the unit stat from its parent unit. The only requirement is that the count needs to be fully totalled BEFORE the conditional link is evaluated.

Another technique would be to simply use validation and report an error if a vehicle is taken for a unit that has too many models in it. If you did this, all of the bookkeeping would be unneeded, and the final rule would be easy to write.

Where the current approach falls down in a big way (IMHO) is in the inconsistency. A vehicle can be added from various different units within the tree, which creates confusion for the user. For one unit, the vehicle is found on child X, for another on child Y, and for a third its on the parent. This also creates lots of extra work for the authors, as has already been discussed.

If the squads mechanism were utilized, everything gets simplified. The vehicle is added via a "detached" link, thereby adding the vehicle as another top-level entity within the squad. This makes it possible to allow the vehicle to be added from all the units within the tree if you wanted, making things easy and obvious for the user. Then a simple squad scope rule is written to ensure that the vehicle can hold all the models in the unit. Yes, this DOES allow a user to add multiple vehicles to the squad, but that can be verified within the squad rule by an extra 1-2 lines of code.

So the obvious question becomes why is this technique better for the user. If the user is allowed to do stupid things, only to be given an error, how can that be better than precluding the user from doing that stupid thing. My contention is that there are a zillion house rules out there. Many of those rules are only for a special scenario that a group of games has concocted for themselves. And most of those rules tighten or relax the "official" rules for the game. If AB compels the user to comply with the rules, then AB is unusable for those situations. If AB just flags an error, the user is free to ignore the error when it's not applicable to the scenario being played. That's why our intent with AB3 was to shift the focus more towards validation than precluding the user from doing something.

If an author is intent to force the user to comply with a set of rules, then that can usually be accomplished in V3. However, it will often entail a bit more work. Performing validation tests is easy, and it provides the user with maximum flexibility while still making sure the user has a valid army.

Anyways, that's my take on the subject. I would love to see the 40K data files shift to using "squads" as outlined above. With AB3, many of the old ways from AB2 are no longer the best way of solving things. In AB2, you had no choice, but AB3 gives you lots of new options. :-)

Hope this helps,
Rob

At 10:20 AM 12/6/2005, you wrote:

Quote:
I'm looking for an easier way to calculate the total number of models in a tree in such a way that it can be used in a Live script.

Each transport vehicle holds a certain number of troops, and the link needs to be disabled if the tree of units it too big. The problem is that in some instances the transport is purchased from the top unit in the tree, and in other cases by children units.

For example, a Space Marine Captain. He can purchase a Drop Pod (which holds ten). The Captain can also purchase a Command Squad numbering up to ten Marines. The Command Squad can in turn purchase a Rhino (which holds ten), or a Razorback (which holds 6). To further complicate things, a Chaplain or Librarian may be attached to the Command Squad. This ends up with a possible tree size of 12.

I made a statcalc that computes the number I need, but I guess statcalcs aren't available in Live scripts.

Any thoughts on the best way to accomplish this?
rob is offline   #6 Reply With Quote
Russell
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Location: Australia
Posts: 254

Old December 8th, 2005, 04:46 PM
Quote:
Originally Posted by rob
Anyways, that's my take on the subject. I would love to see the 40K data files shift to using "squads" as outlined above. With AB3, many of the old ways from AB2 are no longer the best way of solving things. In AB2, you had no choice, but AB3 gives you lots of new options. :-)
As a user of the 40k files, I'd like to see squads used too :-)
Russell is offline   #7 Reply With Quote
Reply

Thread Tools
Display Modes

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 10:54 AM.


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