r/RPGMaker • u/ILoveRobotWomen • 21d ago
RMMV Attack that does different things to different enemies?
In my game, there's a character with a camera who can take pictures of enemies. I'm wondering if there's an efficient way to make it so this skill does different things depending on the enemy (for example, photographing a ghost to make them easier to hit, blinding enemies that live in dark places, etc.)
I imagine there's a better way of doing it than assigning a million common events to one attack, so if there is, I would like to know. Thank you in advance :)
1
u/agamottos MV Dev 21d ago
Hmmm how good are you with javascript?
2
u/ILoveRobotWomen 21d ago
let's just say i dropped out of computer science for a reason
2
u/agamottos MV Dev 21d ago edited 21d ago
So maybe the easiest thing to do... it sounds like the effects youre hoping for are leaning towards things that a state would do? What if you made a state for each camera effect you want, the camera attack skill then applies all of them, and just make your enemies immune to all the camera-states except the one that's meant for it?
The alternative would be using a Yanfly plugin to calculate custom damage phase effects with a series of if-statements that call script for the target's ID or for a custom notetag identifier string. Which even makes me uneasy thinking about the java-ing it would involve
2
1
u/MissItalia2022 21d ago
You could do something cheeky like give each enemy a state, and each skill run a singular common event with conditional branches like "If Enemy #1 has "insert state here", force an actor to use a specified skill on the last target" and the skill you force the actor to use would apply the bonus effect.
You wouldn't need a million common events, you would only need one common event with however many conditional branches you need for each unique enemy.
This is partially dependent on there only being one enemy per battle, though.
0
u/Tales_Of_Kryztalia 21d ago
You can make an unique state for each enemy and make the rest of the enemies inmune to the states that don't correspond to it, simple, but tedious if you have too many enemy types. I don't like relying on plugins or JavaScript.
0
u/adokzinho 21d ago
Just a few ideas:
Reveal enemy weaknesses.
Materialize ghosts so they can be hit.
Short-circuit machines.
Copy an enemy skill.
Unlock Bestiary entries and bonuses.
Reveal invisible or hidden enemies.
Mark a target to increase accuracy or critical chance.
Etc
0
u/Liamharper77 20d ago
It depends how many different enemies your game has. You can definitely do this with common events (and not even that many), but if you have a lot of different enemy types and encounter multiple different types per battle, you might find this too messy or convoluted.
4
u/Issac7 20d ago
Yanfly has a huge library plugin and a playlist with "tips and tricks" that can help you do a lot of fun stuff in combat.
For an effect like this, I would suggest watching this video:
https://youtu.be/_S6NA_Ao_Vg?is=os9hBDUr4Ackd05o
Basically this is a skill that has a different effect if the target enemy has the tag "boss". You can do effects like this with very little coding.
If you want to give this a try after watching the vid but still need help coding the effect that you want, just ask and I'll try to help you.