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
Creeperman
Junior Member
 
Join Date: Apr 2013
Posts: 14

Old June 7th, 2013, 10:06 AM
I have a situation in which a unit comes by default with a melee weapon, to which I am assigning a wpn.melee tag via Evaluate script so I can correctly process the unit's attack stats. It is also possible for the unit to select additional weapons to replace the default melee weapon, which may or may not be of the same type. I cannot use a remainder link since remainders do not support Evaluate statements, and I can't assign the default weapon tags to the unit directly since the user might replace the melee weapon with a ranged one. So far, I'm stuck between reporting inaccurate unit stats or else creating the unit in an invalid state (without weapons) and trusting the user to fix it.

Is there any way to get remainder link type behavior (ie, default selection) without actually using a remainder link, so I can assign tags to the default weapons' Evaluate script?
Creeperman is offline   #1 Reply With Quote
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old June 7th, 2013, 12:30 PM
You could have the default melee weapon set to auto with a live tag expression that can remove it (i.e. !tag.noDefault) and low priority, eg 100.

The other options when selected could then tag the unit with tag.noDefault, the other weapons would need a higher priority (i.e. 50) but all melee weapons could have a display priority set the same for name ordering on screen.

Then when the user selects the unit the default melee weapon is selected, when they choose another one it is then removed.

The other option is to use an exclusion for all the melee weapons of 1 1 and select none, the melee weapons will then flag up as error and if the user does not select a melee weapon and outputs a roster it will also flag in the error reports
Harkan_again is offline   #2 Reply With Quote
Creeperman
Junior Member
 
Join Date: Apr 2013
Posts: 14

Old June 7th, 2013, 02:57 PM
I dislike the idea of defaulting units to an invalid configuration, as it seems to me to be poor data design to require user intervention to fix a unit immediately after creating it. Similarly, individually tagging all possible weapons is cumbersome and not very extensible should I later add additional options or other units with similar requirements.

It seems like the best I can do is an exclusion group with the default options starting selected, which unfortunately requires the user to manually deselect the default option prior to adding a new one. It also doesn't work very well in squads with only a subset of members being able to replace weapons.

Is there a way to access an exclusion count via script? If so, I could attach a hidden option to programmatically drive the selection state of the default option.
Creeperman is offline   #3 Reply With Quote
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old June 8th, 2013, 02:12 PM
One ay to get round the individual tagging is to set up an Option - Evaluate procedure then call it from each of the relevant options eval sections, it may assist by setting up a "dummy" weapon with the procedure call in the eval section that you can then use to copy and rename etc each time you create a new weapon - that will reduce time spent building options each time as well as preventing forgetting to add in the procedure call.

To sort the subset members you can add in the procedure call to tag children as well as the unit?
Harkan_again 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 01:19 AM.


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