Getting Troop Drops On The Map (Without entering a battle)

So I'm facing an issue when trying to make an assassination passive that allows you to instantly kill enemy symbols on the map without engaging them directly in a battle, naturally this prevents the player from getting any loot the enemy would have otherwise dropped from killing them normally. While it is possible to manually add separate drop pools in this situation via eventing it is without a doubt the route of pain and suffering so I am looking for an alternative.

Is it possible to use a script call to get the drops from a specific troop (factoring into their individual drop rates and drop rate boosts) from the map or is a script necessary for this?

Thanks in advance.
Well...if the enemy dies by the use of this skill...after the event happened (on the enemy event itself) you can just make a "change items/weapon/armor" that will drop whatever the enemy was carrying...you can even make the drops random using variables and conditional branches...(tough that would be a little more work)

Edit: Here's a little settup I have...(Mine here would be the stat...I changed the "atk" stat to mine...anyway)

Help.png
Code:
$game_troop.setup(troop_id)
$game_troop.make_drop_items.each do |item|
  $game_party.gain_item(item, 1)
end
Change the troop id.
@TheoAllen
Thanks for the snippet (only find this out today as somehow I forgot to watch this thread thinking I'd be notified lol) but the code doesn't seem to give any results, even on a fresh project - no errors, no items gained, nothing. Not sure if I need to do anything other than changing the troop ID?
Turned out that the make drop item function took from a dead battler. Which was the reason why it doesn't work.

In that case, a script snippet would be required.
Code:
class Game_Troop
  def force_drop_items
    members.inject([]) {|r, enemy| r += enemy.make_drop_items }
  end
end
Then the script call would be.
Code:
$game_troop.setup(troop_id)
$game_troop.force_drop_items.each do |item|
  $game_party.gain_item(item, 1)
end
@TheoAllen That works now. Thanks a ton. 🤘

I noticed one additional issue however, since $game_party.gain_item is called directly instead of command_126 in the interpreter, there is no indication that the player has received the item and therefore they are unable to tell what actually dropped.

I am currently using a item popup script (http://sepher.jp/game/rgss3/RGSS3_getinfo_plus.txt) for normal usage (that works fine on Change Items event command) but had no luck to make it work with this function since gain_item obviously doesn't call the popup function, is there a possible variation of the script call that can capture your snippet and run the modified command_126 in the above link?
Apparently what you need to do is simply using
Code:
e = $game_temp.streffect
e.push(Window_Getinfo.new(id, type, text, value))
Which mean it goes by
Code:
$game_troop.setup(troop_id)
$game_troop.force_drop_items.each do |item|
  value = 1
  type = 0
  id = item.id
  text = CUSTOM_GET_WINDOW::ITEM_TEXT_ADD
  e = $game_temp.streffect
  e.push(Window_Getinfo.new(id, type, text, value))
end
Of course, I haven't tried it yet.
Ah that was exactly what I tried but was missing the item.id part, works perfectly now. Many thanks again!

This can be closed now.
Thread closed

Please report your thread and ask for it to be closed, in future, instead of just adding adding it as a comment to your post. Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/getting-troop-drops-on-the-map-without-entering-a-battle.131218/