CRPG Characters

Last modified date

Now that v0.4 of the Broken Staff CRPG has been released I will discuss the various new files in the system and how they work starting with one of the most important elements.

CRPG Characters

Characters are covered later on because they build off of and use many previously discussed elements: race, class, attributes, skills, feats, items, spells and effects.

CRPG Characters

You can find the available/saved character information in one file: Characters.xml. There is also a Parties.xml file that stores groups of characters and saved games which will contain character information.

These two files form the core of the Broken Staff character system.

Designing a Character System in RPGs

Characters from a data perspective are a bunch of different fields and values. In the example below you will see that they directly utilize most parts of our game system.

One of the main design goals for the BSCRPG was flexibility since as an open source project I wanted other people to make use of it and be able to modify the system to suit their needs. That is why pretty much everything builds off of effects.

You can imagine the hierarchy going like this:

  • Effects – the primary building block
  • Attributes, Feats, Skills – second level elements
  • Race, Class, Items, Spells – third level elements
  • Characters – fourth level elements

Without Effects you cannot have anything else in the system. Without Attributes, Feats and Skills you cannot have Races, Classes, Items and Spells. Finally Characters rely on all previously defined parts of the system.

As we looked at each of the previous elements I talked about how they could be extended and modified. That also holds for the character system. For most changes you would change a lower level element first and then implement those changes with characters as well. But you could also find creative ways to add new elements to the character system to suit your specific needs.

Let’s dive into a simple character example that will hopefully illustrate these concepts better.

Characters.xml

THe sample character we are going to use is Dugan Stiffbeard, a level 1 Dwarf Fighter – your classic Dwarf tank character.

Here is what the data in the XML file looks like:


<Character>
   <Id>char1</Id>
   <Name>Dugan Stiffbeard</Name>
   <Description>
      Physical character description.
   </Description>
   <Background>
      Character history and background. For flavour.
   </Background>
   <Age>34</Age>
   <Race>dwarf</Race>
   <Attributes>
      <Attribute>
         <Id>sex</Id>
         <Value>male</Value>
      </Attribute>
      <Attribute>
         <Id>strength</Id>
         <Value>8</Value>
      </Attribute>
      <Attribute>
         <Id>vitality</Id>
         <Value>10</Value>
      </Attribute>
      <Attribute>
         <Id>dexterity</Id>
         <Value>8</Value>
      </Attribute>
      <Attribute>
         <Id>speed</Id>
         <Value>8</Value>
      </Attribute>
      <Attribute>
         <Id>intelligence</Id>
         <Value>8</Value>
      </Attribute>
      <Attribute>
         <Id>wisdom</Id>
         <Value>8</Value>
      </Attribute>
      <Attribute>
         <Id>charisma</Id>
         <Value>6</Value>
      </Attribute>
      <Attribute>
         <Id>virtue</Id>
         <Value>5</Value>
      </Attribute>
      <Attribute>
         <Id>luck</Id>
         <Value>1</Value>
      </Attribute>
      <Attribute>
         <Id>currenthp</Id>
         <Value>10</Value>
      </Attribute>
      <Attribute>
         <Id>currentsp</Id>
         <Value>10</Value>
      </Attribute>
      <Attribute>
         <Id>currentmp</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>maximumhp</Id>
         <Value>10</Value>
      </Attribute>
      <Attribute>
         <Id>maximumsp</Id>
         <Value>10</Value>
      </Attribute>
      <Attribute>
         <Id>maximummp</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>hpregen</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>spregen</Id>
         <Value>0.1</Value>
      </Attribute>
      <Attribute>
         <Id>mpregen</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>armorclass</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>initiative</Id>
         <Value>1</Value>
      </Attribute>
      <Attribute>
         <Id>attackbonus</Id>
         <Value>1</Value>
      </Attribute>
      <Attribute>
         <Id>experience</Id>
         <Value>1</Value>
      </Attribute>
      <Attribute>
         <Id>fortitude</Id>
         <Value>2</Value>
      </Attribute>
      <Attribute>
         <Id>reflexes</Id>
         <Value>1</Value>
      </Attribute>
      <Attribute>
         <Id>willpower</Id>
         <Value>1</Value>
      </Attribute>
      <Attribute>
         <Id>slashing</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>blunt</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>piercing</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>energy</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>fire</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>nuclear</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>water</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>ice</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>acid</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>lightning</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>holy</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>unholy</Id>
         <Value>0</Value>
      </Attribute>
      <Attribute>
         <Id>poison</Id>
         <Value>0</Value>
      </Attribute>
   </Attributes>
   <Classes>
      <Class>
         <Id>fighter</Id>
         <Level>1</Level>
         <IsCurrent>Yes</IsCurrent>
      </Class>
   </Classes>
   <Skills>
      <Skill>
         <Id>swords</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>daggers</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>axes</Id>
         <Value>10</Value>
      </Skill>
      <Skill>
         <Id>polearms</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>blunt</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>bows</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>crossbows</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>thrown</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>shield</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>martialarts</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>running</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>climbing</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>swimming</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>jump</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>ambidexterity</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>dodge</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>deflect</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>disabletrap</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>picklock</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>sneak</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>scouting</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>pickpocket</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>deathstrike</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>history</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>mythology</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>artifacts</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>diplomacy</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>bartering</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>alchemy</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>enchanting</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>smithing</Id>
         <Value>5</Value>
      </Skill>
      <Skill>
         <Id>arcane</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>holy</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>nature</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>mind</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>fire</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>water</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>earth</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>air</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>mental</Id>
         <Value>0</Value>
      </Skill>
      <Skill>
         <Id>divine</Id>
         <Value>0</Value>
      </Skill>
   </Skills>
   <Feats>
      <Feat>
         <Id>dwarvenresistances</Id>
      </Feat>
      <Feat>
         <Id>dwarvenproficiencies</Id>
      </Feat>
      <Feat>
         <Id>dwarvenskills</Id>
      </Feat>
      <Feat>
         <Id>iswarrior</Id>
      </Feat>
      <Feat>
         <Id>fighterbonusfeat</Id>
      </Feat>
      <Feat>
         <Id>equipbasicweapons</Id>
      </Feat>
      <Feat>
         <Id>equipwarriorweapons</Id>
      </Feat>
      <Feat>
         <Id>equipshields</Id>
      </Feat>
      <Feat>
         <Id>equiplightarmor</Id>
      </Feat>
      <Feat>
         <Id>equipmediumarmor</Id>
      </Feat>
      <Feat>
         <Id>equipheavyarmor</Id>
      </Feat>
      <Feat>
         <Id>powerattack</Id>
      </Feat>
      <Feat>
         <Id>personalitydependable</Id>
      </Feat>
   </Feats>
   <Spells />
   <Equipment>
      <Item>
         <Id>handaxe</Id>
         <Slot>righthand</Slot>
         <Quantity>1</Quantity>
      </Item>
      <Item>
         <Id>buckler</Id>
         <Slot>lefthand</Slot>
         <Quantity>1</Quantity>
      </Item>
      <Item>
         <Id>clothing</Id>
         <Slot>body</Slot>
         <Quantity>1</Quantity>
      </Item>
      <Item>
         <Id>sandals</Id>
         <Slot>feet</Slot>
         <Quantity>1</Quantity>
      </Item>
   </Equipment>
   <Inventory>
      <Item>
         <Id>potionofminorhealing</Id>
         <Quantity>1</Quantity>
      </Item>
   </Inventory>
   <Effects>
      <!-- These are for non-permanent effects the character has. -->
      <Effect>
         <Id>temporaryhp</Id>
         <TimeLeft>3</TimeLeft>
         <Value>1</Value>
      </Effect>
   </Effects>
</Character>

Let’s explore the available fields:

  • Id – This is the lower case id of the character. These must be unique.
  • Name – This is the name of the character. Unlike the id, this is what shows up in the user interface.
  • Description – This is a physical description of the character. There would also likely be portrait and model fields in an actual game but we haven’t reached that stage yet.
  • Race – This is the race of the character. This controls some feats and equipment they will have access to.
  • Age – This is the character’s age. It is not currently used by the system and is only included for roleplaying purposes.
  • Attributes – These are the character’s attributes.
  • Skills – These are the skills the character has.
  • Feats – These are the special abilities the character knows.
  • Spells – These are the spells the character knows. In this example Dugan does not know any spells.
  • Equipment – These are the items the character has equipped.
  • Inventory – These are items the character has that are not equipped.
  • Effects – These are any effects such as spells the character is under. There is just a filler effect in this character.

Adding New Characters

If you wish to add new characters to a game you would probably do so during character creation. But if you want to do so via the XML file you need to:

  1. Add a relevant entry in the Characters.xml file.
  2. Next you would include the effect in any of the files that make use of it such as in: parties, save games etc

So it would be an easy two-step process.

The first step is time consuming though, especially if you do so via code. I would recommend copying and pasting an existing character and then making modifications.

Wrapping Up

This was a long post but the complexity of characters compared to previous systems required it.

If for some reason this explanation of how the character system works confused you or you have any questions please let me know. I would be happy to clarify for you.

Greg Caughill

Greg Caughill is the owner and creative director of Broken Staff Studios.

Share