# User extendable content with Contentmanager

I developed a towerdefense game that uses xml-Files for almost everything, (creeps, levels, towers, upgrades). Those Xml-files define properties like textures, sounds and values like hitpoints.

My goal is to give the user the power to add and modify those things, which will be some kind of editor in the future probably. For now it shall be notepad...

So this makes using the ContentManager impossible i guess, since it needs to compile the data into those xnb Files.

I dont have a problem to use XmlSerializer, but how does it work for textures or sounds? Do i need to write my own code for loading the texture into vram etc?

Do i need to reinvent the wheel here and write my own ContentManger or can I make use of an existing feature?

I found a few "similiar" questions but none really gave me an answer.

• You can read .xml using C# libraries. .png doesn't require compilation to .xnb even though it makes it a bit faster because .xnb is non-compressed format, but .mp3 does require compilation to .xnb. From Monogame MGCB github you can find the source code for the .xnb compiler tool. When I used monogame it had full dependency from XNA pipeline, but I don't know if they changed that. Here it says Removed old XNA content pipeline extensions., but i'm not sure what that means. – dimitris93 May 8 '15 at 14:05
• So your answer is reinvent the wheel ? – CSharpie May 9 '15 at 10:50
• I wouldn't call it re-invent anything, you are just stuck with the .xnb requirement of Monogame. Its same with every other engine. The code for converting to .xnb is there, you just need to search Monogame MGCB github I linked you, and also see which .dll dependencies this code has, add that .dll to your content folder and add it as Reference in visual studio, so that when you publish your game, people won't have to download something extra, since the .dll will be inside your content folder. – dimitris93 May 9 '15 at 15:19

using(var stream = TitleContainer.OpenStream("your-file.png"))