What tools, patterns, or best practices would you recommend to implement the quest mechanics given below listed requirements?
I am talking about software architecture (how generic should you be) and choices for object wiring, event subscription, and representation of conditions. Mentioning of tools / libraries you have successfully used are welcome. Edit: If you are using scripting, what setup do you recommend?
- simple 2D mmo(rpg)
- all the game data, including quests, is stored in a relational database
- any event in the game could trigger a new quest for players or advancement of existing quests
- a quest can have an arbitrary number of conditions that must be met before the quest is available to players
- a quest can consist of an arbitrary number of sub-quests / steps with arbitrary conditions
quests would range from simple:
talk to A - kill 5 B - talk to A - permanently increase health
to quite involved:
use item in area X - go to area Y - a bot will spawn - kill bot without taking more than 10% damage - bot drops item - pick up item - portal unlocks - deliver item to J behind the portal - receive gold and experience - allow to pass portal once more - lock portal for this player
level instances are a possibility (players can complete certain quests in teams or isolation which will spawn the level location just for those participants)
- Quests should preferably be manageable using a world editor without scripting or programming knowledge (Edit: not advocating against scripting in general though)
- I assume C++ as the language of implementation
I was thinking that if I could combine any chain of events and conditions we could model more complex and thus possibly more engaging quests. I experimented with rolling my own ECA (Events-Conditions-Actions) engine but that might be overkill. It has been particularly difficult to model generic conditions without using any sort of scripting.