Attributes (Savage)

From HLKitWiki
Revision as of 03:22, 17 December 2008 by Rob (Talk | contribs)

Jump to: navigation, search

Context: HL KitAuthoring Examples … Savage Worlds Walk-Through 

Overview

Every game system has a core set of attributes, although they are sometimes referred to using a different term (e.g. stats, characteristics, etc.). These attributes are the cornerstone of the game system and everything builds upon them, so they are the natural next step.

How to Handle Attributes?

Looking at how Savage Worlds works, there are five core attributes to the game, and we've already made a number of changes that apply to traits in general. But is there anything else of interest the needs to be handled specifically for attributes? Nothing else is apparent, so we don't need to make any changes to the "Attribute" component at this point.

Add Attributes for Game System

Once we're confident that we have all the necessary mechanics in place for managing attributes properly, we need to define them. Open up the file "thing_attributes.dat" and we'll start adding each new attribute. [Note: For the moment, do not delete the sample attribute.]

Since all of the mechanics for handling attributes is orchestrated by the underlying components, the definition of each attribute is incredibly simple. You can copy the sample attribute provided and adapt it appropriately for each attribute of the game system. Be sure to assign a suitable "explicit" tag to each attribute, with the value corresponding to the order in which the attributes are to be shown to the user. The "Agility" attribute is shown as an example below.

<thing
  id="attrAgi"
  name="Agility"
  compset="Attribute"
  isunique="yes"
  description="Agility is your hero's nimbleness, quickness, and dexterity.">
  <tag group="explicit" tag="1"/>
  </thing> 

Once you've added all the new attributes, reload the data files and verify that they all show up properly.

Delete Sample Attribute

Now that our attributes appear to be working properly, we can delete the sample attribute. Unfortunately, this will cause our data files to cease compiling successfully. The reason is that the sample attribute is actually referenced in places within the Skeleton data files (and now our game system). So we need to locate those places and correct them.

The only place of importance where the sample attribute is referenced happens to be as the linked attribute for the skills given in "thing_skills.dat". Open this file and locate references to "attrSam" - there should be three of them. We're going to be re-working skills in a moment, so we simply need a temporary fix to make the compiler happy. Change each of the skills to reference a different attribute instead, such as "attrAgi".

At this point, you should be able to compile and reload the data files. The five attributes for Savage Worlds are now in place and behaving as they should.