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

Chizuru
chizuru.png


anyway, i just recovered from Covid.
Work's been delayed for a month but now i'm back drawing again.
Ah yes i learned how to make name boxes Im now profeshonal
The snowy mountains in my game are finally done... what a crazy journey.
I participated in the official video event collection!
Well I am infinitely upset that I finally got a good idea... after the Touch the Stars game jam is pretty much over.

Gather resources to build a spaceship to escape the apocalypse! It would have been cool....

Forum statistics

Threads
113,608
Messages
1,076,188
Members
147,615
Latest member
DeadFissure
Top