View Single Post
Homer S
Senior Member
Volunteer Data File Author
 
Join Date: Apr 2009
Posts: 134

Old August 7th, 2014, 03:02 AM
Quote:
Originally Posted by Colen View Post
Can you tell me a little more about how you're implementing the detachment? I assume it's a separate unit within the squad, and you're not trying to assign stats etc to the squad itself?
The detachment is a separate unit. Units are added to the roster in the usual way and then drag and dropped into the detachment.

I added a global option to all units that have been nested via drag and drop but are not detachments with a procedure to change the squad stats:
Code:
if (unit.tagis[ruleset.ro_Forged] = 1) then

  var retval as number

  if (unit.tagis[runtime.multiple] = 1) then
    if (unit.tagis[gnAcc.isDetach] < 1) then
      retval = unit.assign[gnAcc.inDetach]

      if (unit.tagis[Group.HQ] = 1) then
        squad.stat[gn7DtchHQ] = squad.stat[gn7DtchHQ] + 1
SNIPPED
For the validation errors to show correctly, the detachment must be at the bottom of the stack. Only things left to tidy this up is to force the detachment to always be at the bottom, maybe a squad.sortorder[last] or something. Also, a way to hide the detachment unit itself when outputting.

Showing roster selection and validation warnings (individual FOC limits not yet removed)


Units added but not combined


Units fully added


Units fully added, showing squad titles and squad stats


Homer

The only "hobby" GW is interested in is lining their pockets with your money.

Last edited by Homer S; August 7th, 2014 at 04:25 AM.
Homer S is offline   #5 Reply With Quote