Change the effect of an Item/attack depending on who you are using it on

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
938
First Language
German
Hi there :)

What I am looking for is this : A plugin that changes the effect of an attack or item depending on who you are using it on.

Examples : A healing spell that heals your allies, but hurts undead enemys.

                  A healing Item that heals you but when used on undeads turns into some kind of holy water bomb.

                  A Item that rises the friendship with one party member, but not with the others.

So basically it needs to check who I am using the Item/attack on and then let me choose the action depending on who the target is.

Is such a thing possible?

I mean I think it is necessary if you want to include some kind of romance/friendship system in your game. Like make person A's favourite dish, or give Person B a flower he/she likes.

So it might be usefull ^^

This is my first post so I hope I did nothing wrong with posting this ><
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,147
Reaction score
12,421
First Language
English
Primarily Uses
RMMV
You can do this with damage formula.  I'm going to move it into MV Support and people will be able to help you work out the correct formula to use based on what you want.

Can you please list out the names of the spells/skills you are using, and exactly what the effects should be?  Include enemy ids, actor ids, etc, when you want it to do something specific based on the target enemy or actor.
 

gekigengar

Villager
Member
Joined
Oct 27, 2015
Messages
23
Reaction score
5
First Language
English
You can do this with damage formula.  I'm going to move it into MV Support and people will be able to help you work out the correct formula to use based on what you want.

Can you please list out the names of the spells/skills you are using, and exactly what the effects should be?  Include enemy ids, actor ids, etc, when you want it to do something specific based on the target enemy or actor.
Any examples?

I am also looking for this, and was about to make request, on where players/enemy can be inflicted with "Undead" state at any point of the time.

Things with undead state will take damage from heals, and be inflicted with a "burn" state, while the non-undeads will be healed instead. (The core mechanic depends heavily on this).
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
938
First Language
German
You can do this with damage formula.  I'm going to move it into MV Support and people will be able to help you work out the correct formula to use based on what you want.

Can you please list out the names of the spells/skills you are using, and exactly what the effects should be?  Include enemy ids, actor ids, etc, when you want it to do something specific based on the target enemy or actor.
Ok, I will give my best !

So for example one, the healing skill that heals you but hurts undead :

The skill is "Holy light" ( skill ID 8) It should heal an ally 250 hp ( actor Ids 1 to 4), but deal 250 damage to the enemy with the IDs 5, 6, and 9 ( Zombie, Ghost and skeleton). All other enemys should be healed aswell, so the normal effect. ( for what ever reaseon you have to heal an enemy, but this effect isnt that important so if its harder to do you can leave it out ). The one who has this attack whould be the priest, actor ID 4.

Example two: A item that rises the friendship with the other people, some more, some less.

Lets say you have a book ( item ID 5 ) and what to give it to your friend. While Lucius ( ID: 4) really likes books and get 10 friendship points that are linked to the variable 4" friendship Lucius", Harold ( ID 1) really cant stand books and you lose 4 friendship points with him ( variable ID 1) . Both Therese ( ID:2) and Marsha (ID 3) get both 5 friendship point ( variabeln 2 + 3) as they dont like but also dont hate books.

That is what I'd like to do^^ I hope this is better then my first post :)
 

PlatypusOfDoom

Villager
Member
Joined
Aug 24, 2012
Messages
24
Reaction score
5
You could see if the methods listed in this thread still work: http://forums.rpgmakerweb.com/index.php?/topic/1143-how-to-make-the-most-of-custom-formulae-part-1/

That was an old post for VX Ace, so I have no idea if they will still work for MV. Unfortunately I haven't been able to test any of them yet.

For the ability that either heals or damages, you might have to use a common event to pull it off. You could then use the event functions to determine if they should be healed or damaged, then force it to use either of two separate abilities with the same name (one heals, one damages).
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
938
First Language
German
No, that doesnt seem to work :/ 
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
938
First Language
German
OK, here is what I tried so far:

To make it simple and check if it COULD work, I first tried to make a damage formula that would put actor2 into sleep, but would heal everyone else.

So the damage formula needed to check if the target was nr2 and then take action.

vr1 : b.id?(2) b.addState(10) : 150.   Didnt work. Just says didnt do any damage to Actor2  and shows a 0.

vr2: if b.id?(2); b.addState(10) ; else; 150 ; end Same as above.

the "b.addState(10)" work just fine on enemys but not allies. 

Any Ideas what is wrong?
 

PlatypusOfDoom

Villager
Member
Joined
Aug 24, 2012
Messages
24
Reaction score
5
Are you trying to check to see if the character's ID is 2 (the second actor in your database)? If so, you should try a heal formula like this:

b.id == 2 ? b.add_state(10) : 150

That formula says: if the recipient's actor id = 2, then add state 10. If not, heal recipient for 150.
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
938
First Language
German
Yes, that is what I am trying to check, 
I somehow with the help of the damage formular topic managed to get this :

y=0;(b._actorId===2?b.addState(10):y=200);y
Working ( as a test if its even possible to check for an actor) and it works as a skill but not as an item for some reason. 

Once I figured out how the hell I get it working as an item what I want to do with it is this:

Check if the target is actor2 => if yes run a common event that raises variable 2 five points and displays a text => if not, check if target is actor 1, run C.E (common event) that raises variable 1 one point ad displays text => if not checks if target is actor3 and runs a CE that raises variable 3 1 point and displays a text => if not... well you get the gist of it. 
 

Reylegh

Villager
Member
Joined
Nov 30, 2015
Messages
7
Reaction score
0
First Language
Polish/German
Hi,

Iliketea, could you explain me how you manage to get an option to "scope: all" for an item? The RPGmaker allows me for items only to chose target me/ally or enemies, but not all.
Also I am as well interested in making an undead state and let healing potions damage them, so did you manage to create what you wanted? :)
 

Reylegh

Villager
Member
Joined
Nov 30, 2015
Messages
7
Reaction score
0
First Language
Polish/German
For rpg maker ace yanfly created a plugin for the scope all, so seems I need to wait for his reply.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

C&C Remastered comes out tomorrow! Hyped! Already have it preinstalled on Steam.
Its ironic, how often a person can have something smart to say, when their arrogance is originating from an internal vacuum where emotional intelligence belongs.
Parallax mapping is time consuming...
Let's purchase th... WAIT! Just in time ehehehe.
Excited with the idea of a new maker, but I imagine I'll probably be disappointed.

Forum statistics

Threads
98,146
Messages
949,704
Members
129,433
Latest member
PICKLE_1
Top