Improved Item AI
Section 7.G
This plugin builds upon the Deluxe Battle Kit to improve upon the AI when it comes to using items from the inventory. This will generally allow AI trainers to use items more intelligently and less wastefully. AI trainers will now also consider using items to restore HP, PP, or cure the status conditions of their entire party, and not just their active Pokemon.
This also expands upon the types of items the AI is able to use in battle, allowing them to access all of the same items that the player would be able to use. This means you can give NPC's more unique items that they normally wouldn't know how to use, such as Ethers, Guard Spec. or even more obscure things like the Poke Flute.
AI Item Scores
This plugin overhauls how the AI determines to use items by implementing a "scoring" system that works very similarly to how the AI scores moves to determine which to use. While playing in debug mode, you can even turn on battle logging to be able to view the AI's decision making in regards to items within the game console.
In the plugin file [001] Battle_AI, you will find the following settings:
ITEM_FAIL_SCORE = 20
ITEM_USELESS_SCORE = 60
ITEM_BASE_SCORE = 100These are what determines the base values the AI utilizes when it comes to scoring moves. These are identical values used for move calculation, and works similarly here. You may adjust these to your liking.
Item Utilities
This plugin adds several scripting utilities to the Battle class that may be used to make coding your own AI handlers a bit easier. Below I'll cover each new method included:
Last updated
Was this helpful?