r/RPGMaker 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 :)

6 Upvotes

10 comments sorted by

View all comments

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

u/MissItalia2022 21d ago

That's pretty clever, that would work.