Ok So I want to make a wearable Item that allows the user to store and then use the attacks of defeated enemies against enemies. However, I want the skill to have a 10% chance to be learnd on most enemies. and I want the skills to stay With the Neckalace so when it's removed the skills go away from the player but can be given to anther player to learn. If this possible and how would I go abut doing so?
Trying to make a necklace of learning
RPG Maker MV Supportnot possible by default, you'll need a plugin for that.
theoretically you could make part of it with tricky eventing, but not the entire list of options you describe, so it'll have to be a custom plugin.
theoretically you could make part of it with tricky eventing, but not the entire list of options you describe, so it'll have to be a custom plugin.
Cool, I'm all about Plugins. I have every Yanfly one. I'll look into them and see. Thanks Andar!
I think it's extremely unlikely that any existing plugin can do that - that is why I said you'll need a custom plugin, one that is specifically written for this.
The problem is remembering different attacks, that requires data on the object that simply doesn't exist on any plugin that I heard of.
Ah okay. I see. hmm. Well guess I need to figure out how to make a copy skill skill then and figure some code to make it put that skill on the Item and have the Item give that skill to the Character. I need to dig out my old Javascript books from College.
To clarify: you want a piece of armour/weapon that stores skills from enemies AFTER they are defeated by the item-wearer, or as the enemy uses the skill on the player?
I have a system that allows players to learn skills as they are hit with them. The skills are 'stored' on the piece of equipment (in my system, a piece of armour) that can be transferred to another party member. Party members that take the armour off lose the skills; party members that equip the armour gain the skills 'stored' on it.
If that's what you're after, I'd be happy to pass along my set-up to you, help provide a base for your own. If it's learn skills from enemies after they're defeated, I'd need to look into that a bit more for you and tweak what I currently have to hopefully fit your needs.
EDIT: I've actually got both versions functioning. Before I go and fill your post with a bunch of stuff (since both require a fair bit of setup, and time for me to type out in a coherent manner) let me know which route you'd rather. Or both 🙂
I have a system that allows players to learn skills as they are hit with them. The skills are 'stored' on the piece of equipment (in my system, a piece of armour) that can be transferred to another party member. Party members that take the armour off lose the skills; party members that equip the armour gain the skills 'stored' on it.
If that's what you're after, I'd be happy to pass along my set-up to you, help provide a base for your own. If it's learn skills from enemies after they're defeated, I'd need to look into that a bit more for you and tweak what I currently have to hopefully fit your needs.
EDIT: I've actually got both versions functioning. Before I go and fill your post with a bunch of stuff (since both require a fair bit of setup, and time for me to type out in a coherent manner) let me know which route you'd rather. Or both 🙂
Either one would actually work @Cythera . Thank you. it would be helpful.
@Cythera Well that would save me some work. The learning one is the route Id like to go so I can give it a chance Percentage. Thank you.
You can apply the percentage chance to both wih very little modification actually, since I handle both through a single state.
Update: Alright, I'm going to post the weapon version I created. When the user defeats an enemy, it learns the skills of the enemy. I'll add in a 10% chance for yours as well (though I haven't tested the chance personally!)
First, you need the following:
Yanfly's Battle Engine, Skill Core, Buffs+States Core, and Auto Passives.
Way's Core and Custom On Equip Eval
Hime's Common Event Queue
Two Variables (I'm using Var. 3 to 'store' the skills, and Var. 4 as an assist)
TWO common events for every party member that can equip the weapon. One for when they equip, and one for when they remove it.
Also, make sure the character class can use the skill type. I made a skill type named 'Stolen Skills'; you may use what you will, just make sure the class has the "Add Skill Type: X" trait.
I'm using state 5 for the weapon ability. I made this using only two characters, but it's a simple extension for more. I use common event 5-6 for an equip event, and 7-8 for the removal events.
Now, screenshots of the common events. You'll need two for each character, remember. I just posted it for actor ID 1. For others, simply change the "$gameActors.actor(X)" to X = actor ID.
Let me know if that makes any sense at all!
Update: Alright, I'm going to post the weapon version I created. When the user defeats an enemy, it learns the skills of the enemy. I'll add in a 10% chance for yours as well (though I haven't tested the chance personally!)
First, you need the following:
Yanfly's Battle Engine, Skill Core, Buffs+States Core, and Auto Passives.
Way's Core and Custom On Equip Eval
Hime's Common Event Queue
Two Variables (I'm using Var. 3 to 'store' the skills, and Var. 4 as an assist)
TWO common events for every party member that can equip the weapon. One for when they equip, and one for when they remove it.
Also, make sure the character class can use the skill type. I made a skill type named 'Stolen Skills'; you may use what you will, just make sure the class has the "Add Skill Type: X" trait.
I'm using state 5 for the weapon ability. I made this using only two characters, but it's a simple extension for more. I use common event 5-6 for an equip event, and 7-8 for the removal events.
<Passive State: 5>
<Custom On Equip Eval>
if(user.actorId() === 1) {
$gameTemp.reserveCommonEvent(5);
}
if(user.actorId() === 2) {
$gameTemp.reserveCommonEvent(6);
}
</Custom On Equip Eval>
<Custom On Remove Equip Eval>
if(user.actorId() === 1) {
$gameTemp.reserveCommonEvent(7);
}
if(user.actorId() === 2) {
$gameTemp.reserveCommonEvent(8);
}
</Custom On Remove Equip Eval>
<Custom On Equip Eval>
if(user.actorId() === 1) {
$gameTemp.reserveCommonEvent(5);
}
if(user.actorId() === 2) {
$gameTemp.reserveCommonEvent(6);
}
</Custom On Equip Eval>
<Custom On Remove Equip Eval>
if(user.actorId() === 1) {
$gameTemp.reserveCommonEvent(7);
}
if(user.actorId() === 2) {
$gameTemp.reserveCommonEvent(8);
}
</Custom On Remove Equip Eval>
<Custom Establish Effect>
if(target.hp <= 0 && Math.randomInt(11) === 1) {
var skills = target.skills();
for(var z = 0; z < skills.length; ++z) {
var learn = skills[z];
if(!user.isLearnedSkill(learn.id)) {
user.learnSkill(learn.id);
$gameVariables.setValue(4, learn.id);
var tempArray = $gameVariables.value(3) || [];
tempArray.push($gameVariables.value(4));
$gameVariables.setValue(3, tempArray);
}
}
}
</Custom Establish Effect>
if(target.hp <= 0 && Math.randomInt(11) === 1) {
var skills = target.skills();
for(var z = 0; z < skills.length; ++z) {
var learn = skills[z];
if(!user.isLearnedSkill(learn.id)) {
user.learnSkill(learn.id);
$gameVariables.setValue(4, learn.id);
var tempArray = $gameVariables.value(3) || [];
tempArray.push($gameVariables.value(4));
$gameVariables.setValue(3, tempArray);
}
}
}
</Custom Establish Effect>
Sweet. Bring it on then. 🙂 I will of course put you in the Credits at the very least.
bad post
Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-necklace-of-learning.114405/