Jump to content


Photo

Elemental Modifiers


  • Please log in to reply
15 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 11 May 2012 - 11:08 PM

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:

8uqA1.jpg

Download

Script: http://db.tt/davKgFkZ

Edited by Tsukihime, 01 March 2014 - 09:39 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 Gadwin

Gadwin

    Unsigned Zero

  • Ace Member
  • 144 posts
  • LocationMetro Manila, Philippines
  • RM Skill - Pixel Artist

Posted 11 May 2012 - 11:39 PM

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?
Power alone is just plain power.

Scripts
Custom BattleStatus Pause Script

#3 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 11 May 2012 - 11:55 PM

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 by Tsukihime, 12 May 2012 - 12:58 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#4 Xandier

Xandier

    Advanced Member

  • Ace Member
  • 35 posts

Posted 27 September 2012 - 02:22 PM

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 by Xandier, 27 September 2012 - 03:02 PM.


#5 ekomega

ekomega

    Advanced Member

  • Ace Member
  • 268 posts

Posted 19 November 2012 - 05:42 PM

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 by ekomega, 19 November 2012 - 05:49 PM.


#6 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 November 2012 - 07:29 PM

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.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#7 ekomega

ekomega

    Advanced Member

  • Ace Member
  • 268 posts

Posted 19 November 2012 - 07:55 PM

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.

#8 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 November 2012 - 08:03 PM

Btw this script was written in may so it is pretty rough. It would probably be easier to implement as a feature manager plugin.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#9 ekomega

ekomega

    Advanced Member

  • Ace Member
  • 268 posts

Posted 20 November 2012 - 02:03 AM

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?

#10 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 November 2012 - 10:24 AM

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.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#11 ekomega

ekomega

    Advanced Member

  • Ace Member
  • 268 posts

Posted 20 November 2012 - 12:30 PM

Okay, thanks. This is better than not working at all. I'll just wait until you re-do the script. ;)

#12 Rizzledeep

Rizzledeep

    Newbie

  • Ace Member
  • 1 posts

Posted 03 December 2012 - 11:52 PM

Is it possible to somehow add http://forums.rpgmak...ic-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 by Rizzledeep, 04 December 2012 - 09:28 AM.


#13 ekomega

ekomega

    Advanced Member

  • Ace Member
  • 268 posts

Posted 20 December 2012 - 07:23 PM

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://crazescriptas.../rmvxa-scripts/

 

Do you think you could use his method for calculating elemental damage and incorporate it into this script?  Thanks.



#14 hstmalk

hstmalk

    Newbie

  • Ace Member
  • 2 posts

Posted 10 November 2013 - 02:36 PM

ERROR

icon_index = info[1]

HELP ME?!



#15 Lionheart_84

Lionheart_84

    Advanced Member

  • Ace Member
  • 78 posts

Posted 29 January 2014 - 08:42 AM

I too have the same problem!!!



#16 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 29 January 2014 - 11:02 AM

I do not have plans to support this script you should look for alternatives that do a better job.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users