Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New forum theme up and running!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Problems with creating missions and changing events - any help is appreciated
« previous
next »
Print
Pages: [
1
]
Author
Topic: Problems with creating missions and changing events - any help is appreciated (Read 2722 times)
Bribba
Initiate
Posts: 1
Problems with creating missions and changing events - any help is appreciated
«
on:
August 26, 2009, 10:23:26 AM »
Hi, i have been searching the forums for help with this issue but have been unable to find the answer, so sorry if this has been answered already somewhere.
My question is that i am trying to create quests and events that change after a certain criteria is met, i.e-if a potion is in you party and the person wanted a potion, or you have klled the required number of monsters.
I can make events however they just seem to loop where as if i have a conversation with someone, i would like to change the way they spoke a second time as there is a player familiarity to it already.
Any assistance would be appreciated
Logged
MissingName
Here you go. Juicy Fruit. Happy?
Exemplar
Posts: 1,919
The scotch is well hidden. So scram.
Re: Problems with creating missions and changing events - any help is appreciated
«
Reply #1 on:
August 26, 2009, 02:45:07 PM »
Ahhh, I remember when I first started I had no clue how to do these either. And yes, there are already tutorials like this out there. But nevermind that.
You need to work with switches.
Here's a simple version of what you need to do:
First of all, make your event and give it three pages. The "New Page" button is at the top of the action editor.
First page: This is the simplest page and only requires you to use message boxes. You probably already know how to use those.
Just have the kid say he wants a potion.
Second page: This is where it gets a bit trickier. Before anything else on this page, go to the preconditions section and choose: Item held (potion). Add a message with the kid asking for the potion, another for you giving him the potion and another for the kid thanking you.
Now add a "manage items" command. Set this to Remove Item, Specific item: Potion, Amount: 1. This takes the potion away from you and gives it to the kid.
After that, add a "switch operations" command. Select a switch from the [...] box. Here, I have chosen switch 0001. (You can rename switches to avoid confusion.) Set the operation to "turn ON."
Your second page should look like this (I circled the precondition):
Your third page is about as easy as the first. Set the precondition to Switch: 0001 is ON. Add a message of the kid thanking you or giving you some hint.
This is what should happen: If you talk to the kid and you don't have a potion, nothing happens. If you do have one and you give it to him, the switch turns on. This switch makes the third page take action instead of the first two, because switch preconditions trump item preconditions. The third page doesn't let you give him another potion. Endless loop solved.
You can make it fancier by adding in fork operations. For example, on the first page you can say you have a potion when you don't. Then the kid yells at you for lying. On the second page, you could have a choice to give the potion to the kid or just ignore him. If you want, I'll explain that more.
As for the whole kill x number of monsters... I'm actually working on something like that too. It doesn't work yet. Sorry.
Logged
<sig></sig>
Titanhex
Member
Initiate
Posts: 18
Re: Problems with creating missions and changing events - any help is appreciated
«
Reply #2 on:
September 02, 2009, 09:27:05 PM »
Great explanation, Missing!
I suggest reading up on variables and switches. Variables are can be numbers assigned to people, stats, or things that have happened. Switches are just like light switches. If you tell the switch to turn on, it turns on, and off, it turns off. The tricky part is deciding what turns it on, and what happens when it's on.
Pages are an interesting thing, as they can be extremelly helpful or hindering. If you have a ton of coding, try to use pages, if not, try using Conditional Branches. Instead of making 3 pages, use conditional branches.
I'll show you, and throw in how to make the NPC say random things from a pool of random comments.
To start, make the kid say a message as per the example in Missing's first picture. Now, just below that make a conditional branch and go to the secon tab and select Item. Do Party Possesses and select potion. Now, if the party possesses a potion, anything inside that conditional branch will happen. Lets put a message in that branch that says: "Could I please have a drink of your potion?" (Note: For now, keep Execute Custom Handler in the Conditional Branches unchecked)
Next do Show Choices, and lets keep it simple with Yes or No, Cancellation: Ignore. This is much like a conditional branch, as you'll notice. If yes, go to item management and do (Remove Item, Potion, 1). After that, do Switch Operations and make a switch called Child get Potion, and make it turn on. If no, do a message where maybe the kid says "Ow my tummy" or "You're not nice".
Good job! Now, for the child to stop asking for a potion, and to get random responses, we finish up like this. Go to the start of the coding, before the child even talks, and create a Conditonal Branch which has Switch, Child Gets Potion, is ON. Inside that branch, do Variable Operations. Looks scary, but it's not. Create a new variable called Random Number. Have it on Set Equal, and do a Random Number between (1) and (3). Now this Variable Operation will put a random number between 1 and 3 as the variable's #, and you'll understand why soon.
Put a conditional branch after the Variable Operation. Put the variable as Random Variable, and the Number as 1, and Equal to. So this branch will happen if that random number is Equal to 1. Put a message like "Thanks, you're such a nice guy!" Repeat with number 2 and number 3, and put a new message in each of them. Make sure you put the new conditonal branches just under the last conditional branch, not inside them.
Great! Now after the 3rd conditional branch, but still inside the big conditonal branch with the switch, put End Event Processing.
If you've done it correctly you shouldn't need any pages, and it should look like this:
<img src="
http://farm4.static.flickr.com/3522/3881864831_ecd0c2c25a.jpg
" /></a>
«
Last Edit: September 03, 2009, 04:08:51 AM by Titanhex
»
Logged
MissingName
Here you go. Juicy Fruit. Happy?
Exemplar
Posts: 1,919
The scotch is well hidden. So scram.
Re: Problems with creating missions and changing events - any help is appreciated
«
Reply #3 on:
September 02, 2009, 11:45:43 PM »
Your pic is busted...
But yes, variables are a good thing to learn to use. For the kill x number of monsters, the problem lies in the fact that you can't say "If monster type ___ is dead, then..." I think I figured it out though. More on that to come.
You can also use variables to make a cranky character. If you ask them to repeat something over and over again, in real life they would start to become enraged at your bad memory. I've created an example of that here, where examining a barrel 5 times makes the game creator angry.
This event really only needs one page.
Take a conditional branch, saying for the IF case:
(I renamed the variable so I wouldn't get confused.)
Add 1 to the variable of your choice, and then this message:
IT'S A FRIGGIN' BARREL! NO MATTER
HOW MANY TIMES YOU LOOK AT IT, IT'S
JUST A BARREL!
YOU'VE LOOKED AT IT \v[0001] TIMES!
...or something similar.
The \v[0001] allows you to show the value held in a variable inside of a message. When you've talked to the barrel 5 times, it will say:
IT'S A FRIGGIN' BARREL! NO MATTER
HOW MANY TIMES YOU LOOK AT IT, IT'S
JUST A BARREL!
YOU'VE LOOKED AT IT 5 TIMES!
The longer you keep talking to this barrel (using this exact programming), the higher the number will get. If you put the var operation AFTER the message in the IF case, then your number will be off by one.
Note: In the actual programming, a "\" shows up as "¥."
For the ELSE case, just put an operation of +1 to the variable [0001: Barrel] and a simple message saying how the item you are checking is a barrel.
*Clap* And yer DONE. You can take it further, for example talking to it 100 times will give you an item so you can "Shut up and go far away from the barrel."
«
Last Edit: September 02, 2009, 11:51:31 PM by MissingName
»
Logged
<sig></sig>
Titanhex
Member
Initiate
Posts: 18
Re: Problems with creating missions and changing events - any help is appreciated
«
Reply #4 on:
September 03, 2009, 04:20:00 AM »
The programming you'll need to do is determined by whether you're using events to activate your battles, or random encounters. Events, it's easy. Just put a +1 to monsters killed variable after victory.
Random Encounters, you'll have to make specific random encounters in the Monster Group of the Database. On these random encounters, go to the Battle Events section.
Trigger: Turns Elapsed 0 X + 1
In the box, Single Variable (Monsters Killed)
Add
Number 1
I haven't tested it, but that should do it for random encounters. Just put that in the page of all the encounters you want.
Logged
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Problems with creating missions and changing events - any help is appreciated