Monday, April 11, 2016

Documentation: Quest System (schema)

Should You Choose to Accept...

I've been working on creating the db schema for the quest system which ended up leading me to redo how I'm doing the item system, but I feel it was well worth it. The item system is now much more robust and can handle many more scenarios. All items will now be stored in an object system which can be joined to other systems more effectively. The object system now will hold all objects within the game and detail their data out into multiple rows in an object data table. This allows weapons, armor, consumables, resources, building, and cities to all live together within the same system.

This is important since the quest system needs to be able to interact with all types of objects, such as: visit a building, trade a resource, kill a mob, receive a weapon as a reward, etc.


The quest system break each quest down into a set of steps where the starting quests links to the first step, and each step then links to the next.

Each step consists of a goal (visit, trade, craft), an object (city hall, lumber, short bow), and a quantity. This allows for a quest to be very simple or very complex if desired.

The quest reward then links to the quest, and consists of an object and a quantity. Multiple entries can exist allowing for multiple rewards to be given for completing a single quest.

I'm pretty happy with this system, and will figure out how well it work over the next couple of weeks as I start building out the client side to consume this data.