Beastmasters and the new "N per M models in parent" requirement

Posts

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Beastmasters and the new "N per M models in parent" requirement

Postby snowblizz at 27 Aug 2012, 15:30

It's the darndest thing. Now I get it with the sample datafile but if I do a similar one, copying the requirement code from the sample file even, for DE Beastmasters then I just can't get it to work.
If I could attach files here but no. This is the "relevant part of the code". I must be missing something.
Code: Select all
   <unit id="Beastmasters" typeName="Beastmasters" cat="FA" points="12" minSize="1" maxSize="5">
      <stats>
         <stat name="WS">4</stat>
         <stat name="BS">4</stat>
         <stat name="S">3</stat>
         <stat name="T">3</stat>
         <stat name="W">1</stat>
         <stat name="I">6</stat>
         <stat name="A">1</stat>
         <stat name="Ld">8</stat>
         <stat name="Sv">5+</stat>
      </stats>
      <unitEquipment>   
         <unitEquipmentItem id="Closecombatweapon" required="true" />
         <unitEquipmentItem id="Venomblade" exclusivityGroups="ccw" ><minLimit><core:absoluteLimit limit="1" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Powerweapon" exclusivityGroups="ccw" costMultiplier="0.66"><minLimit><core:absoluteLimit limit="1" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Wychsuit" required="true" />
         <unitEquipmentItem id="Agoniser" exclusivityGroups="ccw" ><minLimit><core:absoluteLimit limit="1" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Skyboard" required="true" />
      </unitEquipment>
      <unitAbilities>
         <unitAbility abilityID="UnitTypeBeasts"/>
         <unitAbility abilityID="PowerfromPain"/>
         <unitAbility abilityID="NightVision"/>
      </unitAbilities>
      <contains>
      <!--   <containedUnit containedID="Beastmaster" />-->
         <containedUnit containedID="Khymera" />
         <containedUnit containedID="ClawedFiend" />
         <containedUnit containedID="RazorwingFlocks" />
      </contains>
         <requirements>
         <!--<requirement requirementName="RequiresNUnitsForMUnits">
            <data>Beastmaster</data>
         </requirement>
         <requirement requirementName="RequiresNUnitsForMUnits">
            <data>Khymera;ClawedFiend;RazorwingFlocks:1</data>
         </requirement>-->
      </requirements>      
   </unit>
   <unit id="Khymera" typeName="Khymera" cat="FA" points="12" minSize="1" maxSize="5" containedOnly="true">
      <stats>
         <stat name="WS">4</stat>
         <stat name="BS">0</stat>
         <stat name="S">4</stat>
         <stat name="T">3</stat>
         <stat name="W">1</stat>
         <stat name="I">6</stat>
         <stat name="A">3</stat>
         <stat name="Ld">5</stat>
         <stat name="Sv">6+/4+(i)</stat>
      </stats>
      <unitAbilities>   
         <unitAbility abilityID="UnitTypeBeasts"/>
         <unitAbility abilityID="NightVision"/>
      </unitAbilities>
      <requirement requirementName="RequiresNoMoreThanNUnitsPerMModelsInParent">
         <data>Beastmasters</data>
      </requirement>
   </unit>
   <unit id="ClawedFiend" typeName="Clawed Fiend" cat="FA" points="40" minSize="1" maxSize="1" containedOnly="true">
      <stats>
         <stat name="WS">4</stat>
         <stat name="BS">0</stat>
         <stat name="S">5</stat>
         <stat name="T">5</stat>
         <stat name="W">4</stat>
         <stat name="I">5</stat>
         <stat name="A">4</stat>
         <stat name="Ld">5</stat>
         <stat name="Sv">6+</stat>
      </stats>
         <unitAbilities>
            <unitAbility abilityID="UnitTypeBeasts"/>
            <unitAbility abilityID="NightVision"/>
            <unitAbility abilityID="BestialFury"/>
         </unitAbilities>
      <requirement requirementName="RequiresNoMoreThanNUnitsPerMModelsInParent">
         <data>Beastmasters</data>
      </requirement>
   </unit>
   <unit id="RazorwingFlocks" typeName="Razorwing Flocks" cat="FA" points="15" minSize="1" maxSize="2" containedOnly="true">
      <stats>
         <stat name="WS">4</stat>
         <stat name="BS">0</stat>
         <stat name="S">3</stat>
         <stat name="T">3</stat>
         <stat name="W">5</stat>
         <stat name="I">5</stat>
         <stat name="A">5</stat>
         <stat name="Ld">5</stat>
         <stat name="Sv">6+</stat>
      </stats>
      <unitAbilities>
         <unitAbility abilityID="UnitTypeBeasts"/>
         <unitAbility abilityID="NightVision"/>
         <unitAbility abilityID="WhirlwindofBlades"/>
      </unitAbilities>
      <requirement requirementName="RequiresNoMoreThanNUnitsPerMModelsInParent">
         <data>Beastmasters</data>
      </requirement>
   </unit>

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: How are people progressing?

Postby IBBoard at 29 Aug 2012, 14:23

I used to be suspicious of allowing people to have uploads, and we used to have much more limited disk space. I've enabled it now, so it should be there for future :)

From a quick look at your data file then it looks like it should allow one Razorwing Flock per Beastmaster, one Clawed Fiend per Beastmaster and one Kymera per Beastmaster.

Code: Select all
         <requirement requirementName="RequiresNUnitsForMUnits">
            <data>Khymera;ClawedFiend;RazorwingFlocks:1</data>
         </requirement>

wouldn't work (if it was uncommented) because it would limit based on unit count rather than model count in a unit.

I think that because this case is mixed then we need yet another requirement to handle it from the opposite direction, so that we can limit combined amounts in the same way as we can for other units.

Also, we might need a new requirement that takes account of model count allowed for a number of models (rather than unit count allowed for a number of models) because 5 beastmasters with 5 Kymera currently needs five individual Kymera units under a Beastmaster unit of size 5, rather than one Kymera unit of size 5. Not a show stopper, but something that'd make stuff neater.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Beastmasters and the new "N per M models in parent" requ

Postby snowblizz at 29 Aug 2012, 16:39

Now you are sounding like my programming teacher. Ignore the commented code, I try to avoid deleting code from a file while I may still need it. There was this time when the teacher couldn't peel his eyes of the jumble of code commented out to look at the stuff I was actually asking about.
Although I don't discount that I've made some silly copypaste error because of keeping the "old" information.
I managed to "fake" the structure with a sub-sub-unit structure. Beastermasters (container) --- Beastmaster model (contained and container) --- 1 unit of either (Razorwings, Khymera, Fiend).
That's what the commented code was doing.
I was thinking this would allow me to cut out that middle single Beastmaster unit that's really superfluous (and also messes with equipment assignment).

Also, we might need a new requirement that takes account of model count allowed for a number of models (rather than unit count allowed for a number of models) because 5 beastmasters with 5 Kymera currently needs five individual Kymera units under a Beastmaster unit of size 5, rather than one Kymera unit of size 5. Not a show stopper, but something that'd make stuff neater.

That's actually exactly correct for how the picking would work. Yes it's inconvenient but necessary for some other choices I think. Every Beastmaster model can have a beastpack, I almost said must but that may not be the case. But eg I must allow for 5 Beastmaster having a set of 2 +3 +4 +1 +5 Khymera, e.g. Although you could achieve the same with only 3 units of 5 Khymera.

I'm thinking though, is the problem perhaps that I have 3 different units and I just thought it should work differently? Ie nr of parent unit models >= nr of units (x+y+z). So if I have 3 Beastmaster I can pick 3 Beastpacks in any combination with different numbers of models depending on the Beastpack.
The requirement right now checks that unit X is not present more times than parent unit has models, but it won't consider that units Y and Z ocunt for that limit?

Incidentally, this could be used to restrict transports? Ie a Dark Eldar Venom can only be taken if parent unit has 5>= models right?

I had actually thought about the requirement of "X models in unit N for Y models in unit M" would not apply here but in other cases might well do so.

Regardless the validation is not triggered when the unit size of a parent unit is changed and it needs to do so.
You do not have the required permissions to view the files attached to this post.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Beastmasters and the new "N per M models in parent" requ

Postby IBBoard at 29 Aug 2012, 19:57

I think it is working differently than you thought, because it is not as complex as you need for this case. As you said, it checks children of type X, but not Y and Z.

As it is now, in its simplest case, it is "number of models in parent unit >= number of child units of the one type that declares the RequiresNoMoreThanNUnitsPerMModelsInParent requirement". That means that three different child unit types will each have their own RequiresNoMoreThanNUnitsPerMModelsInParent requirement and so won't interact.

In the case of the beastmasters, you could have three times more packs than you should do, as long as you took one pack of each of the three types for every single beastmaster (rather than just one pack of the three), because the Khymera, Razorwing and Clawed Fiend have independent requirements.

It might be possible to use this to manage transports. If you can only take one and can only take it on units above a certain size then one of these requirements set to that limit (e.g. 5 in your example) and a MaxSize of 1 should work. Without the MaxSize then a unit of 20 could take 4, which may not be what you mean!

If you've not done it already then I'll put in a ticket for the parent size changing. I tested most situations (and noticed that validation on undo/redo wasn't quite right) but that one must have been missed.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Beastmasters and the new "N per M models in parent" requ

Postby snowblizz at 29 Aug 2012, 21:07

Figures. Sort of what I thought when thinking it through. Then it won't help in the case of Beastmasters. I'm starting to see a pattern here with units where multiple units/other stuff would need to be grouped for requirements. :wink:

As to the other idea, Space Marines can take one Razorback if the unit is max 6 models and a Rhino at max 10 models, which should also be the unit size cap.

Orks can be 10-30 models strong and can take a Trukk if the unit size is 12>= models.
MegaNobz take twice the space so a unit of 6 could take 1 transport but anything bigger then that couldn't, the unit maxes out at 10 models.

It would work as long as the the unit size is maxed out before you can get "multiples" of the transport?

Would these be limitable? Also in the DE example I think in some cases the unit 5-10 or even 20 and if the size is 5 the a Venom is available at 10 you can put them in a Raider, but larger than that there's no transport available.

Not sure about the syntax either.


And no, I haven't put in any tickets, I'm not very good at doing that.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Beastmasters and the new "N per M models in parent" requ

Postby IBBoard at 30 Aug 2012, 10:05

You always see the patterns after you've got something to play with - that's why prototypes are good (as long as people remember that prototypes are a) rough and made quickly and b) thrown away to be replaced by the real thing!)

Assuming the Space Marine squad doesn't go over 10 models (which the ones I remember never did) then the Rhino should be possible with "1 per 1 parent model" and a MaxSize of 1 - a bit ugly, but functional. The Razorback won't work because "1 per 6" wouldn't allow one until you had six or more, rather than allowing one for up to six models.

Similarly, if the unit size has to be 12 or less then the Orks wouldn't work - you could easily make it do "1 trukk for units of 12 or more" but not "1 trukk if the unit is 12 or less, but no trukks if it is more". Ditto the Dark Eldar. Also, if MegaNobz can be mixed into the units then it confuses matters further, as we don't take account of the (physical) "size" of the model.

It might be that we need to handle it slightly differently for transports and have transports with "seats" and models taking up those seats (defaulting to 1, but can be overriden for units like MegaNobz). If we added special Transport behaviours then that would also allow us to add the Transport to the top-level unit and then take into account all units below that level (e.g. to take into account champions automatically).
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Beastmasters and the new "N per M models in parent" requ

Postby snowblizz at 30 Aug 2012, 14:43

Mmm.. I see, it was then again as I kinda thought, decided to ask to make sure though.

Transport thing wasn't necessarily for this, I was just thinking about stuff I could actually use the requirement for while I waited for some kind of "transport capacity" thing. Exactly as you say to ensure unit champions eg are added to the "size" of the unit when considering if it fits or not.

Not that it matters greatly, but Meganobz are a separate entity in their own right and can't be parcelled out to units. Regular Nobz lead boyz units, though they *might* actually be able to buy Mega-armour, at some point they did. However, those cases where a mix of units who would count differently against the transport limit would of course need to be handled. They are not *that* common, since eg most transports won't accommodate differently sized models. Eg a mixed Terminator/Space Marine unit could nto ride in a Rhino because the terminator wouldn't fit through the door.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Beastmasters and the new "N per M models in parent" requ

Postby IBBoard at 31 Aug 2012, 18:38

In a mixed Space Marine unit then you could (in theory) use a Land Raider and let the Termi fit in the door.

And there's also all the other game systems that aren't Warhammer/40K that we need to account for :)
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)