If all you really need is a way of defining the components of a Monster then XML would work well both C# and java have a lightning fast implementation of it.
Your xml could be
<?xml version="1.0" encoding="UTF-8"?>
<mobs>
<mob>
<personality>Aggressive</personality>
<intelligence>20</intelligence>
</mob>
</mobs>
Then your Mob class could look like. (Java)
public class Mob {
private IPersonality personality;
private Integer intelligence
//** Getters & Setters **//
}
Where IPersonality is an interface.
You could then load your xml and parse each value through a factory.
for example Parse the Personality Value into the PersonalityFactory which is simply:
public IPersonality getPersonality(String personalityName) {
if(personalityName.equals("Aggressive")) {
return new AggressivePersonality();
}
else if(personalityName.equals("Aggressive""Passive")) {
return new AggressivePersonalityPassivePersonality();
}
else {
//Maybe allow for no personality (We all know monster like that ;) )
return null;
}
}
Then you could set up a mob like so
Mob mob = new Mob();
mob.setPersonality(getPersonality(xmlValue));
mobList.add(mob);
The Key is that you engine knows the format of the xml and has a factory for all it needs.
One advantage of xml is that you can define your own schema to ensure that the format is always correct see here.
Hope this helps