• 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.

Multiple Protagonists

233
Posts
5
Years
    • Seen Oct 9, 2023
    This script has been updated to support v18! All future versions will only support v18, however I've included the link to the v17.2 and v16.2 version (v2.3) at the bottom of the main post.
     
    19
    Posts
    9
    Years
    • Seen Jun 18, 2023
    Hey, so I'm having this error with the script? Every protagonist in the main selection can be named other than the first one. This is the error I get when I name him too. Any help would be appreciated!

    Multiple Protagonists
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Hey, so I'm having this error with the script? Every protagonist in the main selection can be named other than the first one. This is the error I get when I name him too. Any help would be appreciated!

    Multiple Protagonists

    Are you using the Following Pokemon script by mej71 by any chance? It seems to be crashing in the section where I add compatibility for Following. Maybe try deleting your save file and starting a new one? Otherwise, post a screenshot of your intro event code here (specifically any code above and below "pbTrainerName").
     
    19
    Posts
    9
    Years
    • Seen Jun 18, 2023
    Are you using the Following Pokemon script by mej71 by any chance? It seems to be crashing in the section where I add compatibility for Following. Maybe try deleting your save file and starting a new one? Otherwise, post a screenshot of your intro event code here (specifically any code above and below "pbTrainerName").

    I tried starting the new save file but got the same error, it only seems to be happening for the male trainer too. The female and neutral trainers work just fine.
    Here's the code, I'm looking and I can't really tell what's wrong.
    Multiple Protagonists
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    I tried starting the new save file but got the same error, it only seems to be happening for the male trainer too. The female and neutral trainers work just fine.
    Here's the code, I'm looking and I can't really tell what's wrong.
    Multiple Protagonists

    I see that you use "pbChangePlayer" to change between male/female/nonbinary, but you actually need to use "pbSwitchCharacter" to change the player's skin and set their name (pbChangePlayer breaks my script). So try the following steps:

    1. Remove all lines with "pbChangePlayer(X)" in your intro event.
    2. In each Show Choice command, set a temporary variable (I'll use variable ID 001 in this example) equal to the character ID of the selected character. So in the Male command, set Variable 001 equal to 0, for Female set to 1, and for
    Nonbinary set to 2.
    3. Replace the line where you wrote "pbTrainerName" with "pbSwitchCharacter(pbGet(1))" (1 is the variable ID that I used in step 2).

    If that doesn't work, I have three follow-up questions:

    1. What does your intro event (starting from the very beginning of the gender selection down to "pbTrainerName") look like?
    2. Are you using Following Pokemon in your game? If you CTRL + Shift + F search for "Following_Activated_Switch" in your scripts, does it show up anywhere besides this script? I need to know if I have implemented compatibility with that
    script wrong or not.
    3. What are you using this script for? You're letting the player choose their gender at the start of the game, but are all three characters going to be playable at some point in the game? Or is the player limited only to the character they
    chose at the start? If it's the latter, then you don't need my script at all - base Essentials already lets you choose a player's skin at the start of the game.
     
    19
    Posts
    9
    Years
    • Seen Jun 18, 2023
    I see that you use "pbChangePlayer" to change between male/female/nonbinary, but you actually need to use "pbSwitchCharacter" to change the player's skin and set their name (pbChangePlayer breaks my script). So try the following steps:

    1. Remove all lines with "pbChangePlayer(X)" in your intro event.
    2. In each Show Choice command, set a temporary variable (I'll use variable ID 001 in this example) equal to the character ID of the selected character. So in the Male command, set Variable 001 equal to 0, for Female set to 1, and for
    Nonbinary set to 2.
    3. Replace the line where you wrote "pbTrainerName" with "pbSwitchCharacter(pbGet(1))" (1 is the variable ID that I used in step 2).

    If that doesn't work, I have three follow-up questions:

    1. What does your intro event (starting from the very beginning of the gender selection down to "pbTrainerName") look like?
    2. Are you using Following Pokemon in your game? If you CTRL + Shift + F search for "Following_Activated_Switch" in your scripts, does it show up anywhere besides this script? I need to know if I have implemented compatibility with that
    script wrong or not.
    3. What are you using this script for? You're letting the player choose their gender at the start of the game, but are all three characters going to be playable at some point in the game? Or is the player limited only to the character they
    chose at the start? If it's the latter, then you don't need my script at all - base Essentials already lets you choose a player's skin at the start of the game.

    I ended up being able to get it working with your steps, thank you so much! Also yeah my plan is for another playable character not included on the screen, basically one of the rivals that appear early on in the game to offer their backstory so you can play through as them as well. I made an error with the script itself since I'm just starting up, thank you for the help!
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    I ended up being able to get it working with your steps, thank you so much! Also yeah my plan is for another playable character not included on the screen, basically one of the rivals that appear early on in the game to offer their backstory so you can play through as them as well. I made an error with the script itself since I'm just starting up, thank you for the help!

    Awesome! And yeah, I thought for a second that you just wanted a player skin selector, but as long as you got more than one playable protagonist, that's what this script is for!
     

    Bigpokemonfan0

    DBZFan13
    82
    Posts
    13
    Years
    • Seen Apr 27, 2024
    I know you could go up to 8 playable characters, but. Is it possible to make optional characters like those beyond eight? I think of making a special room for your character, so the limit shall be six characters that your own playable character wants to become.

    A person that your character became has over 20 choices, so that makes six. I think of making a super smash bros fan game, pokemon style.
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    I know you could go up to 8 playable characters, but. Is it possible to make optional characters like those beyond eight? I think of making a special room for your character, so the limit shall be six characters that your own playable character wants to become.

    A person that your character became has over 20 choices, so that makes six. I think of making a super smash bros fan game, pokemon style.

    The reason my script has a limit of 8 characters is because Pokemon Essentials itself only allows you to define overworld sprites for up to 8 characters. You could probably edit my script fairly easily to allow for more than 8 characters, but Pokemon Essentials will either crash or just not work correctly if you try to define more than 8 characters. And I didn't want to bother with increasing that limit because I didn't think anyone would actually have more than 8 separate characters, all with separate parties, bags, etc. within the same game.

    Also, if all you're doing is allowing the player to choose which Pokemon they want to be (which is the same as saying they want to choose their appearance), then you don't even need my script to do that. All you need to do is have one base appearance for your trainer, defined as "PlayerA" in the metadata.txt PBS file, then create various outfits with different outfit numbers for the rest of your characters. You can read up on trainer outfits on the wiki page:
    https://essentialsdocs.fandom.com/wiki/Player#Outfits
     
    Last edited:
    1
    Posts
    2
    Years
    • Seen May 28, 2021
    Sorry for bumping a semi-old thread but I was wondering, is this script gonna get updated for v19.1? It looks really nice but I keep getting errors like this whenever I try to use it...

    Spoiler:
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Sorry for bumping a semi-old thread but I was wondering, is this script gonna get updated for v19.1? It looks really nice but I keep getting errors like this whenever I try to use it...

    Hello, sorry for the delay! I'm just in deep in exams hell in school right now lol, but you can expect to see the updated version of this script pretty soon.

    Also as a heads up, I will be dropping support for v18 on all of my scripts, as well as removing the legacy v17 scripts from my threads.
     

    Atlat

    Atlat
    63
    Posts
    4
    Years
    • Online now
    Do you have an estimated time for the v19 update? Your multiple protagonist script is the only part of my project left before I can release my project, meaning I'm kind of just waiting right now. I don't want to be a jerk however and make you feel rushed, so this is more of a "hey, that's nice to know" type of question, if you catch my drift. If you don't have a good idea of when it may be released, don't worry about this comment. I can definitely wait.
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Do you have an estimated time for the v19 update? Your multiple protagonist script is the only part of my project left before I can release my project, meaning I'm kind of just waiting right now. I don't want to be a jerk however and make you feel rushed, so this is more of a "hey, that's nice to know" type of question, if you catch my drift. If you don't have a good idea of when it may be released, don't worry about this comment. I can definitely wait.

    Since you asked, I'll just release it now. All jokes aside, I just happened to finish it today XD

    The script is now updated to v4.0! For anyone upgrading from a previous version of the script, make sure to reinstall the scripts from the "Script Installation" guide again, and also make sure to see my note on the main post about the tiny Essentials v19.1 bug.
     

    Atlat

    Atlat
    63
    Posts
    4
    Years
    • Online now
    Found a bug related to the visuals of the trainer.

    When it comes to everything overworld-related, it works great. Mechanically as well, as it is able to separate the different trainers' mons, items, etc. The trainer sprite is where the issue comes in. It's easy to check through the trainer card, but it also shows up in battle when you look at the back sprite.
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Found a bug related to the visuals of the trainer.

    When it comes to everything overworld-related, it works great. Mechanically as well, as it is able to separate the different trainers' mons, items, etc. The trainer sprite is where the issue comes in. It's easy to check through the trainer card, but it also shows up in battle when you look at the back sprite.

    Fixed. The script has now been updated to v4.0.1! Make sure to start a new save, because the fix won't work on an old one.
     

    Atlat

    Atlat
    63
    Posts
    4
    Years
    • Online now
    There still seems to be issues with the code. I'm still getting the wrong trainer (male MC instead of female MC in this case).
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    There still seems to be issues with the code. I'm still getting the wrong trainer (male MC instead of female MC in this case).

    I can't replicate this, so all I can ask for is more details. Is there a specific scenario that is showing the wrong sprite, or is it still the same as before? Because the trainer card and battle sprites both show the correct MC for me now. Are your trainer sprites named correctly in your Graphics/Trainers/ folder? And sorry for the obvious questions, but are you sure you downloaded the newest version of the script, and have deleted your old save file and started a new one?
     

    Atlat

    Atlat
    63
    Posts
    4
    Years
    • Online now
    I just tried on a fresh new Essentials v19.1 to see if maybe I did something wrong when I upped the number of player characters to 26. This file has no changes to it outside of the latest versions of the plugins from you and Following Mons EX. I started as Red (Character 0) and swapped to my quick setup of a youngster character (Character 2). It did change and gave me the youngster overworld sprites, but it gave me Brendan's battle sprites despite the fact that his name isn't even listed once in the metadata.

    Also, I did delete the save file in both this test project and my actual project.

    Thank you for asking though, I can't tell you the amount of times the solution to my issue was something as dumb as deleting the save file.
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    I just tried on a fresh new Essentials v19.1 to see if maybe I did something wrong when I upped the number of player characters to 26. This file has no changes to it outside of the latest versions of the plugins from you and Following Mons EX. I started as Red (Character 0) and swapped to my quick setup of a youngster character (Character 2). It did change and gave me the youngster overworld sprites, but it gave me Brendan's battle sprites despite the fact that his name isn't even listed once in the metadata.

    Also, I did delete the save file in both this test project and my actual project.

    Thank you for asking though, I can't tell you the amount of times the solution to my issue was something as dumb as deleting the save file.

    Thanks for testing it again, this identified the issue for me. The script is now updated to v4.0.2! I tested the same setup that you did, so I hope this works now XD of course, make sure to start a new save file again.
     

    Atlat

    Atlat
    63
    Posts
    4
    Years
    • Online now
    That seems to be working! Thank you! Now all I've got to do is wait for EBDX to work with the 19.1 Hotfixes, which might take a bit. XD

    But yeah, thank you! If I catch any more bugs, I'll come back here and list them.
     
    Back
    Top