Exchanging items for a party member

Qwilfish

Veteran
Veteran
Joined
Mar 29, 2018
Messages
63
Reaction score
8
First Language
Polish
Primarily Uses
RMMV
I'm working on a game where you can exchange certain items for different monsters to join your party. I managed to do it (kind of) by using conditional branch> if player has 1 Fire Scroll> Fire Deamon joins the party.

The problem is that, that way, you can only exchange 1 item for a monster, while I need it to be more like:
If player has 20 Fire Scrolls> Fire Deamon joins the party

I'm new to RPG Maker and I have no idea how to do it.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Use control variables to get the number of items in inventory, then use conditional branch on the variable.
 

Qwilfish

Veteran
Veteran
Joined
Mar 29, 2018
Messages
63
Reaction score
8
First Language
Polish
Primarily Uses
RMMV
EDIT: Ok, I realised I didn't turn on the conditions. That solves everything, thank you for your help!


Alright, so I managed to make an NPC that gives +1 Bat Wing variable each time you talk to him, and then I can exchange it for a Bat Monster with another NPC.

But I can't seem to be able to make Bat Troops to drop Bat Wings Variables?

I made bat troops to add +2 variable:


And then made an NPC that trades bat wings for a Bat:



What am I doing wrong?
 
Last edited:

TWings

The Dragon Whisperer
Veteran
Joined
Jul 26, 2017
Messages
527
Reaction score
860
First Language
French
Primarily Uses
RMMV
Actually what Andar was suggesting is much more simple.
Taking your example, on your exchange NPC do :
- Variable 4 = Number of bat wings (select game data, item bat wings)
- if variable 4 = 3
...
So you don't need to bother feeding your variable 4 everywhere, just when checking with the npc.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
And if you're doing that with the troops to get bat wings from a battle, you want to use the Enemies tab instead, and make it so that the Bat enemy drops bat wings.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
@Qwilfish and the reason why your troop event didn't work is because you told it to never work: "don't run" means "never executed this event", that running is a Computer term that has nothing to do with escaping.
 

Qwilfish

Veteran
Veteran
Joined
Mar 29, 2018
Messages
63
Reaction score
8
First Language
Polish
Primarily Uses
RMMV
Actually what Andar was suggesting is much more simple.
Taking your example, on your exchange NPC do :
- Variable 4 = Number of bat wings (select game data, item bat wings)
- if variable 4 = 3
...
So you don't need to bother feeding your variable 4 everywhere, just when checking with the npc.
I tried it again but I can't understand what am I supposed to do, I end up with the same thing all the time :(




@mlogan
That's what I was trying to do from the beginning, but I couldn't figure out how xD

@Andar Yeah, I figured it out after I posted it, thanks!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
@Qwilfish you check for exactly 3 bat wings, which means the conditional branch will not only fail with less than 3, it will also fail if the player has four or more bat wings.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
You control the item drop on the Enemies tab, like this:

batwing.png

And as Andar said, change your batwings check to > or equal to; it looks like the > with a line under it.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top