@Numetalfan whoa there cowboy! Hold your horses! I'm all for adding changes, even if its to the map. But lets take this on one item at a time. Your topic here is "new production unit - barracks", and you stated that your xml still does not work. Until you have a working barracks, you shouldn't be adding other items to the xml. Its nice to know that there is a list of items you might want to add or change, but each item should be discussed as a separate topic so that thing don't get to confusing as we go along. So back to the barracks.
You started with a working map, "World War II v3 1941", WW2v3-1941.xml and you created a whole new map "WW2v4-1941", WW2v4-1941.xml. Which you add a barracks.png to each nation, otherwise the two directories are still the same. So lets go from there with you new xml.
First off all references to Malta, Sicily or 66 Sea Zone need to be commented out or removed.
Once that is done, you need to go back over your unit attachments. You removed all the extra </attachments> that was good but you left:
<property name="Unit Placement Restrictions" value="true" editable="false">
<boolean/>
</property>
Under each unit, armour, fighter, bomber, transport, battleship, cruiser, destroyer, carrier, submarine and don't forget the aaGun.
Next lets talk about copying and pasting. You previous xml had:
<property name="Territory Turn Limit" value="false" editable="false">
<boolean/>
</property>
<property name="maxBarracksPerTerritory" value="1"/>
<property name="Placement Restricted By Barracks" value="true" editable="false">
<boolean/>
</property>
<property name="maxFactoriesPerTerritory" value="1"/>
<property name="Placement Restricted By Factory" value="true" editable="false">
<boolean/>
</property>
Your new xml looks like:
<property name="Territory Turn Limit" value="false" editable="false">
<boolean/>
<!-- <property name="maxBarracksPerTerritory" value="1"/> Remove -->
<!-- <property name="Placement Restricted By Barracks" value="true" editable="false"> Remove -->
<!-- <boolean/> Remove -->
<!-- </property> Remove -->
<property name="Unit Placement Restrictions" value="true" editable="false">
<boolean/>
</property>
<property name="maxFactoriesPerTerritory" value="1"/>
<property name="Placement Restricted By Factory" value="true" editable="false">
<boolean/>
</property>
What happened to the </property> tag under the "<property name="Territory Turn Limit" value="false" editable="false">" and "<boolean/>" lines? You highlighted and pasted over it. When you do that thing break. You have to be careful when you copy from the web and insert it into the xml. For now just add that tag back in, and lets see if we can get these barracks to work!!
Enjoy.
Cheers...
P.S. As to making changes to the map, you could start a new topic so that may be discussed. I would be happy to help you with that!