DepressedHarold

Villager
Member
Joined
May 10, 2021
Messages
10
Reaction score
2
First Language
German
Primarily Uses
RMMV
I am trying to create a food system for my MV RPG. I made food items to decrease the characters' hunger on the menu screen. However I haven't found any plugin that works in the menu screen that makes items usable on characters on script conditions (if hunger is greater than 0). There are some Yanfly plugins that seem to be able to do this but they only work in the battle screen.
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
588
Reaction score
160
First Language
Engilsh
Primarily Uses
RMMV
I'm pretty sure Yanfly's Item Requirements plugin works outside of battle as well, this is a paid plug in but the price for Yanfly's plugins are well worth it in my opinion, I purchased all of them myself.

If you use Yanfly's Item Requirements you just have to add the requirements inside of the note tag,

it depends on how your storing the hunger variable, if you're using the game engine variables then you would create a notetag that looks something like this:
Code:
  <Enable Requirements>
    Variable x > 0 
  </Enable Requirements>
// Where x is the id of the variable you're using for hunger

If you're using some sort of hunger script which defines it in a javascript variable then you would use something like this:

Code:
  <Enable Requirements>
    Eval: hunger > 0
  </Enable Requirements>
 

DepressedHarold

Villager
Member
Joined
May 10, 2021
Messages
10
Reaction score
2
First Language
German
Primarily Uses
RMMV
I'm pretty sure Yanfly's Item Requirements plugin works outside of battle as well, this is a paid plug in but the price for Yanfly's plugins are well worth it in my opinion, I purchased all of them myself.

If you use Yanfly's Item Requirements you just have to add the requirements inside of the note tag,

it depends on how your storing the hunger variable, if you're using the game engine variables then you would create a notetag that looks something like this:
Code:
  <Enable Requirements>
    Variable x > 0
  </Enable Requirements>
// Where x is the id of the variable you're using for hunger

If you're using some sort of hunger script which defines it in a javascript variable then you would use something like this:

Code:
  <Enable Requirements>
    Eval: hunger > 0
  </Enable Requirements>
I basically already tried this, the problem is, that when i use Item Requirements in the menu screen the plugin always selects the first actor of my party as the one the item is used at. The requirement code (i did it with custom requirements) is actually run before I select a target for the item and does not run at any time after that.
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
588
Reaction score
160
First Language
Engilsh
Primarily Uses
RMMV
I see, is hunger a global variable or tied to a specific actor?
 

DepressedHarold

Villager
Member
Joined
May 10, 2021
Messages
10
Reaction score
2
First Language
German
Primarily Uses
RMMV
I see, is hunger a global variable or tied to a specific actor?
Every actor has their own hunger variable. They are tecnically seperate global variables and their positioning is relative to the actor id.
 

Latest Threads

Latest Profile Posts

illuminatigirl.png
Illuminati may be just a cover-up for the actual secret society of Illuminaughty. :kaojoy:
Got distracted... again. So now I'm on project.... 5? 6? I can't even remember off the top of my head how many plugins I have in the works. Though I blame the latest two on a coding youtuber I watch occasionally. He codes in C++ but walks through the process well enough that it inspires me to do similar things for JS plugins. So... blame him for my lack of activity. lol
It's my birthday today! Mom and I went to my favorite Japanese restaurant for lunch and they gave me a Japanese dessert as a birthday surprise. Their salad is SO GOOD. Now we're back home chilling!
Game Theory is great to practice and all... but it is zero substitute for playtesting a game and saying, "Am I having fun?".

Forum statistics

Threads
113,759
Messages
1,077,234
Members
147,791
Latest member
besosama
Top