I am wanting to get a plugin or find a way to make it so that if a character in my party gets a fire sword for example, they have their fire spells and attacks do more damage and also help with resistances to those elements. Any help would be appreciated.
MV Element Help
JS Plugin Requestsmake an event that check the inventory and then replaces their common skills for upgraded versions
make it so they have to use a magic circle to activate the effects
make it so they have to use a magic circle to activate the effects
I’m looking for something more along the lines of a plug-in, kind of like the action resistance or action strengthen by Victor engine.
Like these:
Action Resistance
Plugin Download The Action Resistance plugin allows to create effects that protects against specific actions. Different from the default resistances that can be applied to elements, and physical/ma…
Action Strengthen
Last Update: 2015.11.28 Plugin Download The Action Strengthen plugin allows to create effects that strengthen specific actions. You can create a staff that increase the power of thunder spells, a p…
resistances are no problem - just give that equipment a fire element resistance via element damage rate in addition to attack element fire.
increasing the attack power of elements is not possible by default, so you either need to replace skills or use a plugin.
yanfly's element set of plugins should include those options, but I haven't used them myself.
increasing the attack power of elements is not possible by default, so you either need to replace skills or use a plugin.
yanfly's element set of plugins should include those options, but I haven't used them myself.
Element Core (YEP) - Yanfly.moe Wiki
give your weapon one of these for the element amps and give them normal element rate traits for resistance
I wrote a small plugin for just the ability to specify that a bit of equipment can affect outgoing or incoming element rates. It can be downloaded from this link, or you can copy/paste the following into a JavaScript file in your plugins folder. The Plugin has no parameters, so it doesn't matter what you call it, but I called it ItemElementRate.js.
I tested in a default project by putting the following two notetags on the sword that Harold wears:
I then gave Harold access to magic and the fire spell, as well as giving the bat enemies 50 MP and the fire spell, while taking away their normal attack.
I also modified the Fire spell to do 50 damage with no variance and no criticals.
I confirmed that when Harold cast fire on a bat, it did 75 damage and when a bat cast fire on Harold, it did 5 damage.
I don't have anyone else's Plugins, so I can't confirm compatibility, but it's written to modify the value that any other Plugins would return if you place it below all other Plugins, so it should only have compatibility problems if the entirety of the elementRate or calcElementRate methods have been overwritten in a way that doesn't multiply element rates as percentages.
Code:
/*:
* @plugindesc Allows specifying element rates on equipment such
* that equipped items can affect element offense and defense.
*
* @help In the notes box of an equippable item, put <elementOffense: x, y> or
* <elementDefense: x, y> where x is the Id of the element and y is the rate
* to apply as a percentage where 100 means no modifier.
*
* As an example, on a weapon in a default project, <elementOffense: 2, 150>
* would mean that the weapon increases fire damage of all abilities by 50%.
* On an armor, <elementDefense: 2, 10> would mean fire damage is decreased
* by 90% (that is, fire damage taken is reduced to 10%).
* Multiple elementOffense and elementDefense tags can be added to the same
* item and each one will be calculated multiplicatively with any other
* element rate modifiers such as states and traits.
*
* For example, a weapon with <elementOffense: 2, 150> AND
* <elementDefense: 2, 10> would mean that equipping that weapon
* increases all fire damage that actor does by 50% and reduces all
* fire damage that actor takes by 90%.
*/
(function(module) {
'use strict';
var Zevia = module.Zevia || {};
var calculateEquipElementRate = function(property, equips, rate, elementId) {
return equips.reduce(function(elementRate, equip) {
if (!equip || !equip.meta || !equip.meta[property]) { return elementRate; }
var values = equip.meta[property].split(',');
if (Number(values[0].match(/\d+/)) !== elementId) { return elementRate; }
return elementRate * (values[1].match(/\d+/) / 100);
}, rate);
};
Zevia.targetElementRate = Game_BattlerBase.prototype.elementRate;
Game_BattlerBase.prototype.elementRate = function(elementId, subject) {
var rate = Zevia.targetElementRate.call(this, elementId);
if (subject && subject.equips) {
return calculateEquipElementRate('elementOffense', subject.equips(), rate, elementId);
}
if (!this.equips) { return rate; }
return calculateEquipElementRate('elementDefense', this.equips(), rate, elementId);
};
Zevia.calcElementRate = Game_Action.prototype.calcElementRate;
Game_Action.prototype.calcElementRate = function(target) {
var rate = Zevia.calcElementRate.call(this, target);
var elementId = this.item().damage.elementId;
if (elementId < 0 || !this.subject().equips) { return rate; }
return calculateEquipElementRate('elementOffense', this.subject().equips(), rate, elementId);
};
Zevia.elementsMaxRate = Game_Action.prototype.elementsMaxRate;
Game_Action.prototype.elementsMaxRate = function(target, elements) {
var maxRate = Zevia.elementsMaxRate.call(this, target, elements);
var subject = this.subject();
if (!subject.equips || !elements.length) { return maxRate; }
return Math.max.apply(null, elements.map(function(elementId) {
return target.elementRate(elementId, subject);
}, this).concat(maxRate));
};
})(window);
I tested in a default project by putting the following two notetags on the sword that Harold wears:
Code:
<elementOffense: 2, 150>
<elementDefense: 2, 10>
I then gave Harold access to magic and the fire spell, as well as giving the bat enemies 50 MP and the fire spell, while taking away their normal attack.
I also modified the Fire spell to do 50 damage with no variance and no criticals.
I confirmed that when Harold cast fire on a bat, it did 75 damage and when a bat cast fire on Harold, it did 5 damage.
I don't have anyone else's Plugins, so I can't confirm compatibility, but it's written to modify the value that any other Plugins would return if you place it below all other Plugins, so it should only have compatibility problems if the entirety of the elementRate or calcElementRate methods have been overwritten in a way that doesn't multiply element rates as percentages.
So it is working for the most part, but I am having an issue and don't know if I am doing it right or it is just this way in general. I have the base attack do 100 damage. I have a sword that does fire element damage and the offense is set to 120.
The defense works and when the enemy attacks me doing fire element damage, it does 50 damage like it is supposed to, but my character is only doing 100 instead of 120. My fire spell does 120, but my base attack doesn't. Did I do something wrong?
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!
Edit: Reopened at a helper’s request.
Edit: Reopened at a helper’s request.
I've updated the download link and my copy/pasted Plugin in my previous post to address for the issue you reported, @slickdeath97.
I was able to recreate the issue by changing the Attack skill's damage to 50, variance to 0, crit to no, then changed the Sword item to have an Attack Element of Fire and confirmed the bats were only taking 50 damage. When I added fire * 150% to the bat, they take 75 damage, so element rates are supposed to be calculated for weapons with the element "Normal Attack".
After updating the Plugin, I removed fire * 150% from the bat, then confirmed that the sword still does 75 damage with the elementsOffense: 2, 150 tag.
I also confirmed that multiple sources of element rates should stack up - I gave the bats and Harold fire * 200%, as well as the elementOffense and elementDefense tags noted in my previous post, and confirmed that the weapon attack and fire spell did 150 damage to the bats and the bats' fire spell does 10 damage to Harold. If I change the bats to have an Attack Element of fire and give them back the attack command, it also does 10 damage.
EDIT: Unrelated to the thread, but just as a side note since I just noticed in your screenshot, you have a typo in your weapon name - "Flame Blabe" instead of "Flame Blade". 🙂
I was able to recreate the issue by changing the Attack skill's damage to 50, variance to 0, crit to no, then changed the Sword item to have an Attack Element of Fire and confirmed the bats were only taking 50 damage. When I added fire * 150% to the bat, they take 75 damage, so element rates are supposed to be calculated for weapons with the element "Normal Attack".
After updating the Plugin, I removed fire * 150% from the bat, then confirmed that the sword still does 75 damage with the elementsOffense: 2, 150 tag.
I also confirmed that multiple sources of element rates should stack up - I gave the bats and Harold fire * 200%, as well as the elementOffense and elementDefense tags noted in my previous post, and confirmed that the weapon attack and fire spell did 150 damage to the bats and the bats' fire spell does 10 damage to Harold. If I change the bats to have an Attack Element of fire and give them back the attack command, it also does 10 damage.
EDIT: Unrelated to the thread, but just as a side note since I just noticed in your screenshot, you have a typo in your weapon name - "Flame Blabe" instead of "Flame Blade". 🙂
Lol. Thanks for the help and also noted. I was just in a rush to make a blade to test so I didn't catch on to the typo.
Edit: So I updated the plugin, but the damage is still staying at 100 and is not changed for my normal attack. The slime is still dealing 50 which is correct, but my character is only dealing 100 instead of 120. I have not changed any of my stuff from the last screenshots.
@slickdeath97 Did you not see that @ShadowDragon gave you a link to a fix for the Victor Engine plugins you were using? Would save you a lot of trouble to pay attention when folks post in your threads.
Can you share the latest screenshots of your slime enemy, your attack skill, your actor, the actor's class, the weapon, and the battle test confirming that your actor is, in fact, equipping the right weapon? I'll see if I can recreate the problem in a default project if I have that information.
EDIT: It would also be helpful if I could see your element definitions in the system tab.
I already tried that fix, and the error still came up. So I decided not to go with those plug-ins and decided to look into something else.
You sure? Fix worked for me when the plugins didn't initially.
My bad. It worked, but I put it above them at first by accident. Been a long day. Lol.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/element-help.167109/