DepressedHarold

Villager
Member
Joined
May 10, 2021
Messages
8
Reaction score
1
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
8
Reaction score
1
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
8
Reaction score
1
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

Figured I would start posting what I am working on here. Anyways, a quest system plugin I have been working on:
20mgjmZ.png


What features would yall like to see in a quest system?
Playing my game to improve my game. (Totally not procrastinating)
Hope he recovers fast :|
Looks like it's functional:
It's a common thing to forget eating &drinking while you are working concentrated, right?
If I had discovered RPG-Maker before moving together with my girlfriend, I'd have died of dehydration a long time ago.

Forum statistics

Threads
112,500
Messages
1,068,726
Members
146,176
Latest member
Spooky_frog
Top