where partner_id is the partner's character ID (same ID as what goes in pbSwitchCharacter).
For the second question, I haven't edited the AI code in any way. You should try downloading a new copy of Essentials and testing out a double battle with a partner, and if the same issue happens then it's a bug in Essentials.
Yes, for the PC storage, you can simply comment out any lines in the script that contain PokemonStorage or PCItemStorage and start a new save.
The Pokedex info is a bit trickier because that is stored within the general $Trainer object, so it can't just be commented out because you'd be sharing a lot more than just the Pokedex. I think you could try this: at the start of the game, save the first player's Pokedex to a Game Variable with this Script:
Ruby:
$game_variables[XXX] = $Trainer.pokedex
Then inside this script, find the above line on 502 and place this line below it:
Ruby:
newmeta[PBCharacterData::Trainer] = $Trainer # Find this
$Trainer.pokedex = $game_variables[XXX] # Add this below
In script section Player, find this line:
Ruby:
attr_reader :pokedex
and change it to:
Ruby:
attr_accessor :pokedex
I haven't tested this, so let me know if it works.
I tried making that work ( shared pokedex ) on essential v20.1 but it seems only works on v19.
I wonder if there is a way to make all protagonists share the same pokedex in v20.1
Thanks again for the great script.
I tried making that work ( shared pokedex ) on essential v20.1 but it seems only works on v19.
I wonder if there is a way to make all protagonists share the same pokedex in v20.1
Thanks again for the great script.
So, as you can tell the game I am working on is based on protagonist teaming up in battles, now the problem that i am facing is the partner can't access his\her bag in battle, due to some missing codes in essential scripts
And what makes this crucial for me is without having the mega ring in the partner’s bag, he\she can't mega evolve.
now I managed to fix the problem partially by the help of the community, but it only works on normal trainers, not the different protagonist.
Well, I took the code I'm going to share from the script Save File Calls so credits to him, I guess?
This is part of a code to pass all data from a player to a trainer to fight against but maybe it'll help?
Ruby:
oldbag = bag.clone
items = []
for i in 0...oldbag.pockets.length
pocket = oldbag.pockets[i]
for j in 0...pocket.length
item = pocket[j]
item[1].times do |k|
items.push(item[0])
end
end
end
trainer.items = items
end
Well, I took the code I'm going to share from the script Save File Calls so credits to him, I guess?
This is part of a code to pass all data from a player to a trainer to fight against but maybe it'll help?
Ruby:
oldbag = bag.clone
items = []
for i in 0...oldbag.pockets.length
pocket = oldbag.pockets[i]
for j in 0...pocket.length
item = pocket[j]
item[1].times do |k|
items.push(item[0])
end
end
end
trainer.items = items
end
You should use that before switching between characters so the bag stored is from the last character. Maybe combine it with conditionals to see which character the player was using to store the bags on different variables? It should be something similar to the way the partner's pokemon are selected.
As for the place, I haven't looked at the script but probably around the same place where the script stores the character's pokemon.
this looks like its what ive been looking for just a couple of questions
1) how complicated will it be to convert to 21.1 ive done a couple but i know some are harder than others
2) is there a way to battle an inactive protaganist
3) i see that theres ways to share the pokedex but can this be done after a certain point and does it work with storage
this looks like its what ive been looking for just a couple of questions
1) how complicated will it be to convert to 21.1 ive done a couple but i know some are harder than others
2) is there a way to battle an inactive protaganist
3) i see that theres ways to share the pokedex but can this be done after a certain point and does it work with storage
1) I'm planning to update this in the next couple of weeks.
2) Can you clarify your question? You can battle any protagonist that has been switched to at least once. You can also modify the data of any character once the character has been initialized, if you want to give a custom party, items, etc.
3) To share the pokedex only after a certain point, you can probably use the same code I posted above (https://eeveeexpo.com/threads/2056/post-59010), but instead of doing this part:
Ruby:
newmeta[PBCharacterData::Player] = $player # Find this
$player.pokedex = $game_variables[XXX] # Add this below
You replace it with this:
Ruby:
newmeta[PBCharacterData::Player] = $player # Find this
$player.pokedex = $game_variables[XXX] if $game_switches[YYY] # Add this below
And then create a new Game Switch that you turn on at the point you want to enable pokedex sharing. One issue with this is that it will only use the first character's pokedex data, not merge the data between all the characters. Some extra code would be required if you want the data to be merged the first time the sharing is enabled.
You should be able to apply a very similar method to the pokedex sharing code to any object, such as the bag, pokemon storage, or item storage.
NOTE: This version (and all future versions) will ONLY be compatible with Essentials v21.1. You can download a v20 version (v4.1.1) from the main post.
- Updated to Essentials v21.1
Well, I've actually updated it to Essentials v21.1 now.
At some point in the next one or two weeks, I'm planning to refactor the script. As part of the new version, I'll add a feature to allow sharing of resources (such as bag, item storage, pokemon storage, dex, etc.) between characters, given that there have been several people asking for it.
WARNING! v5.0.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 v5.0.0 without ruining players' old saves.
Added settings to enable or disable sharing of Pokedex, bag, Pokemon storage, and item storage between all characters
Refactored script into multiple sections and replaced enum...
Hey there, this is a really cool resource and the work you put into it shows in the code! I was wondering if you might have any advice for adapting this script to swap with a follower, like a temporary trainer or even a follower pokemon? Unless it just make sense to designate a second player that looks like the follower pokemon and sometimes take control of it?
Hello. I see this has been recently been updated on GitHub. Does this plug-in work for having the play having two trainers at once? I'm thinking of a game where the player uses partners to get through. I have done a quick overview of the scripts, but I am new to RPGM and Essentials.
Hey there, this is a really cool resource and the work you put into it shows in the code! I was wondering if you might have any advice for adapting this script to swap with a follower, like a temporary trainer or even a follower pokemon? Unless it just make sense to designate a second player that looks like the follower pokemon and sometimes take control of it?
That second option is probably the easiest approach. You'll need to have some code in pbSwitchCharacter to set the correct location upon switch. You might even be able to make it a smooth transition by having some code to shift the camera to the follower's location, then perform the switch without the default fade transition.
Hello. I see this has been recently been updated on GitHub. Does this plug-in work for having the play having two trainers at once? I'm thinking of a game where the player uses partners to get through. I have done a quick overview of the scripts, but I am new to RPGM and Essentials.
If you mean that the player should have the ability to control two characters simultaneously (i.e. side-by-side screens), then this plugin will not provide that. If you mean that the player can switch between two characters at any given time, then this plugin does provide that.
im sorry for bothering you sir, do you mind help me fix it as when im using Essentials Deluxe its caused an error when change character red into leaf
btw its on essentials version 20.1
This section is for the discussion of the tutorials and resources on Eevee Expo. To find tutorials and resources, check out the Tutorial and Resource Manager for optimal navigation.