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
161
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
161
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 Posts

Latest Profile Posts

So Deltarune Chapter 2 is supposed to release today... if it's out already, has anyone played it? And I can't because I have a stinking Mac and not a Windows PC.
I forgot that forums have profile walls that you can post or comment on, guess I found a new platform to specifically rant about game-related deranged thought or problems that I have. Salut mes amis!
I couldn't help myself, so I edited the tiles a bit and made a birdhouse :LZSsmile: I hope I will finish the town today!Screenshot 2021-09-17 134349.png
How do I find the threads I have watched? It's been so long I've forgotten :kaoswt:
So far, this is how the wall tileset its looking in-editor. :kaoswt2:
1631863283853.png
Still thinking on details to add.

Forum statistics

Threads
115,135
Messages
1,087,504
Members
149,643
Latest member
Loyalvib
Top