Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Trouble with giving items to my characters.

Status
Not open for further replies.

Gioaki

Villager
Xy$
0.00
Hi,

I'm really new to this RPG Maker stuff, so I get stuck sometimes without knowing how to fix some "bugs" (I don't know a better way to call these problems). Going straight to the point, I'm trying to make some kind of an adventure game and decided that I wanted to be able to choose if the player wants to be a male or a female. I found a lot of helpful tutorials on YouTube in order to make this possible, but I didn't like the idea of a game being so basic as to just choose male or female and that's it: I want to make a game that truly knows if your playing as either gender. I thought that making two variables called "male" and "female" would do the trick. As the player choose their gender, the variable of the specific gender will be set to 1, so I also thought that, when making every event, I should use two conditions; one for male and another one for female and only execute if said variable was set to 1.

So, this is my problem: they just don't seem to work as expected. Although I use the Change Item command, it just won't work and I can't seem to figure out why. I made sure that the item was there and that I can give it to a generic character. I'd like to post a screenshot, but I'm not using RPG Maker MV in English, but in my native language, so its just... Pointless. So I researched for the English commands and will write down the content of an example event (it being a body with a book on its hands):

-------------------------------------------------------------------------------------------------------------------------------------------

PAGE 1

>If : male = 1
>Message : It seems someone died here ... They have a really strange book on their hands.
>
Change Item : Strange Diary + 1
>Message : I should keep going on and read this later.
: end

>if : female = 1
>Message : Someone died here... Looks like they have a book on their hands.
>
Change Item : Strange Diary + 1
>Message : I should keep going if I don't want to meet the same fate.
: end
>Control Self Switch : A = ON

PAGE 2 (With Self Switch A as condition).

>Message : It's a dead body.

-------------------------------------------------------------------------------------------------------------------------------------------

As the event is a "dead body", I set the Autonomous Movement to "Fixed", Options to "Direction Fix", Priority to "Same as characters" and Trigger to "Action Button" in bot pages (I don't really think it was really necessary to specify this, but could help somehow).

The result form that event is that it actually shows the correct messages to the specified gender, but won't give the item to the character nor show the message from the second page.

It should be noted that I'm using some plugins in order to give the project a little pinch of magic. Here is the list:

-Community_Basic (Don´t even know how it works)
-KhasCore 2.0
-KhasGraphics 1.1
-KhasUltraLighting 4.2

So, that's it. Hope someone can help me with this as I really want to finish this project. I also apologize for any grammar mistakes.

Thanks in advance!
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Xy$
0.02
Although I use the Change Item command, it just won't work and I can't seem to figure out why.

PAGE 1

>If : male = 1
>Message : It seems someone died here ... They have a really strange book on their hands.
>
Change Item : Strange Diary + 1
>Message : I should keep going on and read this later.
: end

>if : female = 1
>Message : Someone died here... Looks like they have a book on their hands.
>
Change Item : Strange Diary + 1
>Message : I should keep going if I don't want to meet the same fate.
: end
>Control Self Switch : A = ON

PAGE 2 (With Self Switch A as condition).

>Message : It's a dead body.

-------------------------------------------------------------------------------------------------------------------------------------------

As the event is a "dead body", I set the Autonomous Movement to "Fixed", Options to "Direction Fix", Priority to "Same as characters" and Trigger to "Action Button" in bot pages (I don't really think it was really necessary to specify this, but could help somehow).

The result form that event is that it actually shows the correct messages to the specified gender, but won't give the item to the character nor show the message from the second page.
Hmm... not really sure what the problem is to be honest...

Have you tried disabling all plugins? Then try testing this.

Screenshots may still help me as I am familiar enough with the maker to use it in any language. (cool)
Please post screenshots of the event setup and the item setup.

Also if the item is the same for both gender, you could place the give item command at the top of the page instead of using 2 separate commands...

Side note:
If you haven't already I suggest to use a plugin for gender, it can be tricky to event without scripting.
Genders Plugin by FenrirKnight (aka. MikauSchekzen)
Gender Restrictions Plugin by
MutationIndustries(aka. MuteDay)
Gender Message System Plugin by nekosune
Gender Message Codes Plugin by yuyu!
 
Last edited:

Gioaki

Villager
Xy$
0.00
Thanks a lot for the response, I will try to use those plugins you suggested. I tested the event without the plugins I was using, but still won't work. Screenshots:

test.png


test 2.png
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Xy$
0.02
Thanks a lot for the response, I will try to use those plugins you suggested. I tested the event without the plugins I was using, but still won't work. Screenshots:

View attachment 7424
View attachment 7425
Hmm... I see...
Is that the only item that doesn't work?

Have you tried the script directly?
JavaScript:
$gameParty.gainItem($dataItems[itemId], n);
Use that in the script command instead to test. (cute)
n = quantity

If you'd like I could work on this directly if you send me a link to a copy of your project so far. (cool)
Preferably on github, Google drive, or dropbox...
 

Gioaki

Villager
Xy$
0.00
Thank you so much! Using script instead of command did the job. Now, I can keep going on with this project (I definitively have to learn scripting...).

Once again, thank you so much! (jolly)
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Xy$
0.02
Thank you so much! Using script instead of command did the job. Now, I can keep going on with this project (I definitively have to learn scripting...).

Once again, thank you so much! (jolly)
Glad to help out! If you need anything else I'll be around. (cool)(thumbsup)

Thread is now closed.
 
Status
Not open for further replies.
Top