[RMMZ] HEALING OVER THE MAX AMOUNT?

Posts

Pages: 1
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
So in my game I have a state that allows the user to heal an ally's HP past their max. So if an ally has 800 HP and their max HP is 1000 and they are healed by 400 HP, if the state is active on the healer the target will now have 1200 HP, 1000 permanent hit points and 200 temporary hit points. How exactly do I do this in MZ?

For the record I have all main visustella plugins so I'm good on that front. There was a tips and tricks about this done by Yanfly for MV but I don't think it works in MZ anymore due to the terminology change. I thought of using VS Anti Damage barriers in order to do this, but I have no idea what the process is to accomplish this. Maybe there's also a plugin for this? Can anyone help me? Thanks.
Marrend
Guardian of the Description Thread
21781
The main culprit might be the "refresh" function of Game_BattlerBase...

Game_BattlerBase.prototype.refresh = function() {
    for (const stateId of this.stateResistSet()) {
        this.eraseState(stateId);
    }
    this._hp = this._hp.clamp(0, this.mhp);
    this._mp = this._mp.clamp(0, this.mmp);
    this._tp = this._tp.clamp(0, this.maxTp());
};

...though I'm not 100% certain. You could try copying this into a temporary plug-in, and comment out the line concerning hp to see if that does the trick? Though, if I'm reading things right, this both sets the values so hp cannot fall below 0 as well as not being able to rise above mhp. Something to keep in mind.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
I don't know javascript and can't write a plugin for the life of me. I didn't understand a single thing you said in your post either. Complete nonsense. And I don't want this as a feature on everything, I just want this as a feature when a specific state is active. When the user is inflicted with the "Overheal" state they gain the ability to heal over the Max HP of whoever the target is. I have no idea what that code is all about and what it does, and still don't know how to implement my idea in my game. Especially now I'm super hesitant to use any complex script calls at all because every single time I've used them they've broken my game.
To simplify what Marrend said:
there's a function that exists to guarantee HP/MP/TP don't exceed their max values. This function is called periodically. That means that even if you do set HP to 1200/1000, the next time the Refresh function is called (which is probably several times per action) it'll get clamped (limited) to 1000.

There's a Yanfly Tips And Tricks article for Curada, a healing spell that stores overhealing in a variable and automatically heals the target when they get hurt.
It is different, but rather similar, you may want to use that.

http://www.yanfly.moe/wiki/Curada_(MV_Plugin_Tips_%26_Tricks)

The syntax should be different but the logic should be the same.
Marrend
Guardian of the Description Thread
21781
I don't know javascript and can't write a plugin for the life of me.

All I was asking you to do was to make a js file, take that code-snippet, comment a line out, and see what that edit did. This isn't high-level programming. This is a matter of copy-paste-test. If you're not even comfortable doing that, I don't know what to tell you.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
author=JosephSeraph
To simplify what Marrend said:
there's a function that exists to guarantee HP/MP/TP don't exceed their max values. This function is called periodically. That means that even if you do set HP to 1200/1000, the next time the Refresh function is called (which is probably several times per action) it'll get clamped (limited) to 1000.

There's a Yanfly Tips And Tricks article for Curada, a healing spell that stores overhealing in a variable and automatically heals the target when they get hurt.
It is different, but rather similar, you may want to use that.

http://www.yanfly.moe/wiki/Curada_(MV_Plugin_Tips_%26_Tricks)

The syntax should be different but the logic should be the same.

That's the problem. I used Yanfly Tips and Tricks for many things in my game and that broke everything due to using the wrong terminology. I don't know the syntax at all for anything code-wise. I tried changing the syntax but that just caused a different game breaking glitch.

author=Marrend
I don't know javascript and can't write a plugin for the life of me.
All I was asking you to do was to make a js file, take that code-snippet, comment a line out, and see what that edit did. This isn't high-level programming. This is a matter of copy-paste-test. If you're not even comfortable doing that, I don't know what to tell you.


Problem is is that I can't test anything like that because MY GAME DOESN'T EVEN OPEN. Every time I try to playtest the game instantly crashes and that's what I've been trying to fix for the entire past week. I need something that definitively, 100% works. What I need is to use the Visustella Anti Damage Barriers to make an HP barrier when healing above MHP equal to (HP + Amount Healed - MHP) Thing is I don't know what as it requires JavaScript. I don't want to mess with the base code as that would probably just break everything.

This whole idea stemmed from a Yanfly tips and tricks, but when I try to implement it since the syntax was different inserting the code shown on the page broke my game. So I deleted every instance of that type of JavaScript in my game's states and replaced them with alternatives, but there are two specific uses that CANNOT be replaced, that being the mimic skill and the overheal state as they're essential to making possible endgame builds in my game that would allow you to stand a chance against the superbosses. Not delving into all this complex JavaScript is key in getting my game to finally work. I need to just use basic plugin features to accomplish this, not a completely separate plugin I would have to code myself that could break the entire engine. I hope you undertstand.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Marrend
Guardian of the Description Thread
21781
I won't comment about how your game crashes on boot-up, since that's a different thread. However. I find it more than mildly frustrating that you are telling me that opening up NotePad, WordPad, or any text-editing program, copy-pasting the code in this post into it, commenting out the one line that includes the mention of hp, using save as (call it "misc.js", if you must), and adding it into your game (or, hell, even a fresh project) via Plugin Manager is somehow "delving into complex JavaScript"?

Look. I'm done posting in this thread. It's become obvious that my help, or the way I've provided it, isn't desired. For what it's worth, I hope you get this to where you need it to be.
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
I do need help. Please stay. Copying and pasting the code isn't complex javascript. I never even said that and if I did I corrected myself. I'm just not sure if it would work 100%. My theory is that that line of code would make it so ALL skills heal above max HP which isn't what I'm looking for. I only want you to be able to heal past max HP if your inflicted with a certain state, not all the time. Plus, altering the base code could have disasterious consequences that could cause many more issues with plugins and such. It's too risky.

The reason my game keeps crashing is because of the javascript. If I insert more, that will just cause more problems. I've already figured that out. Now I have to look somewhere else since there's only two people active on this forum and it's you and the guy with the Tifa pfp. I just want to know what the new syntax is for these Yanfly tips and tricks so that I can adapt the code to work in MZ, but no one is offering to help with that. Just insisting that I use code that I know won't work and isn't what I'm looking for but when I refuse their code they get angry at me and leave.

I literally don't know anything that was written in the code you provided and I can't test it because the incorrect syntax is breaking the game, so why is it unreasonable for me to be worried about the code you provided when code previously provided broke my game completely? I've been spending the past 8 days fixing it, delaying the release of my game or even just my game page as I can't get screenshots. It's beyond frustrating and I just want some help, but everyone seems to be ignoring my ideas and not reading what I'm saying in full.

All those separate topics I made? All of them are deeply connected together. The mimic skill threat, the heal above max HP thread, the game crash thread, and heck, even the atk boost based on lost hp thread, were all deeply connected and all part of the same issue. I was going to talk about all this stuff in the original thread, but the threat stopped getting traffic a few days in since RMN doesn't have an @ system like the official forums or twitter or something to get people's attention. Plus, the thread was about a glitch in my game and all the other issues I was having (which I didn't find out until later) didn't fit the original topic so I split them into multiple threads. That was my mistake, I should have just included all the additional problems in a second thread instead of 4 separate ones, one for each issue. Please, forgive me.
Marrend
Guardian of the Description Thread
21781
My theory is that that line of code would make it so ALL skills heal above max HP which isn't what I'm looking for.

That was my theory as well, if you bothered to read my first post in this thread. That was entirely the point of my post. To see if it was possible without limits, then worry about how it could be limited! However, with you continuing to argue with me on this point, it kinda sounds like you'd rather have the work done for you, rather than try doing it yourself.

Hell, I even gave you an out last comment, saying that you could implement it for a fresh project, and you weren't even willing to go that far! All I'm seeing is more complaining that your project isn't working, and the demand for a code that works 100% with what you intend.
Yeah I'm sorry but Marrend spent actual time analyzing your situation and trying to help you, it is expected that you at least try to spend the same amount of time implementing said help or else it's better to not even ask? You came out as rude and disrespectful, dunno if I should ignore it or point it out. I tried to ignore it at first, in hopes it's a language barrier or some other cognitive barrier. :P
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
Found the answer to all my problems. You know you could have linked this from the beginning, right? https://forums.rpgmakerweb.com/index.php?threads/how-to-implement-every-possible-yanfly-tips-tricks-effect-in-mz-with-visustella-plugins.143816/

I wasn't trying to be disrespectful. You just didn't clearly spell it out that I needed to test if that feature was even possible first before I could make limits on it. And yes, I did want someone to come up with the code for me, since may I remind you that I cannot code. I do not know javascript in any way, shape, or form. Heck, the whole reason I picked up RPG Maker in the first place and not another engine like GameMaker or Unity was solely because it didn't require me to learn code to use it. Just drag and drop and that's it.

Plus, I couldn't even test out the feature in my current project, and I never thought to make a separate test one and no one suggested it. People always expect me to know things without them telling me which can't work because I have autism so I can't just know or think of new solutions by myself without outside help. Anyways this thread is over and all the glitches are solved. Mods, please close this page so people don't keep responding non-stop to a problem that's already solved, drama erupts, and I get banned again. Thank you.
author=KrimsonKatt
You know you could have linked this from the beginning, right?


author=KrimsonKatt
I wasn't trying to be disrespectful.
Marrend
Guardian of the Description Thread
21781
KrimsonKatt, snippet
You just didn't clearly spell it out that I needed to test if that feature was even possible first before I could make limits on it.

Well, maybe I didn't spell it out. One could imply from...

me, snippet, first post
You could try copying this into a temporary plug-in, and comment out the line concerning hp to see if that does the trick?

...this that I suspected that it would, at least, be a step in the right direction.

KrimsonKatt, snippet
I never thought to make a separate test one and no one suggested it.

Hi.

me, snippet
...and adding it into your game (or, hell, even a fresh project)...

KrimsonKatt, snippet
...may I remind you that I cannot code.

This is the big one. The issue I have with this statement isn't that you cannot code. The issue I have is that you're unwilling to learn. I tried to describe a process by which you could have made a simple-plug-in...

me, snippet
...you are telling me that opening up NotePad, WordPad, or any text-editing program, copy-pasting the code in this post into it, commenting out the one line that includes the mention of hp, using save as (call it "misc.js", if you must), and adding it into your game (or, hell, even a fresh project)...

...but, no, screw me, I wasn't going to do the work for you, smallhobbit, you're up next.


*Edit: This might be a topic to lock. The issue has been resolved, and further conversation probably isn't conducive to any party involved.
Pages: 1