Tsukihime 1,487 Posted May 12, 2012 (edited) This script is no longer supported. Elemental modifiers Author: Tsukihime Type: Damage calculation enhancement Overview The default engine handles elements pretty plainly. When you have element rate feature, it adjusts how much more or less damage you take, regardless where you put the feature. This script changes it so that you can define element rates more accurately. For example, if your weapon has a fire element rate of 200%, that doesn't necessarily mean you should take 200% damage from fire. Features Distinguish between elemental damage and elemental resistance. Elemental damage bonus is calculated along with elemental resist Usage Just copy into your project and set up your game as usual. Elemental damage is applied to weapons and skills (this means by default, only weapons will alter your elemental damage bonus) Elemental resist is applied to actor, class, armor, enemy, and states. Basically everything else. Note that in the database, it is a little different that what you might expect. Suppose you were adding some element rates to your armor: 100% ice = full ice damage = no bonus 50% ice = half ice damage = 50% resist bonus 200% ice = double ice damage = -100% resist bonus Examples When you set up your elemental rates appropriately, you can see the results: Download Script: http://db.tt/davKgFkZ Edited March 2, 2014 by Tsukihime 1 Gadwin reacted to this Share this post Link to post Share on other sites
Gadwin 8 Posted May 12, 2012 I have a question what will be the damage calculation if the defender has a - 100% resistance to ice while the attack has a 100% ice? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 12, 2012 (edited) I'm thinking 200% (just add weakness and strength together), but not sure if I want to do it that way. Note: from the database perspective, 100% is "full damage', 0% is "no damage", 200% is "double damage". Anyways I decided on the following: if element rate < 100% then resist rate * damage rate if element rate >= 100% then resist rate + damage rate Meaning, if you have +50% ice resist bonus, that means you should be reducing all ice damage by 50%. So then the bonus ice damage that you deal is reduced proportionally. Actor Attack: +200% ice (double damage) Enemy Resist: +50% ice (halve damage) So you only deal 100% ice damage, which is basically no bonus. Actor attack: +200 %ice (double damage) Enemy resist: -50 %ice (weak against ice!) In this case, enemy is weak against ice, so you deal 200% + 50% = 250% ice damage, or basically 1.5x bonus. I think it is more fair than doubling the ice damage to like, 400%. We could make it more interesting by randomizing which element is inflicted, so it's not always the one that results in the highest damage. Edited May 12, 2012 by Tsukihime Share this post Link to post Share on other sites
Xandier 0 Posted September 27, 2012 (edited) My game is crashing every time and I get an error every time any actor does elemental magic damage. Script 'Elemental Modifiers' line 106: ArguementError occurred. wrong number of arguements (1 for 0) The elemental effect percent values are displaying in my status menu however. Also, my damage is all off, and the yanfly "weakness" pop up text is no longer apearing. I'm not using any scripts that effect elemental damage other than yours. Before your script, I had a weapon that did "piercing" damage type. When I used it on enemies that recieved double piercing damaging, it did 12 damge and a "weakness" popped up. Now I when I use the same weapon on the same enemy, it does 18 damage, and no "weakness" pops up. Edited September 27, 2012 by Xandier Share this post Link to post Share on other sites
ekomega 20 Posted November 19, 2012 (edited) Any plan on fixing this script? As the above poster mentioned, on line 106, there's an error: element_id = item.damage.element_id element_resist_rate(item.damage.element_id) + user.element_attack_rate(item.damage.element_id) There should be a numerical operator (I'm guessing) between "item.damage.element_id" and "element_resist_rate(item.damage.element_id)". I'm guessing it's supposed to be "-" (minus), since you'd want to substract the resist rate (and then add the attack rate). EDIT: With my testing, putting the minus sign in seems to work perfectly, and Yanfly's element popups also work normally. I included this script at the top of my script list, right after the feature managers and before Yanfly Battle Engine and Yanfly Element Popup. Has anyone else had success with this? Edited November 19, 2012 by ekomega Share this post Link to post Share on other sites
Tsukihime 1,487 Posted November 20, 2012 Honestly I don't actually know what the script is doing there. It's supposed to pick the element that does the most damage, but I have no idea why I wrote it that way. Share this post Link to post Share on other sites
ekomega 20 Posted November 20, 2012 Honestly I don't actually know what the script is doing there. It's supposed to pick the element that does the most damage, but I have no idea why I wrote it that way. Weird. LOL. Share this post Link to post Share on other sites
Tsukihime 1,487 Posted November 20, 2012 Btw this script was written in may so it is pretty rough. It would probably be easier to implement as a feature manager plugin. Share this post Link to post Share on other sites
ekomega 20 Posted November 20, 2012 Please do. Or if you wouldn't mind fixing the one line that's broken, if you don't feel like writing it over. I clearly have no idea how these scripts work. I just changed line 106 in my project to: element_id = item.damage.element_id Does that seem reasonable? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted November 20, 2012 It would work, but I think it was supposed to first determine which element did the most damage and set that as the element ID. If you just pick the item/skill's element, it may not be the optimal one. Share this post Link to post Share on other sites
ekomega 20 Posted November 20, 2012 Okay, thanks. This is better than not working at all. I'll just wait until you re-do the script. Share this post Link to post Share on other sites
Rizzledeep 0 Posted December 4, 2012 (edited) Is it possible to somehow add http://forums.rpgmakerweb.com/index.php?/topic/538-runic-enchantment/ runes to be recognized by the elemental modifier? When I check the status on elemental resists, added resist runes do not show up. I'm thinking that it is not registering the runes because they are not technically equipped to the actor. Cheers. -Edit: Well as an alternative I decided to use your FP equip script to equip resist runes to the character so they are recognized by the modifier. This way I can keep the the rune slots on gear to adjust other modifiers like +EVA etc, but still being able to give the player options to add resists that will show up in the status. Edited December 4, 2012 by Rizzledeep Share this post Link to post Share on other sites
ekomega 20 Posted December 21, 2012 I realized I had another element modification script in my project, and it handles a method for mixing the damage for multiple elements. It's the Elemental Merger script from this page: http://crazescriptasylum.wordpress.com/rmvxa-scripts/ Do you think you could use his method for calculating elemental damage and incorporate it into this script? Thanks. Share this post Link to post Share on other sites
hstmalk 0 Posted November 10, 2013 ERRORicon_index = info[1]HELP ME?! Share this post Link to post Share on other sites
Lionheart_84 3 Posted January 29, 2014 I too have the same problem!!! Share this post Link to post Share on other sites
Tsukihime 1,487 Posted January 29, 2014 I do not have plans to support this script you should look for alternatives that do a better job. Share this post Link to post Share on other sites