The RPG Maker Resource Kit

RMRK RPG Maker Creation => General Tutorials and Eventing => RPG Maker General => Tutorials Database => Topic started by: Sirius on July 24, 2009, 07:20:58 AM

Title: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on July 24, 2009, 07:20:58 AM
This is (obviously) a tutorial on how to turn any household action into an experience gaining adventure![/poor cheesy opening] You'll need a firm grasp of how variables work, and a bit of patience if you're hoping to make your experience system fairly extensive. My example will be with fishing (markchapman's idea), but you can extend it across just about anything. Without further ado, here it is.

Creating Your Skill

The first thing you'll need to do is create a variable for every skill you want in your game (fishing, mining, woodcutting, think RuneScape, even make up your own. People watching, anyone?). Call them "Fishing Level" (Or whatever the skill is), and set them to 1. Now that each skill is set up, you're ready to start training! I'll start talking in fishing terms, but the concept holds firm for any and every skill.

Training Said Skill

Next up, make yourself a cute little map with some water (In my fishing case, I'm using an 8 second world map tileset for demonstration, but you might want to spend more time on yours). Now that you're done with that, it's time to create a new variable. In my case, I'm going to call it "Fishing Experience," and leave it at 0. Make an event in the water of you fishing that loosely resembles this:

Spoiler for:
(http://img33.imageshack.us/img33/5240/fishingtut1.jpg)

Make the experience value whatever you want (be sure it's constant with the variable, and also make sure it's set to 'add,' not 'set equal'), and add a fish if you find it necessary. Just like that, you have yourself a lovely experience variable working for you!

The Skill can Level Up Too! But how, is the question...

Hopefully, you now have a working fishing experience system. Maybe, though, you come across a fish in the water that you must be more skilled in order to catch! What do you do? Level up, of course! (That's what I do in real life. If ever I need something, I just level up a couple times. No big.)

Seeing that each fish gives me 4 experience, I'll have level 2 come at 16 exp. Now, set up a new event in a corner of your map, and make it a Parallel Process. The trigger should be set to if your Fishing Level is equal to 1 (So as to not confuse the system later). Put in a conditional branch seeing if Fishing Experience is Greater than or Equal to 16; below which you put your happy little "Congratulations! You are now level 2!" message, as well as a variable operation adding 1 to your 'Fishing Level' variable, as such:

Spoiler for:
(http://img9.imageshack.us/img9/8044/fishingtut2.jpg)

Bam. There's level two. Feel the power.

Great, I'm Level Two. Now What?

Now, you're gonna want to make a level 3, and a level 4, and so on. Create a new page on your Parallel Process, and add on to what you did on the previous page. Raise the condition variable up to 2, increase the experience condition, and change your congratulatory message to "Congrats! You're level 3! (Something to that effect)." It shouldn't look a little something like this; it should look EXACTLY like this (Well, only if you're following me to the letter):

Spoiler for:
(http://img33.imageshack.us/img33/580/fishingtut3.jpg)

Before you ask, yes, you have to do this for Every. Single. Level. You. Want. To. Have... For. Every. Skill. Hence why I said you need "a bit of patience" earlier. You'll also have to copy that Parallel Process into every map you're able to fish in.

Cool, That Works! But Now All I'm Left With is a Bunch of Stupid, Useless Numbers! You Little Piece Of-

Not so fast. That "Fishing Level" variable can work wonders for you. Like I was saying, maybe you come across a fish that you need to be a higher level to catch. Set up that event like the first one we've been using so much ("Make an event in the water of you fishing" <--- That one), but give it a good ol' level requirement of 3. The first page should loosely resemble this:

Spoiler for:
(http://img268.imageshack.us/img268/4234/fishingtut4.jpg)

And the second (your actual fishing event), should look like this:

Spoiler for:
(http://img193.imageshack.us/img193/1783/fishingtut6.jpg)

Voila, a level requirement!

Wow, You Did It Again! Now How Can I See What Level I Am?

There are a couple ways. For the master eventers, you can set up a custom menu displaying you prowess in all of your skills, but for the sake of demonstration, I'll use an RTP dude. We talked it out, and he agreed to stalk you and know exactly how much experience you have, and exactly what level you are at all times. His message in the event itself looks like this:

Spoiler for:
(http://img193.imageshack.us/img193/8750/fishingtut7.jpg)

When put into the game, though, it says

Spoiler for:
(http://img31.imageshack.us/img31/114/fishingtut5.jpg)

Magic! I know! Utilize those \v[XXXX] commands in whatever creative ways you can come up with.

Groovy! What Else Can I Do?

I guess this counts as the end of my tutorial (for now. I'll edit it if I-or someone else- deem something unworthy). Using another practical example, you could have a cooking skill build off of fishing. Say you have a couple fish in your inventory, and you're standing next to a campfire. Examine the campfire, and it gives you the option to cook some fish, giving you cooking experience (and possibly burning the fish, use the random number function for that). This tutorial is just a description of HOW to do it, now you have to be the creative one and use it however you want.

Spoiler for:
I hope I made sense. It's actually a cool idea, it just takes a lot of work to make it work. Oh well, now the word's out.
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Grafikal on July 24, 2009, 07:29:52 AM
great work sirius!
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: markchapman on July 24, 2009, 11:19:28 PM
wow.........know i feel kinda stupid... i wasa useing what you gave me yesterday an was way wrong.. but your light guided me in the right direction.. thanks...
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on July 24, 2009, 11:31:40 PM
That was a very poetic response, markchapman, and you're welcome.
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: markchapman on July 24, 2009, 11:45:39 PM
lol. can i ask another small favor? could i get that sprite you used for your fishing spot?
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on July 24, 2009, 11:58:53 PM
(http://img194.imageshack.us/img194/3183/keyswaterfall.png)

Source: FSM (http://www.tekepon.net/fsm/modules/refmap/index.php?mode=chara&cid=3#chara05_a (http://www.tekepon.net/fsm/modules/refmap/index.php?mode=chara&cid=3#chara05_a)

Right click -> Save image as (whatever you want to call it) -> Rpg Maker 2003 -> Import resources -> Charset -> This picture.

It's a really nice Refmap resource, complete with keys, books, waterfall, sparkles and, well what I use as fish. Make sure it's set to "Fixed Dir/Continuous" in the event.
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Kokowam on July 25, 2009, 03:53:02 AM
Unless you made it, please give credit. :P
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on July 25, 2009, 04:04:49 AM
Sorry, I just figured that saying "It's a really nice Refmap resource" was enough to imply that it wasn't mine. Fixed :)
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: markchapman on July 25, 2009, 09:52:58 PM
thanks. after i got the skills down pat, i found that i needed one more sprite. a smelting furnace....
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on July 25, 2009, 09:59:37 PM
Erm... That FSM site has a tileset that might help you.

I think it's the fourth one down. (http://www.tekepon.net/fsm/modules/refmap/index.php?mode=map&sort=released&cid=3#example) The site isn't in english, but there's clearly a button that says "download"  :lol:
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: markchapman on July 25, 2009, 10:35:31 PM
could you make me an awsome hero sprite, any genderm with a couple faces and a battle sprite? i want a custom sprite peice, ill make it full cred on you. this may not be the place for this but it will be ok..... i hope....
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on July 25, 2009, 10:47:43 PM
Sorry, I'm not a spriter. You can either post a request on the resources board, or you can try your luck with Charas. Charas would probably be better, though, most people don't make sprites for free.

Use their generators, they have charsets, facesets, and battle chars (although their selection in the latter is very lacking) (http://charas-project.net/resources.php?wa=0&lang=en&area=2&offset=0&howmany=10&fsearch=)
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: markchapman on July 25, 2009, 10:52:10 PM
  well....... lol.... your the nicest person i talked to yet.... not reall bout to ask anyone else... but thanks for all the help, ill try that link you gave me.
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Aqudalan on November 02, 2009, 11:09:16 PM
Is it possible to use a spell with a minimum level requirement?
Title: Re: Tutorial: Creating Custom Skills & Gaining Experience
Post by: Sirius on November 03, 2009, 01:53:59 AM
You can either have the skill set to be learned at a higher level (Hero tab, basic stuff), or if you're talking about a created "magic" skill, use a conditional branch. Go into your parallel process and say 'if [Magic Skill] is 5, Fireball is learned,' or something to that extent.

If that's not what you were talking about, just tell me and I can look further into it.