dempereztnick
New Member
Right now, I have many XML's describing all game objects, with its properties set. For example:\[code\]<gameObject id="commonEnemy"> ... <data> <life>100</life> <speed>12</speed> </data> <tags> <tag>KILLABLE</tag> <tag>COLLIDABLE</tag> </tags> ...</gameObject>\[/code\]All files have different "components" (like data and tags in the example above). There are nearly a thousands of these files, consuming much disk-space. But since some gameObject "share" some properties with others, I can make a default file and inherit other files from it, thus changing only what is needed. Something like:\[code\]<gameObject id="badassEnemy" import="commonEnemy"> ... <data> <life>200</life> <!-- I'm increasing the life --> </data> <tags> <tag>KILLABLE</tag> <!-- And is not more collidable. Totally weird XML syntax, but just to make a point --> remove <tag>COLLIDABLE</tag> </tags> ...</gameObject>\[/code\]But as far as I know, XML don't support by default inheritance, nor it is very friendly of merging nodes.What I need is some format which allows me to:
- Inherit from one object
- Add a simple type and array type
- Modify a simple type and array type
- Delete a simple type and array type