AddThis Smart Layers

Get tutorials and game reviews by email

Name Email



 

Monday, 21 April 2014

RMXP Logo

Creating an RPG Maker XP attributes system


Attributes are becoming increasingly popular in RPG's, having been around for as long as the genre itself has existed. Here we'll show you how to create your own system with some creative ways to implement it...
Share this Tutorial →

Introduction:


Think back to some of the best RPG's ever created. Games such as The Elder Scrolls series and later Fallout games. These games all did one thing very well - they gave the player complete control of their experience. Instead of providing a linear plot and a wide array of characters, developers such as Bethesda merely created a rich and vibrant game world and then gave the player the tools to interact with that world in whatever way they saw fit. While there is an overarching plot line - this is entirely optional. 

There are typically 2 ways in which a player can personalise their character. In their appearance and their attributes. While appearance is almost always purely cosmetic and simply exists to add a level of customisation to the game, attributes serve a much more important purpose. When implemented correctly, attributes can drastically change the way a game is played.


Step 1 - Considerations:


Before setting up any attributes you should think carefully about two important things...

1. What attributes would be beneficial to your game?

The possibilities for attributes in your game are literally endless. You could set up literally dozens of different traits which can affect gameplay - however I'm generally inclined here to believe that less is more. The more attributes you create the more work it creates for you to implement them in a way that makes them worth existing in the first place. As well as this, you also risk burning out the player with a game that is too feature rich, creating a learning curve that is far too steep.

For this tutorial we are going to look at 3 attributes which made appearances in Fallout 3. Perception, Charisma and Luck. It's important for each of these attributes to serve a real purpose, to have some effect on the gameplay:

Perception: The character has better awareness of their surroundings, making them more likely to find rare items on the map.
Charisma: The character is charming and is much more persuasive, granting them preferable rates at shops and bars as well as being more likely to talk their way out of sticky situations.
Strength: The character is made of tougher stuff and is able to clear away obstructions on the map, leading to new hidden areas.

In this case - I've chosen 3 different traits which are typically contradictory to one another. In other words, most people will not be proficient in all 3. This adds an additional element to the gameplay - sacrifice. If you want your character to have higher Perception, making it easier to find rare items, then you may find that Charisma will drop (because the character is more interested in scanning the surroundings than keeping up meaningful conversations).

2. How will they manifest themselves?

Another important consideration to make is what place these attributes will have in your game. First of all comes development...how do you define and develop these attributes? This is something that I'll consider shortly during the creation of my system but it's important to make these considerations early on in your game development, allowing you to weave your attributes system into the fabric of your game.


Step 2 - Create your variables:


Creating your attributes using variables is incredibly simple. Just create an event anywhere in your game, set its trigger to 'Parallel Process' and select 'Control Variables'. Here you can create 3 brand new variables called Perception, Charisma and Strength.

Right now, these attributes are simply numbers stored in your game. Currently they are all set to 0. I like to think of 0 is a good neutral number in development because you have both positive and negative numbers available to you.

You can obviously create as many attributes as you want - theoretically as many attributes as their are variables (5000).




Step 3 - Implement!:


Once you've created your attributes, it's time to figure out how they'll work. This I'll leave up to you and instead show you how to create events that will change attributes and then conditional branched based on the values of those attributes.

Setting your attributes:

Once again, you'll be using the 'Control Switches' menu to define the values in your attributes (assuming you're not leaving them at a neutral 0). To set your attribute, simply care another parallel process event and open the 'Control Switches' menu. 

Let's say we wanted to increase the Perception attribute to 10. We would do this by selecting the 'Perception' variable. We would then set the Add operation and set the operand to a constant of 10. In other words, you're telling the game to add 10 to the variable 'Perception'. There are many different things that you can do with variables, most of which will be covered in a future tutorial.

You can use this menu to modify your attributes whenever you see fit. 

Your attributes at work:

The final step in your attributes system is to give them a purpose. I'm going to put together a theoretical example that uses each of my 3 different attributes.
1. An item that is only visible when the player's Perception is higher than a certain value.
2. A guard that will not allow you through the door unless your Charisma is higher than a certain value.
3. A stone that will not move unless your Strength is higher than a certain value.

Example 1:
In this example we've created a simple event with a basic Necklace Sprite. Here we're going to be relying on event conditions to work with our attributes system. As you can see - the conditions of this event's existence is based on your 'Perception' variable. The event will only be visible, and the necklace available if the character's Perception attribute is 10 or more.

You could also create multiple event pages based on different thresholds. In other words, the higher the 'Perception' value, the rarer the item that can be picked up.



Example 2:
To put our Charisma attribute into practice we're going to set up a guard that might have a soft spot for our charismatic hero. This takes a little bit more work than example 1 but can yield some humorous results if done properly.

The set of the event is very simple and I've just used an armoured character sprite. Nothing else is required. The event commands are as follows. I've started off by letting the player know the Guard has no intention of letting him through and giving them a choice of response (reminiscent of Bioware titles like Mass Effect and Dragon Age). These choices are to:

1. Accept his response and move away
2. Try your luck (will require Charisma)
3. Engage in battle with the guard

If the player chooses outcome 1 then the conversation ends and will cycle through the same way if the player approaches the guard.

If the player chooses outcome 2 then a conditional branch is activated. The condition is that the variable 'Charisma' is Greater than or equal to 10

If this condition is met than the guard allows the player through, commenting that 'you seem pretty important'. Otherwise (your charisma score is below 10) then the guard accuses you of being smart and does not allow you through.

Finally, if the player chooses outcome 3, then a battle commences with the guard. 

You could simply create a conditional branch instead of these choices but I feel that giving the player these choices allows their play style to affect the way the game plays out for them, adding a level of uniqueness that would otherwise be hard to come by.

Example 3:
Last but not least, we'll create a stone that can only be moved by players with a Strength rating of 10 or more. This once again uses a simple conditional branch.

In this example our conditional branch simply checks to ensure that the variable 'Strength' is equal to or higher than 10.

If this is the case then the event will move two spaces to the left, out of the way of the player allowing them to pass without hindrance.

If the character's Strength attribute is anything below 10 then a text prompt informing them that 'The boulder is too heavy to move - I need to improve my strength first!'.



To Conclude...


Attributes can be your hidden best friend in RPG development and can help you create a game that is truly unique for each player. It is important to remember that you need to be organised when implementing an attributes system, considering what level the attribute is likely to be at during certain stages of the game. This will prevent your game from either being too easy (because the attribute requirement is always far too low) or pretty much impossible (because the attribute requirement is far too high).

No comments:

Post a Comment

 
© (2014) RPG Maker Guru - any reproduced content is done so in line with fair use policies