The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tutorials Looking for a guide to help you out? Then you're in the right place! We've got everything you need, ranging from Mapping to Music!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old November 3rd, 2013, 03:54 PM
AkameTheBulbasaur's Avatar
AkameTheBulbasaur
Akame Marukawa of Iyotono
 
Join Date: May 2013
Location: A place
Age: 16
Gender: Female
Nature: Relaxed
Have you ever wanted to add something to your Pokemon hack that no main series game (as of this date, 2013/11/3) has ever had before? Well, look no further than here! This tutorial will show you two different ways to make side quests in your Pokemon hack.

Materials
*A ROM in which you are hacking
*AdvanceMap (and a basic knowledge of how to use it)
*PKSV-UI (I find this one easiest to use, but I'm sure this will work with other script editors as well)
*Notepad (To copy and paste your script into, just in case something goes wrong and you need to recompile the script)
*A basic knowledge of scripting (You will need to know how to make a Yes/No question script, how to make basic applymovement scripts, and you will also need to know what flags are and how to use them.)

With that said and done, let's start!

There are two ways in which one could make a side quest script. The first way works like this:
Spoiler:

The player will interact with a "message board" that will have a script detailing a quest. In this case, it will be an item exchange (the player gives an NPC an item for another item of equal or greater value.)
Once they have accepted the quest, they will talk to the NPC who, depending or whether the player has the requested item, will reward the player or say that they want that item.

We'll start with the "message board" script.

Spoiler:
Step 1: Open your ROM in AdvanceMap and choose a map where the "message board" will be located. As for me, I like to use the Pokemart for this purpose, so I will use it in this tutorial. Create a "sign" event and place overtop where you'd like the message board to be.



Step 2: Bring up PKSV-UI and start a new script.

This script will use dynamic offsets, so type in #dyn 0x740000 and #org @start, as you would in any other script. Then type in "lock." Typing in "faceplayer" isn't needed, as it's a sign post, and not a sprite, but I do it out of habit. After that, type "Checkflag 0x#" where # is the UNSET flag you will use for this script. Then we will put "if == jump @stillhavetodo" This will tell the script whether or not you have accepted the quest, and bring you somewhere else if you have not. The next thing to type is a yes/no question. This will tell the player what the conditions of the quest are, and allow them to either accept or decline the quest. Keep in mind, you can only have 34 characters per line without them running over. Spaces count as characters. By now, your script should look like this.



Now we'll move on to the "acceptquest" and "deny quest" parts. The first thing after starting the accept quest script (aka putting in #org @acceptquest) is putting in the message that will appear to tell the player they have accepted the quest. A simple "PLAYER accepted the quest!" will suffice. Make sure to put a "callstd" with "MSG_NORMAL" or "MSG_SIGN" right afterward. Problems happen when you don't. Then, you'll want to set a flag, so that if the player interacts with the message board again, it won't ask you if you want to accept the quest when you've already accepted it. This flag should be the same one that you used in the "check flag" command from earlier. Now, you may want to put in a fanfare. If you do, type in "fanfare 0x101" followed by "waitfanfare" so that you can't exit out of the script while it's still playing. After that, release and end the "acceptquest" script. Here's what all of that should look like.



For the "deny quest" script, just make a message saying something like "Decided not to do the quest" or something along those lines.



The next step is the "stillhavetodo" script. If you've accepted the quest, but still haven't finished it, then it will send you here. The first thing to do is to set another flag. IT CANNOT BE THE SAME ONE FROM BEFORE! This flag will check to see if you've completed the quest, and if so, will send you to the "questdone" script. If that flag hasn't been set, then it will tell you that you still have to do the request. Release and end the script.



This is the "quest done" script, which you will see if you have accepted AND completed the quest. For my script, I put in a yes/no question asking if you want to read the quest again. If the player chooses yes, they will go to the "readagain" script. If they didn't pick yes, then the script will end.



In the "readagain" script, you will just have a message saying the quest, but it should be a regular message, not a yes/no question.



At the end, your script should look something like this:





The second part of the "message board" script is the NPC who made the request.

Spoiler:

Start the script as normal. Use "lock" AND "faceplayer", as this is a person script.
Type in "checkflag" and use the flag you set when you accepted the quest. This will make the NPC say a different message than normal, depending on whether or not you have the item required.
If the that flag has been set, you will be taken to the "takingquest" script. Make a message with what the NPC will normally say. "callstd" it, release and end.



For the "takingquest" script, put another "check flag." This is the second flag you used in the "message board" script, and is the flag you will set when the quest has been completed. If that flag has been set, you will be sent to a "normal" script. Next we'll use the command "check item" The deal with "check item" is this: put the command in, and type the name of the item you're checking the bag for in all caps, followed by the number of the item that will be required. Afterwards, put in "compare 0x800D 0x1" You must do this, otherwise it won't work, and that would be sad Next you put "if 0x4 goto @has" The "0x4" means it is checking for an item amount greater than or equal to the amount specified before. Once you have all of that, put in a message that the NPC will say if you DO NOT have that item. Release and end the script.



If you have the right type and number of the item, then you will be sent to the "has" script. The first thing you do is put "applymovement 0x# @wow" The # is the event number of the person event in AdvanceMap. To find it, highlight the NPC and look to the right. The person event no. is underneath the delete button.



When you make the "wow" part, do not put an equals sign after the "#org @wow", put an "m" instead. Then put "say_" and have either "!", "?" or "!!" following the underscore. Here's what it should look like:

After that, put a message with what the NPC will say if you have the item. Something like "Wow! You have (insert item here)! Want to trade it for (insert other item here)?" "callstd" it and then type "remove item" followed by the item you are giving the NPC and the number of that item that will be removed from your bag. Right after that, type "additem" followed by the type and number of the item the NPC is giving to you. Then, you will set the flag that you checked for in the "taking quest" script. Put a little fanfare and then end the script.



If the player does not have the right type and number of the item checked for, they will be sent to the "nothave" script. Simply put a message here saying something like "I really want (insert item here), but nobody has it!" Put anything you want here. "callstd", release and end.



Finally, you will make the "normal" script. All you do here, is have the message that the NPC will normally say.



Here's the whole thing together.




The second way works like this:
Spoiler:

The player talks to an NPC who requests a certain item. If the player has it, they will take the item and reward the player. If the player doesn't have it, then they will tell the player something and the script will end.

Step 1: Create a person event in AdvanceMap and open up a new script for them.

Step 2: Start the script and type "lock" and "faceplayer." Then type "check flag" and use a flag you haven't used on that ROM yet. Type a "whereisit" message saying something like "I lost my (insert item)! Where is it?" and "callstd" it. Directly after, type "check item"

(in case you dot know, or haven't read the first part, here's how to use "check item." Put the command in, and type the name of the item you're checking the bag for in all caps, followed by the number of the item that will be required. Afterwards, put in "compare 0x800D 0x1" You must do this, otherwise it won't work. Next you put "if 0x4 goto @has" The "0x4" means it is checking for an item amount greater than or equal to the amount specified before.)

Once you've finished the "check item" command, make another message for when the player doesn't have the item. "Callstd", release and end. Here's what you should have:



Next make a "has" script. This script is exactly the same as the "has" script in the first part.

(in case you didn't read the first part or don't know about applymovement scripts, the applymovement scripts use the person event number of the NPC and link to another script. In other words, type in "applymovement 0x# @wow" where # is the person event no. When typing the "wow" part, don't use an equals sign after the "#org @wow", use an "M". Put "say_(insert "!", "?", or "!!") end" after the "m")

You should have the "applymovement" command, then a message that the NPC will say if the player has the item (ex: "Oh my goodness! You found it!"), a "removeitem" command with the item you're giving, an "additem" command with the item you're getting, a "set flag" command with the flag you checked for before (the flag you will set so that the game knows you completed the quest) and a fanfare. Release and end the script.



After, put a "normal" script, with what the NPC will say after you have completed their quest.



Here's what it all should look like:



__________________
"The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
Reply With Quote
  #2    
Old November 8th, 2013, 05:53 PM
King Haxxo
 
Join Date: Nov 2013
Gender: Male
I haven't had the opportunity to try this yet but I love the idea. It allows the implementation of extra game play utilizing what is already available. Simple yet elegant. You bet I'll be using it in my hack. Good job!
__________________


Pokemon - Tainted Black
A darkness has fallen over Kanto... Will you be the one to vanquish it?
Reply With Quote
  #3    
Old November 9th, 2013, 05:30 AM
V.V's Avatar
V.V
ブラック
 
Join Date: Nov 2013
Location: Wall Maria
Gender: Male
Nature: Quiet
Send a message via Skype™ to V.V
Hmm. This is the same to XSE right? If it is, then this would be helpful
__________________


Reply With Quote
  #4    
Old November 9th, 2013, 11:38 AM
AkameTheBulbasaur's Avatar
AkameTheBulbasaur
Akame Marukawa of Iyotono
 
Join Date: May 2013
Location: A place
Age: 16
Gender: Female
Nature: Relaxed
Quote:
Originally Posted by Sagittarius View Post
Hmm. This is the same to XSE right? If it is, then this would be helpful
I've never used XSE before, but I imagine it would be extremely similar. From what I've seen, XSE is almost the same as PKSV-UI in terms of commands. If you are pretty familiar with XSE then it shouldn't be too hard to use with that program.
__________________
"The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
Reply With Quote
  #5    
Old November 10th, 2013, 01:48 AM
V.V's Avatar
V.V
ブラック
 
Join Date: Nov 2013
Location: Wall Maria
Gender: Male
Nature: Quiet
Send a message via Skype™ to V.V
Quote:
Originally Posted by AkameTheBulbasaur View Post
I've never used XSE before, but I imagine it would be extremely similar. From what I've seen, XSE is almost the same as PKSV-UI in terms of commands. If you are pretty familiar with XSE then it shouldn't be too hard to use with that program.
I actually re-typed your script to see if it works.
So luckily I didn't made any mistakes so it works, but XSE much better. (My opinion)
__________________


Reply With Quote
  #6    
Old November 12th, 2013, 11:34 AM
Orpheus's Avatar
Orpheus
Go Beyond Death
 
Join Date: Jul 2012
Location: Kentucky
Age: 14
Gender: Male
Nature: Calm
This is helpful, as Side Quests were something I've wanted to incorporate into my hack. Thanks!
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 12:13 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.