A character that does no damage to a specific monster

(so ok, because i'm poor i just buyed rpg maker vx ace in last Steam Winter Sale, now i'm working in my game and i need help in a specific part) Is there any way to make a party member do no damage to a specific monster?

For example, there are boars, bats, rats and slimes, the protagonist manages to deal damage to all of them normally, but one of the allies can not deal damage in slimes.

Is there any way for me to do this? Even if it is by script or something else

I've moved this thread to RPGMaker ACE. Thank you.


Where you posted it is for sharing resources for the engine that you've made with others.

The feature you ask for might require a script, but I'll put it here for now as it might be doable without a script.
Moved to: RPGMaker ACE
Where you posted it is for sharing resources for the engine that you've made with others.

The feature you ask for might require a script, but I'll put it here for now as it might be doable without a script.

oh, ok, thanks
It might be doable without a script, but that depends on details you didn't give in your question.

You need to keep in mind the sequence how the engine works.

Actors use skills, and skills damage enemies.

It is relatively easy to make skills that don't damage specific enemies - can be done with elemental rate or with if-conditions in the damage formula or a few other ways.
But those skills are isolated and below the actor selection level - it won't be the actor but the skill that does no damage.

So if you can give that specific actor that should not damage a specific type of enemy its own skills, then this is easy.
If the actor has to be able to use the same skills as the other actors, and those other actors could use the skills to do damage, then you'll be better searching for or requesting a plugin, especially if there are a lot of those conditions in your project.
If the OP wants his/her actor to be able to use the same skill as the other actors shouldn't something like this in the damage formula work?
Code:
r = your_damage_formula_goes_here; (a == $game_actors[id]) ? r*b.element_rate(n) : r

In this case n is the element rate for slimes which should be 0 if the actor should deal no damage at all, but it can be something different if the damage should be altered in another way.

Of course this must be included in EVERY shared skill and is VERY tedious but it allows the OP to achieve what he wants without having to look for a script.

@cbmarcilio be aware of the fact that since in VX Ace (unlike in MV) your damage formula box only allows a very limited ammount of characters. That said if you need a lot of conditions and/or you want to use that condition in a skill which already has a very long damage formula you won't be able to do it and you need a script. A fast way to overcome this is to use something like this:
Code:
module CSM # Custom Skill Multiplier
    def self.slime_mult(formula, a, b)
        if (character == $game_actors[id]) #change id with the id of the actor which should not be able to damage slimes
            formula * b.element_rate(n) #change n with the element rate you are going to use for slimes (slimes should have element_rate(n) = 0)
        else
            formula
        end
    end
end
Copy/paste it in your project then set your skill formulae to be like this:
Code:
r = your_skill_formula_goes_here; CSM.slime_mult(r, a, b)

This is no way less tedious than te previous method but it allows you to use it for skills with long damage formulae. If you want to spare few characters in your damage formula box you can even do something like this:
Code:
CSM.slime_mult((your_formula_goes_here), a, b)

While the 1st method will work for sure I am not sure I made no mistake in this code. It should work but you have to test it out.

If what you need is more complicated than this and/or you don't want to spend too much time setting up your skills then you shuld follow Andar's advice and ask for a script. I hope this helps 🙂

EDIT:
@cbmarcilio the code below can be edited to let it work in other situations as well. Of course you have to give us detailed informations if you want something different. That code is supposed to work for your example but not for everything.
If the OP wants his/her actor to be able to use the same skill as the other actors shouldn't something like this in the damage formula work?
Code:
r = your_damage_formula_goes_here; (a == $game_actors[id]) ? r*b.element_rate(n) : r

In this case n is the element rate for slimes which should be 0 if the actor should deal no damage at all, but it can be something different if the damage should be altered in another way.

Of course this must be included in EVERY shared skill and is VERY tedious but it allows the OP to achieve what he wants without having to look for a script.

@cbmarcilio be aware of the fact that since in VX Ace (unlike in MV) your damage formula box only allows a very limited ammount of characters. That said if you need a lot of conditions and/or you want to use that condition in a skill which already has a very long damage formula you won't be able to do it and you need a script. A fast way to overcome this is to use something like this:
Code:
module CSM # Custom Skill Multiplier
    def self.slime_mult(formula, a, b)
        if (character == $game_actors[id]) #change id with the id of the actor which should not be able to damage slimes
            formula * b.element_rate(n) #change n with the element rate you are going to use for slimes (slimes should have element_rate(n) = 0)
        else
            formula
        end
    end
end
Copy/paste it in your project then set your skill formulae to be like this:
Code:
r = your_skill_formula_goes_here; CSM.slime_mult(r, a, b)

This is no way less tedious than te previous method but it allows you to use it for skills with long damage formulae. If you want to spare few characters in your damage formula box you can even do something like this:
Code:
CSM.slime_mult((your_formula_goes_here), a, b)

While the 1st method will work for sure I am not sure I made no mistake in this code. It should work but you have to test it out.

If what you need is more complicated than this and/or you don't want to spend too much time setting up your skills then you shuld follow Andar's advice and ask for a script. I hope this helps 🙂

EDIT:
@cbmarcilio the code below can be edited to let it work in other situations as well. Of course you have to give us detailed informations if you want something different. That code is supposed to work for your example but not for everything.

First of all i just wanted to say thanks for trying to help me, like, really thanks, but continuing, now i have a couple of questions because i really didn't understand some stuff.

First of all, i used that first damage formula and simple, all characters can't do damage in all enemies, explaining better my request, in the begining of the game, there will be two characters in the party, the protagonist and the ally, the protagonist can deal damage to the slimes but the ally can't
i put some prints in the imgur if you want to see it


(and i really didn't understand too well the stuff of "(a == $game_actors[id]) ? r*b.element_rate(n)", i'm really new in rpg maker)
Oh, no need to answer, I found a way, but still thank you for helping me, really <3
(one of yanfly scripts do exactly what i needed)
I am happy you found a solution to your problem. Anyway, if you are interested in how it works you can press F1 in your editor and read something about ruby syntax. You will find your answer there. However it was tested so I am quite sure you didn't set it up properly because in my fresh game it worked perfectly.

However, I am glad Yanfly has the script you need =)

Original thread: https://forums.rpgmakerweb.com/threads/a-character-that-does-no-damage-to-a-specific-monster.78416/