Element EX v1.06

Element EX v1.06
by AdiktuzMiko



# Basically it allows you to give elemental damage bonuses/penalty and 
# protection/weakness tags to objects. Also allows you to set objects
# to have multiple elements
# Example: A fire ring should increase the damage of all fire element 
#          attacks/skills of it's wearer.
#          An anti-fire ring should reduce the damage the user takes from
#          fire element attacks/skills. But it can/will also increase the damage
#          taken by the user from water element attacks/skills.
#  You can now have a scene that shows the elemental bonuses/resistances of your     actors


Direct Link:Β http://pastebin.com/raw.php?i=QpzG4niR


Terms and Conditions

Terms and Conditions



42 thoughts on “Element EX v1.06

  1. Pingback: Element EX | Lanthanum Entertainment

  2. RogueDeus

    Hi AdiktuzMiko, I just found your script and it looks great. I am trying to use it and so far everything works fine. There are a few references to window skins that had to be commented out to remove errors on menu access.

    There are a few things I was wondering.

    First, would you be willing to add a scrolling feature to your menu window? I have well over 14 different elements I am working with and I am sure I’m not alone in that department. It would really help.

    Second, would you be willing to support replacing icons in the menu with text names, if desired?

    Third, would you be willing to add the option of inserting blank lines, or possibly text lines, in your menu list? It would help segment large lists considerably, if we could add labels to groups.

    No pressure. If you don’t have time to listen to the requests of a stranger, I wont hold it against you. πŸ˜‰

    1. lanthanumentertainment Post author

      I’m not sure really… I’m pretty busy for until the next month so I don’t think I can do those within that timeframe… I’m not yet sure how to do scrolling windows aside from selectable windows that auto scrolls…

      Thanks for the suggestions…

      I’ll take a look when I get the time and see if I can…

      anyway at first glance, 1 and 2 I think is possible but 3 is quite pretty much a pain to do if my thinking is correct and might be quite project specific…

      though the elements menu is not really on my priority as it’s just an add-on feature for elements EX which has no actual effect on the main system itself…

      1. RogueDeus

        Thanks for the quick feedback! No rush on any of it, I am glad to give you my experience using it. Its the least I can do to thank you for writing/sharing it.

        One more note:
        I am not sure why, but I had to remove the script because it was interfering with Yanfly’s Element Popups. I noticed you override one of his methods for compatibility. But it doesn’t seem to work… All flavor color, Weak/Resist text, and animation seemed to break when I got to using damage types with rate adjustments in a battle.

        I recently updated all my Yanfly scripts from his blog, if that helps.

        Thanks again!

      2. lanthanumentertainment Post author

        I am using Yanfly’s scripts which is why I made that comp patch and I don’t have those errors… there are also some people that are constantly keeping up with me and uses this script plus yanfly’s and they doesn’t seem to have the error too…

        for starters, take a look at the ELEMENTS array in the upper part of my script and make sure that all elements that you use are in there… there are also some settings there for determining which element will be used for the color,weak/resist etc…

  3. RogueDeus

    It seems that I reported without testing it correctly…

    For starters, I had not read your script description completely and missed the part where you state, clearly, that your script disables the built in element rate system… *face-palm*

    Lastly, that small detail regarding adding elements to objects, wasn’t very clear… I didn’t catch that if I had a skill that was to deal fire damage I needed to add to the skill.

    Sorry for the false alarm.

    Just to be sure I understand completely, I hope I do not go to far here, as I am actually quite excited about the potential of using your script, and would like your feedback.

    Is the equivalent of adding an [Atk Element] feature to an object. So adding it to an actor, causes all their Normal Attacks to include that element. While adding it to a skill is equivalent to selecting the element in the Damage menu. If a skill has two or more elements assigned, all defenses for each of those elements apply 100%.

    Thus if the skills elements where fire and ice, and the target had 10% fire def, and 10% ice def, the total defense would be 20%…

    Is that intentional?

    I understand that this additive stackability is supposed to support only the same defense type, but its also limiting the utility of the script to a single applied element for an attack. Which is the default system, I recognize. But it can be more if you wanted it too.

    Are you interested in allowing the developer to assign ratios to multiple element situations? The skeleton is there, waiting to be built onto.

    Maybe an attack does 80% Fire damage and 20% Ice damage, thus a 50% Ice defense would only block 10% of the total damage, rather than applying to the fire damage equally. And visa verse in multiple defense situations. I can imagine the creativity that would enable for developers using your script.

    I can also imagine the absurdity in a mighty (Fire/Earth/Physical, element) Meteorite striking a target for 10,000 damage (2000/4000/4000 split) and all 10,000 of it shrugged off because the target is carrying a trinket that blocks 100% Fire damage. Or worse, if the target happened to also have a 5% Physical damage (105% total) the Meteorite Strike actually HEALS the target for 1,000 Health!!

    If its to much work for you, I won’t push it. I will make the best of your well made script as it is. πŸ˜‰

    1. lanthanumentertainment Post author

      Ah… I see… well that’s because I was too focused on the bonus side and not on the resistance side… everything works so fine when you have bonuses set so I forgot about that resistance problem when it comes to multi-element objects…

      though I’m quite busy so I’m not sure if I can fix it within a short time…

      as for the partition damage, I made one but for bonus damage only (it deals the elemental %damage as a bonus instead of cutting it off from the base damage: like a 100 damage skill that has 20% fire will actually be 120 damage)… doing it for the base damage is much harder coz I cannot find a good way to ensure that you cannot have more than 100% allocation given that you can assign these properties to any object… just imagine when you equip 3 items that sets 50% of your damage to fire, then that means you will already have 150% damage…

  4. RogueDeus

    Wait a second…
    Just to make sure I am not doing something wrong, if I place the [obj ele x] note on a weapon, that weapons normal attack damage is supposed to be treated as that element correct? So long as the default attack skill has [obj ele 0] in its note tag?

      1. RogueDeus

        Thanks for pointing that out.
        Now that I have been able to poke this script a bit more, I have a question and another large suggestion… πŸ™‚

        Can you explain when an attack shows as one element vs. another, assuming it has more than one? Right now I am seeing that the element with the greater weakness is the one indicated. But if there is no weakness on the enemy, multi-element damage appears to be non-elemental.

        The same issue with flat defense seems to plague the flat damage bonus as did the percent defense… If the total damage reduction meets are exceeds the total attack damage, then the attack is NULL even if there is more than one element applied.

        Example: A 10 damage attack with FIRE and ICE element types (but no bonus damage) lands on an enemy with +10 Fire Defense, the ICE nature of the attack is ignored as well and the attack does NULL damage. However, intuitively, if half the element type of an attack is blocked completely, shouldn’t the other half still deal damage?

        Effectively, if I am not mistaken about anything (which I may be), the current nature of the script requires that if an item is going to add an element type, it should also add a flat damage bonus of some amount, otherwise if the target blocks 100% (either percent or flat defense) of any one of the element types, then all the attacks damage is NULL.

        Example: Your party’s best attacks are a 60-90 PHYSICAL Damage, and a 70-90 FIRE damage attacks, and is fighting a Boss that is +100 damage defense to all PHYSICAL attacks, and +60 damage defense to FIRE, but has no resistance against Ice. Your caster is half out of mana and there is no way you can last dealing a maximum of 30 Fire damage one a round… But your caster has a spell that applies ‘Ice’ element type to the target, yet no bonus damage for balance reasons. It wont matter much, because the weapons being used are PHYSICAL element weapons and 100% of their damage will be blocked via the +100 PHYSICAL defense.

        It seems a reasonable solution would be to divide the (non elemental bonus damage) damage by the number of elements in an attack and then apply individual resistances/defenses to each type separately.

        Example: If the above attack would deal 60-90 PHYSICAL/ICE Damage, and it dealt 80 Damage, then the +100 PHYSICAL defense of the Boss would apply to 40 of it, and the other 40 would be applied as ICE damage.

        Example: If the above attack would deal 80 PHYSICAL Damage + 20 ICE Damage (From the spell, if it gave a bonus) it would function normally. All 80 PHYSICAL is NULL and the 20 ICE carries through.

        In the end, the ‘type’ bonus would end up as helping deal greater damage, without the potential for greater TOTAL damage.

        But the more element types added, the more the final damage is divided, and thus risking doing less damage over all if the target has multiple smaller defenses.

        At the moment I understand that my suggestions are ancillary to the core function of the script, which very well might be that no element type is ever intended to be added without corresponding flat damage bonuses, and I am the first one that find that restrictive. So I won’t hold it against you, if you decide I am being to anal retentive about this. πŸ˜‰

  5. lanthanumentertainment Post author

    as for the question about why only 1 element shows during damage, that is because I designed like the way that Yanfly designed his pop-ups which checks for resistance based on the final rate multiplier…I have no intentions right now of showing multiple resistances/weakness mesages simply because If you have lots of elements then showing them all will result to so many pop-ups that you won’t be able to read them probably…

    also, about the elemental damage showing like non-elemental when no bonuses are applied, well for single element maybe I can simply make it show that single element, but for multi-element it makes things quite complicated…

    about the limitations that is present because of the way I calculate the bonuses, I now know the problem… My design was that multi-element skills are 100% of all the elements (and to an extent behave like 1), but what you want is that the damage get’s shared by the elements in a divided manner…

    of course I can make it such that in order to nullify multi element skills, you need to nullify all elements that it has… but that means too much work…

    Hmmmm… I think it will be better to keep this the way it is and simply improve my partition damage script so that it can have a feature that allows you to set elemental partition damages which are taken from the base damage itself rather than applied as bonus damage… mainly because the partition damage handles each element partition as a separate one so the elements ex script will apply the bonuses/resistance individually to each element without affecting the damage of the others… also since doing it in another script is better than editing the current set-up of the EEX script, which might cause problems too… and that way, we can still have both situations…

    though I don’t think I can do anything until early december…

  6. RogueDeus

    I reworked your core script, and have managed to work out the few issues I had with the math.

    It took me the good part of about 20 hours or so, but I learned how you did what you did and how Yanfly did what he did, and I think I have found a solid solution. Including element popups, as well as resist/weakness popups. (I will make sure the rest work as well.)

    It supports multi-element popups and ‘highest’ element popups, as well as applied element ‘weight’, based on how many [obj ele #] tags the script finds amongst all objects. It was the simpler solution and required a small code change.

    I am cleaning the code up, so its easier to follow.

    When I am done (likely early next week at latest) is there a way I can send it to you? That way you have final say as to if and how it gets shared.

    I will keep it 100% to myself if you wish.

    1. lanthanumentertainment Post author

      well yeah, I actually learned those (the pop-up thingy) during the creation of my other scripts but I thought it wasn’t needed (plus I just don’t have the motivation to do those)

      If you really want to share it, well just make it clear that it was an edited version of my script and possibly put a link back to the original script and well keep it free for everybody… πŸ™‚

      I’m still planning what to do with it anyways, looking for things that needed to be modified and things to add…

      1. RogueDeus

        Its almost complete. I just need to QA test it a bit (to test interaction with other scripts/settings), clean up some stuff, and I can send it to you.

        Do you want me to post it online and let you grab it? Or send it directly? Or?

  7. RogueDeus

    Please be as brutal as you think you have to. I am new to this and learn best the hard way.

    If there is anything that isn’t obvious, I can explain.

    Also, I think I will add/change a few things… I am going to add a default element flag that is not factored into skill value weight unless no other elements exist. That way there is less auto multi-element defaults.

    Also, I think I am going to add combat logging to the popups, thus it will be possible to turn them off completely without losing all script related feedback.

  8. lanthanumentertainment Post author

    Update! Added support for defining how much percent does a certain element has in the total damage. Take note that the direct bonuses aren’t affected though, since they aren’t % based anyways.

  9. Maliki79

    Hello. Glad to see you are still supporting this script as I have a problem.

    I am trying to use this script in conjunction to a weapon affix script I have (and by extension, an item instance script).

    My intention is to use the affixes to apply increases to element damage/defense that can stack with other equips.

    The problem is, while the notetag additions are applied to the weapon/armor item, the notes themselves are not read by this script after they are added. So any element addition that was present before the change remains, while the changes are ignored.

    I suspect this is happening because the notes are read only at the start of a new game and never updated.

    Do you know how I could go about re-applying the values in the notetags AFTER the tags are changed by the affixes?

    Thanks in advance for your assistance.

  10. Maliki79

    Thank you.
    I was able to get it working by using this call after the affix:


    Thanks again for the awesome script!
    (By the way, I managed to work the numbers in such a way to make elements absorbable. Very VERY helpful for me!)

  11. Jason

    Is there any way to get this working with Yanfly – Element Popups? I like how the debuff colors can be changed with this, like poison/bleed, but it causes all of the regular element colors to be white. I tried adding every type of tag that I could and nothing would display the right colors. All were white besides poison/bleed.

    1. lanthanumentertainment Post author

      It is working with Yanfly’s element pop-up… Given you put this script below yanfly’s and you set the correct settings in this script and yanflys. Like make sure you’ve made the correct element list within this script.

      1. lanthanumentertainment Post author

        did you hit save b4 battle test? Also, does it also happen outside of battle test? Can’t really watch the video right now or anytime soon…

        Also, what other battle related scripts are you using? Something might be interfering as I haven’t really experienced this problem before.

        what’s the exact tag that you had on those two skills? The one which the pop-up color showed and the one that didn’t.

      2. Jason

        Yes I did and yes it does the same thing in the game. You’re telling me you can reply to my post, but you can’t watch a 1 min video O.o right…

        I have alot of battle scripts, so maybe one is conflicting. The one where the colors are showing is from states causing poison/bleed dmg. The ones not showing is ANY elemental dmg spell IE fire, wind etc.

      3. lanthanumentertainment Post author

        I’m a working person whose only internet connection (unless I go home which I can only do around 1 day every two weeks or so) is the one on the office which doesn’t allow viewing of videos. So yes, I can reply to posts but cannot watch any video.

        Since it might be caused by something else, I cannot really test it or find a possible fix unless I have all those scripts too, so a demo file would be good.

        Also, I’d only do it if it’s a quick fix as I don’t really offer doing compatibility patches for my scripts.

      4. Jason

        You have a very strange work setup. That’s gotta suck. I put everything into 3 pictures.

        I can go through deleting scripts to see if there is a conflict. I will let u know. Ya I don’t expect you to go crazy on a fix, just thought it was something simple.

        What tags am I suppose to add to skills like fire/ice? I’ve tried all of them, and no color on the dmg.

  12. lanthanumentertainment Post author

    That would be “obj ele 3″ (replace the ” with the arrow heads) for the fire one…

    Also, make sure you test on a new game… and maybe also try to put my Slip Damage EX below Element EX. Though I doubt that’s causing the problem.

    1. Jason

      I was able to get it working. I positioned the scripts in that order ABOVE Yanfly Elemental Popups. Thanks for you time helping πŸ˜€

  13. TeacherPoetPhilosopher

    Hi, I just want to say I had the exact same problem as RogueDeus. Using his modified version of the script, and it works now, so THANK YOU so much!

  14. RogueDeus

    In case anyone wonders, I have learned a ton about Ruby and RGSS since I made that script alteration. I am glad if it helps anyone, but you should know that there are at least a few math bugs I introduced (in that version) that I can not remember exactly, since I stopped using the script many, many, months ago.

    I’ll look into the last update I made to it before I stopped using it, and post the updated link here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s