Unit equipment and limits worked example - Tactical Marines

Posts

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

Unit equipment and limits worked example - Tactical Marines

Postby snowblizz at 14 May 2010, 20:17

Trying to figure out the following and not having much luck:
A unit of Space Marines has bolters as standard. As many as they have models.
If unit count is 10 (we can't quite model this yet) 1 model can swap a bolter for a special weapon (choice of 3)
A further model can swap his bolter for a heavy weapon, one of 4.
Not quite about stats anymore so I guess cut and paste it somewhere more suitable. :roll:
Been trying this but it won't quite give me the behaviour I'd like:
Code: Select all
      <equipmentSlots>
         <equipmentSlot name="bolter">
            <maxLimit>
               <core:sizeConstrainedLimit limit="10" />
            </maxLimit>
         </equipmentSlot>
      </equipmentSlots>

      <unitEquipment>
         <unitEquipmentItem id="Powerarmour" required="true" />
         <unitEquipmentItem id="Boltpistol" required="true" />
         <unitEquipmentItem id="FragandKrakgrenades" required="true" />
         <unitEquipmentItem id="Boltgun" required="true"  equipmentSlot="bolter"><minLimit><core:sizeConstrainedLimit limit="0" /></minLimit><maxLimit><core:sizeConstrainedLimit limit="10" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Flamer"  exclusivityGroups="special" costMultiplier="0" equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Meltagun"  exclusivityGroups="special"  equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Plasmagun"  exclusivityGroups="special"  equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Heavybolter"  exclusivityGroups="heavy" costMultiplier="0" equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Multi-melta"  exclusivityGroups="heavy" costMultiplier="0" equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Missilelauncher"  exclusivityGroups="heavy" costMultiplier="0" equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Lascannon"  exclusivityGroups="heavy"  equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
         <unitEquipmentItem id="Plasmacannon"  exclusivityGroups="heavy"  equipmentSlot="bolter"><minLimit><core:absoluteLimit limit="0" /></minLimit><maxLimit><core:absoluteLimit limit="1" /></maxLimit></unitEquipmentItem>
      </unitEquipment>

[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: Unit equipment and limits worked example - Tactical Mari

Postby IBBoard at 15 May 2010, 09:27

If your unit size can only ever go up to 10 then you don't need "<core:sizeConstrainedLimit limit="10" />". That's a limit that says "this number or the unit size, whichever is smaller". If you just mean "the unit size" then just use a plain "<core:unitSizeLimit/>".

This is untested, but this is what I'd have done:

Code: Select all
      <equipmentSlots>
         <equipmentSlot name="special">
            <minLimit>
               <core:absolute limit="0" />
            </minLimit>
            <maxLimit>
               <core:percentageLimit limit="0.2" round="down" />
            </maxLimit>
         </equipmentSlot>
         <equipmentSlot name="heavy">
            <minLimit>
               <core:absolute limit="0" />
            </minLimit>
            <maxLimit>
               <core:percentageLimit limit="0.1" round="down" />
            </maxLimit>
         </equipmentSlot>
      </equipmentSlots>

      <unitEquipment>
         <unitEquipmentItem id="Powerarmour" required="true" />
         <unitEquipmentItem id="Boltpistol" required="true" />
         <unitEquipmentItem id="FragandKrakgrenades" required="true" />
         <unitEquipmentItem id="Boltgun" required="true" />
         <unitEquipmentItem id="Flamer"  equipmentSlot="special" costMultiplier="0" />
         <unitEquipmentItem id="Meltagun"  equipmentSlot="special" />
         <unitEquipmentItem id="Plasmagun"  equipmentSlot="special" />
         <unitEquipmentItem id="Heavybolter"  equipmentSlot="heavy" costMultiplier="0" />
         <unitEquipmentItem id="Multi-melta"  equipmentSlot="heavy" costMultiplier="0" />
         <unitEquipmentItem id="Missilelauncher"  equipmentSlot="heavy" costMultiplier="0" />
         <unitEquipmentItem id="Lascannon"  equipmentSlot="heavy" />
         <unitEquipmentItem id="Plasmacannon"  equipmentSlot="heavy" />
      </unitEquipment>

That assumes a unit size of 10, so you'd have to tweak the percentages if you were keeping the Sergeant separate, but I think it should work. My take on it has always been that special weapon still leave the standard weapon (e.g. bolter) in place and are just an additional weapon. If that isn't the case then it could get messy and I'll have to look at it again, but I always worked that way because it was simple maths (unit size * trooper cost + extra equipment cost)

...

Actually, maybe we need a "composite limit", because that doesn't quite work with the special weapons. What that lets you do at the moment is to have two special weapons in a 10-man squad. I'll add a ticket for "composite", at which point the special weapon max limits would be something like:
Code: Select all
            <maxLimit>
               <core:compositeLimit>
                   <core:percentageLimit limit="0.2" round="down" />
                   <core:absoluteLimit limit="1" />
               </core:compositeLimit>
            </maxLimit>
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: Unit equipment and limits worked example - Tactical Mari

Postby snowblizz at 15 May 2010, 16:31

I did not know the equipmentslot supported minLimits.

Hah, well that was an underhand and unplanned way to get something. I was thinking about suggesting something like that, the "complex limits", as I noticed last night while trying to implement the Terminator weapon restrictions it wouldn't bend that far.

[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: Unit equipment and limits worked example - Tactical Mari

Postby IBBoard at 15 May 2010, 18:32

Ah, good point, they don't. D'oh :\ Looking at the example then it might not be necessary anyway as I think that the equipment slots assume a minimum of 0 anyway because of the standard use case. I guess we might need a specific minimum in some cases, but it isn't handled yet.
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: Unit equipment and limits worked example - Tactical Mari

Postby snowblizz at 07 Jul 2010, 12:43

Bumping this a bit.

I ran into another effingly annoying Space Marine unit. The Vanguard veterans.

4-9 models + sergeant. Of those 4-9, ANY can swap pistol and/or ccw for a set of options. So each model can have 2 from a list of options. I'm not sure how I'm going to put that in.

The unit would be able to have 2*9 or 18 items of each option. I guess, I could make than an absolute limit. Basically they can take twice the sizeConstrianedlimit of items I guess.

Any ideas?

I also run into a problem with the Space Marine characters. They have a long list of upgrades. However if they buy Terminator armour (replace most of their equipment) then they can buy part of the same list at a "discounted price", basically taking into account that they would have paid for a "basic" set of items in the terminator armour. In this case a stormbolter and power sword, and when replacing them the upgrades are cheaper than when bought for a power armoured character.
I'm thinking there could be a solution, but I can't figure one out.

[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: Unit equipment and limits worked example - Tactical Mari

Postby IBBoard at 10 Jul 2010, 09:24

Maybe we need a new limit type - a unit size multiple. If you used a 2x unit size multiple limit on a slot and assigned pistol, CCW, [insert others] to that equipment slot then you should get your limit of 8->18 (depending on unit size). If there's a limit of one pistol per person then you could add a unit size limit on the pistol as well, which should ensure that you have to take the remainder as something else.

The only problem I might need to look into is how we handle a slot with a matching min and max limit when you're trying to do mixed equipment, since it might stop you doing either of a) reducing one then adding/increasing the other (because you can't go below the min limit) and b) adding/increasing one and then reducing the other (because it won't let you go over the limit).

As for the discounted Terminator equipment, that might be something that needs requirements/restrictions, which will probably be in v0.2. You would have to duplicate the equipment with different prices, but it would let you say "X requires terminator armour" and "Y excludes terminator armour", where X is a discounted version and Y isn't. The alternative is whether we can work some discounting system so that you can equip your character with A, B and C and then add the armour without having to remove your existing equipment and replace it with A1, B1 and C1.

As an aside, there's a ticket open at the moment that needs more info. If you can give me the info then I'll hopefully have a chance in the near future to check it out, fix it and get what could be RC1 released ;) It does depend on my computer playing nicely and what work I can get done around a visit from the in-laws, though.
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: Unit equipment and limits worked example - Tactical Mari

Postby snowblizz at 10 Jul 2010, 13:11

You are saying I could have the same item appear several times as a option with a different price? I did not know if it was possible. And no longer remember if I tested it or not. But that would be useful.

Or maybe you meant I'd need to insert a Terminator-armour-power weapon, power fist, etc etc etc options?

As to the unit I mentioned. The issues is that each model has, in principle, a pistol and sword. Each model can be individually armed with a list of say 8 items. And they can swap either pistol OR sword for any of the 8 items. So model 1 swaps pistol for a plasma pistol and sword for a power sword, model 2 swaps pistol for lightning claw, and sword for lightning claw. Etc etc etc. Again a place where I'd need being able to "sub-unit" or use some equipment decomposer function to individualise unit members.
Now I was thinking as a first stop I'd just let the user pick as many of the weapon options as they felt like and then realised that there's nothing that allows me to say 2 times the unit size. Which I guess would still be a workaround. A new limit type sounds like a good idea anyway. Something like this
<UnitsizeMultipleLimit limit="x"> where x would allow me to specify a multiple to use.

We discussed being able to "individualize" options to unitmembers in anther thread IIRC. Something like that would of course be what I'd imagine. Mainly because that other program does just that.

I'll look into that needinfo as well. Usually I get a notify, this time I haven't so didn't realise there was one.

For now I guess I'll just put all the item limits to 18 and let the user sort it out for now. Their own fault if they buy too many items. :P

[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: Unit equipment and limits worked example - Tactical Mari

Postby IBBoard at 12 Jul 2010, 12:08

Good point, maybe we assume that there will only be one occurrence of each reference to an equipment item at the moment. For now you'd probably need to duplicate the equipment items as well as the unit equipment items (the references to them).

It looks like this situation might need the individualisation behaviour, but I think that a better handling of limits for mixing may need investigation for the simpler case anyway.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)