This project is read-only.

Adding Additional Maps (Levels)

Nov 12, 2011 at 10:34 PM

Hi there,

I am trying to add additional levels to the project so that my game has more than 5 maps.  To do this, I edited the maps.xml file by adding an additional item

<Map MapData="6.xml">


In addition to this, I also created an .xml file, which I saved in the same location as the original 5, and copied and pasted the template, with my intention  being to simply change variables (background, # of waves etc).  However, when I go to test the build, I get an error message saying

XML is not in the XNA intermediate format.  Missing XnaContent root element. 

I figured this was likely due to an issue my new files were creating with the contentpipeline, but when I look at the map c# files such as MapListImporter I don't see where I would make changes.  As mentioned earlier, I have no previous experience coding so I'm at a loss.  I tried searching on the web for a solution but wasn't able to find anything.  I'm just wondering how I change the files so that I can add additional maps that will compile and show up in the game.  Any help is greatly appreciated, thanks so much!


Nov 13, 2011 at 2:30 AM

Okay so I think I figured it out.  I changed my 6.xml file from compile to content and that seemed to make it work!

Nov 13, 2011 at 5:29 AM
The individual map files should not be included in the compiled project in visual studio.

They need to be edited externally or dragged into visual studio manually.

Setting the file to "none" is the best option.


From: camronnba
Sent: 13/11/2011 1:30 PM
To: Michael Quandt
Subject: Re: Adding Additional Maps (Levels) [scripttd:279228]

From: camronnba

Okay so I think I figured it out. I changed my 6.xml file from compile to content and that seemed to make it work!