In the switch to making items load from XML, most properties of most items were easy to deal with, as they consist of strings, ints, and bools.
One of the outlying cases was speed multiplier of armor, which was a float. I had to change the XML slightly in some cases, because the values would parse as either int or float, and I wanted floats. So I changed a few 1s to 1.0s.
The last remaining “strange” one was the inventory list for shops. I wound up having to specify the type within the xml, and using reflection to find a static method that I could call in order to load them properly. This solution works nicely, and gives me the ability to deal with some more of these “1-off” properties in the future.
It also scratches at the door of making the game extensible, meaning that with a little more work (and by a little more work, I mean a lot more work), a person who is modding the game would be able to supply their own assembly to add behavior to the game, all without me having to hand out my source code (even though half an hour with ildasm will tell you everything you want to know).
In other development news, I’ve been considering rather heavily the feature creep issue and HamQuest as a game. There are a number of new features that I will be adding for certain(some new items, changing how the player interacts with shops, continued refactor for loading from xml), and those that I definitely won’t be adding(an XNA client, a Silverlight client – these will be separate projects)
Still other features I’m on the fence about. There are four of these:
- The Dragon’s Fire Breath: I’m leaning towards cutting this, as it would be the only ranged weapon in the entire games, and the dragon is pretty much too hard to kill already.
- The Amulet: The amulet, if I include it, would repel undead. I was thinking of putting it in as a response to the ghoul and the necromancer. However, considering that half of the creatures in the game are undead, does this item give the player too much of an advantage?
- The Escape Portal: This would be a portal that the player can carry with him and use when he wants to escape to a random other room. Most of the functionality is already in the game. My main issue with it is that it would require a new control for the player in order to use it.
- Monster summoning portals: This would be a portal that, when the player walks onto it, will grab some other creature in some room and bring it into the player current room. It would look just like any normal portal. There are also ideas for a portal monster that teleports you when it hits.
So, in any case, we’ll see how it all goes.