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 July 6th, 2006, 06:54 PM
are exclusion remainter links calculated after all other options have been processed?

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

Old July 12th, 2006, 07:07 PM
I'm sure you'll love this answer: mostly yes. :-)

Remainder links are calculated AFTER all other LINKS have been processed. The reason for that is simple: the remainder is calculated based on the exclusion usages of all other links, so those usages must be calculated first. If you have a link with a priority of 50 and a remainder link with a priority of 7, the remainder link will be processed AFTER the other link with a normally earlier priority.

HOWEVER, remainder links are calculated BEFORE any other normal "last" scripts are evaluated, such as PostLinks and EntityDone scripts. This is a critical detail that can cause problems if you aren't expecting it.

There are a few articles in the "How To" and "Tips & Tricks" chapters of the docs covering the nuances of remainder links, as well as some important details in the "Data File" chapter where remainders are actually defined.

Hope this helps,
Rob

At 06:54 PM 7/6/2006, you wrote:

Quote:
are exclusion remainter links calculated after all other options have been processed?
rob 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 July 13th, 2006, 03:09 PM
Basically I was looking for a way to assign a tag to a unit if it was carrying a particular class of weapon (in this case the Bolter). The problem is, that the weapon is often the default weapon for Space Marines to carry, so it is frequently assigned to the remainder of the weapon exclusion group.

I wanted to use this tag to enable/disable a few ammunition options that may only be used with the Bolter type weapons.

Any ideas?

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 July 14th, 2006, 12:29 AM
can you script it so on the postlink section it looks for the bolter option being selected or greater than zero and if so then assigns a tag to the unit that way round?
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 July 14th, 2006, 03:42 PM
But isn't the postlink script too late to have that tag enable the ammo options?

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 July 14th, 2006, 07:15 PM
This is a classic "chicken-and-egg" problem. The remainder links, by definition, need to be the last thing calculated so that they accurately reflect what is "left over". Yet you want to base other options on these things that must be processed last. There is simply no way to do this with a remainder link.

Since exclusion groups are not calculated until AFTER all links (and Option scripts) are fully processed, there is no way this can be accomplished using a exclusion groups. In addition, you can NOT *RELIABLY* chain to other options from a remainder link, so please don't try that technique. It will be a recipe for inconsistent results and frustration, because you'll be trying to get AB to something for which the behavior is essentially "undefined".

That leaves a private unit stat as the most viable method for solving this problem. You would need to increment the private unit stat in the same way that you are currently incrementing the exclusion usage. You can then have your "bolter only" links utilize a Live tagexpr based on the current state of the private unit stat and the model count.

I realize this is a hassle, but that's the unfortunate reality of using the remainder for the bolters. In the early days of AB3 (i.e. before it was ever released), I warned the 40K data file authors about this limitation, but they were all so accustomed to doing it with remainder links from the AB2 days that they stuck with what they were familiar with. We even had to enhance what could be accomplished with remainder links from the original plan in order to allow the 40K team to keep using the remainder technique. Unfortunately, the fundamental nature of remainder links having to be last precludes any chance of us being able to enhance remainder links further to accomplish what you want. :-(

If this is only for Space Marines, then the nuisance factor of the duplicate approach might be tolerable. I wish there was a better solution, but that's all I can think of.

Sorry,
Rob

At 03:09 PM 7/13/2006, you wrote:

Quote:
Basically I was looking for a way to assign a tag to a unit if it was carrying a particular class of weapon (in this case the Bolter). The problem is, that the weapon is often the default weapon for Space Marines to carry, so it is frequently assigned to the remainder of the weapon exclusion group.

I wanted to use this tag to enable/disable a few ammunition options that may only be used with the Bolter type weapons.

Any ideas?
rob is offline   #6 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old July 14th, 2006, 07:16 PM
Correct. The PostLink script approach is not a viable alternative.

-Rob

At 03:42 PM 7/14/2006, you wrote:

Quote:
But isn't the postlink script too late to have that tag enable the ammo options?
rob is offline   #7 Reply With Quote
HakujinGrande
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Santa Cruz, CA, US
Posts: 123

Old July 14th, 2006, 08:57 PM
I figured as much. Fortunately the units that have this option (Deathwatch for those interested), did not need absolutely need the Bolter as a remainder link.


Also, was I correct in assuming that the selection count, as referencing "unit.option[smBolter].selection", wouldn't be set until the remainder link was processed?

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

Old July 14th, 2006, 10:00 PM
Assuming that the "smBolter" option is the bolter whose selection count is controlled by the remainder link, you are correct. The selection count of a remainder link is determined after all of the exclusions have been tallied for all other links. There is no other way it can be done that I can think of. If you've got a nifty way of doing it, let me know and we'll put it on the todo list for a future release. :-)

-Rob

At 08:57 PM 7/14/2006, you wrote:

Quote:
I figured as much. Fortunately the units that have this option (Deathwatch for those interested), did not need absolutely need the Bolter as a remainder link.


Also, was I correct in assuming that the selection count, as referencing "unit.option[smBolter].selection", wouldn't be set until the remainder link was processed?
rob is offline   #9 Reply With Quote
harkan
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Posts: 345

Old July 16th, 2006, 03:06 AM
On a more general point, would it be better for units that use remainders then to have them set as an automatic option that is preselected?

I can't think of any units where the count of the weaponry that is currently shown by remainder links is essential as I am sure the user will be able to figure out that from a unit of 10 guardsmen with two special weapons, the other 8 have lasguns?

If the remainder is essential, i.e. it becomes something along the lines of a unit with 5 members and the various weapon options can remove all the lasguns (as an example) then possibly a live statement for the lasguns that counts the usage of the exclusions or a private unit stat to control it's live state, i.e. when the unit selects two meltaguns, two sniper rifles and a bolter the private stat count reads zero and the lasguns are no longer displayed?
harkan is offline   #10 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 06:41 AM.


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