Username:


Password:


Remember me


  • Find Us On Facebook



exclusion groups AND remainders

Have a question about how to do something in the datafiles? Ask it here, we'll help if we can. NOTE: We cannot teach you how to use ABCREATE or how our files work, we don't have the time.

exclusion groups AND remainders

#1  Postby Malarick » Sun Nov 11, 2007 2:47 pm

Hi all,

I have a bit of a conumdrum that I hope you can help me with.

I am doing a new 40k army list and in that list I have a unit that can be equipped like:-

CC Weapon
Bolt Pistol

They come as standard.

the entire unit can opt to swap both CC Weapon and Bolt Pistol for a Bolter.

Okay....I can get that to work via exclusion groups, but my problem is the next bit.

I have a special weapon that I have equipped (lets call this weaponX).

If I select 1 weaponX I need it to deduct 1 from the total Bolt Pistols (but not the CC Weapon).

OR

If I have already opted for the Bolter option I need it to deduct 1 from the Bolter count, when I add 1 weaponX.

I have successfully managed to get one or the other working (i.e I can get the bolt pistols to be deducted from (via remainders) or I can swap the CC Weapons for Bolter (via exclusion groups)) but I cannot get them to all work together.

Am I being clear enough?

I will try and sum up.

Unit A - 10 men

10 x CC Weapon
10 x Bolt Pistol

Option to replace both with 10 x Bolter

If I Choose 1 x WeaponX I need to deduct 1 from Bolter or Bolt Pistol (but not CC Weapon)

So it would look like:-

10 x CC Weapon
9 x Bolt Pistol

1 x WeaponX

OR

9 x Bolter
1 x WeaponX

Any ideas?
User avatar
Malarick
Recruit
Recruit
 
Posts: 1
Joined: Tue Sep 04, 2007 12:00 am

#2  Postby Golf33 » Mon Nov 12, 2007 12:56 pm

Hi mate,

not an answer I'm afraid but can you explain how you got the swap of weapons to work?
User avatar
Golf33
Recruit
Recruit
 
Posts: 5
Joined: Sat Feb 10, 2007 12:00 am

#3  Postby Golf33 » Thu Nov 29, 2007 10:49 am

You probably worked out how to do the whole thing already but just in case, here's how I got it working:

Create a normal (non-accrued, non-global) tag 'tgMyTags.tBoltP'. Assign the tag to the unit.

Create an option 'oSwapWpn', name 'Swap BP/CCW for Bolter'. In the Eval script, put:
Code: Select all
var retval as number
retval = this.unit.delete[tgMyTags.tBoltP]


Add the option 'oSwapWpn' to your unit. Cost 'free'; priority '1'.

Add the bolt pistol option to your unit. Cost 'free'; priority 2 or more; remainder 'range_m'; live:
Code: Select all
tgMyTags.tBoltP


Add the CCW option to your unit. Cost 'free'; priority 2 or more; remainder 'close_m'; live:
Code: Select all
tgMyTags.tBoltP


Add the bolter option to your unit. Cost 'free'; priority 2 or more; remainder 'range_m'; live:
Code: Select all
!tgMyTags.tBoltP


Add the special weapon option to your unit. Range 0-1; priority 2 or more; exclusion 1 against 'range_m'.

That should just about do it!
User avatar
Golf33
Recruit
Recruit
 
Posts: 5
Joined: Sat Feb 10, 2007 12:00 am


Return to Datafile Programming Support

Who is online

Registered users: No registered users

cron