FAVORITE ITEMS SYSTEM (A.K.A. FRIENDSHIP POINTS)

A basic system to have items give different effects depending who they're used on

  • Novalux
  • 07/10/2019 02:39 AM
  • 448 views
Lets say Harold drinks a vial of Dragon Blood. As a magical dragon slayer, you'd expect his HP to recover by a good deal. If his friend Average Joe drinks a vial of dragon blood, you wouldn't expect the same thing to happen. Who knows, the dragon blood might even be poisonous to Average Joe, or give him a Stomachache. Whatever the case, after this tutorial you should be able to make sure the same item produces different effects on Dragon Slayer Harold and Average Joe.

Warning: This system is made entirely through eventing, so it may not look the prettiest.

First of all, lets create an item 001 "Dragon's Blood"
Now, instead of setting its effects, we're going to create a common event with the same name.

In the common event, Set 4 (or your max party members) choices, like so, using brackets instead of parentheses:

\P(1)
\P(2)
\P(3)
\P(4)

This will display the names of each party member in a list to choose from. Now we're going to create a variable 004 and call it "Item Effect ID" (or whatever you want to call it).

Next, underneath \P(1), we want to select:
Control Variables -> 004 -> Set -> Game Data -> Party Member (1) Actor ID

Your common event should look like this
\P(1)
Control Variables 004 "Item Effect ID" = Actor ID of the party member #1
\P(2)
\P(3)
\P(4)

Now underneath Control Variables 004, we want to but a conditional branch

IF Control Variables 004 = 01 (A.k.a Harold's actor id)
change HP actor 01 "Harold" +200

Which sets the effect for if Harold were to drink the dragons blood. Next, we create the effect for if Average Joe were to drink the dragons blood:

IF Control Variables 004 = 02 (a.k.a. Average Joes actor ID)
Change state actor (variable 004 "Item Effect ID") ADD State 006 "Poison"

So that Average Joe would get poisioned if drinking the blood.

Now we throw both of these underneath Control Variables 004 in the common event and get:

\P(1)
Control Variables 004 "Item Effect ID" = Actor ID of the party member #1
IF Control Variables 004 = 01 (A.k.a Harold's actor id)
Change HP actor 01 "Harold" +200
ELSE
IF Control Variables 004 = 02 (a.k.a. Average Joes actor ID)
Change state actor (variable 004 "Item Effect ID") ADD State 006 "Poison"
\P(2)
\P(3)
\P(4)

And basically what you have to do is set the effect for each actor and add it as a conditional branch underneath the previous actor's effect.

\P(1)
Control Variables 004 "Item Effect ID" = Actor ID of the party member #1
IF Control Variables 004 = 01 (A.k.a Harold's actor id)
Actor 01 Effect
ELSE
IF Control Variables 004 = 02 (A.k.a Average Joe's actor id)
Actor 02 Effect
ElSE
IF Control Variables 004 = 03
Actor 03 effect
...etc.

Now this covers everything if you selected Party member 1's name, but what if you selected Party Member 2? Well this is why I put each IF underneath the ELSE of the conditional branch before it- so that all you have to do is copy and paste the whole thing under \P(2), \P(3), and \P(4) (and so on if you have more party members.)

In the end it should look like this:

\P(1)
Control Variables 004 "Item Effect ID" = Actor ID of the party member #1
IF Control Variables 004 = 01 (A.k.a Harold's actor id)
Actor 01 Effect
ELSE
IF Control Variables 004 = 02 (A.k.a Average Joe's actor id)
Actor 02 Effect
ElSE
IF Control Variables 004 = 03
Actor 03 effect
ELSE
etc, etc
\P(2)
Control Variables 004 "Item Effect ID" = Actor ID of the party member #2
IF Control Variables 004 = 01 (A.k.a Harold's actor id)
Actor 01 Effect
ELSE
IF Control Variables 004 = 02 (A.k.a Average Joe's actor id)
Actor 02 Effect
ElSE
IF Control Variables 004 = 03
Actor 03 effect
ELSE
etc, etc
\P(3)
Control Variables 004 "Item Effect ID" = Actor ID of the party member #3
IF Control Variables 004 = 01 (A.k.a Harold's actor id)
Actor 01 Effect
ELSE
IF Control Variables 004 = 02 (A.k.a Average Joe's actor id)
Actor 02 Effect
ElSE
IF Control Variables 004 = 03
Actor 03 effect
ELSE
etc, etc
\P(4)
etc...

Make sure you change the actor id of the party member to = # of the party member's name you chose or it won't work correctly (the bolded parts)

Now just set the original effect of item 001 Dragon's Blood to Common Event 001 "Dragon's Blood" and you should be good to go.

But what if you wanted to make a friendship points system with gifts having different values for different people? All you would have to do is create a separate variable for each actor to represent their "Friendship Points". For example;

Variable 005= Harold - Joe's FP
Variable 006= Harold - Sarah's FP
Variable 007= Harold - Brian's FP
...etc.

And then instead of Actor 01 effect, plug in Variable 005 +10, or however many points giving a flower to Sarah would entail.

Now, if you want to take into account who's giving the item, say, if Joe were giving it to Sarah, that'd be something different entirely, something I haven't figured out... yet.

Hopefully this tutorial has helped you out in some way. To recap-
Create an item
Create a common event
Create choices = to your # of party members
Create a variable and set it = to the actor ID of the Party member you chose
Create a conditional branch for IF that variable = Actor 1's ID
Set the effect you want underneath that conditional branch
Place another conditional branch under the ELSE of the previous conditional branch
Set the effect for the second actor
Continue until you've done this for all actors you're going to use the item on
Copy + Paste all that under \P(2), changing the actor id of the party member to 2 (bolded)
Repeat for \P(3), \P(4), \P(5), etc.
And finally set the effect of the original item to Common Event X (whatever the item is)

And there you have it, a system for actor-dependent effects from one item... now to get to all the other items.