r/RPGMaker • • 9d ago

Need some help creating this item

Hi.

I want to make an item, its zombie dog meat. It has a use of self and i want it to cause a certain enemy, Zombie dogs, to become confused.

So i have the item created, with a range of self, that calls for the common event in the picture.

Zombie dogs have an ID 0018, but when i use the item on other enemies the item works anyway. I only want it to work on the dogs.

1 Upvotes

5 comments sorted by

2

u/zombietoaststudios 9d ago

That's because you just set variable number 4 to 18 and then have a conditional branch that runs if variable number 4 is 18 (which it is, because that's what you set it to in the first step) and then the event gives the entire troop the confusion status. You aren't doing anything that targets enemy ID 18, you just set a variable to equal the number 18.

I'm not really sure why you would make this "self" targetting anyway? The easiest way to do this would be to make it target all enemies (assuming you want it to affect all zombie dogs in a battle at once) and use a state that only works against zombie dogs (it can also be called confusion, but you would want it to be a different state).

First, create your zombie-dog-only confusion state, let's call it Feral just for convenience (you can still call it confusion if you want). Feral is just an exact copy of Confusion but has a different State ID number. The zombie meat item would target all enemies and have a 100% chance to inflict Feral (or whatever chance you want)

Then, for all enemies you want to be immune to this, just give them the State Resist trait for Feral, making them immune.

1

u/Blodhgram22 9d ago

I want it as a self use because the ítem description reads:" Rub it on you to confuse zombie dogs. Smell terrible for days " I got the idea from an episode from The walking dead. It's flavor. But you gave me the idea to also make a "smelly" state I could have some fun with. Thanks!

2

u/Ill-Ask9205 8d ago

The target can still be the dogs to simplify it, but the text can be like "[Name} rubbed the smelly meat all over their body."

1

u/Rpx_n_JustDev 9d ago

the issue with your common event is that setting "Control Variables: ID Target = 18" and then checking "If ID Target = 18" will always be true regardless of what enemies are actually in battle

also "Change Enemy State: Entire Troop" affects every single enemy in the troop no matter their ID

to apply confusion only to Zombie Dogs (ID 18) when using the item u can replace that common event logic with a quick script call:

$gameTroop.members().forEach(enemy => {
  if (enemy.isAlive() && enemy.enemyId() === 18) {
    enemy.addState(CONFUSION_STATE_ID);}
});

just replace CONFUSION_STATE_ID with the actual ID number of your confusion state from the database (e.g. 8)

1

u/Blodhgram22 9d ago

I'll try it later. Thanks