How to Check Item List before Giving Items to NPC

yhomick

Villager
Member
Joined
Dec 28, 2016
Messages
5
Reaction score
0
First Language
Filipino
Primarily Uses
N/A
Hello Everyone. I'm new to this forum so please tell me if I'm doing something wrong with this post.


Anyway, I am making a game and I want to give items to NPC. I tried the conditional branch to check if item is in inventory but that's not what I need, because I want to let the player check the inventory first then confirm the item to be given to the NPC. I am not sure if that's even possible, but hope you could help me.


Any replies would be much appreciated  :)  Thanks  :) :)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
you can use control variable : game data to load the number of items of any type into the variable, and then chack the variable to see how many the player has.
 

dinhbat3

Veteran
Veteran
Joined
Feb 5, 2014
Messages
184
Reaction score
31
First Language
English
Primarily Uses
Might be misinterpreting the request incorrectly, but I am thinking the original question is to allow the player to speak to the NPC, and given an item select screen to select the item.


If so there are 2 ways to go about this (both with links!)


Speaking to the NPC who then pops up a window for you to select your items:


Vlue has a script for this: http://www.rpgmakercentral.com/topic/19709-advanced-select-item/


Use an item on the NPC without needing to speak to the NPC first.


I found a tutorial on youtube that could help with that =) when I pasted the link it was a huge video so I put it in this spoiler.




I could be wrong though... So if I understood it incorrectly, apologies... and ignore me =D


Hope this helps!


~ Dinhbat
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
If you want the player to select the item when talking to the NPC, set it up as a Key Item and use the Select Key Item command to put the item id into a variable.  Then you can do a conditional branch to see what the variable is - if it's the correct item ID, remove the item and do whatever processing you want to do.
 

yhomick

Villager
Member
Joined
Dec 28, 2016
Messages
5
Reaction score
0
First Language
Filipino
Primarily Uses
N/A
Thanks for the replies, but what I want to happen is when the player talks to an NPC there will be choices as Talk, Give and Cancel.. When the player choose Talk, there will be a 'Show Text' Event, which I managed already. And when the player choose Give, the inventory or item list will pop-up so the player can choose what item to give. It's somewhat like the sell command where player confirms which to sell and how many to sell..


Anyway, I did appreciate all the replies.


Thanks again.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
yeah, the only way to do this without scripting is if you make that item as a key item. Else you will need a script that allows showing of normal items in a list for events.
 

yhomick

Villager
Member
Joined
Dec 28, 2016
Messages
5
Reaction score
0
First Language
Filipino
Primarily Uses
N/A
Thanks everyone! I'll try all your suggestions.  :) :)
 

yhomick

Villager
Member
Joined
Dec 28, 2016
Messages
5
Reaction score
0
First Language
Filipino
Primarily Uses
N/A
YES!!  :rock-left: :guffaw: :rock-right:


It worked!! Thanks to all your suggestions guys!!  :D :D
 

yhomick

Villager
Member
Joined
Dec 28, 2016
Messages
5
Reaction score
0
First Language
Filipino
Primarily Uses
N/A
yeah, the only way to do this without scripting is if you make that item as a key item. Else you will need a script that allows showing of normal items in a list for events.
So, there's a way to do it using script?? How's that??  :unsure:
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
yhomick, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.



If you want to add something, simply edit your earlier post.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
So, there's a way to do it using script?? How's that??  :unsure:


If you can do it without scripting, do it without scripting.  You've got something that works.


The reference is to either changing the Select Key Items command so non-key items will be shown (basically, ALL items will be shown), or to write a new window and class that are similar to Select Key Item, but allow all items to be shown.  If you're happy with the way it's working for you now, don't go down that track.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
So, there's a way to do it using script?? How's that??  :unsure:


Ofc there is, edit the key item choosing window to show all items or script your own item choosing window.


but like Shaz said, if you can use the non-script option, better just go that way.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,243
Members
137,609
Latest member
shododdydoddy
Top