As above really, I'm looking to run something similar to a hunger bar that needs to be refilled over time otherwise the player dies?
If the player picks up a food item then the bar re-fills and begins to deplete again ...
Any ideas?
You could use a state with Ex-Parameter HP Regeneration of a negative number, except that uses a % and not a set value.
A percentage would work absolutely fine, could you possibly explain this a little more? Also it's not health that i'll be running but a different variable, however it works in the same way so thought it was easier to explain it that way.
Thank you for replying so fast too!
If you're not using MP, then you can rename MP to hunger or whatever and have it used that way.
In the traits area you can change additional parameters, and one of them is MP-regeneration (another would be the HP-regeneration Shaz mentioned).
If you set that for a negative value in the traits of every actor, it will automatically go down.
The only thing you would have to do is to make your events check the MP of the actors.
If you're already using HP and MP in your game, then you would either have to use a variable and control it (and its changes) with parallel process events, or use a plugin that adds new values.
There is a tutorial about evented hunger/thirst systems somewhere on this forum, but I don't know if a plugin already exists for MV.
Hi Andar, thanks for coming in on this ... so I have checked out the traits area in MV and I can not find a way to add this in? I'm so sorry as I'm a complete newbie for adding in custom things to RPG Maker MV ... could you possibly point me to something I could follow?
I was probably being a little cagey, but basically what I'm after is a Battery stat that if it reaches 0 then a plugin command is ran that reduces the light emitting from the player using the Terrax Lighting system.
. . .on ACE i used TP. . .but somehow, it causes major lag. . .might be working well in MV. . .
yes there is - control variable, load the game data into the variable and then check the value of the variable with a conditional branch
Perfect! So it's working now and the lighting effect too ... the only issues i'm encountering are ...
1) The MP only seems to reduce when I run, it needs to reduce constantly
2) The update frequency of the parallel event isn't immediate, is there a way I can get this to speed up?
Thank you so much for your help!
2) The update frequency of any parallel depends on the number of waits inside - and is a matter of experimentation.
too few waits and the event will cause lag, slowing down everything.
too many waits and the check will not happen often enough, again slowing everything down.
The correct number is somewhere in the middle and depends on too many other things to be set generally.
Without wait, the parallel will run once per frame - sixty times per second - usually causing lag.
The wait commands tells it to skip some frames before running again - a wait(5) would result in the event being executed "only" ten times per second.
a wait(120) would result in a two-second-stop between two executions of the parallel.
Start with wait(5) and increas if too much lag, decrease if the event isn't called often enough
1) RM has no time in the game, if you want that you'll need to implement a time system, either by event or by script.
Event could be the same parallel that checks for zero, only reduzing the MP in addition to checking with the change MP command.
In that case however, you have to remove the trait
Fantastic, putting those waits in actually makes it all work a little quicker (as I didn't have any in there before)
The last piece of the puzzle is that the MP only reduces when the character moves, is there a way to get it to reduce constantly?
Solved it ... I added a section to the common event that was being called to reduce the MP by one each cycle, that way I didn't have to mess around with the player stats too much ... job done.
Thank you for all of your help there Andar, brilliant!
MP regeneration/degeneration only ticks on movement. You need to set it to a parallel event instead. Have the event change MP and wait in a loop. That will allow you to tie battery power to frame rate and thus real time.
[edit]: glad you figured it out!