SPECIAL STATUSES [2K3]
Posts
I see, so that one WILL require separate battle events then...I will keep that one in mind (shouldn't be hard yeah, since Disable's coding can easily be used for this...).
And the reason I set the real Max HP above the Diseased Max HP was so that it would remember the actual Max HP before setting the diseased Max HP so that the actual Max HP wouldn't be overwritten, but I guess since the event would be constantly checked, it would get overwritten anyways by the diseased Max HP. Worst yet is since it's checking it all the time, trying to set up the real Max HP anywhere means it would probably get overwritten, no? Not to mention I DON'T have it set up to actually check to make sure that after a player's HP is less than their current Diseased Max HP that it changes to the new one...@_@
And the reason I set the real Max HP above the Diseased Max HP was so that it would remember the actual Max HP before setting the diseased Max HP so that the actual Max HP wouldn't be overwritten, but I guess since the event would be constantly checked, it would get overwritten anyways by the diseased Max HP. Worst yet is since it's checking it all the time, trying to set up the real Max HP anywhere means it would probably get overwritten, no? Not to mention I DON'T have it set up to actually check to make sure that after a player's HP is less than their current Diseased Max HP that it changes to the new one...@_@
Only record the Max HP into the "Real Max HP" stat when the character's status is NOT diseased. That way, any time the character is diseased, you CAN'T overwrite to the Real Max HP variable.
But wouldn't the problem be that if you record that when they're not Diseased, that the Diseased value would still take precedence as the Max HP since the Max HP would be changed for the character to reflect it? Therefore, recording it would give you the Diseased value instead of the real one? That's the issue I'm seeing here.
Not if you only write to the REAL MAX HP variable when the character is not diseased.
Bob has 100 hp. He is healthy. Every tick of the game clock, a parallel common event records Bob's Max Hp into Bob'sRealMaxHp.
Bob is unlucky. He goes to a shady tavern and ends up heading home with the WRONG woman.
Bob gets diseased. The parallel common event stops recording Bob's Hp. Bob'sRealMaxHp will still be 100, but his Bob'sDiseasedHp will be 75. Set the character's max hp to Bob'sDiseasedHp.
Bob is very unlucky. He stubs his toe critically and then falls down the stairs. His hp is reduced to 25, and since he is diseased his MaxHp has to come down. An event will notice that Bob's Current HP is less than Bob'sDiseasedHp and reduce the stat accordingly.
Bob somehow manages to gain a level. Lets say that when Bob gets a level up while diseased, it adds to a variable called Bob'sLevelsWhileDiseased. With some math, you can figure out how much Hp Bob should have gained, if he wasn't diseased. You can figure this on the fly, or just record it into Bob'sHpGainWhileDiseased. You could even go ahead and add the number of Hp he should gain directly into Bob'sRealHp if you don't want to make a billion extra variable calls.
During his level-up, Bob tags Medicine.
Bob manufactures some Penicillin.
Bob consumes Penicillin, curing him of his disease.
When Bob is not diseased, his current Hp is checked against Bob'sRealHp. His current Hp is less, so it is adjusted up to Bob'sRealHp. You just have to check to see if his HP is less than his non-diseased HP before you allow the event to start recording again. If you added his level hp gain into his Real stat, job done. If not, just add it back in at this point, and the next tick of the internal clock, it will be reflected in the new Bob'sRealHp variable.
Hopefully Bob is more careful about whom he elects to take home next time.
Bob has 100 hp. He is healthy. Every tick of the game clock, a parallel common event records Bob's Max Hp into Bob'sRealMaxHp.
Bob is unlucky. He goes to a shady tavern and ends up heading home with the WRONG woman.
Bob gets diseased. The parallel common event stops recording Bob's Hp. Bob'sRealMaxHp will still be 100, but his Bob'sDiseasedHp will be 75. Set the character's max hp to Bob'sDiseasedHp.
Bob is very unlucky. He stubs his toe critically and then falls down the stairs. His hp is reduced to 25, and since he is diseased his MaxHp has to come down. An event will notice that Bob's Current HP is less than Bob'sDiseasedHp and reduce the stat accordingly.
Bob somehow manages to gain a level. Lets say that when Bob gets a level up while diseased, it adds to a variable called Bob'sLevelsWhileDiseased. With some math, you can figure out how much Hp Bob should have gained, if he wasn't diseased. You can figure this on the fly, or just record it into Bob'sHpGainWhileDiseased. You could even go ahead and add the number of Hp he should gain directly into Bob'sRealHp if you don't want to make a billion extra variable calls.
During his level-up, Bob tags Medicine.
Bob manufactures some Penicillin.
Bob consumes Penicillin, curing him of his disease.
When Bob is not diseased, his current Hp is checked against Bob'sRealHp. His current Hp is less, so it is adjusted up to Bob'sRealHp. You just have to check to see if his HP is less than his non-diseased HP before you allow the event to start recording again. If you added his level hp gain into his Real stat, job done. If not, just add it back in at this point, and the next tick of the internal clock, it will be reflected in the new Bob'sRealHp variable.
Hopefully Bob is more careful about whom he elects to take home next time.
Ok, so finally got unlazy and tried more on this coding.
I believe this is what I needed for the Parallel Process right? I'm hoping that if this is it, that it doesn't mess with any other events like the HP/MP+% stuff...
This is without the level-up coding, as I'm just trying to figure out how to set the coding up itself. I don't know if the Parallel Process would mess with this or not though...that's the question, and I'm not even sure at this point if I'm doing this right or if it's worth the hassle or not @_@

I believe this is what I needed for the Parallel Process right? I'm hoping that if this is it, that it doesn't mess with any other events like the HP/MP+% stuff...

This is without the level-up coding, as I'm just trying to figure out how to set the coding up itself. I don't know if the Parallel Process would mess with this or not though...that's the question, and I'm not even sure at this point if I'm doing this right or if it's worth the hassle or not @_@
It wouldn't have to be parallel. You call it from battle, because that should be the only time the character's hp can decrease, outside of terrain based damage. If you have terrain based damage, you could set a parallel call on that map that references the common event.
Let's see...there's a few statuses that deal damage while on the overworld as well (Poison being the biggest one, and I think Venom does, and I KNOW HP Drain does too). So it'd have to be Parallel regardless then, though I have NO idea how much that'll lag the game with how much is in that Common Event alone as it is...unless I make Disease ONLY last in battle...what do you think on that subject? Battle only, or last after battle? That might be the factor in what I do on this...
Also, any input on the coding thus far? I haven't tested it YET per say, but...
Also, any input on the coding thus far? I haven't tested it YET per say, but...
"Reimu Max HP V|1075| Down" makes it look like you would subtract the characters current hp from their max hp. If their max hp is set to their current hp the turn before, there's a problem.
Reimu has 100 Mhp when Diseased. V|1075| = 100 V|1103| = 100
Reimu gets hit. Hp is now 80.
80 =/= 100
Reimu's Hp is reduced by V|1075| or 80, since that is the value it would record on the next cycle.
Reimu dies instantly? (I may be reading it wrong, I'm kind of sleep deprived right now.)
You're on the right track, you just need to modify it a little. Find the difference between current hp and old max hp, and subtract that number from max hp.
Reimu has 100 Mhp when Diseased. V|1075| = 100 V|1103| = 100
Reimu gets hit. Hp is now 80.
80 =/= 100
Reimu's Hp is reduced by V|1075| or 80, since that is the value it would record on the next cycle.
Reimu dies instantly? (I may be reading it wrong, I'm kind of sleep deprived right now.)
You're on the right track, you just need to modify it a little. Find the difference between current hp and old max hp, and subtract that number from max hp.
It's a-me again! And well, time to report in!
So, I had Avee take a crack at the coding, and well...according to him/her/it, it...doesn't exactly work correctly. Either HP drops to 1 and stays there, or HP stays at maximum, never doing what either ability are meant to do. And I'm all out of ideas at this point trying to figure this out (on top of trying to do bugtesting and LPing and all that junk). @_@
So, I had Avee take a crack at the coding, and well...according to him/her/it, it...doesn't exactly work correctly. Either HP drops to 1 and stays there, or HP stays at maximum, never doing what either ability are meant to do. And I'm all out of ideas at this point trying to figure this out (on top of trying to do bugtesting and LPing and all that junk). @_@
And now I'm back! So I decided to FINALLY work on the Disease coding and well....it's working a BIT better, but not the way I want it to yet.
As you can see, I have the Disease variable set up exactly as the stat bonuses, so as to keep the game from constantly increasing/decreasing HP. Now the problem is, I can't figure out how to set it so that whenever the HP falls at all, that the NEW Max HP becomes the CURRENT HP (while keeping the real Max HP somewhere else so that after Disease is removed, the character's HP is returned to normal). And from the looks of it, I won't be able to make it so that if the character dies while under Disease and is revived they'll revive with 1 HP. Sadness.
Though I wonder if it doesn't have to do with this...
Since it IS calling it every turn...and I'm trying to save space by not having 20-30 more battle events used up just for this status...I'm wondering if it's possible to do in the Common Events at all now?
In addition to this, somewhat related, I also started on the Weapon/Status Bless commands. I have a status for each element/status in the game, but there's one problem. It seems that the effect doesn't STAY on (for instance, sometimes while under the Fire status (to make the weapon Fire elemental), it'll either be the correct weapon or the default one. In addition, outside of battle it doesn't always adjust the weapon correctly either.
I have yet to work on Bubble status, but that'll be next too. x_x

As you can see, I have the Disease variable set up exactly as the stat bonuses, so as to keep the game from constantly increasing/decreasing HP. Now the problem is, I can't figure out how to set it so that whenever the HP falls at all, that the NEW Max HP becomes the CURRENT HP (while keeping the real Max HP somewhere else so that after Disease is removed, the character's HP is returned to normal). And from the looks of it, I won't be able to make it so that if the character dies while under Disease and is revived they'll revive with 1 HP. Sadness.
Though I wonder if it doesn't have to do with this...

Since it IS calling it every turn...and I'm trying to save space by not having 20-30 more battle events used up just for this status...I'm wondering if it's possible to do in the Common Events at all now?
In addition to this, somewhat related, I also started on the Weapon/Status Bless commands. I have a status for each element/status in the game, but there's one problem. It seems that the effect doesn't STAY on (for instance, sometimes while under the Fire status (to make the weapon Fire elemental), it'll either be the correct weapon or the default one. In addition, outside of battle it doesn't always adjust the weapon correctly either.

I have yet to work on Bubble status, but that'll be next too. x_x
Ok, so I can't figure out what's wrong with Weapon Bless. I think it's due to me having the Battle Event be read every turn which is making it read it both lines continuously each turn (well, one line one turn, then another line the next. I don't know man...). Also, on Disease, still working on it, but would it be possible to set it so that if any character has the status, it turns on a special switch that could be used in the battle event, which while that switch is on, it'll check for the status in the common event (I would assume this would bypass the having to check it every turn issue that I'm having with some of these abilities, since right now having it checked every turn doesn't work...).
I'm assuming that I COULD also, theoretically, set it so that for the Reverse Doll, instead of having 28 battle events for each character that can equip the accessory (Reverse Doll full revives a KO'd character upon death), I could stick all of the coding in a Common Event, and have a Party Exhausion battle event constantly checking for that common event without having to wait a turn for it to kick in (such is the problem with Auto-Life right now).
I could really use help on these. It'd be one less thing out of my hair ;_;
I'm assuming that I COULD also, theoretically, set it so that for the Reverse Doll, instead of having 28 battle events for each character that can equip the accessory (Reverse Doll full revives a KO'd character upon death), I could stick all of the coding in a Common Event, and have a Party Exhausion battle event constantly checking for that common event without having to wait a turn for it to kick in (such is the problem with Auto-Life right now).
I could really use help on these. It'd be one less thing out of my hair ;_;
Ok, so I figured out what the problem with Weapon Bless was (I had to make a second Common Event that triggers after battle to cleanup everything, by making a switch for that event turn on at the beginning of the battle). However, now I'm working on Disease again. I'm coming close, except there's a few things still not working right.
Coding:

Right now, everything is working fine and dandy...for the most part. HP doesn't spontaneously increase to max or decrease to max now on the overworld or in battle...and when Disease is cured, HP returns back to its normal value SO far...the problem? Instead of decreasing Max HP to the current HP (for instance, if a 1000 HP character lost 500 HP, their new Max HP would be 500 until the status is cured, at which case it would immediately go back to 1000 Max HP), it decreases the Max HP to 1. I even managed to keep the Max HP at 1 even when KO'd and revived and it doesn't restore all HP to max after curing the status as I want...it's just keeping it from dropping to 1 instantly. Anyone have any clue as to how to solve this issue?
After I get Disease done, probably going to work on Bubble. I KNOW these can be done dangit! >_<
EDIT - Ok, so I didn't get Weapon Bless to work fully right. I get it working fine, then add more into it and then it stops working fine. I don't know what's going on...
Code for those who want to help. This first one is for the MAIN Weapon Bless command (i.e. Making it so that while the status is on the character, that character is equipped with the elemental version of that weapon).

This next one is only after battles, where Turn x0 calls the switch for it afterwards.

The final one is ran alongside the first one in a Turns Elapsed event. This one is meant to be for when the character is NOT under the status anymore. Reason I put this here is because having an If - Else statement in the first one just wasn't working at all.

Yes, I've tested this with the Gohei and Ying-Yang Orb. In ALL instances, it works perfectly fine with the Gohei, but sometimes it's worked perfectly fine with Ying-Yang Orb, and then when I add more onto the coding, it stops working for it altogether. As of right now, it does not work with Ying-Yang Orb and I don't understand why. So frustrating >_<
Coding:

Right now, everything is working fine and dandy...for the most part. HP doesn't spontaneously increase to max or decrease to max now on the overworld or in battle...and when Disease is cured, HP returns back to its normal value SO far...the problem? Instead of decreasing Max HP to the current HP (for instance, if a 1000 HP character lost 500 HP, their new Max HP would be 500 until the status is cured, at which case it would immediately go back to 1000 Max HP), it decreases the Max HP to 1. I even managed to keep the Max HP at 1 even when KO'd and revived and it doesn't restore all HP to max after curing the status as I want...it's just keeping it from dropping to 1 instantly. Anyone have any clue as to how to solve this issue?
After I get Disease done, probably going to work on Bubble. I KNOW these can be done dangit! >_<
EDIT - Ok, so I didn't get Weapon Bless to work fully right. I get it working fine, then add more into it and then it stops working fine. I don't know what's going on...
Code for those who want to help. This first one is for the MAIN Weapon Bless command (i.e. Making it so that while the status is on the character, that character is equipped with the elemental version of that weapon).

This next one is only after battles, where Turn x0 calls the switch for it afterwards.

The final one is ran alongside the first one in a Turns Elapsed event. This one is meant to be for when the character is NOT under the status anymore. Reason I put this here is because having an If - Else statement in the first one just wasn't working at all.

Yes, I've tested this with the Gohei and Ying-Yang Orb. In ALL instances, it works perfectly fine with the Gohei, but sometimes it's worked perfectly fine with Ying-Yang Orb, and then when I add more onto the coding, it stops working for it altogether. As of right now, it does not work with Ying-Yang Orb and I don't understand why. So frustrating >_<
author=Xenomic
Well, I'd LIKE to make it persist after battle is the problem with Disease. Just making sure that the Max HP values aren't overwritten is the issue (and the level up is another, forgot about that...I'll just have to see how much HP it gives on level up through a variable or something...hmm....).
At least I won't have to worry about Bubble too much since it doesn't last after battle...
Is it possible to only have one battle event for Auto-Life to check for everyone that may have it, or will I need separate switches for that?
You could make it, so that any characters inflicted with Disease, does not obtain any experience at the end of each battle. This will then fix the problem with leveling up.
With that, all you need to do, is a simple Conditional Branch event. That if they are inflicted with it, it checks and removes the max amount of exp that can be obtained through RPG Maker, after every battle. This way, it isn't a custom experience system, and it can also be easily stopped. Thus this makes any battles null and void in terms of actually leveling up with them, as it doesn't build up.
Hmmm...that would be different from FFXII yes, but that would make it so much easier too (plus that means if I could code that, then I CAN have possibly Virus (No EXP) and Wounded (Half EXP) statuses without custom EXP system). I'm assuming this is by using the Change Experience command right? This wouldn't cause levels to decrease I would assume.
The man thing before I do that (well, I SHOULD add it in while working on this) is getting the status in itself to work properly. Any idea on how to go about fixing that?
The man thing before I do that (well, I SHOULD add it in while working on this) is getting the status in itself to work properly. Any idea on how to go about fixing that?
Nah, I don't think it decreases levels.
Also I don't know how to work it in, so your actual status works the way that you're wanting to.
Also I don't know how to work it in, so your actual status works the way that you're wanting to.
Well, guess I'll have to figure that out then somehow. I'll test it with that No EXP block of code. I think what I might need to do is somehow set up a Common Event that is read only once after a fight and then the other main one being read at all times....hmmm.
Bringing this back up, even though it's not related to the status problem at hand (Disease still eluding me...). So I have Weapon Bless almost fully coded (almost a week's worth of non-stop coding...ugh)...however, there is a slight problem with it. You see, it'll work fine with those that use ONE weapon, but for those that dual-wield? It'll only affect the weapon in their first hand, and never the one in their second hand. I'm not sure WHY it does it this way, and I'm not sure how to handle this issue. Do I need to copy/paste each block of code for each weapon twice for dual-wielders or is there something else I need to do for it to work with both weapons on them?
Did I mention that I hate coding and I hate Disease right now? I'm sure I did...>_>;
Did I mention that I hate coding and I hate Disease right now? I'm sure I did...>_>;
















