- 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.
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!
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.
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!
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.
[2021-05-19 06:42:03 -0400]
[Pokémon Essentials version 19]
Exception: RuntimeError
Message: Script error in event 1 (coords 0,0), map 1 (Intro):
Exception: NoMethodError
Message: undefined method `pokedexViable' for #<PokemonGlobalMetadata:0x0000025f011c1ee0 @bicycle=false, @surfing=false, @diving=false, @sliding=false, @fishing=false, @startTime=2021-05-19 06:41:35.5605989 -0400, @stepcount=0, @pcItemStorage=nil, @mailbox=nil, @phoneNumbers=[], @phoneTime=0, @partner=nil, @creditsPlayed=false, @pokedexDex=0, @pokedexIndex=[0, 0, 0], @pokedexMode=0, @daycare=[[nil, 0], [nil, 0]], @daycareEgg=false, @daycareEggSteps=0, @safariState=#<SafariState:0x0000025f019880c0 @start=nil, @ballcount=0, @inProgress=false, @steps=0, @decision=0>, @bugContestState=#<BugContestState:0x0000025f01993f38 @ballcount=0, @ended=false, @inProgress=false, @decision=0, @encounterMap=0, @lastPokemon=nil, @otherparty=[], @contestants=[], @places=[], @start=nil, @reception=[], @lastContest=nil>, @challenge=nil, @lastbattle=nil, @eventvars={}, @bridge=0, @repel=0, @flashused=false, @encounter_version=0, @healingSpot=nil, @escapePoint=[], @pokecenterMapId=-1, @pokecenterX=-1, @pokecenterY=-1, @pokecenterDirection=-1, @visitedMaps=[nil, true], @mapTrail=[1], @happinessSteps=0, @pokerusTime=2021-05-19 06:41:35.6404371 -0400, @safesave=false, @mainCharacters=[nil, nil, nil, nil, nil, nil, nil, nil], @commandCharacterSwitchOn=false, @allowedCharacters=[true, false, false, false, false, false, false, false], @roamPokemon=[], @roamPosition={1=>21, 3=>31}, @roamedAlready=false, @dependentEvents=[], @flashUsed=false>
***Full script:
pbSwitchCharacter(0)
Backtrace:
356:Multiple Protagonists:708:in `pbCharacterInfoArray'
356:Multiple Protagonists:547:in `pbSwitchCharacter'
(eval):1:in `execute_script'
033:Interpreter:131:in `eval'
033:Interpreter:131:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'
033:Interpreter:81:in `update'
Backtrace:
033:Interpreter:183:in `rescue in execute_script'
033:Interpreter:129:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'
033:Interpreter:81:in `update'
032:Scene_Map:156:in `block in update'
032:Scene_Map:154:in `loop'
032:Scene_Map:154:in `update'
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...
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.
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.
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 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.