Announcement

Collapse
No announcement yet.

HOW TO MAKE A BASIC FETCH QUEST USING CONDITIONAL BRANCHES AND VARIABLES RMXP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HOW TO MAKE A BASIC FETCH QUEST USING CONDITIONAL BRANCHES AND VARIABLES RMXP

    Author: Julius Tinker
    Name: Creating Easy FETCH Quests


    Learning Basic Concepts Essential for Making Quests That require more that one item
    VARIABLES AND CONDITIONAL BRANCHES EXPLAINDED EASILY




    I don’t know about anyone else but when I first started RMXP there were alot of things that I didn’t fully understand.

    This is a quick and simple tutorial that shows you how to make basic quests and explains the concepts of variables and conditional branches. It also teaches you how to fully understand the page system used in the events.


    First of all you will need to know all of the functions for all of the current buttons:

    Message: Displays a field a text when the event is called.
    Show Choices: Creates an event function that allows your players to choose one of the options given.
    Input Number: Creates an event that allows your play to put in a number, the max digits equaling how high the input will go.
    Wait: Commands the play to halt for said amount of time.
    Comment: Inserts a field of text that the game does not show. It is useful when creating demos, to show text of what is going on in the Event Command list.
    Conditional Branch: Creates a string of event commands that are executed are said condition.
    Loop: Creates a never-ending, reoccurring event.
    End Loop: Ends the loop.
    End Event Processing: Ends the current event taking place.
    Erase Event: Completely wipes an event from existence in your game.
    Common Event: Inserts a common event, which is a string of events that can be created through your database.
    Label: Creates a name for an event.
    Jump to Label: Brings your player to the labeled event.
    Switch Operation: Calls a switch operation (see my guide on Switches to figure out to make the best of that).
    Variable Operation: Executes a variable operation.
    Self Switch Operation: Executes a self switch operation (see my Switch guide).
    Timer Operation: Creates an operation that is executed for said amount of time.
    Change Money: Changes the amount of money your player’s party has.
    Change Items: Changes the items your player’s party has.
    Change Weapons: Changes the weapons your player’s party has.
    Change Defense Items: Changes the defense items your player’s party has.
    Change Party: Changes the current characters that are part of your player’s party.
    Change Window Skin: Changes the skin design of the player’s window skin.
    Change Battle BGM: Changes the current battle music being played.
    Change Victory ME: Changes the current victory music that is played when your player’s party wins a battle.
    Allow/Disallow Saving: Allows or disallows your player from currently saving his or her game file.
    Allow/Disallow Main Menu: Allows or disallows access to the main menu.
    Allow/Disallow Encounters: Allows or disallows enemy encounters.


    Variables are made to count,
    Weather it be, player level, play time, agility, dexterity, or a variable you make yourself.
    The basic function remains the same.

    I will show you how to make a basic quest using variables and conditional branches.
    Everything will be explained.

    1. First let’s start by making a new event on the map.
    2. Second pick a graphic for this event
    3. Make a new page and pick the same graphic
    4. For this example quest I will say that a man has lost two of his tools
    and needs someone to find them for him:
    5. Create the two tools as unusable items. This makes them quest items.
    6. Then go to common events:
    7. *Note: Common events are global so that means that they are not constricted by maps. So what =ever you put into one that is parallel triggered to a switch it happens all through your game.
    8. Make a common event and have it parallel triggered to a switch that you will place in the map that your play starts out on. This switch will also be a parallel triggered event.
    9. Go to the Common event field and double click on an empty line
    10. Select the variable operation button in the command events.
    11. Go to the specific variable command and make a new variable called tools
    12. Go to OPERAND and click the item selection.
    13. Pick the tool you just made
    14. Press Ok
    15. And repeat with the second tool
    16. *Note: This will make it so that no matter where you are in the game if you have a cretin item you will have the variable that you make for it.
    17. Make two new events and put them where you would find tools on one of your maps
    18. *Note: It can be in a draw or under a bed or you could find sprites that look like the tools.
    19. Now go to the two paged event that you made on your map, person that will be asking you to find the tools
    20. On the first page enter what the character will say when the hero talks to him:
    21. For example, “Help I need to find my tools to finish my life long project”
    22. Then you will give the hero the choice to help him or not.
    23. Under this put the message: will you help me?
    24. After the message give the choice
    25. Do this by going to the command events and selecting the Show Choices button
    26. Enter the choices you want but for this we are going to use [yes & no]
    27. Press the OK button
    28. This should bring up something that looks like this:
    29. <>Message: Can you help me find my tools?
    30. <>Show Message: Yes, No
    31. [Yes] Handler
    32. <>(*Place the events that you want to happen if the player chooses yes*)
    33. (*Pace hints as to where to find the tools.*)
    34. <>
    35. [No] Handler
    36. <> (*Place the events that you want to happen if the player chooses no*)
    37. <>
    38. : End
    39. <>
    40. In the yes handler enter a local switch event.
    41. To do this go to the space under the [Yes] Handler and after your message that hints as to where to find the items
    42. Go to the empty space and enter the event command “Local Switch Operation
    43. *Note: Local switches are just like regular switch but only work in the event that you are making, they are mainly used to switch through pages so that they move in order.
    44. The local switch for this event should be set to A = ON
    45. It should look like this now:

    46. <>Message: Can you help me find my tools?
    47. <>Show Message: Yes, No
    48. [Yes] Handler
    49. <>(*Place the events that you want to happen if the player chooses yes*)
    50. (*Pace hints as to where to find the tools.*)
    51. <>Local Switch: A = ON
    52. [No] Handler
    53. <> (*Place the events that you want to happen if the player chooses no*)
    54. <>
    55. : End
    56. <>


    When the Local Switch is activated it automatically switches from the page where it is activated to the page that has the prediction for that particular switch checked in the prediction box located in the top left hand side of the event.
    Predictions: These are things work in the basis of what if, true and false
    For an example:
    What if a man asks you to find his tools.
    If you said yes the prediction will make what you entered on that particular page true.
    If you said no the local switch or any other switch will not have been activated and then
    The statements and events on the page with the prediction become false and doesn’t go to that page with the prediction checked.
    *Note: you can use the variable prediction, the two switches, and the local switches together for more complex quests or procedures.


    Now to start the second page
    The page should have. The Local Switch: A = ON should be checked

    Make a new conditional branch into the empty field.
    To do this:
    Go to the blank line and double click it
    When you do that the event command menu will come up
    Click the Conditional branch button
    *Note: The conditional branch is not that hard to figure out.
    It’s is just like the prediction in many ways.
    If you have a certain item then what ever you put in the conditional branch happens. This means that if it is true that you have the item then it will process the events in the field
    If it is not true that you have the required item then the events in the else handler will be activated.

    You should get something that looks like this:

    <>Conditional Branch: Variable [001: Your variable here] >=2
    (*This line states that if the player has not two variables that you made then it will activate the things in this field*)(*it can be nothing or a lot of things*)
    <>Conditional Branch: Variable: [001: Your variable here] = = 1
    (*This line states that if you have collected one of the required items the events here will take place*) (*For this we will only use it to count.*)
    <>Message: I am still missing one tool.
    <>
    : Else handler
    <>Conditional Branch: Variable: [001: Your variable here] = = 0
    (*This line states that the player have collected none of the required items the events here will take place*)
    <>Message: You still have not found any of my tools
    <>
    : End
    <>
    : Else Handler
    (*If the player has collected all of the required items then the events here will take place*)
    <>Message: You found all of my tools!
    <> (*A suitable reward, weather it be money or an weapon, or even an item*)
    <>Variable Operation: [Your variable here] -= 2
    (*This takes the variables away from the player so the quest can be repeated*)
    <>Change Items: [Tool1] - 1
    <>Change Items: [Tool2] - 1

    <>Local Switch: A = OFF
    (* If you don’t want the quest to be repeatable then all you have to do is make a new page with the same graphic and in the event field only put a message saying thank you and accolades for your actions*)(* To do this use the local switch principal that is explained earlier in the tutorial*)

    : End



    When all is said and done your page two should look like this:

    <>Conditional Branch: Variable [001: Your variable here] >=2
    <>Conditional Branch: Variable: [001: Your variable here] = = 1
    <>Message: I am still missing one tool.
    <>
    : Else handler
    <>Conditional Branch: Variable: [001: Your variable here] = = 0
    <>Message: You still have not found any of my tools
    <>
    : End
    <>
    : Else Handler
    <>Message: You found all of my tools!
    <>Change Items: [Tool1] - 1
    <>Change Items: [Tool2] - 1
    <>Variable Operation: [Your variable here] -= 2
    <>Local Switch: A = OFF
    : End
Working...
X