[XP] [Blizz-ABS] HP and MP Regeneration + More

Started by AJNR95, February 09, 2012, 08:25:35 pm

Previous topic - Next topic

AJNR95

February 09, 2012, 08:25:35 pm Last Edit: March 25, 2012, 08:22:28 pm by AJNR95
Health and Mana Regeneration
+More
Version: 2.0
Type: Combat Features



Introduction

Health Regeneration for Blizzard's Active Battle System or any Live Action Battle system.
THIS ONLY WORKS logically FOR SINGLE ACTOR GAMES


Version 1.1 Stamina/Mana Regeneration added.
Version 1.1 World Time and World Weather added.
Version 1.1 "Ring of Luck" mentioned
Version 1.1 Live Action Potion Heal mentioned
Update! KK20's Energy Consumption on Sprint
Update! Energy Bar (Similar to MGS' Psyche Bar)
Update! Recharge Skills (Blizz-ABS Action Recharge Time by Winkio)
Features

HP Regeneration

  • Regenerates Health after a set time of not taking damage
  • Disables after taking damage
  • Disables after fully recovering, allowing a preemptive stop
  • Version 2! Recover 0.5% of Health instead of a set value
  • (Optional) Regeneration Rate increases when recovering for a prolonged time


SMP Regeneration Not available in Version 2!

  • Regenerates Mana/Stamina after a set time of not using spells/abilities
  • Disables Regeneration when Mana/Stamina is used (Not updated for Mana Drain Skills)

.
"Energy" Bar Version 2!

  • Recharges when you don't take damage, Drains when you have taken damage (Combat Enabled)
  • Influences the Player's Statistics based on it's value (Energetic, Normal, Tired, Stressed)
  • Changes how skills are used entirely
    .
    World Time Discontinued!


    Live Action Potion Heal

    • Potions now heal rapidly over time until they hit their set time instead of heal instantly


    "Ring of Luck" Not available in Version 2!

    • Completely Random Chance to Heal for a Random amount of Health (Not created to be ON with a set armor equipped)

    .
    Skill Recharge Version 2!
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Taiine


ForeverZer0

* Moves to Event Database *

Nice job. :)
On a side note, just to make you aware, the dark blue text is kinda hard to read for people using any of the dark themes of the forum.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

AJNR95

Quote from: Taiine on February 09, 2012, 09:19:44 pm
@.x DEMO PLZ. kthx. :3


Demo? Oh. Oh oh oh oh. Yeah here. Fixed. Bye. :D

Quote from: ForeverZer0 on February 09, 2012, 10:21:52 pm
* Moves to Event Database *

Nice job. :)
On a side note, just to make you aware, the dark blue text is kinda hard to read for people using any of the dark themes of the forum.


Thanks, but I'm unable to fix the color now. I put up the Demo now so it's all in one wrap and people are able to sift through the stuff in there.

Demo also comes with a "Ring of Luck" Event System, and Custom Live Action Health Potion Event System.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

ForeverZer0

Off-Topic: ShowHide
The color is not a big deal, and its not necessary to change it, but you can by using the modify button in the top-right corner of your post.
  :)

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

ShadowPierce

Good job... I'll be switching to this one, my regen system was way more inferior... I had to make my enemies use skills instead of attacks to make an In-Battle state... :P

Anyway, nice job! :D

Spoiler: ShowHide
Quote from: Blizzard on February 16, 2011, 03:44:48 pmThere you go. It's the proof that SDK is crap. It's incompatible with itself.
3DS Friend Code: ShowHide
1161-0627-9890

AJNR95

Thank you, ShadowPierce :)

Main Topic is updated and summarized
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Taiine

Can you add one that makes SP act like an energy bar? I've tried such in my gage but it bugs out to easily. Pretty much when you run (with babs) it should stedily drain sp, and then slowly regen when your not.

AJNR95

Quote from: Taiine on February 11, 2012, 11:23:44 pm
Can you add one that makes SP act like an energy bar? I've tried such in my gage but it bugs out to easily. Pretty much when you run (with babs) it should stedily drain sp, and then slowly regen when your not.


I could do that, but it varies on the situation.

1. Is the Sprint button your using, using the Game's "Gamepad"? Are you using A, B, C, X, Y, Z, L or R?
If not, there should be a Script Evaluator command that checks if the Sprint System/Sprint Button is used
It is much easier to just disable the Sprint itself once you reach 0 SP, but that probably isn't your priority right now, I'll message Blizzard about it

2. Is your BABS Sprint Speed a whole number? or Decimal? The event will make it a whole number.

Or I can use an alternate way of a Sprinting Event System, but it might need the BABS Sprint to be removed,
basically not entering a Keyword for Run. (RUN = "Key[]"). I can make a Sprinting System, but I'll also message Blizzard.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Taiine

O.o

Woe uh... I just mean like... default stuff. like 'if your are sprinting, drain x mana' 'if not, regen x mana'
what I have semi works, but if you drain the mana to 0, it refuses to regen at all unless you use a potion or something to regen it back abive 1. even stopping the drain at 1 the issue repeats, now it needs to be above 1 to regen. whatever value is set to 'mana at X, disable sprint' is the value that at that point wont allow it to regen.

AJNR95

I'm sorry. To summarize all the garbage I said, "Are you using Blizzard ABS or not?"

If not, then this can be creating easily.

If yes, there are going to be conflicts between the Events and Script.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Taiine

Well, I already said I was using BABS. and that I do have a system that sort of works.. though it brakes...

a.k.a
if MP is over X > Enable sprinting key
if sprint key held, subtract Y MP a sec
If sprint key not held, add Y MP a sec
if MP is at X, disable sprint key


that's pretty much what I use... but I can't smack the bug that once you get to X MP to disable sprint... the MP stops regening, but if you stop sprinting before it gets to there, it'll regen just fine. Can change what value it disables it at and each time if you drop to that value, you can' regen at all.

I thought your mana points system could be edited to just also drain MP when you're running and regen it when not... not not bug out like mine does >.>

KK20

February 15, 2012, 05:29:08 pm #12 Last Edit: February 17, 2012, 07:24:12 pm by KK20
A copy-paste solution from another post.

1.) Open Part 2 of BlizzABS. Locate 'def update_control' (Line 3592). A few lines below, find 'player.move_speed = player.normal_speed' (Line 3596) and replace it with
player.move_speed = player.normal_speed unless $game_switches[id]
Replace 'id' with whatever switch you want to be on in order to run your parallel process event.
Go down a bit and find 'player.move_speed = Config::RUN_SPEED' (Line 3605) and replace it with
player.move_speed = Config::RUN_SPEED unless $game_switches[id]
Again, replacing 'id' with the switch you want.

2.) Do something like this:
Spoiler: ShowHide


Drains MP as long as the run key is held down. If MP is zero, the character will walk at normal speed even if the run key is held down. If the run key is not being pressed, regen MP. The above example was just bare-bones testing.

EDIT: Forgot a couple of lines in the picture. Fix'd.
EDIT 2: Changed the eventing a bit to allow all actors to use this feature, not just the first actor.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AJNR95

Thank you KK20. Sorry I've been inactive. I've been busy with school and my laptop has been a diligent friend by freezing every 20 minutes.
I don't think I would've found a detoured solution via Events. I will try to use this too. Thanks again KK20  :)
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Taiine

That is actually the event system I tried using and is the one that gave me this bug. It works fine unless you let it fully drain, only then will the sp be 'locked' at that value unless you use a potion or something to up it.

ah well... guess sp will remain dull boring sp rather than 'energy' and players can run indef where ever they want! ;D

KK20

Quote from: Taiine on February 16, 2012, 08:40:45 pm
That is actually the event system I tried using and is the one that gave me this bug. It works fine unless you let it fully drain, only then will the sp be 'locked' at that value unless you use a potion or something to up it.

ah well... guess sp will remain dull boring sp rather than 'energy' and players can run indef where ever they want! ;D

Did you at least give mine a try? Because from what I can tell, you said yours checked if the MP > 0 first. Mine checks if the run key is being held down first.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AJNR95

The system has a bug.

NoMethodError occurred while running script.

undefined method '[]' for nil:NilClass

I don't know what I did wrong.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Taiine

Quote from: KK20 on February 16, 2012, 09:33:55 pm
Quote from: Taiine on February 16, 2012, 08:40:45 pm
That is actually the event system I tried using and is the one that gave me this bug. It works fine unless you let it fully drain, only then will the sp be 'locked' at that value unless you use a potion or something to up it.

ah well... guess sp will remain dull boring sp rather than 'energy' and players can run indef where ever they want! ;D

Did you at least give mine a try? Because from what I can tell, you said yours checked if the MP > 0 first. Mine checks if the run key is being held down first.


@.x I said in the last post that IS the event system I tried. :P

KK20

Quote from: KK20 on February 16, 2012, 09:33:55 pm
Did you at least give mine a try? Because from what I can tell, you said yours checked if the MP > 0 first. Mine checks if the run key is being held down first.


Quote
if MP is over X > Enable sprinting key
if sprint key held, subtract Y MP a sec
If sprint key not held, add Y MP a sec
if MP is at X, disable sprint key

Note that you check first if your MP is greater than X. If it is, enable the run key. Also note that your regen only works IF your MP is greater than X as well. Thus, you are saying:
if actor.mp > X
  if Input.press?(Input::Run)
    actor.mp -= amount
  else
    actor.mp += amount
  end
else
  # Prevent player from running
end
Obviously, your bug makes sense because it's faulty logic order. Your event is NOT the same as mine.

I've tested MY version different ways, using spells while running, and it all works clean. I suggest you to do EXACTLY what I say. Also note that I did not download AJNR95's demo to borrow any of his ideas.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AJNR95

Quote from: KK20 on February 17, 2012, 06:18:12 pm
I've tested MY version different ways, using spells while running, and it all works clean. I suggest you to do EXACTLY what I say. Also note that I did not download AJNR95's demo to borrow any of his ideas.


:???: I had transcribed your Script Running system thing to another small game of mine. But when I start it up, it comes up with that error. I followed your steps. For the Demo, it shouldn't contain any "Running" Events.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.