• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Resource Multiple Protagonists v5.0.0

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
243
HI I WANT THE SWITCH OPTION TO BE IN MODULAR MENU BY LUKA SJ HOW I DO
Chill with the caps man. Anyways, try adding this code to the very bottom of the Modular Pause Menu script:
Ruby:
Expand Collapse Copy
# Multiple Protagonists
MenuHandlers.addEntry(:MULTIPLEPROTAGONISTS,_INTL("Multiple Protagonists"),"menuMultipleProtagonists",proc{|menu|
    characters = []
    characterIDs = []
    for i in 0...8
        if $PokemonGlobal.allowedCharacters[i] && i != $PokemonGlobal.playerID
            characters.push($PokemonGlobal.mainCharacters[i][PBCharacterData::Trainer].name)
            characterIDs.push(i)
        end
    end
    if characters.length <= 0
        pbMessage(_INTL("You're the only character!"))
        next
    end
    characters.push("Cancel")
    command = pbShowCommands(nil, characters, characters.length)
    if command >= 0 && command < characters.length - 1
        menu.pbHideMenu
        pbSwitchCharacter(characterIDs[command])
        break
    end
},proc{ return $PokemonGlobal.commandCharacterSwitchOn && !pbInSafari? && !pbInBugContest? && !pbBattleChallenge.pbInProgress? })
 

GalarianZapdos

Novice
Member
Joined
Jan 3, 2021
Posts
26
Chill with the caps man. Anyways, try adding this code to the very bottom of the Modular Pause Menu script:
Ruby:
Expand Collapse Copy
# Multiple Protagonists
MenuHandlers.addEntry(:MULTIPLEPROTAGONISTS,_INTL("Multiple Protagonists"),"menuMultipleProtagonists",proc{|menu|
    characters = []
    characterIDs = []
    for i in 0...8
        if $PokemonGlobal.allowedCharacters[i] && i != $PokemonGlobal.playerID
            characters.push($PokemonGlobal.mainCharacters[i][PBCharacterData::Trainer].name)
            characterIDs.push(i)
        end
    end
    if characters.length <= 0
        pbMessage(_INTL("You're the only character!"))
        next
    end
    characters.push("Cancel")
    command = pbShowCommands(nil, characters, characters.length)
    if command >= 0 && command < characters.length - 1
        menu.pbHideMenu
        pbSwitchCharacter(characterIDs[command])
        break
    end
},proc{ return $PokemonGlobal.commandCharacterSwitchOn && !pbInSafari? && !pbInBugContest? && !pbBattleChallenge.pbInProgress? })
Thank you very much. I Love typing with CAPS 😁.
 

MajikkuMagic

Rookie
Member
Joined
Apr 6, 2021
Posts
2
What a brilliant script. I'm loving it. Is there a way that the sprite of the character I'm not currently playing as will stay where it was when we switched. So if I have both characters on the same map I can see the other character? It kinda breaks immersion if I'm standing near where the other character is supposed to be and then switch and that character isnt there.
 

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
243
What a brilliant script. I'm loving it. Is there a way that the sprite of the character I'm not currently playing as will stay where it was when we switched. So if I have both characters on the same map I can see the other character? It kinda breaks immersion if I'm standing near where the other character is supposed to be and then switch and that character isnt there.
Hm, yeah, that might be something to work on for a future update. I initially made this script with the intention of having my protagonists nowhere near each other, but I can see how it might look strange if you allow the player to switch freely between characters AND let the characters roam the same maps. If you're switching characters by event, then one thing you could try is having separate events that just have your characters' graphics, then setting their event locations during the switch to make it look like the earlier character's graphic stayed at their location.
 

MajikkuMagic

Rookie
Member
Joined
Apr 6, 2021
Posts
2
Hm, yeah, that might be something to work on for a future update. I initially made this script with the intention of having my protagonists nowhere near each other, but I can see how it might look strange if you allow the player to switch freely between characters AND let the characters roam the same maps. If you're switching characters by event, then one thing you could try is having separate events that just have your characters' graphics, then setting their event locations during the switch to make it look like the earlier character's graphic stayed at their location.
Yeah that's what I've been doing for any story based stuff where you aren't freely switching between them. It's not a huge deal as I can just set events for the story based puzzle stuff. no worries. Thank you!
 

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
243
NettoHikari updated Multiple Protagonists with a new update entry:

Upgrade to v19.1

NOTE: This version (and all future versions) will ONLY be compatible with Essentials v19.1. You can download a v18 version (v3.0) from the main post. If you're upgrading from a previous version of the plugin, make sure to look at the Script Installation guide again to reinstall some of the miscellaneous code.
- Updated to v19.1

Read the rest of this update entry...
 

trainer00002

nothing but babbages in here tonight
Member
Joined
Jun 8, 2021
Posts
13
hi, keep getting this error? the only changes i've made from the script's instructions/to the script itself were removing the checks for the safari and whatnot since my game doesn't have one (there are no \PN checks in following pokemon ex from what i could tell)

Screenshot_717.png
Screenshot_719.png
 

AenaonDogsky

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
511
hi, keep getting this error? the only changes i've made from the script's instructions/to the script itself were removing the checks for the safari and whatnot since my game doesn't have one (there are no \PN checks in following pokemon ex from what i could tell)

View attachment 6466View attachment 6467

Hi, not the script author (obviously) or on 19.1, but I have used the script for this game jam, have you tried starting a new savefile post-script implementation?

Also, try adding these to the intro event in this order:

pbChangePlayer(0)

pbTrainerName("Yourname") (or perhaps call the naming script here? Haven't tried)

pbSwitchCharacter(1, "Yourothercharname", 2) (can be any direction or no direction iirc)

pbSwitchCharacter(0)
 

trainer00002

nothing but babbages in here tonight
Member
Joined
Jun 8, 2021
Posts
13
Hi, not the script author (obviously) or on 19.1, but I have used the script for this game jam, have you tried starting a new savefile post-script implementation?

Also, try adding these to the intro event in this order:

pbChangePlayer(0)

pbTrainerName("Yourname") (or perhaps call the naming script here? Haven't tried)

pbSwitchCharacter(1, "Yourothercharname", 2) (can be any direction or no direction iirc)

pbSwitchCharacter(0)
yes, all testing has been with new save files! the error doesn't pop up in the intro, it happens when i attempt to use the switch command from the start menu. i did try adding that stuff to the intro but i still get the same error once the game loads and i try switching again
 

AenaonDogsky

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
511
yes, all testing has been with new save files! the error doesn't pop up in the intro, it happens when i attempt to use the switch command from the start menu. i did try adding that stuff to the intro but i still get the same error once the game loads and i try switching again
Derp I'm blind, I thought I read the error... turns out ... I'm blind.

Here's what I've added to the menu script, perhaps it might help:

part 1
part 1:
Expand Collapse Copy
  cmdSwitch   = -1

part 2

Part 2:
Expand Collapse Copy
    if $PokemonGlobal.commandCharacterSwitchOn && !pbInSafari? &&
           !pbInBugContest? && !pbBattleChallenge.pbInProgress?
       commands[cmdSwitch = commands.length] = _INTL("Switch")
     end

part 3


part 3:
Expand Collapse Copy
#============================
        elsif cmdSwitch>=0 && command==cmdSwitch
       characters = []
       characterIDs = []
       for i in 0...8
         if $PokemonGlobal.allowedCharacters[i] && i != $PokemonGlobal.playerID
           characters.push($PokemonGlobal.mainCharacters[i][PBCharacterData::Trainer].name)
           characterIDs.push(i)
         end
       end
       if characters.length <= 0
         pbMessage(_INTL("You're the only character!"))
         next
       end
       characters.push("Cancel")
       command = pbShowCommands(nil, characters, characters.length)
       if command >= 0 && command < characters.length - 1
         @scene.pbHideMenu
         pbSwitchCharacter(characterIDs[command])
         break
       end
     #========================================

This is on 18.1 as mentioned before. I don't think the menu script would have changed much, but Netto's 19.1 version of the script surely would, so don't copy paste anything directly - perhaps take a look at the conditions e.g. for the safari?
 
Last edited:

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
243
yes, all testing has been with new save files! the error doesn't pop up in the intro, it happens when i attempt to use the switch command from the start menu. i did try adding that stuff to the intro but i still get the same error once the game loads and i try switching again
I haven't been able to reproduce this. Can you describe exactly which lines in my script you changed and with what? Also, do you have any code related to my script in your starting event, like anything similar to the code that Dogz mentioned in his first post? Can you outline exactly what actions you take from when you start a new game to when you try to switch from the pause menu?
 

trainer00002

nothing but babbages in here tonight
Member
Joined
Jun 8, 2021
Posts
13
I haven't been able to reproduce this. Can you describe exactly which lines in my script you changed and with what? Also, do you have any code related to my script in your starting event, like anything similar to the code that Dogz mentioned in his first post? Can you outline exactly what actions you take from when you start a new game to when you try to switch from the pause menu?
i have an event set up directly next to the starting point so i can just turn, press c, and instantly activate the option on in the menu, i don't even move any tiles in any direction. the only thing that happens prior to that is the shortcut intro sequence i set up, which (prior to fussing with it and adding in a quick pbswitch to go back and forth between my actual player character and a test character) had nothing in there related to the script

the only thing i remotely altered was, initially, removing this:
Screenshot_727.png

and i've since put it right back in to no effect (i had copy-pasted it into the correct spot in the pause menu script and THEN removed it, so i just copy-pasted the one that was in the script tutorial)

i've tried changing my intro like so:
Screenshot_728.png

to, again, no effect

if i use pbSwitchCharacter through an event it works fine, it's just the pause menu version that keeps breaking. aside from adding my playable characters to the metadata file and activating stuff like running shoes and the pokegear, i haven't touched anything related to trainer info at all (including from base essentials) so i'm really not sure what the problem could be :-( it just keeps returning that same error at the same spot no matter what i do
 

AenaonDogsky

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
511
i have an event set up directly next to the starting point so i can just turn, press c, and instantly activate the option on in the menu, i don't even move any tiles in any direction. the only thing that happens prior to that is the shortcut intro sequence i set up, which (prior to fussing with it and adding in a quick pbswitch to go back and forth between my actual player character and a test character) had nothing in there related to the script the only thing i remotely altered was, initially, removing this: View attachment 6473 and i've since put it right back in to no effect (i had copy-pasted it into the correct spot in the pause menu script and THEN removed it, so i just copy-pasted the one that was in the script tutorial) i've tried changing my intro like so: View attachment 6474 to, again, no effect if i use pbSwitchCharacter through an event it works fine, it's just the pause menu version that keeps breaking. aside from adding my playable characters to the metadata file and activating stuff like running shoes and the pokegear, i haven't touched anything related to trainer info at all (including from base essentials) so i'm really not sure what the problem could be :-( it just keeps returning that same error at the same spot no matter what i do

I vaguely remember having an issue like that earlier in development but I can't recall it. Could you either post or link to the menu script, and (if you have made any modifications) to Hikari's?
 

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
243
i have an event set up directly next to the starting point so i can just turn, press c, and instantly activate the option on in the menu, i don't even move any tiles in any direction. the only thing that happens prior to that is the shortcut intro sequence i set up, which (prior to fussing with it and adding in a quick pbswitch to go back and forth between my actual player character and a test character) had nothing in there related to the script

the only thing i remotely altered was, initially, removing this:
View attachment 6473
and i've since put it right back in to no effect (i had copy-pasted it into the correct spot in the pause menu script and THEN removed it, so i just copy-pasted the one that was in the script tutorial)

i've tried changing my intro like so:
View attachment 6474
to, again, no effect

if i use pbSwitchCharacter through an event it works fine, it's just the pause menu version that keeps breaking. aside from adding my playable characters to the metadata file and activating stuff like running shoes and the pokegear, i haven't touched anything related to trainer info at all (including from base essentials) so i'm really not sure what the problem could be :-( it just keeps returning that same error at the same spot no matter what i do

It occurs to me that this set of instructions may have been worded incorrectly:
At the start of the game, the character id is initially 0 (PlayerA). Use
pbTrainerName to set the character up instead of pbSwitchCharacter, unless
you want the starting character to NOT be PlayerA.
Did you completely remove the "pbTrainerName" script from your starting event? You actually need it to set up your character even if you're not starting with PlayerA as your first playable character. If you don't want the player to be able to name PlayerA until later, you're free to give a dummy name like:
Ruby:
Expand Collapse Copy
pbTrainerName("Dum")
Then switch to whatever character you want, then after you switch back to PlayerA, call "pbTrainerName" again.
 

trainer00002

nothing but babbages in here tonight
Member
Joined
Jun 8, 2021
Posts
13
It occurs to me that this set of instructions may have been worded incorrectly:

Did you completely remove the "pbTrainerName" script from your starting event? You actually need it to set up your character even if you're not starting with PlayerA as your first playable character. If you don't want the player to be able to name PlayerA until later, you're free to give a dummy name like:
Ruby:
Expand Collapse Copy
pbTrainerName("Dum")
Then switch to whatever character you want, then after you switch back to PlayerA, call "pbTrainerName" again.
that did it, thank you!
 

DrifterFox

Rookie
Member
Joined
Aug 11, 2021
Posts
7
Hello. I keep running into the following error. I've installed Multiple Protagonists into my own project and I've fiddled around with a few things to try to get it to work, but to no avail. I've also created a brand new project and installed Multiple Protagonists and I got the exact same error. I imagine I must be doing something wrong, but I cannot for the life of me figure out what it is.

Error359738442221.PNG
 
Back
Top