Page 1 of 1

0-1 per phalanx

PostPosted: Thu Jun 07, 2007 4:33 pm
by Jonru
Hi, I've been working on producing a Necron epic list from the specialist games website and I've got most of it working to a decent enough state. The only problem I have is coding for the 0-1 units per phalanx (eques, monolith formations, pylon formations and venators). I've tried to get it to work by counting up the number of support units (epGroup.epSupp) but that comes out with all of them added together and i've tried putting them in different epgroups but then they don't show up under the support tab and i'm at a loss really of how to do it. Any assistance would be great! If its too much effort then don't worry about it. Cheers

PostPosted: Thu Jun 07, 2007 6:08 pm
by harkan
if you set up a merge rule with either a target id of that unit or no target id. If you dont use a target id then tag the unit instead (makes it more flexible as well).

The rule code needs to be something like:

if (count[unit] <= tagvalue[TAG HERE]) then

@valid = 1
endif

then it will show an error when it occurs. If you have a look in generalstuff.dat on the 40k files at the rules in there it may give you a better idea

PostPosted: Sat Jun 09, 2007 12:06 am
by Jonru
urgh, sorry but its not working. Here is what I have:

I'm trying to make the venator unit come up with an error when there are more venators than Phalanx units. the phalanx is epGroup.epForm and the venator is epGroup.epSupp. In the target id I have put neVenator and then:

if (count[unit] <= tagcount[epGroup.epForm]) then
@valid = 1
endif

This would make sense to me and should work but for some reason it doesn't... The error seems to apply to the venator unit and flayed ones (children to venator) and the Lord and Warriors in the Phalanx unit, but no to the Phalanx itself. Perhaps it is counting with the children included, and this value is throwing off the count?

I have also tried this, but it doesn't work properly either:
if (tagcount[epGroup.epSupp] <= tagcount[epGroup.epForm]) then
@valid = 1

endif

Any help would be appreciated (also, where is the generalstuff.dat?) Thanks

EDIT: CANCEL THAT! I have solved the problem now, learnt about global and local tags in the process! Woo :) Army list is almost done now.