This is the first in a series of posts where I will be outlining the Broken Staff CRPG system and giving an introduction into how it works.
At the heart of the Broken Staff CRPG system are effects.
You can find the effect information in two files: Effects.xml and EffectTypes.xml.
Effect types are just a way of organizing effects into different groups.
EffectTypes.xml lists the 6 types of effects currently used by the system.
Here is an example of an effect type:
<Description>Character attribute based effects.</Description>
Let’s explore the three available fields:
- Id – This is the lower case id of the effect type. This value is referenced in the Effects.xml file. These must be unique.
- Name – This is the name of the effect type that is displayed to users through code.
- Description – This is a description of the effect type. It is mainly used for documentation purposes but you can display it to users through code if you need to.
Now that you have learned how effect types are setup we will discuss the actual effects.
Effects.xml lists the different effects that have been defined.
Here is an example of an effect:
<Name>Remove All Magic</Name>
<Description>Attempts to remove all the magic effects on the target.</Description>
Let’s explore some of the available fields:
- Id – This is the lower case id of the effect. This value is referenced in other data files and in code. These must be unique.
- Name – This is the name of the effect that is displayed to users through code.
- Description – This is a description of the effect. It is mainly used for documentation purposes but you can display it to users through code if you need to.
- Type – This is the effect type. It references an id in the EffectTypes.xml file.
- Attribute – This is an optional value. It references an id in the Attributes.xml file.
- Skill – This is an optional value. It references an id in the Skills.xml file.
Effects really are the building blocks of the system. Attributes, skills, items, characters all reference them. I have tried to add a large variety of effects but you may want to add custom ones that utilize your custom gameworld and aren’t included in our default setup.
Now you may have noticed that for being a building block the definition of an effect is very simple. This is because most of the functionality is currently planned on being handled in the code.
Which is a bad thing, but I do not yet have a way around that.
Has anyone seen a way to further define effects in data files that would integrate with lots of front end game systems?
Adding New Effects
If you wish to add new effects to your game you need to:
- Add a relevant entry in the Effects.xml file.
- Next you would include the effect in any of the files that make use of it such as in: attributes, skills, feats, races, classes, items, monsters etc
- Finally you would add code to your game system to handle the new effect.
An easy process. The only time consuming part will be adding new code to the game system if you’ve not done that much in the past.
If you interact with the Broken Staff CRPG system, you will be using effects.
Learn how to properly set them up and use them and you will have lots of control over how you modify and craft the system to suit your needs.
What do you think? Have we setup effects properly? Can you think of a better way to maximize system flexibility while keeping ease of use?
I’d love to hear from you.