The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: nabbig2 on March 31, 2007, 01:15:19 AM

Title: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 01:15:19 AM
How can I make it so that an NPC will give a character and item BUT only if the character is a certain level? If not, can I set the requirement level for a weapon? (claw, for instance)
Title: Re: Help with NPC and item.
Post by: :) on March 31, 2007, 01:43:25 AM
hmm...maybe you can make the character learn a skill on that level he needs to get the item. then use a simple conditional branch set for actor-Skill___< what he learns.
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 01:44:57 AM
If not, just do this:

Control Variables: [Character Level] = Arshes' level  
Conditional Branch: Variable [Character Level] >= 12
    Change Items: Iron Sword + 1
Branch END

Coloured stuff is what you edit.
Red = Actor Name, Blue = Level you need to wield the item, Green = item in question

That would do it.
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 01:45:52 AM
I don't get quite what you mean...how can a skill affect equiping weapons?

And about the code part algebra, where do I put in the code if I want to use it?
Title: Re: Help with NPC and item.
Post by: :) on March 31, 2007, 01:47:20 AM
you dont put the code with copy and paste, open the event and do as he did.


also algebra...I never knew varibles can be set to character's level...My second thing learned from you. =D
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 01:52:13 AM
How do I get to control variables? I can't find anything like that in the event screen...
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 01:52:50 AM
It's just eventing, so you would put it in at the place where the NPC would give you the item if you were the correct level. It's not like a script or anything.


And you should be posting in Tutorials for problems like this:

Read the sticky for what should be posted here.

http://rmrk.net/index.php/topic,12506.0.html (http://rmrk.net/index.php/topic,12506.0.html)

And an event is what your NPC is. That big screen with a graphic in the bottom left - There is a huge white window to the left. You right click that and a menu pops up which shows a list of possible event commands. The code I posted uses three event commands: Change Items, Control Variable, and Conditional Branch. You create an event by right-clicking on any square on the map. I hate to toot my own horn, but I made a tutorial (incomplete) on event commands which I hope will help you with some of the basics. Zxmelee also made an events tutorial which it might be helpful to check out.

Zxmelee:
http://rmrk.net/index.php/topic,157.0.html (http://rmrk.net/index.php/topic,157.0.html)
Mine:
http://rmrk.net/index.php/topic,14229.0.html (http://rmrk.net/index.php/topic,14229.0.html)


@Nouman: that's actually a compliment - it's hard to come across anything you don't know about RMXP  ;8
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 01:59:10 AM
Wait-so I click on the event of the NPC giving the item, and there is a "Control Variables" event in there?
Title: Re: Help with NPC and item.
Post by: :) on March 31, 2007, 02:01:19 AM
yes under control switches.
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:03:06 AM
Under the Event Commands, right? I can't find it...
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:05:29 AM
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg206.imageshack.us%2Fimg206%2F3572%2Feventcontrolvarqx0.png&hash=ca3e57abd04bc76d2e857a9a9fe0d88ef81654f8)
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:08:24 AM
Oh dam. So sorry I forgot to tell, I am using version 2000. Thanks for the picture though it helps.
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:11:30 AM
In 2k it is called Change Variable:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg249.imageshack.us%2Fimg249%2F4336%2Feventcontrolvarcn7.png&hash=50aed6d2f7ff7461aa256a411ba2ce0873ef1f4f)

I should've known you were using 2k - The Enemy Encounter post was by you too. Silly me. ;D
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:14:24 AM
Oh thanks. So the screen pops up, but I'm not sure what to click from there.

(BTW thanks for sticking with me, I know I'm a noob  :)
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:18:16 AM
Those are the options you have. Click on the three dots next to One to name your variables. Click on the down arrows to change hero



(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg206.imageshack.us%2Fimg206%2F7159%2Feventcontrolvarzm6.png&hash=ef254548ce654133cf475df9b904fc4ac207551e)

Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:21:25 AM
Which down arrows?
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:22:11 AM
The one next to the white bar which has Alex in it
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:23:34 AM
oooh, sorry, I didn't see that.  So which part should I change to level 10 (the required level I want the hero to be)?
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:29:50 AM
that is not in the control variables part. You are done with the Control Variables part now.

For the level thing, you have to go to Fork Conditions, which is an event command in the third tab, second column, 5th row. In that screen, you have to click on variable, set it to the variable you made. Then change the word from same to above, then change the number 0 to the level you want the hero to be
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:35:08 AM
hmmm, okay, I did that, but the NPC still gives it to me if I am level 1
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:36:57 AM
You have to put the Change Items command inside the Fork Conditions. So ABOVE the ELSE and BELOW the FORK
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:47:23 AM
Ugh, is this what I'm supposed to be doing?: (http://picture1.png)
Title: Re: Help with NPC and item.
Post by: nabbig2 on March 31, 2007, 02:51:37 AM
Forget that post...I think I'm missing on something, this is insanely annoying......
Is there another way to make my level requirement 10 to wear the claw?
Title: Re: Help with NPC and item.
Post by: modern algebra on March 31, 2007, 02:59:36 AM
To first post:
that is... not a picture. This is what it should look like:


(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg132.imageshack.us%2Fimg132%2F7105%2Fencounter2000nt9.png&hash=a45e4a6c380c3a41c1864630135b2314613b309c)

Anyway, I have to go now, I'll chack back when I can for a reply, but hopefully you can figure it out from here. My advice is to upgrade to Xp or at least 2k3. There are lots of useful tuts that will help you figure rpg maker out for both of those makers. For 2000, there is really nothing. What we just did is a 3 second process if you know events.

To second post:
Nothing that I could explain before I leave. You would, firstly have to use the same structure. The variable and the conditional branch (just the con. branch would be set to below this time). You would have to put them in a common event set on paralell process, and you would need an additional conditional branch wwhich checked if he was wearing the armor and then a de-equip if he is.