Mutual Exclusion - a practical example

Posts

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

Mutual Exclusion - a practical example

Postby snowblizz at 05 Oct 2009, 17:03

Now that I realised there were multiple mutexes I've played around a bit with them, but I don't think I'm quite getting the hang of it.

However, an item will show up multiple times in the "replace" window. also I'm still able to add mutually exclusive groups, though replace only allows the correct items.
I think I'll bug you with a practical example. MagaArm and Warbike shouldn't be allowed at the same time. Choppa can be replaced with a Bigchoppa or Powerklaw. Slugga with a Shoota or another ranged weapon. Both with Mega-armour, which shouldn't allow any of the previous weapons, or be pickable when they are taken. And finally Evy armour which shouldn't allow or warn you as it would be redundant with Megaarmour
<unitEquipment>
<unitEquipmentItem id="Choppa" required="true" exclusivityGroups="ccw1"/>
<unitEquipmentItem id="Slugga" required="true" exclusivityGroups="ccw2"/>
<unitEquipmentItem id="Shoota" required="true" exclusivityGroups="ccw2" />
<unitEquipmentItem id="StiBom" required="true" costMultiplier="0" />
<unitEquipmentItem id="Klaw" exclusivityGroups="ccw1"/>
<unitEquipmentItem id="MegaArm" exclusivityGroups="bike, Marm" />
<unitEquipmentItem id="WarBike" exclusivityGroups="bike, Marm"/>
<unitEquipmentItem id="AmmoRunt" />
<unitEquipmentItem id="Squig" />
<unitEquipmentItem id="Cybork" />
<unitEquipmentItem id="BossPole" />
<unitEquipmentItem id="EvyArm" />
<unitEquipmentItem id="LinkedShoota" exclusivityGroups="ccw2"/>
<unitEquipmentItem id="ShootaRokkit" exclusivityGroups="ccw2"/>
<unitEquipmentItem id="ShootaSkorcha" exclusivityGroups="ccw2"/>
<unitEquipmentItem id="BigChoppa" exclusivityGroups="ccw1"/>
</unitEquipment>

Feel free to fork this into an appropriate thread though.

[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: Mutual Exclusion - a practical example

Postby IBBoard at 06 Oct 2009, 09:41

Split to another thread, since it is a useful discussion to highlight on mutex groups :)

I'll make the equipment section optional - it shouldn't break anything in the data files.

As for the mutex groups, it is possible that the "replace" window has a bug when there are multiple mutex groups that match. I'd tested the mega armour/warbike combination with your previous data file and had it work correctly for "add", though.

From the look of that chunk there, you should start with a Choppa and a Slugga, be able to swap the choppa for a Big Choppa or Klaw, be able to swap the Slugga for a Shoota, Linked Shoota, Shoota Rokkit or Shoota Skorcha. You can then take either the bike or the mega armour, but not both (but you don't need both mutex groups unless there are things that the mega armour prohibits you from taking that the warbike doesn't, or vice versa).

There is still a known limit with the "replace" dialog in that it either a) won't let you take replacements that are mutually exclusive to something you've already got (so if mega armour is mutually exclusive of the choppa and slugga then it might hide the mega armour when replacing the choppa with the mega armour because you've got the slugga) or b) will let you take replacements that are mutually exclusive to something you've already got (so if mega armour is mutually exclusive of the choppa and slugga then it might let you take the mega armour when replacing the choppa without removing the slugga). I should probably put a ticket in for it, but there are API functions that should already help with it.
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: Mutual Exclusion - a practical example

Postby snowblizz at 06 Oct 2009, 17:34

Then it in theory works as I had expected. In practice it won't do any of that. I can add as many I want to of a mutex group. E.g. give the model all the ranged weapons in the list.

[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: Mutual Exclusion - a practical example

Postby IBBoard at 06 Oct 2009, 18:01

Mutex is working for me in the latest versions of the code, so maybe I fixed something after the beta 3 release. I thought I'd only really been refactoring code and moving it rather than fixing anything with mutex, 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: Mutual Exclusion - a practical example

Postby snowblizz at 06 Oct 2009, 18:10

Weird, but then again who knows? I think half of the bugs I keep reporting stems from bad datafile design when I keep switching from Notepad to Winizp and then run Warfoundry and test it.
A lot of the stuff would most likely not come up with a datafile editor, no pressure though. :wink: :P

Eagerly awaiting beta4.

[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: Mutual Exclusion - a practical example

Postby IBBoard at 07 Oct 2009, 18:20

I've had problems just within a single IDE (Integrated Development Environment) before now! You edit a file, run the app, think it is fixed, commit the changes and then realise that something has changed between the running and the uploading, but you don't know what. Then you run it again and find it is broken and looks like it shouldn't have worked before!

If we could find more developers then a data file editor could be made quicker, but no-one seems to be interested in developing. I could probably do to contact some site admins, but first I need to a) find out what the big sites are and b) hope I get a better response than when I posted on WarVault about a year ago!
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
Tsudico
New blood
New blood
Progress to next rank:
 
60%
 
Posts: 30
Joined: 20 Jan 2008, 16:25

Re: Mutual Exclusion - a practical example

Postby Tsudico at 05 Dec 2010, 03:13

** pokes his head up **

I'm interested in developing, I just have very limited time to. I am still working on Tau, but at a glacier-like pace. :(

Here's a couple questions regarding equipment slots and mutual exclusion.

A unit has 1-3 models that each have 3 equipment slots. Is there a way to allow for each model to set the slots separately, or is it for the unit as a whole? If it is only for the unit as a whole, is there a way to prevent a unit from showing up unless it's as a contained unit?

For example:
Code: Select all
<unit id="BandofBrothers" name="Band of Brothers" cat="std" minSize="1" maxSize="3">
   <contains>
      <containedUnit containedID="SuperSoldier"/>
   </contains>
</unit>
<unit id="SuperSoldier" name="Super Soldier" minSize="1" maxSize="1">
   <stats>
      <stat name="Str">5</stat>
      <stat name="End">4</stat>
      <stat name="Wil">4</stat>
      <stat name="Int">3</stat>
   </stats>
   <equipmentSlots>
      <equipmentSlot name="option1">
         <maxLimit>
            <core:unitSizeLimit />
         </maxLimit>
      </equipmentSlot>
      <equipmentSlot name="option2">
         <maxLimit>
            <core:unitSizeLimit />
         </maxLimit>
      </equipmentSlot>
      <equipmentSlot name="option3">
         <maxLimit>
            <core:unitSizeLimit />
         </maxLimit>
      </equipmentSlot>
   </equipmentSlots>
   <unitEquipment>
      <unitEquipmentItem id="Rifle" exclusivityGroups="longrange" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="1" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Bow" exclusivityGroups="longrange" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="1" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Crossbow" exclusivityGroups="longrange" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="1" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Pistol" exclusivityGroups="shortrange" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="2" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Sling" exclusivityGroups="shortrange" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="1" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Slingshot" exclusivityGroups="shortrange" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="1" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Sword" exclusivityGroups="melee" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="2" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="TwoHandedSword" exclusivityGroups="melee" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="1" />
         </maxLimit>
      </unitEquipmentItem>
      <unitEquipmentItem id="Flail" exclusivityGroups="melee" equipmentSlot="option1, option2, option3">
         <minLimit>
            <core:absoluteLimit limit="0" />
         </minLimit>
         <maxLimit>
            <core:absoluteLimit limit="2" />
         </maxLimit>
      </unitEquipmentItem>
</unit>


If I don't want SuperSoldier to show up under any category, can I just not set a category for it? If that is the case, can I then put it as a contained unit of the BandofBrothers and then it would be counted as part of the std category? As you can see, each SuperSoldier should be able to pick their own equipment, and I need to keep track of which SuperSoldier has what, so I don't think putting all the equipment for one unit would work.

As far as developing a data file editor, am I correct in assuming that I'll need the APIs associated with data file reading and the other IBBoard Utils that are in WarFoundry? Do you also want multiple GUI implimentations or can I just stick with one, and if so, what is preferred? GTK, Win.Forms, or QT?

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

Re: Mutual Exclusion - a practical example

Postby snowblizz at 05 Dec 2010, 11:11

<equpementSlot> is for the entire unit yes. Currently there's no "hiding" of a unit. I expect there to be though, soon as I can twist IBBoards arm to stop fooling around with that Linux nonsense and give me something that actually matters. :P You have to have a category or it won't load I think.
I was hoping that we could get <containedUnit> implemented in 0.2, that and requirements.

What you've done, is as far as I can tell the way to do it. Just not fully implemented yet. I've done the same for some units.

Can't say too much of the programming, but I do suggest WinForm as a priority. Eventually I guess something working in Linux and Mac would be useful, but hopefully that should be easier to do when the basics are there?

[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: Mutual Exclusion - a practical example

Postby IBBoard at 05 Dec 2010, 14:51

Linux does matter, since a) it is a market with more developers in it per head of population and b) it'll give them one of the few native army creation apps (the only one I know of) so they'll get more interested in it :P

I think we need a lot more planning before I push for v0.2 and the new features. We've got various vague ideas and general things that we need, but where as the basics were plotted out as I went, some of the more advanced features need a bit more thinking about. Things like how we capture it in the data files (easy is good, but vaguely usable is sufficient) and how we present the interface (easy is the most important, or people won't want to use it). Things like per-model equipment is where that gets hard.

At the moment then we do require categories for unit types (primarily so that the cost of units is assigned to the correct place for those game systems that care), but I'll do a slight change so that units don't have to show up in the "create a unit" list.

In terms of data file editors, that would be best discussed in a separate thread. In summary, though, WinForms is best as a first focus (because it theoretically runs on everything that .Net does without any extra packages) and you'll probably need all of the current packages for WarFoundry, plus some additions to write objects back to files. Alternatively, you could ignore the current API completely (since it focuses on reading data and creating objects) and just write the XML as-is from the app.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)