Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [Eventing]Easy Character Creation, Using events, 4 variables and a little math
Rast
post Apr 4 2012, 01:15 AM
Post #1


Level 71
Group Icon

Group: +Gold Member
Posts: 3,282
Type: Musician
RM Skill: Advanced
Rev Points: 10




It's easier than you think. A lot easier. All you need is a single variable for each party member and a little bit of basic math, and as an added bonus this will work on just about any version of RPG Maker.


The Variables

First of, go into your variable menu and create one variable for each player. Name them whatever you like, but I suggest something simple and easy, like Hero1, Hero2, Hero3, etc. For this tutorial, we'll be using 4 members.

Setting up

If you haven't already, put your heroes into the default party. You can do it later if you have reason to, but this tutorial assumes they're already in your party, so you may need to omit certain commands(such as Enter Hero Name) until they've been added.

Next, you'll need to to a little math. How many races and classes do you have? Can the player choose the gender? For this example, I'll have 3 races(Human, Elf, Dwarf) with the ability to choose a gender. Here comes the fun part. Write down each race in one group, gender in another, and class in another group. You need to assign each option a numerical value, and here's the catch: You must be able to combine one option from every group and end up with a unique sum. No combination can have the same result as another combination. Because of this, I suggest avoiding 1, 2 or 3 as a value if you're doing more than two groups. After you write down said groups and values, write down each possible combination and the value that would result in it. For example...

QUOTE
Human: +1
Elf: +3
Dwarf: +7

Male: +4
Female: +5


Human Male = 5
Human Female = 6
Elf Male = 7
Elf Female = 8
Dwarf Male = 11
Dwarf Female = 12


Now you simply apply that in an event. Use a Show Choice dialogue. You can format it however you feel like, but I suggest something along the lines of this:
QUOTE
>Label 1
>Set Variable Character1 =0
>Show Choice: Human, Elf, Dwarf
>>Human
>>>Set Variable Character1 +1
>>Elf
>>>Set Variable Character1 +3
>>Dwarf
>>>Set Variable Character1 +7
>Message: Select Gender
>Show Choice: Male, Female
>>Male
>>>Set Variable Character1 +4
>>Female
>>>Set Variable Character1 +5
>>Cancel Case
>>Go to Label 1
>Enter Hero Name: 001:Character 1


Time for a little explanation. The label command is there as a simple way to loop the menu. If the user cancels at the gender select menu, we send them back to Label 1(the race select menu) and reset the character variable. As for the variables, we're effectively storing data about the character in a single variable. You can use this to include unique events depending on what race a character is. Checking if the variable Character1 is equal to 7 translates into checking if the first character is a Male Elf.

Anyways, you'll want to repeat that process for each character, with the proper variables. Then, you run one final set of commands. Remember that list you made of the exact values of each race/class/gender combo? You'll need it. You're going to check the value of each character's variable and do whatever it is you want. Anything from changing stats, class, etc to changing their walking/battle graphics.

There are, of course, a few flaws to this system. For one, it works best if you use the fewest amount of actors possible, and merely change stats/class/equipment/skills as needed. To this end, I suggest making a class for each race and class combination. Trust me on this. By doing this and simply assigning each character the correct class, you'll have fewer characters to worry about checking and save yourself a lot of eventing later.

For one thing, if you want the characters to have dialogue, you're probably going to use the \n command to show the name the player gave them. Problem is, if you make a character for each race you won't know which character will need to speak without first checking if they're in the party. The only guarantee is that \n[0] will still reference the party leader.

Additionally, if you have more than 4 races or classes you'll need multiple choice menus or a custom menu, making this system optimal for games with fewer character creation options.

In Conclusion

Using variables in this way will allow you to do some pretty neat things, like show an image of the selected character on the creation screen, and include unique dialogue based on the race/class of party members. It's perfectly possible to do this without the variables, and simple change per each decision. As I pointed out, though, that one little variable will tell all these potentially useful things about your character.


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 03:12 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker