[Solved][Tips]Need Help with custom dataFiles

Posts

[Unknown user]'s Avatar
cyberbooster
New blood
New blood
Progress to next rank:
 
60%
 
Posts: 30
Joined: 02 Nov 2011, 16:53

[Solved][Tips]Need Help with custom dataFiles

Postby cyberbooster at 02 Nov 2011, 17:09

Hello,
I just came across WarFoundry today and I was really interested in setting up some data files (for my own testings and for some popular games).
I have some problem with the setup of a race, I would like the Warriors to pickup a certain equip up to 2 times AND a specific type of equip up to 1 time (but there are 2 items in this "FGs" type of equip).
Here is the code:

Code: Select all
<unit id="asdasd2" typeName="Warriors" cat="cat1" points="140" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (10)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">16</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">10</stat>
            <stat name="Def">5+</stat>
            <stat name="Ner">5</stat>
         </stats>
         <equipmentSlots>
            <equipmentSlot name="FGs">
               <maxLimit>
                  <core:sizeConstrainedLimit limit="1" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:sizeConstrainedLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:sizeConstrainedLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            

            <unitEquipmentItem id="equip2" equipmentSlot="FGs">
               <minLimit>
                  <core:sizeConstrainedLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:sizeConstrainedLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="FGs">
               <minLimit>
                  <core:sizeConstrainedLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:sizeConstrainedLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>



What am I missing? Why I can equip only 1 item of "equip1"?
Last edited by cyberbooster on 10 Nov 2011, 18:16, edited 2 times in total.

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

Re: Need Help with custom dataFiles

Postby snowblizz at 03 Nov 2011, 15:52

From that code the size of the unit is restricted to 1, the core:limit type is "sizeConstrained" which means it is also constrained by the current unit size, in this case 1.

One thing that is not supported though is items which could belong to 2 "slots". Say a unit can/should have/has x ranged weapons, of which z can be of heavy weapon, there's no easy way to make it so yet.

I'm in the process of writing a nice little explanation of how to write datafiles. Almost done. I see that might have been time well spent. Stay tuned.

The guide is now up on the datafile's groupsite: http://games.groups.yahoo.com/group/WarFoundryAB/

[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: Need Help with custom dataFiles

Postby IBBoard at 04 Nov 2011, 20:09

Any documentation people can provide is greatly appreciated (especially if it is on the wiki ;) ). Also, any examples (clearly and thoroughly explained, with example units for illustrating the point) of the type of requirements that are needed would be great.

I'm not sure I understand what is going on here and what is needed, although Snowblizz's point is correct - if a unit has a max size 1 then any <core:sizeConstrainedLimit> greater than 1 ends up no differently to a value of 1 because the limit is the lowest of the limit value or the unit size.
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
cyberbooster
New blood
New blood
Progress to next rank:
 
60%
 
Posts: 30
Joined: 02 Nov 2011, 16:53

Re: Need Help with custom dataFiles

Postby cyberbooster at 07 Nov 2011, 10:47

Thanks for the help, I'm going to read the guide.

So, if I have a system which allows 3 normal weapons and 2 heavy I need to set the maxsize to 5 and limit the equipment one by one (or by category)?

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

Re: Need Help with custom dataFiles

Postby snowblizz at 07 Nov 2011, 15:46

If the restriction is 0-3 normal weapons and additionally 0-2 heavy weapons then you can make two equipment slots for it. Though you'll not be able to control the total amount of equipment on the models, ie a unit of 2 would be able to take 2 normal and two heavy.

If however you can take more of either category by taking less then you are out of luck.

In that case the "slot" should be 5 and each weapon option should get an individual restriction of 0-3 and 0-2 respectively. If that makes sense. I'm not so good theoretically, I like to see the rules and test them out in practice. I work better that way I've found. So if I turn out to be talking gibberish I blame that. :P

[Unknown user]'s Avatar
cyberbooster
New blood
New blood
Progress to next rank:
 
60%
 
Posts: 30
Joined: 02 Nov 2011, 16:53

Re: Need Help with custom dataFiles

Postby cyberbooster at 07 Nov 2011, 17:10

Ok, so maybe talking with an example should be better.
I'm trying to do the xml files for warpath (Mantic).

In that game you consider the models in the unit just as a mere number, so the equipment is linked to the unit and not to the models. For what I've seen, the solution 0..2, 0..3 should work for a while (so I should put maximum size of the unit to 5 right? even if there are 20 models), at least until they decide to have a maximum of weapons lower than the sum of the maximum for each type.

Right? I am talking gibberish? :D

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

Re: Need Help with custom dataFiles

Postby snowblizz at 07 Nov 2011, 18:11

If the equipment is added with no regard for the number of models in the unit I'd suggest using the "absoluteLimit" instead. Then it doesn't matter how many or few models the unit is listed as having you just get the set number of items.

[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: Need Help with custom dataFiles

Postby IBBoard at 07 Nov 2011, 19:26

Mantic games? Cool. I've never played it, but thanks for experimenting in new areas for us :) My idea has always been that we'll support all game systems from all companies (unless they do some truly obscure things that we can't handle - and then I plan to have a plugin system that would let somebody add something to handle it :D), so it is good to get some non-Games Workshop coverage.

I'll read Snowblizz's docs and put together a few pages on our wiki about this if necessary (BTW - if anyone has any ideas on how best to organise it so it is useful then please shout! I've got inside knowledge bias)

As Snowblizz said, absoluteLimit is "limit is X no matter what the size of the unit" where as sizeConstrainedLimit is "limit is X or the size of the unit, whichever is smaller". From the sound of it you want the former, where as the latter is for (for example) units of 5-10 models that may have up to 7 of some item but no more than one per model.
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
cyberbooster
New blood
New blood
Progress to next rank:
 
60%
 
Posts: 30
Joined: 02 Nov 2011, 16:53

Re: Need Help with custom dataFiles

Postby cyberbooster at 07 Nov 2011, 19:34

Very good. I understood everything. I'll try put up something in next few days.
I saw the tweet about it. lol :D

[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: Need Help with custom dataFiles

Postby IBBoard at 07 Nov 2011, 20:20

It's good that we're expanding, so I thought the world (at least the Twitter-connected part of it) should see :)

As for documentation, it may need some updates but we do have this section on the Wiki already. Snowblizz has Documenter permissions on the Wiki and can reword it to make more sense if I'm too obtuse or techy or anything :)
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: Need Help with custom dataFiles

Postby snowblizz at 07 Nov 2011, 21:42

It can't be too bad since I borrowed parts of it for the guide. No point in writing the same thing over again. I was looking at the file format page but wasn't sure on how best to formulate myself. I've had my eye on it though...

[Unknown user]'s Avatar
cyberbooster
New blood
New blood
Progress to next rank:
 
60%
 
Posts: 30
Joined: 02 Nov 2011, 16:53

Re: Need Help with custom dataFiles

Postby cyberbooster at 07 Nov 2011, 23:39

ok, I'm too tired to look into this problem right now. Hope somebody gives me a hand :D

Warpath 0.1 (no vehicles for now)
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<system xmlns="http://ibboard.co.uk/warfoundry/system" xmlns:cats="http://ibboard.co.uk/warfoundry/cats" id="wp" name="WarPath" warn="false">
   <categories>
      <cats:cat id="cat1" name="Infantry" minPercentage="0" maxPercentage="100" />
      <cats:cat id="cat2" name="Ordnance" minPercentage="0" maxPercentage="100" />
      <cats:cat id="cat3" name="Armour" minPercentage="0" maxPercentage="100" />
      <cats:cat id="cat4" name="Aircraft" minPercentage="0" maxPercentage="100" />
      <cats:cat id="cat5" name="Heroes/Monsters" minPercentage="0" maxPercentage="100" />
   </categories>
   <sysStatsList defaultStats="wpDefault">
      <sysStats id="wpDefault">
         <sysStat name="Type"/>
         <sysStat name="Spd"/>
         <sysStat name="Hit"/>
         <sysStat name="Fire"/>
         <sysStat name="Ran"/>
         <sysStat name="Att"/>
         <sysStat name="Def"/>
         <sysStat name="Ner"/>
      </sysStats>
   </sysStatsList>
</system>



Race template 0.1 (still some units missing):
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<race xmlns="http://ibboard.co.uk/warfoundry/race" xmlns:core="http://ibboard.co.uk/warfoundry/core" id="ForgeFathers" name="ForgeFathers" system="wp" defaultArmyName="{0} ForgeFathers Army">
   <units>
      <unit id="ForgeFathers1" typeName="Steel Warriors Team" cat="cat1" points="75" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (5)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">8</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">5</stat>
            <stat name="Def">5+</stat>
            <stat name="Ner">3</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip4" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers2" typeName="Steel Warriors Section" cat="cat1" points="140" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (10)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">16</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">10</stat>
            <stat name="Def">5+</stat>
            <stat name="Ner">5</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers3" typeName="Steel Warriors Platoon" cat="cat1" points="265" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (20)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">32</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">20</stat>
            <stat name="Def">5+</stat>
            <stat name="Ner">9</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="3" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers4" typeName="Grizzlers Team" cat="cat1" points="85" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (5)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">3+</stat>
            <stat name="Fire">8</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">5</stat>
            <stat name="Def">5+</stat>
            <stat name="Ner">3</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="4" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            

            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="4" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="4" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers5" typeName="Grizzlers Section" cat="cat1" points="150" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (10)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">3+</stat>
            <stat name="Fire">16</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">10</stat>
            <stat name="Def">5+</stat>
            <stat name="Ner">5</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="8" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            

            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="8" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="8" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers6" typeName="ForgeGuard Team" cat="cat1" points="140" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (5)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">3+</stat>
            <stat name="Fire">8</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">5</stat>
            <stat name="Def">6+</stat>
            <stat name="Ner">3</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
            <unitAbility abilityID="CrushingStrenght6"/>
            <unitAbility abilityID="Lumbering"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers7" typeName="ForgeGuard Section" cat="cat1" points="250" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (10)</stat>
            <stat name="Spd">4</stat>
            <stat name="Hit">3+</stat>
            <stat name="Fire">16</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">10</stat>
            <stat name="Def">6+</stat>
            <stat name="Ner">5</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
            <unitAbility abilityID="CrushingStrenght6"/>
            <unitAbility abilityID="Lumbering"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers8" typeName="Hel Valkyr Team" cat="cat1" points="70" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (5)</stat>
            <stat name="Spd">10</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">8</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">5</stat>
            <stat name="Def">3+</stat>
            <stat name="Ner">4</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
            <unitAbility abilityID="Fast"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers9" typeName="Hel Valkyr Section" cat="cat1" points="130" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (10)</stat>
            <stat name="Spd">10</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">16</stat>
            <stat name="Ran">24</stat>
            <stat name="Att">10</stat>
            <stat name="Def">3+</stat>
            <stat name="Ner">6</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
            <unitAbility abilityID="Fast"/>
         </unitAbilities>
         <equipmentSlots>
            <equipmentSlot name="BFGs">
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </equipmentSlot>
         </equipmentSlots>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
            <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
         
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers10" typeName="Scrappers Team" cat="cat1" points="50" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (5)</stat>
            <stat name="Spd">5</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">4</stat>
            <stat name="Ran">12</stat>
            <stat name="Att">10</stat>
            <stat name="Def">3+</stat>
            <stat name="Ner">4</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="1" />
               </maxLimit>
            </unitEquipmentItem>
         </unitEquipment>
      </unit>

      <unit id="ForgeFathers11" typeName="Scrappers Section" cat="cat1" points="90" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (10)</stat>
            <stat name="Spd">5</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">8</stat>
            <stat name="Ran">12</stat>
            <stat name="Att">20</stat>
            <stat name="Def">3+</stat>
            <stat name="Ner">6</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="2" />
               </maxLimit>
            </unitEquipmentItem>
         </unitEquipment>
      </unit>


      <unit id="ForgeFathers12" typeName="Scrappers Platoon" cat="cat1" points="170" maxNum="1" maxSize="1">
         <stats>
            <stat name="Type">Inf (20)</stat>
            <stat name="Spd">5</stat>
            <stat name="Hit">4+</stat>
            <stat name="Fire">16</stat>
            <stat name="Ran">12</stat>
            <stat name="Att">40</stat>
            <stat name="Def">3+</stat>
            <stat name="Ner">10</stat>
         </stats>
         <unitAbilities>
            <unitAbility abilityID="piercing1"/>
         </unitAbilities>
         <unitEquipment>
            <unitEquipmentItem id="equip1" required="false" >
               <minLimit>
                  <core:absoluteLimit limit="0" />
               </minLimit>
               <maxLimit>
                  <core:absoluteLimit limit="3" />
               </maxLimit>
            </unitEquipmentItem>
         </unitEquipment>
      </unit>



      
   </units>
   <equipment>
      <equipmentItem id="equip1" name="Heat Hammer" cost="30" />
      <equipmentItem id="equip2" name="BFG Hailstorm Autocannon" cost="30" />
      <equipmentItem id="equip3" name="BFG Heat Cannon" cost="30" />
      <equipmentItem id="equip4" name="Dragon Breath" cost="30" />
   </equipment>
   <abilities>
      <ability id="piercing1" name="Piercing(1)"><description>The unit is equipped with Piercing (1) weapons.</description>
      </ability>
      <ability id="CrushingStrenght6" name="Crushing Strenght (6)"><description> The unit is equipped with Crushing Strength (6)</description>
      </ability>
      <ability id="Lumbering" name="Lumbering"><description> The unit is has Lumbering</description>
      </ability>
      <ability id="Fast" name="Fast"><description>The unit has Fast special rule</description>
      </ability>

   </abilities>
</race>



Error on new list:
Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at IBBoard.WarFoundry.GUI.WinForms.FrmMain.SetNonNullArmyState(Army newArmy)
   at IBBoard.WarFoundry.GUI.WinForms.FrmMain.SetArmy(Army newArmy)
   at IBBoard.WarFoundry.GUI.WinForms.FrmMain.CreateNewArmy()
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
WarFoundry
    Assembly Version: 0.1.0.25833
    Win32 Version: 0.1.0.25833
    CodeBase: file:///C:/Users/Mike/Downloads/WarFoundry-WinForms-v0.1/WarFoundry.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
log4net
    Assembly Version: 1.2.10.0
    Win32 Version: 1.2.10.0
    CodeBase: file:///C:/Users/Mike/Downloads/WarFoundry-WinForms-v0.1/log4net.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
IBBoard
    Assembly Version: 1.0.3955.25832
    Win32 Version: 1.0.3955.25832
    CodeBase: file:///C:/Users/Mike/Downloads/WarFoundry-WinForms-v0.1/IBBoard.DLL
----------------------------------------
IBBoard.WarFoundry.API
    Assembly Version: 0.1.0.25832
    Win32 Version: 0.1.0.25832
    CodeBase: file:///C:/Users/Mike/Downloads/WarFoundry-WinForms-v0.1/IBBoard.WarFoundry.API.DLL
----------------------------------------
IBBoardWF
    Assembly Version: 1.0.0.25832
    Win32 Version: 1.0.0.25832
    CodeBase: file:///C:/Users/Mike/Downloads/WarFoundry-WinForms-v0.1/IBBoardWF.DLL
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version: 0.86.0.518
    Win32 Version: 0.86.0.518
    CodeBase: file:///C:/Users/Mike/Downloads/WarFoundry-WinForms-v0.1/ICSharpCode.SharpZipLib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

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

Re: Need Help with custom dataFiles

Postby snowblizz at 08 Nov 2011, 15:08

I do not get that same issue, however you have run afoul of one problem mentioned in the guide. Order is important. The tags must be specifically arranged in the "correct" order. You have placed the <unitAbility> before the equipment and that is an automatic failure unfortunately.
Here's a fixed version with the abilities correctly placed.

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
    <race xmlns="http://ibboard.co.uk/warfoundry/race" xmlns:core="http://ibboard.co.uk/warfoundry/core" id="ForgeFathers" name="ForgeFathers" system="wp" defaultArmyName="{0} ForgeFathers Army">
       <units>
          <unit id="ForgeFathers1" typeName="Steel Warriors Team" cat="cat1" points="75" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (5)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">8</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">5</stat>
                <stat name="Def">5+</stat>
                <stat name="Ner">3</stat>
             </stats>

             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip4" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
             </unitEquipment>
             <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>          </unit>

          <unit id="ForgeFathers2" typeName="Steel Warriors Section" cat="cat1" points="140" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (10)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">16</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">10</stat>
                <stat name="Def">5+</stat>
                <stat name="Ner">5</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
             <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>          </unit>

          <unit id="ForgeFathers3" typeName="Steel Warriors Platoon" cat="cat1" points="265" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (20)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">32</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">20</stat>
                <stat name="Def">5+</stat>
                <stat name="Ner">9</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="3" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
             <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>          </unit>

          <unit id="ForgeFathers4" typeName="Grizzlers Team" cat="cat1" points="85" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (5)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">3+</stat>
                <stat name="Fire">8</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">5</stat>
                <stat name="Def">5+</stat>
                <stat name="Ner">3</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="4" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
               

                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="4" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="4" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>         </unit>

          <unit id="ForgeFathers5" typeName="Grizzlers Section" cat="cat1" points="150" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (10)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">3+</stat>
                <stat name="Fire">16</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">10</stat>
                <stat name="Def">5+</stat>
                <stat name="Ner">5</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="8" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
               

                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="8" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="8" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>         </unit>

          <unit id="ForgeFathers6" typeName="ForgeGuard Team" cat="cat1" points="140" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (5)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">3+</stat>
                <stat name="Fire">8</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">5</stat>
                <stat name="Def">6+</stat>
                <stat name="Ner">3</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
                <unitAbility abilityID="CrushingStrenght6"/>
                <unitAbility abilityID="Lumbering"/>
             </unitAbilities>         </unit>

          <unit id="ForgeFathers7" typeName="ForgeGuard Section" cat="cat1" points="250" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (10)</stat>
                <stat name="Spd">4</stat>
                <stat name="Hit">3+</stat>
                <stat name="Fire">16</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">10</stat>
                <stat name="Def">6+</stat>
                <stat name="Ner">5</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
                <unitAbility abilityID="CrushingStrenght6"/>
                <unitAbility abilityID="Lumbering"/>
             </unitAbilities>         </unit>

          <unit id="ForgeFathers8" typeName="Hel Valkyr Team" cat="cat1" points="70" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (5)</stat>
                <stat name="Spd">10</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">8</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">5</stat>
                <stat name="Def">3+</stat>
                <stat name="Ner">4</stat>
             </stats>
 
             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
                <unitAbility abilityID="Fast"/>
             </unitAbilities>        </unit>

          <unit id="ForgeFathers9" typeName="Hel Valkyr Section" cat="cat1" points="130" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (10)</stat>
                <stat name="Spd">10</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">16</stat>
                <stat name="Ran">24</stat>
                <stat name="Att">10</stat>
                <stat name="Def">3+</stat>
                <stat name="Ner">6</stat>
             </stats>

             <equipmentSlots>
                <equipmentSlot name="BFGs">
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </equipmentSlot>
             </equipmentSlots>
             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip2" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
                <unitEquipmentItem id="equip3" equipmentSlot="BFGs">
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
             
             </unitEquipment>
               <unitAbilities>
                <unitAbility abilityID="piercing1"/>
                <unitAbility abilityID="Fast"/>
             </unitAbilities>        </unit>

          <unit id="ForgeFathers10" typeName="Scrappers Team" cat="cat1" points="50" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (5)</stat>
                <stat name="Spd">5</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">4</stat>
                <stat name="Ran">12</stat>
                <stat name="Att">10</stat>
                <stat name="Def">3+</stat>
                <stat name="Ner">4</stat>
             </stats>

             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="1" />
                   </maxLimit>
                </unitEquipmentItem>
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>         </unit>

          <unit id="ForgeFathers11" typeName="Scrappers Section" cat="cat1" points="90" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (10)</stat>
                <stat name="Spd">5</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">8</stat>
                <stat name="Ran">12</stat>
                <stat name="Att">20</stat>
                <stat name="Def">3+</stat>
                <stat name="Ner">6</stat>
             </stats>

             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="2" />
                   </maxLimit>
                </unitEquipmentItem>
             </unitEquipment>
              <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>         </unit>


          <unit id="ForgeFathers12" typeName="Scrappers Platoon" cat="cat1" points="170" maxNum="1" maxSize="1">
             <stats>
                <stat name="Type">Inf (20)</stat>
                <stat name="Spd">5</stat>
                <stat name="Hit">4+</stat>
                <stat name="Fire">16</stat>
                <stat name="Ran">12</stat>
                <stat name="Att">40</stat>
                <stat name="Def">3+</stat>
                <stat name="Ner">10</stat>
             </stats>

             <unitEquipment>
                <unitEquipmentItem id="equip1" required="false" >
                   <minLimit>
                      <core:absoluteLimit limit="0" />
                   </minLimit>
                   <maxLimit>
                      <core:absoluteLimit limit="3" />
                   </maxLimit>
                </unitEquipmentItem>
             </unitEquipment>
               <unitAbilities>
                <unitAbility abilityID="piercing1"/>
             </unitAbilities>        </unit>



         
       </units>
       <equipment>
          <equipmentItem id="equip1" name="Heat Hammer" cost="30" />
          <equipmentItem id="equip2" name="BFG Hailstorm Autocannon" cost="30" />
          <equipmentItem id="equip3" name="BFG Heat Cannon" cost="30" />
          <equipmentItem id="equip4" name="Dragon Breath" cost="30" />
       </equipment>
       <abilities>
          <ability id="piercing1" name="Piercing(1)"><description>The unit is equipped with Piercing (1) weapons.</description>
          </ability>
          <ability id="CrushingStrenght6" name="Crushing Strenght (6)"><description> The unit is equipped with Crushing Strength (6)</description>
          </ability>
          <ability id="Lumbering" name="Lumbering"><description> The unit is has Lumbering</description>
          </ability>
          <ability id="Fast" name="Fast"><description>The unit has Fast special rule</description>
          </ability>

       </abilities>
    </race>


Using the above code for the race file I can create rosters and save army files.

Running the program generates the following loading failures in the log file which are epically unhelpful by referring to a completely different problem it seems. For me at least. IBBoard, any ideas?
INFO [16:11:37]: FrmMain.Main() - Line: 0 - Starting WarFoundry WinForms
DEBUG [16:11:38]: FrmMain.FrmMain_Load() - Line: 0 - Attempting to load current game system from properties
WARN [16:11:39]: FrmMain.FileLoadingFinished() - Line: 0 - Failed to load C:\Users\Henri\WarFoundry-WinForms\data\readme.txt: File not handled as a Race or Game System definition: C:\Users\Henri\WarFoundry-WinForms\data\readme.txt
WARN [16:11:39]: FrmMain.FileLoadingFinished() - Line: 0 - Failed to load C:\Users\Henri\WarFoundry-WinForms\data\Forgefathers.race: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 1, position 7.
INFO [16:11:39]: FrmMain.FrmMain_Load() - Line: 0 - Loaded game system wh from properties
WARN [16:11:30]: FrmMain.FileLoadingFinished() - Line: 0 - Failed to load C:\Users\Henri\WarFoundry-WinForms\data\readme.txt: File not handled as a Race or Game System definition: C:\Users\Henri\WarFoundry-WinForms\data\readme.txt
ERROR [16:11:52]: FrmMain.CreateNewArmy() - Line: 0 - Race file was invalid
IBBoard.IO.InvalidFileException: Attribute 'costMultiplier' of unit equipment item equip1 for Steel Warriors Team was not a valid decimal number ---> System.FormatException: Attribute 'costMultiplier' of unitEquipmentItem with ID equip1 was not a valid number
at IBBoard.Xml.XmlTools.GetDoubleValueFromAttribute(XmlElement elem, String attributeName)
at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.LoadEquipmentForUnitType(XmlElement elem, UnitType type)
--- End of inner exception stack trace ---
at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.LoadEquipmentForUnitType(XmlElement elem, UnitType type)
at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CreateUnitTypeFromElement(XmlElement elem, String id, Race parentRace)
at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlRaceFactory.CompleteLoading(Race race)
at IBBoard.WarFoundry.API.Factories.Xml.WarFoundryXmlFactory.CompleteLoadingRace(Race race)
at IBBoard.WarFoundry.API.Objects.WarFoundryStagedLoadingObject.EnsureFullyLoaded()
at IBBoard.WarFoundry.API.Objects.Race.get_Categories()
at IBBoard.WarFoundry.GUI.WinForms.FrmMain.SetNonNullArmyState(Army newArmy)
at IBBoard.WarFoundry.GUI.WinForms.FrmMain.SetArmy(Army newArmy)
at IBBoard.WarFoundry.GUI.WinForms.FrmMain.CreateNewArmy()

[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: Need Help with custom dataFiles

Postby IBBoard at 09 Nov 2011, 19:42

That error makes sense to me - kinda. You just need to know what you're looking for :) The important part is the ERROR line:
Code: Select all
 Race file was invalid
IBBoard.IO.InvalidFileException: Attribute 'costMultiplier' of unit equipment item equip1 for Steel Warriors Team was not a valid decimal number...

You've got the equipment ID (equip1) and unit type (Steel Warriors Team) in there, plus it tells you what it thinks wasn't right ("costMultiplier" wasn't a decimal number).

Looking at the data file, I can't quite tell why, though, as it doesn't seem to be mentioned and so should take on its default value. That's the bit that makes less sense. I'll investigate further.


[edit] Odd, I can't recreate that problem at the moment in the GTK ap on the DevMaster build on Linux. That section of the schema has been there since February 2010, though, so it should have caused a problem earlier. What does your schema/race.xsd file look like, Snowblizz?

[Edit2] Nope, I can't recreate it with the DevMaster version of the WinForms app on Windows XP either, even if I change my language to French (which should swap decimal points for commas in decimal numbers). Any further info would greatly help debugging.
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: Need Help with custom dataFiles

Postby snowblizz at 10 Nov 2011, 07:09

I used the code posted by cyberbooster "as is" pasted into a race/system file.

Interesting. The behaviour is different depending on what version you run. On my Vista laptop and Cry Havoc 0.1 I can try and create a army and then get a pop-up with the error message.
Attribute 'costMultiplier' of unit equipment item equip1 for Steel Warriors Team was not a valid decimal number

The reason it's confusing is that there is no "costMultiplier" used in the datafile, so how can it be wrong? :? At least for someone like me. First thing I did was search for the costMultiplier only to find there was none.

On my Vista desktop and I think Cry Havoc I don't get any pop-up but the same error AFAICT in the log.

Next