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

Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?
I've been working on status effects since last thursday, and today I finished the core mechanic of Zombie, Teleport, Curse and Recall. Zombie and Curse are lacking a few things to make them complete atm. Teleport though is the "HAHA" spell for some of my mobs, but can "NOPE" at them with Recall.

Forum statistics

Threads
115,169
Messages
1,087,780
Members
149,711
Latest member
GHench
Top