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

Resource Multiple Protagonists v5.0.0

NettoHikari

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

v2.0 Update

WARNING! v2.0 is not compatible with the previous versions. This means that you MUST start a new save for testing if you update this script.
In other words, if you've already released a game using an earlier version of this script, then you cannot update to v2.0 without ruining players' old saves.
- Revamped internal structure of how character data is stored
- Added trading between characters (examples in script guide)
- Trade Pokemon 1 for 1 (just like trading with an NPC)
- Send...

Read the rest of this update entry...
 

Snewper

"IDOLA" the Evil Carnation
Member
Joined
Apr 19, 2017
Posts
7
So I keep getting a gsub error, as I mentioned in my review.

Ruby:
Expand Collapse Copy
---------------------------
PKMN Essentials - V17.2
---------------------------
[Pokémon Essentials version 17.2]

Exception: NoMethodError

Message: undefined method `gsubPN' for Kernel:Module

Messages:1044:in `pbMessageDisplay'

Messages:1316:in `pbMessage'

Messages:1326:in `pbConfirmMessage'

Compiler:3450:in `pbTrainerTypeCheck'

Compiler:3467:in `pbTrainerBattleCheck'

Compiler:4300:in `pbConvertToTrainerEvent'

Compiler:3509:in `pbCompileTrainerEvents'

Compiler:3504:in `each'

Compiler:3504:in `pbCompileTrainerEvents'

Compiler:3499:in `each'



This exception was logged in

C:\Users\cgoog\Saved Games\PKMN Essentials _ V17_2\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------

The baffling thing is that I don't have a pre-existing save. Any suggestions?
 

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
242
heyo I followed everything in this script and for some reason, the switch option does not show
Make sure you've installed the code from lines 39-84 correctly, and that you ran
Ruby:
Expand Collapse Copy
pbEnableCharacterCommandSwitching
at least once in an event somewhere before trying to access the Switch option through menu. Also, it won't show up in the middle of a Bug Contest, Safari, or Battle Challenge, but I doubt that's what you're trying to do.
 

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
242
I've been testing out the script in v18, it's brilliant! I'd like to store who I'm playing as in a variable every time I switch. Do you know of a way I could go about doing that? ^^
Thank you! Yeah, there are 2 variables that store the "current" character ID actually: "$PokemonGlobal.playerID" and "$Trainer.metaID". They're both always set to the same ID, and have a range of 0-7 (for 8 possible characters), where 0 is your first character, 1 is the second, etc. If you're using this in Conditional Branches in events, you'd use the Script option to compare this value to certain IDs.
 
Thank you! Yeah, there are 2 variables that store the "current" character ID actually: "$PokemonGlobal.playerID" and "$Trainer.metaID". They're both always set to the same ID, and have a range of 0-7 (for 8 possible characters), where 0 is your first character, 1 is the second, etc. If you're using this in Conditional Branches in events, you'd use the Script option to compare this value to certain IDs.

Awesome, that's just what I needed! Thank-you!
 

TinyDratini

Rookie
Member
Joined
Sep 7, 2020
Posts
1
Hiya! The script works amazing so far. Though is there a way to like "sync" their locations? I'm planning on using the other player as a "partner" with their own party and such to help in double battles which works great, but the problem I'm facing is that their locations are different when switching.

I think I can briefly switch player characters and transfer that partner player to the same map as the first player every time there is a map transition but is there an less convoluted alternative way to do this? But I'm also using Essentials v17.2 so if it's not possible to update the script with a snippet then I can try the transfer method.

Also, if I progress the story with one player with switches/vars would I also have to set the story switches/vars for the second player too or is that gamewide?
 
Last edited:

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
242
Hiya! The script works amazing so far. Though is there a way to like "sync" their locations? I'm planning on using the other player as a "partner" with their own party and such to help in double battles which works great, but the problem I'm facing is that their locations are different when switching.

I think I can briefly switch player characters and transfer that partner player to the same map as the first player every time there is a map transition but is there an less convoluted alternative way to do this? But I'm also using Essentials v17.2 so if it's not possible to update the script with a snippet then I can try the transfer method.

Also, if I progress the story with one player with switches/vars would I also have to set the story switches/vars for the second player too or is that gamewide?

Hi TinyDratini, you could probably achieve syncing their locations with this command (works on the v17.2 version):
Ruby:
Expand Collapse Copy
pbSetLastMap(CHARACTER_ID, MAP_ID, X, Y, DIRECTION)
For example, just before you switch to the other character using "pbSwitchCharacter", you can use the above method to set the other character's "last map" location - where they spawn when you switch to them. It'd look like this:
Ruby:
Expand Collapse Copy
pbSetLastMap(($PokemonGlobal.playerID + 1) % 2, $game_map.map_id, $game_player.x, $game_player.y, $game_player.direction)
For the first parameter, I just assumed you're switching between character IDs 0 and 1, so if it's different then you'll have to adjust that.

Also, all global switches and variables, as well as self switches, are gamewide, so you don't need to worry about setting them for both players. Hope that helps!
 

SebastiaanZ

Trainer
Member
Joined
Jun 5, 2019
Posts
60
Hey, this is amazing. However when I use \PN0 - \PN7, I get the name of the normal main character with the numberr behind it. How can I fix it so that the actual name of the new character shows up?
 

NettoHikari

Cooltrainer
Member
Joined
Jan 4, 2019
Posts
242
Back
Top