• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other✓] Two Way Route

Hajima

Manga Artist 101
111
Posts
7
Years
    • Seen Nov 4, 2016
    I'm making a Pokemon Rom Hack that I was hoping that can have a Two Way Route.

    What I meant was, You can either be in the bad side or good side.

    Is it possible? Like for example, at the very start you we're asked if you would become good or evil, and what choice you made would direct you to the good or bad route?

    The script I'm going to be using to trigger the routes is this :
    Spoiler:


    I also have the problem with that script, where should I add the warp script?

    Thanks!

    Additional : How the heck do you make a script tile, all the tutorials I've read so far don't make sense at all.
     
    Last edited:

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • Two Routes Response

    I'm making a Pokemon Rom Hack that I was hoping that can have a Two Way Route.

    What I meant was, You can either be in the bad side or good side.

    Is it possible? Like for example, at the very start you we're asked if you would become good or evil, and what choice you made would direct you to the good or bad route?

    The script I'm going to be using to trigger the routes is this :
    Spoiler:


    I also have the problem with that script, where should I add the warp script?

    Thanks!

    Additional : How the heck do you make a script tile, all the tutorials I've read so far don't make sense at all.

    To Hajima:

    I added some organization tags which I myself have noticed have started to become useful, especially if you want to save an archival copy of your script in a folder or something.

    For parts of these scripts, I will assume you have used the tutorial found here:
    https://www.pokecommunity.com/showthread.php?t=302476

    It is very useful to add this in the long run, but to each their own.

    What I will be doing is using a safe, already in game flag, for a yes or no at the beginning. This flag will pretty much be used through out the entire script, and is the single most important flag you will have in your ROM.

    I will be using flag 0x230 for your good or evil choice, which is the one used for the pokemart dude in route 1.

    If this is set it will = 1, which means that, yes, we have chosen the evil path. If it is not set, it will automatically be 0, meaning we don't have to set it.

    setflag 0x2C6 is to permanently remove the NPC from the map, so the event will never play again. This flag was from the fat guy in Viridian.

    When reading the script, understand that since the 0x230 flag is already set to 0, we are automatically good. In the script, we have it set it to 1 to make the player evil.

    I also added the warp script after the player is released, in an easy to understand format.

    Good or evil Choice Script:
    Spoiler:


    Now I'm also going to add an extra something that should help in the future as your hack progresses, and is also a good example as to what you can do with the above script.

    Sometimes, you will probably be using the same map, but you just want certain people to appear for the good choice, and some for the bad choice.

    Now, lets say for example you have 5 people on a map, total. Now, if you choose the bad side, two, lets say rockets, should be on the map. If you choose the good side, two police or whatever, should be on the map. The last person should be a bystander that changes his message based on your choice, but stays on the map either way.

    To do the first part, we must add a level script to the map, setting and changing flags based on our choice that will remove two of the other sides people.

    You add the below flags to each Person ID in Advance Map. Again, there is an image below for reference.

    Finally since I am using the extended flags from the tutorial above, you WILL need to change these flags below to ones already used in game if you have NOT applied the hack.

    EDIT: I just looked at some flags, so that you could test the script, if you decide to wait on adding that hack. The flags are 0x249, from the Magikarp guy on Route 4, and 0x232, from the fossil guy in MT. Moon. You would just exchange them out for whichever one.

    Level Script:
    Spoiler:


    Use the tutorial here to correctly insert the level script, you WILL need to do this:
    https://www.pokecommunity.com/showpost.php?p=4414826

    Here is an image album to a few images explaining where to put things:
    https://imgur.com/a/0d6Zs

    As you can see, I simply used the variable 0x4012 and 0x0000 for the level script.

    This means that when the variable 0x4012 = 0, we will run the level script.

    I would personally choose a variable that will ALWAYS be zero, or you could look more into level scripts to run it when entering a map, etc.

    Finally, since we also have a bystander, we will add his own unique script, changing his message based on your choice of good or evil.

    Bystander Script:
    Spoiler:


    And that's pretty much it. You now have a working choice script, a working level script, and a working person who says something different based on your choice.

    This is pretty comprehensive for your question, but it will future-proof your hack.

    It might look like a lot at first, but read carefully and look at the images, and you'll be sure to get it.

    Good luck, and happy hacking!

    EDIT: Script Tile? What do you mean?
     
    Last edited:

    Hajima

    Manga Artist 101
    111
    Posts
    7
    Years
    • Seen Nov 4, 2016
    To Hajima:

    I added some organization tags which I myself have noticed have started to become useful, especially if you want to save an archival copy of your script in a folder or something.

    For parts of these scripts, I will assume you have used the tutorial found here:
    https://www.pokecommunity.com/showthread.php?t=302476

    It is very useful to add this in the long run, but to each their own.

    What I will be doing is using a safe, already in game flag, for a yes or no at the beginning. This flag will pretty much be used through out the entire script, and is the single most important flag you will have in your ROM.

    I will be using flag 0x230 for your good or evil choice, which is the one used for the pokemart dude in route 1.

    If this is set it will = 1, which means that, yes, we have chosen the evil path. If it is not set, it will automatically be 0, meaning we don't have to set it.

    setflag 0x2C6 is to permanently remove the NPC from the map, so the event will never play again. This flag was from the fat guy in Viridian.

    When reading the script, understand that since the 0x230 flag is already set to 0, we are automatically good. In the script, we have it set it to 1 to make the player evil.

    I also added the warp script after the player is released, in an easy to understand format.

    Good or evil Choice Script:
    Spoiler:


    Now I'm also going to add an extra something that should help in the future as your hack progresses, and is also a good example as to what you can do with the above script.

    Sometimes, you will probably be using the same map, but you just want certain people to appear for the good choice, and some for the bad choice.

    Now, lets say for example you have 5 people on a map, total. Now, if you choose the bad side, two, lets say rockets, should be on the map. If you choose the good side, two police or whatever, should be on the map. The last person should be a bystander that changes his message based on your choice, but stays on the map either way.

    To do the first part, we must add a level script to the map, setting and changing flags based on our choice that will remove two of the other sides people.

    You add the below flags to each Person ID in Advance Map. Again, there is an image below for reference.

    Finally since I am using the extended flags from the tutorial above, you WILL need to change these flags below to ones already used in game if you have NOT applied the hack.

    EDIT: I just looked at some flags, so that you could test the script, if you decide to wait on adding that hack. The flags are 0x249, from the Magikarp guy on Route 4, and 0x232, from the fossil guy in MT. Moon. You would just exchange them out for whichever one.

    Level Script:
    Spoiler:


    Use the tutorial here to correctly insert the level script, you WILL need to do this:
    https://www.pokecommunity.com/showpost.php?p=4414826

    Here is an image album to a few images explaining where to put things:
    https://imgur.com/a/0d6Zs

    As you can see, I simply used the variable 0x4012 and 0x0000 for the level script.

    This means that when the variable 0x4012 = 0, we will run the level script.

    I would personally choose a variable that will ALWAYS be zero, or you could look more into level scripts to run it when entering a map, etc.

    Finally, since we also have a bystander, we will add his own unique script, changing his message based on your choice of good or evil.

    Bystander Script:
    Spoiler:


    And that's pretty much it. You now have a working choice script, a working level script, and a working person who says something different based on your choice.

    This is pretty comprehensive for your question, but it will future-proof your hack.

    It might look like a lot at first, but read carefully and look at the images, and you'll be sure to get it.

    Good luck, and happy hacking!

    EDIT: Script Tile? What do you mean?

    I didn't use the tutorial from "https://www.pokecommunity.com/showthread.php?t=302476". I also have little information about flags and vars because I've only started Rom Hacking a couple weeks ago (4 1/2 to be exact).

    I'll try the script and flags later! Also, what I meant by script tile was like, a message box appearing as of a narration (doesn't have an npc). But damn, this is pretty complicated and pretty hard to understand. lol
     
    Last edited:

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • To Hajima:

    I understand why you say it's complicated. To shorten it the last post it would pretty much be this:

    You set a flag: 1 for evil, 0 for good. That is your permanent choice throughout the game, and everything changes based on that choice.

    As you progress, you will want different events for each choice. For example, when you enter a map, say a city, you might wish to make certain people appear for the evil side, and other people for the good.

    You might also wish to have people whom appear on both sides, who say different things depending on what side you are on. If you're bad, they might be scared. If you're good, they might be relieved.

    To make people disappear, you need to check the side you are on and set a flag based on that. In the games, simply assigning a set flag to a Person ID removes them from the map.

    If you choose the good side, certain, non related NPC's should disappear, as they do not apply. Same for the evil side.

    Those scripts are examples of what you will want to do as your game progresses, which is make certain things happen based on your choice.



    The warp is easiest added after releasing the player, and will teleport you immediately to another location.

    This is a sample tilescript. This particular one could make it look like an NPC is pushing the player after telling them to back off.

    Tilescript:
    Spoiler:



    Simple "step on this and display a message" script:
    Spoiler:


    Re read these as you go and you'll find that they are easier to understand after some trail and error.

    One last tip, and this is what I was trying to do in the last post: As the game gets bigger, you will have larger events, and you will want to organize your scripts better.

    If you have any questions, either VM or PM me.

    Good luck, and have fun!
     

    Hajima

    Manga Artist 101
    111
    Posts
    7
    Years
    • Seen Nov 4, 2016
    To Hajima:

    I understand why you say it's complicated. To shorten it the last post it would pretty much be this:

    You set a flag: 1 for evil, 0 for good. That is your permanent choice throughout the game, and everything changes based on that choice.

    As you progress, you will want different events for each choice. For example, when you enter a map, say a city, you might wish to make certain people appear for the evil side, and other people for the good.

    You might also wish to have people whom appear on both sides, who say different things depending on what side you are on. If you're bad, they might be scared. If you're good, they might be relieved.

    To make people disappear, you need to check the side you are on and set a flag based on that. In the games, simply assigning a set flag to a Person ID removes them from the map.

    If you choose the good side, certain, non related NPC's should disappear, as they do not apply. Same for the evil side.

    Those scripts are examples of what you will want to do as your game progresses, which is make certain things happen based on your choice.



    The warp is easiest added after releasing the player, and will teleport you immediately to another location.

    This is a sample tilescript. This particular one could make it look like an NPC is pushing the player after telling them to back off.

    Tilescript:
    Spoiler:



    Simple "step on this and display a message" script:
    Spoiler:


    Re read these as you go and you'll find that they are easier to understand after some trail and error.

    One last tip, and this is what I was trying to do in the last post: As the game gets bigger, you will have larger events, and you will want to organize your scripts better.

    If you have any questions, either VM or PM me.

    Good luck, and have fun!

    So there's no need for me to follow the tutorial from the page https://www.pokecommunity.com/showthread.php?t=302476?
    EDIT : Also the flag that also indicates the pokemart dude from route 1, won't it be affected if I used it? Same goes for the other one?
    EDIT: My game freezes when stepping on the "step on this and display a message" script.
     
    Last edited:

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • To Hajima:

    I apologize. I thought you were making a completely NEW hack. If you aren't you will probably need to add both the flag hack AND the variable hack as well.

    There is a list of the complete usable flags and variables: https://www.pokecommunity.com/showthread.php?t=302347, but what it boils down to is you have a VERY limited number in the vanilla game.

    Most hackers who are hacking a vanilla ROM would typically take flags, like the Pokemart guys, and variables, like Professor Oaks, remove those events from the game, and use them for their own purposes. From what it sounds like, you will need the extension hack, no real way around it, especially if you are keeping normal events like the Pokemart guys.

    If you ARE making a new hack, then you won't have the Pokemart guy and so you will simply take his flag. Same with the rest of the events.

    I can assure you, it will be VERY difficult to make a new hack with just what is in the game.

    I apologize about the tilescript. It needs a variable to run. For my test, I personally just used 0x4050, which is used by Professor Oak in Pallet Town. You will have to change this, and a guide is found here:
    https://www.pokecommunity.com/showthread.php?t=161616 Check the "Scripts" Section to change the variable number.

    I do apologize. This all probably just looks like a lot of words to you. Here's a simplified version:

    You will probably need the hack, especially if you are using in game events, like the potion from the Pokemart guy.
    You are very limited if you do not add the hack, a list of free flags and variables is here: https://www.pokecommunity.com/showthread.php?t=302347
    If you choose not to add the hack, you will have to remove events in game anyways, so the point is moot.
    If you hack is brand new, but you don't add the extension, you can just use the variables already in game, such as the old pokemart guy, the Route 4 Magikarp guy, etc.
    Tilescript needs a variable in advance map to run. It needs to be a free one, or one that will always be zero or a specified number.

    If you need help with the addition of the flag extension hack, I can make a patch for you that you would simply patch to your game and you'd be all set. 1 problem with the flags is you can't use the ingame help system, which some people are unaware of. It's typically not used, but again, you may want it.

    Good luck, let me know if you have questions.
     
    Last edited:

    Hajima

    Manga Artist 101
    111
    Posts
    7
    Years
    • Seen Nov 4, 2016
    To Hajima:

    I apologize. I thought you were making a completely NEW hack. If you aren't you will probably need to add both the flag hack AND the variable hack as well.

    There is a list of the complete usable flags and variables: https://www.pokecommunity.com/showthread.php?t=302347, but what it boils down to is you have a VERY limited number in the vanilla game.

    Most hackers who are hacking a vanilla ROM would typically take flags, like the Pokemart guys, and variables, like Professor Oaks, remove those events from the game, and use them for their own purposes. From what it sounds like, you will need the extension hack, no real way around it, especially if you are keeping normal events like the Pokemart guys.

    If you ARE making a new hack, then you won't have the Pokemart guy and so you will simply take his flag. Same with the rest of the events.

    I can assure you, it will be VERY difficult to make a new hack with just what is in the game.

    I apologize about the tilescript. It needs a variable to run. For my test, I personally just used 0x4050, which is used by Professor Oak in Pallet Town. You will have to change this, and a guide is found here:
    https://www.pokecommunity.com/showthread.php?t=161616 Check the "Scripts" Section to change the variable number.

    I do apologize. This all probably just looks like a lot of words to you. Here's a simplified version:

    You will probably need the hack, especially if you are using in game events, like the potion from the Pokemart guy.
    You are very limited if you do not add the hack, a list of free flags and variables is here: https://www.pokecommunity.com/showthread.php?t=302347
    If you choose not to add the hack, you will have to remove events in game anyways, so the point is moot.
    If you hack is brand new, but you don't add the extension, you can just use the variables already in game, such as the old pokemart guy, the Route 4 Magikarp guy, etc.
    Tilescript needs a variable in advance map to run. It needs to be a free one, or one that will always be zero or a specified number.

    If you need help with the addition of the flag extension hack, I can make a patch for you that you would simply patch to your game and you'd be all set. 1 problem with the flags is you can't use the ingame help system, which some people are unaware of. It's typically not used, but again, you may want it.

    Good luck, let me know if you have questions.

    I'd very much appreciate it if you do make a patch, it will totally boost up the process.
     

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • You must have free space at 0xA00000 - 0xA001A0. If you don't let me know.

    Patch is attached and added some other fixes, listed in the readme. Apply the no running indoors patch if you don't want that. Do that after applying the first.
     

    Attachments

    • Hajima-Patch.zip
      1.9 KB · Views: 5

    Hajima

    Manga Artist 101
    111
    Posts
    7
    Years
    • Seen Nov 4, 2016
    You must have free space at 0xA00000 - 0xA001A0. If you don't let me know.

    Patch is attached and added some other fixes, listed in the readme. Apply the no running indoors patch if you don't want that. Do that after applying the first.

    It works but, one other question. If i used the var 4050, am I able to use it again on an other script?

    Thanks! This has really helped me alot!

    EDIT : After setting flag 0x230 as the evil route, how do I actually set it up on other events?
     
    Last edited:

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • Let me put it like this. Since you've patched the ROM, just use var 0x5000. This would just stay at zero, which is what you'll want. If you change the variable, let's say to 1, when you step on the tilescript, it will NOT work. This can be useful if you need to run a script one time, or if, as you progress, need a certain event to activate after another one.

    Short answer, for constant tilescripts that you always want to run, use a variable, like 0x5000, and never change it.

    For tilescripts that should run once use variable 0x5001, and change it as it goes.

    BTW: I would keep 0x230 as the choice flag, since it was built into the game, it is NOT subject to any glitches, and if you need to, change the Pokemart dudes script to have like 0x900, one of the new ones. This isn't necessary but it is bulletproof.

    Also, my friend, keep a list of your variables, both for your own reference, and to tell what you have already used. Trust me this helps alot.

    Good luck, and PM with any questions.
     

    0

    Happy and at peace. :)
    556
    Posts
    8
    Years
  • To answer your edited question.

    Level script snippet:
    Spoiler:


    Use the tutorial here to correctly insert the level script. It's fairly simply, just read it slowly and carefully:
    https://www.pokecommunity.com/showpost.php?p=4414826

    Here is an image album to a few images explaining where to put things:
    https://imgur.com/a/0d6Zs

    As you can see, I used the variable 0x4012 and 0x0000 for the level script. Change this to your alwayszero variable, which above, I suggested 0x5000.

    This means that when the variable 0x5000 = 0, we will run the level script. Running the level script sets flags depending on our choice.

    For that level script, when 0x230 = 1, we set the map so it has people from the evil side on the map. When 0x230 = 0, those people will not appear and people from the good side will appear.This is one example of what can be done with our level script. Changing the people shown on the map to the player.

    To give you a better example tell me what you would like to do, and I will try to engineer a script to suite that idea.
     
    Back
    Top