RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
298
Reaction score
656
First Language
English
Primarily Uses
RMVXA
As the title says.

Let's say you whack an enemy and they're dropped to less than half health. What I want to do is configure it so when you escape, they keep that amount of health when you encounter them again. You know, instead of fighting them with full HP again.

(I have a visual encounter system, for further context)
 
Last edited:

Blackyu

Professional Procrastinator
Veteran
Joined
Jul 10, 2016
Messages
110
Reaction score
336
First Language
French
Primarily Uses
RMVXA
Hiya !
Quick question, do you want that feature for one single enemy, multiple enemies, or every enemy you encounter ? Asking that because the approach might be different depending on what you want.

(By the way, by 'visual encounter system', do you mean you can see the enemies on the screen and you run into them to fight or is it something else ?)
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
298
Reaction score
656
First Language
English
Primarily Uses
RMVXA
You can see the enemies on the screen before you fight them, yes.

The idea for this is mainly for boss fights, since for normal encounters it's unreasonable due to the vast number of them.

Stuff like a roaming boss (the best example I have is the Deathgaze enemy from Final Fantasy 6).
 

Blackyu

Professional Procrastinator
Veteran
Joined
Jul 10, 2016
Messages
110
Reaction score
336
First Language
French
Primarily Uses
RMVXA
Alright, so if you're familiar with Variables, I think I have a solution !
You're gonna need two variables (I'll call them A and B ).
In your battle events, you'll need two pages, one that happens at the start of the battle and the other that happens at the end of every turn.

First page would go like this :

Change enemy health (reduce it by Variable, use A)

It will be used to change an enemy's health according to variable A


The second one is like this :

Control Variable : Set A to Enemy Max Health (Other -> Enemy -> Max HP) Control Variable : Set B to Enemy Health (Other -> Enemy -> HP) Control Variable : Subtract Variable B to Variable A

(My RPG Maker is in French, so the terminology of commands might not be exact)

What we're doing here is that, at the end of every turn of battle, the difference between the enemy's max health and its current health (the amount of HP it has therefore lost since the beginning of the battle) is stored in Variable A.
This amount is removed from the enemy's HP when a battle with it begins, so it should have the health you left it at previously !

It's untested, but it should work ! Tell me if you have any problems !
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
298
Reaction score
656
First Language
English
Primarily Uses
RMVXA
@Blackyu you mad lad, it works!

It works exactly how I want, but one small bug: if you escape on the first turn, the effect of the variable doesn't apply.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,968
Reaction score
14,820
First Language
English
Primarily Uses
RMVXA
Note you will need a variable for each and every enemy in your game if you do it this way, so I hope you either have less than 999 enemies or aren't using this for every enemy. If you need it for more than that you'll need a script.
 

Blackyu

Professional Procrastinator
Veteran
Joined
Jul 10, 2016
Messages
110
Reaction score
336
First Language
French
Primarily Uses
RMVXA
Nice ! Is the glitch fixed if you change the frequency of the second event from "Every Turn" to "Always" ?
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
298
Reaction score
656
First Language
English
Primarily Uses
RMVXA
@bgillisp I see you didn't read what I said earlier. It's only for specific enemies.

@Blackyu I found out the cause and fixed it up. I didn't tag it as "when the end of the turn", and that's why it didn't count when you escape the first turn.

So all in all, a rousing success. Thanks for helping, dude. :)
 

Blackyu

Professional Procrastinator
Veteran
Joined
Jul 10, 2016
Messages
110
Reaction score
336
First Language
French
Primarily Uses
RMVXA
If several of those specific enemies are available at the same time, remember that you will still have to use different variables (At least Variable A will have to be different, since B is just a transit variable and isn't used outside of operations) !

But you're welcome ! Best of luck in your RPG Making !
 

Latest Threads

Latest Profile Posts

I decided to reinstall one of my most favourite game of all times, Gothic 2. Time to get back to Khorinis!
So much game make... I needs to rest. The foods call.
-Casino with bunnysuit green check.png
1638563168795.png
Monday December 6th 2021 at 7PM Hawkzombie will stream A Thief's Voyage on his Twitch.

Hawkzombie Twitch

Check it out.​
Ladies and gentlepeeps, I'm working on a Chuck E Cheese horror game! Did you know that in the 80's, in the Pizza Time Theater, Helen Henny was a separate character who performed in a separate room called the Cabaret? She was one of the possible guest stars there, and she was a Hollywood star at the time. But this particular unit seems to have a dark secret...

Forum statistics

Threads
117,161
Messages
1,105,052
Members
153,244
Latest member
MLC
Top