Add specific item upon kill?

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Sadly, i get very confused when altering code beyond a couple of numbers....

One of my characters, Enoch, is a necromancer with a summon skill using an item called Necroplasm as a skill cost.
I was wanting to equip him with a passive "Harvest" state that allows him to automatically add Necroplasm to the inventory when he kills an enemy.

I am using most of Yanfly's RMMV plugins, specifically including Auto Passive States and Buffs and States Core.
I *have* used these plugins to add a "Pokemon Sun/Moon" style Beast Boost passive state to my gladiator character as indicated here.
Sadly, I don't know how to alter the notetages--or if it's possible--to create a passive state allowing Enoch to add Necroplasm to the inventory upon delivering the killing blow.

Is there anyone with the coding knowledge who can help with this?
 

rainyday

Veteran
Veteran
Joined
Nov 5, 2019
Messages
72
Reaction score
43
First Language
English
Primarily Uses
RMMV
Put this in your passive state's notebox
Code:
<Custom Conclude Effect>
if(target.hp <= 0){
//Change x to the item ID you want to give, and y to the amount to give.
$gameParty.gainItem($dataItems[x],y,false);
var text = '<CENTER>' + user.name() + ' has generated a ' + $dataItems[x].name + ' from ' + target.name() + '!';
var wait = 90;
BattleManager.addText(text, wait);
}
</Custom Conclude Effect>
That's probably the least complex way to implement this, if you want something more fancy just let me know.
 
Last edited:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Thanks! I'll try this out!
Edit:
This worked wonderfully! Thanks for your help!
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top