DrinkableTrees

Villager
Member
Joined
Oct 13, 2017
Messages
25
Reaction score
8
First Language
English
Primarily Uses
RMMV
Hey RMMV community!

I've been playing with a new conditional branch absolutely necessary for certain mechanics of my game and it doesn't seem to be processing well. The source of where I found this script was here: https://steamcommunity.com/app/220700/discussions/2/523898291496333465/

I've attached several images below.
-Event Info.png shows the event, the conditional branch script and how its all written out. Pheonix down's item ID is 0012, i made sure of this.
-TheOption.png shows the choice where the choice takes place that makes the error. The error undergoes when the first option is selected. I made sure to have 10 item ID 0012's (Pheonix Downs) but it still causes an error and forces the player to go down the Else path, where no conversion takes place.
-TheError.png shows the debug console that appears when the error takes place. Below where it was highlighted it did note to make sure ItemCore (from Yanfly) was up to date, so (to be safe) I reinstalled it and replaced it. The error still takes place.
-GoesDownElsePath.png only shows that, in fact, after the error screen appears the player goes down the "Else" option, which is supposed to take place if the player chooses to convert pheonix downs into Nia Potions but doesn't have enough Downs.

Thank you if you can help! It'll be a big step towards my game's vision.

EDIT: The goal for the NPC is (after their sidequest is finished) open up the option to exchange 10 Pheonix Downs (itemID 0012) into 1 Nia Potion (itemID 0013).
 

Attachments

  • EventInfo.png
    EventInfo.png
    313.3 KB · Views: 24
  • GoesDownElsePath.png
    GoesDownElsePath.png
    689.8 KB · Views: 19
  • TheError.png
    TheError.png
    317.7 KB · Views: 16
  • TheOption.png
    TheOption.png
    704.7 KB · Views: 17

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,763
Reaction score
8,971
First Language
German
Primarily Uses
RMMV
Why use a script for this at all?

Just use control variable to get the number of phoenix downs in the player inventory and check that in the conditional branch...
 

DrinkableTrees

Villager
Member
Joined
Oct 13, 2017
Messages
25
Reaction score
8
First Language
English
Primarily Uses
RMMV
Why use a script for this at all?

Just use control variable to get the number of phoenix downs in the player inventory and check that in the conditional branch...

I've heard about people commonly using variables to track how much of a number of items they current have on them. How would i make sure the variable is kept up to the number of Downs on me without having to go through the game and add "+1" for everytime the player gains a Pheonix Down?


EDIT: I found out how to set the variable to the # of item in possession through Control Variable -> Game Data.

For others and personal future reference: Make a variable to track the number you have, you wont need to update it each time it comes into possession. Right before the variable amount becomes relevant, make a "Control Variable -> Game Data -> Item -> Item you wish to count. Set the operation to "Set" and there ya go!
 
Last edited:

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
736
Reaction score
243
First Language
Vietnamese
Primarily Uses
RMMV
Control Variables => Game Data => Item => Choose the item you want and it will count the number of items you have.
 

Latest Profile Posts

SF_People3_1 added!
index.php

Micro rant. The worst part of working from home when you live with your family is seeing how inconsiderate they are. "Hey, you're sitting in front of your computer, that means you're not doing anything! I want to put the TV at 200 decibels!"

If I was working in the office would you still talking me like that?
It's definitely discouraging when streamers give a try-to-say-it-nicely (i.e. bad) review of your game demo. It's like jumping into a cold pool. Bad initally, but it gets better with time. And you are now more alert and see better.
Some screenshots of the pub and lodging with the beginnings of clutter taking shape
TTp8uCw.png

jtC202e.png

bSXgyVl.png

eRx9PUF.png
Backgrounds are not my strong suit... :kaodes:
DazI8jt.jpg

Just realized I forgot doing the clouds... woops

Forum statistics

Threads
118,507
Messages
1,116,489
Members
155,507
Latest member
2dweeb6ae
Top