Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   Army Builder (http://forums.wolflair.com/forumdisplay.php?f=16)
-   -   Question about priorities... (http://forums.wolflair.com/showthread.php?t=6317)

HakujinGrande July 6th, 2006 06:54 PM

Question about priorities...
 
are exclusion remainter links calculated after all other options have been processed?

rob July 12th, 2006 07:07 PM

Question about priorities...
 
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?

HakujinGrande 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?

harkan 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?

HakujinGrande July 14th, 2006 03:42 PM

But isn't the postlink script too late to have that tag enable the ammo options?

rob July 14th, 2006 07:15 PM

Question about priorities...
 
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 July 14th, 2006 07:16 PM

Question about priorities...
 
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?

HakujinGrande 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?

rob July 14th, 2006 10:00 PM

Question about priorities...
 
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?

harkan 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?


All times are GMT -8. The time now is 07:25 AM.

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