Yanfly Armorscaling not working properly? Possibly ignores Damage Formula?

Discussion in 'Javascript/Plugin Support' started by Captain_Joshua, Aug 16, 2019.

  1. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    35
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I have added the armorscaling yanfly plugin to my plugin list, together with the damage core that is necessary for it to work. I have not changed any of the default setting of the plugins beyond setting a damage cap of 9999.


    However now I am running into an unusual glitch.



    As you can see, I have removed the damage from the attack formula, as recommended by the plugin and in the video related to it. In addition, I have set the damage for the special attack to be a.atk * 4, which should use the attack stat * 4 - the enemies armor. The normal attack is a.atk * 2. However, as you may see, there is no difference between the damage the two attacks do. After testing it a few times, the normal attack generally even did a little more damage by about 10~20 damage, which may very well have simply been because of the variance I had not set off yet. After setting the variance to 0 both skills do the exact same damage, despite the normal attack only having a.atk * 2 instead of a.atk * 4. In addition, the users atk stat is 21, which would mean that both skills use a.atk * 4 for some reason, despite what I have set in the settings.

    Note: This has nothing to do with the order in which plugins are set. I made sure to check I had them set in the exact same order as shown on the website.
     

    Attached Files:

    Last edited: Aug 16, 2019
    #1
  2. killdude

    killdude RPD Officer Veteran

    Messages:
    56
    Likes Received:
    12
    Location:
    Raccoon City
    First Language:
    Turkish
    Primarily Uses:
    RMMV
    I thought like you first.I delete the damage formulas def part and it worked.Plugins default formula is 2.def=1.armor.You can edit it.Try to make battlers def is very high to see the plugin works but you shouldnt put def on damage formula.See if it happens otherwise i try to help again.
    Edit:I forgot in default plugin does not give any armor for certain hit.Check it if your skills is certain hit and get it to physical or magical damage.
     
    #2
  3. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    35
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Alright but...as you may see in the screenshot, I already did that? Neither of the skills have any .def set inside it? I´m not exactly sure what you´re telling me here with the "don´t put def on damage formula" since there isn´t any in the damage formula to begin with?
     
    #3
  4. ramza

    ramza Lunatic Coder Veteran

    Messages:
    531
    Likes Received:
    290
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Your enemy has no defense, so it has no armor. If you increase the defense of the enemy to something much larger, it'll actually start to subtract from the incoming damage. You can see that if you're using the default armor scaling formula, you're reducing incoming damage by a whopping 0.5% (a 1000hp hit does 995 damage). With low numbers, rounding would appear to make that change completely disappear.

    I can't speak to why a skill that should effectively do double damage is still doing base damage, but you're not sharing the actor params, so it's hard to know what it's supposed to do.

    Instead of using params at all, test with attacks that do a flat damage value (like 1000), and see how your enemy armor scaling affects them. And use this calculator to see what kind of effects your formula will have on those numbers.:
     
    #4
  5. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    35
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    The actors parameters are attached in the image.

    I have changed the damage from the special skill to 200, while also changing the normal attacks damage to 100.
    I then proceeded to test them out in battle. Both attacks did exactly 196 damage. The enemy still has 1 defense, which would explain why it isn´t exactly 200 for the skill...however the normal attack still does the same damage as the skill for some unknown reason?
     

    Attached Files:

    #5
  6. ramza

    ramza Lunatic Coder Veteran

    Messages:
    531
    Likes Received:
    290
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    I think at this point, we'd probably need to see your other plugins to determine what's going on here, and the load order.

    The only other thing I can think of is that I see your monster has several elemental weaknesses. Is it possible the normal weapon is using one of those elements and is inflicting double damage? I see the attack skill itself is using the 'normal attack' element, so if the weapon is 'magic' or 'wind' or 'ice' it'd cause the attack to do double damage.

    Since you have these elemental weaknesses on the enemy, it seems like a possibility you also have them set on weapons already.
     
    #6
  7. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    35
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Unfortunately, that does not seem to be the problem causer. As you can see in the given pictures

    1) The normal attack is as standart as it can get. There are no special elements, its set to the standart normal attack. The only change I made to the skill in the notetags is that it checks if the user is holding a weapon with the missile animation, which causes them to attack from a distance instead of running to the enemy. Since the skills in question don´t use missile animations, this should not affect it whatsoever. It shouldn´t affect damage even if it was missile.

    2)The enemy has weaknesses to 5 different elements I was using to test elemental weaknesses, however it is neither weak to "Normal Attack" nor is it weak to the "Smash" element. Which the special attack is. So the enemies elemental weakness also does not seem to cause the problem.

    3) Here is my plugin list. I made sure to place each plugin in the recommended order as given on the yanfly website.

    Please tell me if there is any other information I could provide that may help figure out where the problem lies.
     

    Attached Files:

    #7
  8. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,784
    Likes Received:
    11,822
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Normal attack uses whatever element your equipped weapon has, or if you have a state which gives you an elemental attack you will use that. So you need to check both your weapons and any states the actor might have on them.

    Also what is with the \I on states? I don't think that even works, so that might be a problem too.
     
    #8
  9. ramza

    ramza Lunatic Coder Veteran

    Messages:
    531
    Likes Received:
    290
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    From your original screenshots, I can infer that the normal attack skill has no element, or more specifically it has 'normal attack' element. The thing about that element though, as @bgillisp said, is that 'normal attack' takes the element of the weapon, or states that the battler has. Since you mentioned in your follow post that you were testing elemental weaknesses earlier, it seems even more likely that your weapons have an elemental attribute on them, possibly one of the ones listed as doing double damage to the enemy. Check your weapons, or any states the allies have for elements, and remove them, or set the attack skill to smash element and then compare the damage again.

    It is important to discount as many points of interference as possible when troubleshooting an issue like this. It's also worth noting that you're unlikely to be the only person using both of these two plugins (listed in the title) together, as I'm sure hundreds or even thousands of people are using yanfly plugins in their own projects, but you are the only one to report this problem, so the law of averages suggests that the issue is something you're doing, rather than a problem with the plugins.

    And for what it's worth, I use both in my own project and have no issues with the damage formula.
     
    #9
  10. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    35
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I see, thank you very much. I think I misunderstood the earlier statement. I checked the weapon and it´s damage type was in fact set to magic, for some reason, which the enemy was set to be weak to. So yes, that was in fact the problem. Thank you very much for pointing out my oversight, the armor plugin (seems) to properly work as intended now.
     
    #10

Share This Page