Jump to content

Prevent AI trainers from switching to certain mons


princessyiris

Recommended Posts

I'm having an issue with the AI and I'm wondering if anyone knows enough about the Reborn scripts to help me out.

 

I have a gym leader set on a Mountain field with auto-hail.

The reason I have it set like this is so that the field will turn into a Snowy Mountain field after three turns of hail.

 

The gym leader's semi-final mon is a Masquerain with Tailwind. Tailwind summons Strong Winds on the Mountain field, which cancel out the hail permanently.

blob.png.ca422989717fd9629635378c7b14f251.png

The gym leader is insistent on ALWAYS sending out this Masquerain after their first mon dies, without fail. The tailwind messes up the whole thing and ironically makes the battle easier than intended.

 

I just want the gym leader to use the default order their team is set in. Is there a way to basically tell the AI trainer to use the default order?

Link to comment
Share on other sites

There are several ways to go about this.

 

Essentials has a method known as skill codes which is an unused function to get certain trainers to do certain things. This method is the last parameter that can be set in the trainertypes PBS file. 

 

Here is a reddit post where Maruno, the creator of essentials, talks about how to set one out.

 

Reborn uses a more advanced switching method for pokemon, (def pbSwitch I believe) to calculate which pokemon to switch to, based on a number of factors. The default switching method (pbWithdraw or something along those lines) is still within the AI script, just commented out. It may be possible to write a skill code that forces the trainer to use the default switching method Which causes them to switch pokemon in order.

 

Another method involves using a similar method as the Shelly battle. There is a section in the AI script which forces Shelly's Illumise to always use rain dance on the first term. It might also be possible to throw the switching method into a similar piece of code which should grant the same effect.

 

Hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...