CRPG Encounters

CRPG Encounters

To finish up our v0.4 series of tutorials we will be looking at encounters.

CRPG Encounters

Encounters are bascially groups of monsters that your characters can fight. The default example that comes with the system is very basic, but you should be able to extend it without too much trouble.

Encounters.xml

Here’s a sample encounter:


<Encounter>
   <Id>arenalvl1d</Id>
   <Name>Arena - Level 1 Humanoid Fight</Name>
   <Description>This is a fight for level one characters in the arena.</Description>
   <Group>arena</Group>
   <OnceOnly>No</OnceOnly>
   <EncounterType>combat</EncounterType>
   <PartyLevel>1</PartyLevel>
   <Monsters>
      <Monster>
         <Id>thug</Id>
         <MinValue>1</MinValue>
         <MaxValue>2</MaxValue>
      <Monster>
      <Monster>
         <Id>fighter</Id>
         <MinValue>0</MinValue>
         <MaxValue>2</MaxValue>
      <Monster>
      <Monster>
         <Id>apprenticemage</Id>
         <MinValue>0</MinValue>
         <MaxValue>1</MaxValue>
      <Monster>
      <Monster>
         <Id>gaian</Id>
         <MinValue>0</MinValue>
         <MaxValue>1</MaxValue>
      <Monster>
   </Monsters>
   <Treasures>
      <Item>
         <Id>goldpiece</Id>
         <MinValue>1</MinValue>
         <MaxValue>6</MaxValue>

      </Item>
   </Treasures>
</Encounter>

The encounter has the standard id, name and description fields.

There are also a number of custom fields:

  • Group: What is the encounter group? For the default system that would be arena, but you would put your own values here
  • OnceOnly: Does the encounter only run once? Yes or no
  • EncounterType: The type of encounter. ‘combat’ is the default value
  • PartyLevel: The party level the encounter happens at
  • Monsters: A list of monsters each with an id that corresponds to a Monsters.xml entry and min/max numbers
  • Treasures: A list of items each with an id that corresponds to an Items.xml entry and min/max values

Adding New Encounters

To do so you need to:

  • Add a relevant entry for any new monsters to the Monsters.xml file. This includes defining the id, name, description and fields unique to the new monster
  • Then add the encounter including monsters and treasure to the Encounters.xml file

We’ve now covered all the areas in v0.4 from a data perspective. After a short detour for a few blog posts we will be coming back to the system and review the same elements from a code perspective.

Greg Caughill

Greg Caughill

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