• 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 Party Switcher for 17.2+ (Based on Reborn's Code) 4.0

Michael

That One Guy
Member
Michael submitted a new resource:

Party Switcher for 17.2 (Based on Reborn's Code) - Efficiently swap out Pokemon if you have a full party

I've gone ahead and edited another resource to allow compatibility within 17.2. This script allows for a Pokemon to be chosen to swap out if your party is full.

First, replace the entirety of Pokebattle_BattlePeer with this script!

Next, search for this line in the script editor:
Ruby:
Expand Collapse Copy
def pbStorePokemon(pokemon)
You should find the script in PSystem_PokemonUtilities. Replace the entire section with...

Read more about this resource...
 

Jonas930

Is anyonre there?
Member
Joined
Apr 15, 2017
Posts
84
Isn't there a script which do same thing as this one there already?
 

Michael

That One Guy
Member

Richard PT

Cooltrainer
Member
Joined
Oct 26, 2018
Posts
127
The script works fine, but i detected a bug. If i go to a water current directly to a small island, which in the first pic is to the left, and then used surf against the water current, the player can surf where it shouldn't surf, for ex: a small island. Under the water currents tiles, which is layer 2, is the surf tiles, which is layer 1. The grey area is to be normal walking, like emerald tiles. See the pics:
waterc10.png
 

Michael

That One Guy
Member
The script works fine, but i detected a bug. If i go to a water current directly to a small island, which in the first pic is to the left, and then used surf against the water current, the player can surf where it shouldn't surf, for ex: a small island. Under the water currents tiles, which is layer 2, is the surf tiles, which is layer 1. The grey area is to be normal walking, like emerald tiles. See the pics:
waterc10.png
Uhh, this is the wrong script - although from what I've seen, I'm pretty sure that's an essentials bug with water in general - I'll look into it when I have the time.
 

Richard PT

Cooltrainer
Member
Joined
Oct 26, 2018
Posts
127
Uhh, this is the wrong script - although from what I've seen, I'm pretty sure that's an essentials bug with water in general - I'll look into it when I have the time.

I don't know that, sorry. XD
 

WolfPP

Discord wolfppontes
Member
Joined
Aug 24, 2018
Posts
136
Lol yep, wrong thread. Anyway,you need to edit the terrain nor create a new one. Check inside 'PBTerrain':

Code:
Expand Collapse Copy
  def PBTerrain.isSurfable?(tag)
    return PBTerrain.isWater?(tag)
  end

  def PBTerrain.isWater?(tag)
    return tag==PBTerrain::Water ||
           tag==PBTerrain::StillWater ||
           tag==PBTerrain::DeepWater ||
           tag==PBTerrain::WaterfallCrest ||
           tag==PBTerrain::Waterfall
  end

  def PBTerrain.isPassableWater?(tag)
    return tag==PBTerrain::Water ||
           tag==PBTerrain::StillWater ||
           tag==PBTerrain::DeepWater ||
           tag==PBTerrain::WaterfallCrest
  end

  def PBTerrain.isJustWater?(tag)
    return tag==PBTerrain::Water ||
           tag==PBTerrain::StillWater ||
           tag==PBTerrain::DeepWater
  end

  def PBTerrain.isDeepWater?(tag)
    return tag==PBTerrain::DeepWater
  end

  def PBTerrain.isWaterfall?(tag)
    return tag==PBTerrain::WaterfallCrest ||
           tag==PBTerrain::Waterfall
  end
 

Mak

Edge Lord
Member
Joined
Apr 1, 2017
Posts
115
I will admit that I have not tested this on the v19 iteration of the script , and subsequently do not know if the bug is still present there, but I have noticed that the v18 version of the script has an issue where adding a newly caught Pokemon to your party will shuffle your party, but not the held items. If a Pokemon is moved from its position in the party, the held item will be passed off to whatever member ends up occupying its previous party slot as opposed to the item simply sticking to the same Pokemon.

I can't figure out what the cause of the issue is, given that Reborn's version of the code also doesn't reference held items, so I'm unsure if it's the result of v18 modifying how held items are scripted or something of that sort.

EDIT: I have tested on v19 and can confirm the issue is still present
 
Last edited:

CornParade0669

Novice
Member
Joined
Apr 23, 2022
Posts
12
I'm getting the same issue as Mak in the above comment (using v19). If you select a Pokémon to send to the storage box after catching a new Pokémon with a full party, all the Pokémon after it move up one slot in the party as expected but their items remain in the same slots.

e.g. Pokémon in party slots 3 and 6 have items. I catch a Pokémon and select slot 3 to send to the storage box. The Pokémon in slots 4 to 6 move to slots 3 to 5 respectively and the newly caught Pokémon is added to slot 6. The issue is that the new Pokémon in slot 6 has the item that should be on the Pokémon in slot 5 and the item on the Pokémon sent to the box has been duplicated and remains on the Pokémon in slot 3 (which was previously in slot 4).

There's also some issues on e.g. line 53 and others where the game crashes because "pokemon" wasn't defined. I think those instances need to be "pkmn" but I may be wrong. Changing them to "pkmn" seemed to fix the crashing issue but I'm still getting the party item issue described above.
 

Michael

That One Guy
Member
I'm getting the same issue as Mak in the above comment (using v19). If you select a Pokémon to send to the storage box after catching a new Pokémon with a full party, all the Pokémon after it move up one slot in the party as expected but their items remain in the same slots.

e.g. Pokémon in party slots 3 and 6 have items. I catch a Pokémon and select slot 3 to send to the storage box. The Pokémon in slots 4 to 6 move to slots 3 to 5 respectively and the newly caught Pokémon is added to slot 6. The issue is that the new Pokémon in slot 6 has the item that should be on the Pokémon in slot 5 and the item on the Pokémon sent to the box has been duplicated and remains on the Pokémon in slot 3 (which was previously in slot 4).
I will admit that I have not tested this on the v19 iteration of the script , and subsequently do not know if the bug is still present there, but I have noticed that the v18 version of the script has an issue where adding a newly caught Pokemon to your party will shuffle your party, but not the held items. If a Pokemon is moved from its position in the party, the held item will be passed off to whatever member ends up occupying its previous party slot as opposed to the item simply sticking to the same Pokemon.

I can't figure out what the cause of the issue is, given that Reborn's version of the code also doesn't reference held items, so I'm unsure if it's the result of v18 modifying how held items are scripted or something of that sort.

EDIT: I have tested on v19 and can confirm the issue is still present
I will look into this. Thanks for letting me know!
 

Michael

That One Guy
Member
Michael updated Party Switcher for 17.2+ (Based on Reborn's Code) with a new update entry:

Version 4.0 - Bug Fixes and Additional Functionality

  • Fixed crash that occurs when a Pokémon is caught on the Essentials v. 19 version of the script.
  • Fixed bug where items would be duplicated on Essentials v. 18 and v.19 version of the scripts
  • Essentials v.18 and v.19 versions now switch in place as opposed to setting the swapped Pokémon to the end of the party
  • Added ability to be able to see the summary of party Pokémon prior to swapping out. This setting can be toggled in the script. Enabled by default

Read the rest of this update entry...
 
Back
Top