Tips & Tricks – Poach (Final Fantasy Tactics) – RPG Maker MV

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

In Final Fantasy Tactics, Thieves can gain the ability: Secret Hunt, which effectively lets them Poach enemies. Poached enemies, when killed by a character with Secret Hunt, will give extra item(s) to the player. Here’s how you can create this effect for RPG Maker MV!

Get the copy/paste code here: 

Place this code inside of your Poach skill’s notebox. Change the values in red to fit your game’s settings.

<After Eval>
// Check if the user is an actor, target is an enemy, and the target has been slain.
if (user.isActor() && target.isEnemy() && (target.isDead() || target.hp <= 0)) {
  // Get the ID of the target.
  var id = target.enemyId();
  // Create an empty pool for the list of possible items.
  var pool = [];
  // Add items to the global pool.
  pool.push($dataItems[1]);
  pool.push($dataItems[2]);
  pool.push($dataItems[3]);
  // If the enemy ID is 1...
  if (id === 1) {
    // ...then add unique items to the possible pool.
    pool.push($dataWeapons[1]);
  // If the enemy ID is 2...
  } else if (id === 2) {
    // ...then add unique items to the possible pool.
    pool.push($dataWeapons[2]);
    pool.push($dataWeapons[3]);
  // If the enemy ID is 3...
  } else if (id === 3) {
    // ...then add unique items to the possible pool.
    pool.push($dataArmors[1]);
    pool.push($dataArmors[2]);
    pool.push($dataArmors[3]);
  }
  // Get a random item from the pool.
  var item = pool[Math.floor(Math.random() * pool.length)];
  // Make sure the item is valid.
  if (item) {
    // Play an animation on the target.
    target.startAnimation(2);
    // Remove the target's immortality.
    target.removeImmortal();
    // Play a sound effect.
    SoundManager.playShop();
    // Make the player party gain the said item.
    $gameParty.gainItem(item, 1);
    // Create a message indicating the item has been poached.
    var msg = '<CENTER>' + user.name() + ' acquired \\i[' + item.iconIndex + ']' + item.name + ' from ' + target.name() + '!';
    // Set the wait frames to 60.
    var wait = 60;
    // Make the BattleManager display the text.
    BattleManager.addText(msg, wait);
  }
}
</After Eval>

Happy poaching!

Please wait while you are redirected...or Click Here if you do not want to wait.