Stealing or forcing an item drop

So it seems that stealing is not implemented in the base RMVXA and requires a script. Before I go that route, is there a way to increase an enemies loot drop chance(s) through eventing?

 

Sample for clarity: Dodo bird has 1/1000 chance of dropping Dodo egg when killed. Eric casts "Maxzorz Lootzorz" which increases the dodo Bird's chance of dropping an Egg by 1000%. 

 

 

My old post

___________________________________

I'm thinking of a spell that has a 50% chance of killing an enemy if their hp <50% of mhp....and then I want it to drop a specific item to that enemy.

Skills have a success chance rate to 'cast' so that works well enough for the first part of my spell. The part I'm really missing is how to drop an Item specific to that monster (and not the spell)... Maybe  a common event that references the ID of the monster, and then add's item IF conditional match = ID xxx?

Much obliged.

EDIT: I was just checking Control Variables and it doesn't seem able to reference an Enemy's ID# only it's stats. I can set a monsters Item Drop's and change it's probability to some_high_number.  But there doesn't seem to be a steal skill in the default RMVXace. My goal is to grant items that can only be attained by killing a monster with that spell. 
Although in many cases it might be easier, you don't have to use a script to 'steal' items - as always the trick is to make it look that way to the player.  This is what I have done in my current project

I have a skill called.Thievery (this is for an enemy, but the basic principle is the same).  It calls a Common Event

The common Event rolls a variable, in my case 0 - 3.

Then conditionals

-If zero, then remove 1 small health healing potion.  Text says "Thief stole a Health Potion from you."

-If 1 conditional checking the level of gold.  If 35+, then reduce gold by 35, Text says  "Thief stole 35 Gold Pieces from you."  Else: "Thief failed to steal anything from you".

-if 2 - same as 1, but for 25 gold pieces

-if 3 - "Thief failed to steal anything from you."

This is do-able because it's in a limited context.  It could start getting cumbersome if you want the actor to be able to steal a lot of different things.

EDIT

Re: your edit - you can identify the enemy ID in the damage formula, which might provide you with the clue for how to do this.  

For example, if the enemy ID in the database is 57, and you wanted to inflict a huge amount of damage, the formula would be:

b.enemy? && b.enemy_id == 57 ? 9999 : a.atk * 4 - b.def * 2

What this is doing is saying if the enemy ID is 57, then deal 9999 damage.  If not, then do the normal damage.

So, if Eric's skill cast an identifying state e.g. state 40, it might be possible to construct a damage formula and then use an 'end of battle' parallel process to get what you want.  So it might be:

b.enemy? && b.enemy_id == 57 ? b.add_state(40) : 0

I've now got to go out, but for the battle end event, something like

In the troop tab - set to turn zero - turn switch Battle End ON 

As it's a parallel process, it won't happen in the battle screen, but the moment you return to the map - we can get round that

Switch Battle End calls a parallel process Common Event.  

That CE gives you the dodo egg, text saying something like "Eric finds a dodo egg in the bones of the dodo"  or something similar to account for it being after the battle.

Last command of the CE must be to turn the switch Battle End OFF
I like this! Good thinking. Except for what I need, I think I need a way to call the EnemyID into a variable and I don't see this option. 

Orrrr............I just thought of this. I could have the troop battle event put the variable in for me. So at the start of the battle it sets Variable XYZ to XX, then my spell gives a conditional branch that works off the variable set by the battle. 

Off to testing!

EDIT: Yay it works....sort of. So it easily works when there is only 1 enemy type in the battle. But I don't know how to make it work when there are 2 enemy types in the battle.

Example: Troop: Slime*2 during turn 1 I set variable 20:Enemy ID == 1, then my spell hits and conditional checks if 20:Enemy ID==1, if yes than "you stole" if no "no ID found". And it works! But if there is Slime+Spider, I can set EnemyID==1, I could set EnemyID2==2, but don't yet have a way of knowing which enemy my spell is targetting to start off different conditional branches. :|
So if I've understood correctly, you've actually got 2 separate queries.

  1. Getting the dodo's egg only if you kill the dodo.  Has that been solved with the suggestion of the state plus battle end switch?
  2. A more general steal ability which can distinguish between different enemies.
Is that where we are now?
So if I've understood correctly, you've actually got 2 separate queries.

  1. Getting the dodo's egg only if you kill the dodo.  Has that been solved with the suggestion of the state plus battle end switch?
  2. A more general steal ability which can distinguish between different enemies.
Is that where we are now?
1. Actually I was able to get the Egg after combat with just Skills and Common event + Troop event. I honestly couldn't figure out how to use State's to improve the situation. (There is a bug I think, where if the spell doesn't kill him due to MDEF or something, the ability of stealing still occurs)

2. While I can deal damage in relation to Enemy ID, and it's nice to know there is such a thing, I still don't know how to use this to create a Steal that relates to Enemy ID. 
I know how to steal a set amount of gold by using the damage formula, or stealing a percentage, I cannot think of a way of achieving what you want with stealing items based on enemy ID.  if no one passes by with a solution, I think you are going to have to go down the route of using a script.

In case it is ever of use to you (as you were annoyed that you can't steal by default) the way of stealing gold from the heroes is to put this in the damage formula

$game_party.lose_gold(amount)


to steal it (apparently) from the enemy put

$game_party.gain_gold(amount)

For a percentage e.g. 5%

[SIZE=10.5pt]x = $game_party.gold ; x *= 0.05 ; $game_party.lose_gold(x.to_i); 0[/SIZE]

[SIZE=10.5pt]That zero at the end is because you have to do some damage otherwise the gold stays the same.  You can change that 0 to whatever you want.[/SIZE]

Original thread: https://forums.rpgmakerweb.com/threads/stealing-or-forcing-an-item-drop.42348/