Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Regenerating MP

Necrus

Member

First off, my name is Necrus and I am new to the RPG Maker XP fourms. :thumb:

What I am needing support on is advice on how I can make it so my characters gradually regenerate MP over time, kinda like a poison effect on MP, but in reverse.
Is there anyway I can do this with RPG Maker XP alone, or will I need to script my own code?

Thanks!  :smile:
 
Make a Parallel Process event on every map that goes something like this:

>Change MP: +x
>Wait: x

(I'm not too sure about the actual commands without a copy of RPGMaker in front of me...)

Parallel Processes automatically loop and if you place something like this on every map then MP will regenerate over time. If I had a copy of RPGMaker on the comp. I am on now I would take a screenshot for you, but it should be quite simple to work out.

If you wanted to do it via the no. of steps the hero takes then it would be a bit more complex, but doing it via time like this is quite simple.
 
You can also do it by scripting. All you have to do is override the method where the step count is increased, and update the HP of your party there. This will regenerate your HP for every step you take, whatever the map you are in. You can also implement some tests as well as number of steps needed for a regeneration tick, etc.... You just have to do it once and for all.
Alas, I am not yet familiar enough with the RGSS data stucture to tell you exactly what to write and where to write it, help uou any further.
 
It's much easier to do it with a parallel process common event.  Make a common event that's triggered by a switch (any switch will work - if you want it to be from the start of the game, choose a switch that's turned on early or add in a switch).  Then, use

Code:
@>Change MP: Entire Party, +1
@>Wait: 30 Frames

Now, every 30 frames, your party will regenerate 1 MP.  This will only take place while they're on a map (not while they're in the menu or during battle), which is probably what you're looking for.
 

Necrus

Member

*finally returns* Thank you all for your input, I needed it for both outside and inside battle and looks like I got both answers

The community here is quite knowledgeable

EDIT: That thing you told me to do, to regnerate the entire party's MP every so-frames, during combat it doesn't work because Im using a real-time system that has a ready bar, the bars won't move at all since its "waiting" the entire time, plus once it reaches maximum MP, the game freezes

I haven't tried it outside of combat (which may work) but right now I think I need something to work in combat that doesn't use the Wait function

EDIT 2: Nevermind, I fixed it, I had to set it to the condition of turn 1+1x then make the span per turn (not battle)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top