Chaos Project

RPG Maker => Event Systems => Event System Requests => Topic started by: ShadowPierce on July 15, 2010, 11:18:34 am

Title: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 15, 2010, 11:18:34 am
Passive Regeneration System for BABS
Version: 1.0
Type: Auto-Regeneration System



Introduction

This event system regenerates the player's HP when not in battle.


Features




Screenshots
Spoiler: ShowHide
See Instructions



Demo
Sorry, no demo yet... :P


Instructions

What you'll need:

   • 3 Common Events
   • 1 Switch
   • 1 State
   • 1 (or more) Skill/s (I'll explain later)

1. Make a Switch named "Always" or "Regen" and activate it on your 1st map with an autorun/parallel process event. (Since it will be active all throughout the game)
2. Make a state and name it "Off-Battle". Remove the check in the "Release at the end of battle" box and set its rating to 10.
3. Make a Common Event and name it "Regen". Set its trigger to Parallel and its switch to "Always" and insert these into Regen:
Spoiler: ShowHide
(http://i844.photobucket.com/albums/ab9/giogsgs12/RPG%20Maker%20XP/RegenScreenie1.png)

Note: You can change the Wait to how long you want the interval between heal waves, "17" in the 3rd line to the Off-Battle state, and the "1" in the 4th line to the value you want to regenerate.
4. Make another Common Event named "Auto Off-Battle". Set its trigger to Parallel and its switch to "Always" and insert these into Common Event:
Spoiler: ShowHide
(http://i844.photobucket.com/albums/ab9/giogsgs12/RPG%20Maker%20XP/RegenScreenie2.png)

Note: You may change the Wait to how long you want before the state activates again.
5. Make a third Common Event and name it "Activate On-Battle". Set its trigger to "None" and insert these:
Spoiler: ShowHide
(http://i844.photobucket.com/albums/ab9/giogsgs12/RPG%20Maker%20XP/RegenScreenie3.png)

6. Make a skill named "Attack" and set its parameters to how you want an enemy would normally attack. Or alternatively, make a separate "Attack" skill for every monster (like I did)to have a variation depending on the monster. Have the attack's & all the other skills' Common Event set to "Activate On-Battle". Pictures explain better than words.
Spoiler: ShowHide
(http://i844.photobucket.com/albums/ab9/giogsgs12/RPG%20Maker%20XP/RegenScreenie4.png)

7. Lastly, remove all monster's attack & replace it with the "Attack" skill you just made.
Spoiler: ShowHide
(http://i844.photobucket.com/albums/ab9/giogsgs12/RPG%20Maker%20XP/RegenScreenie5.png)


Voila! Passive Regeneration System Complete!  :haha:



Credits and Thanks





Author's Notes

->Compatible with other ABSs & battle systems but most likely not recommended...


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: SBR* on July 15, 2010, 11:52:43 am
If the Passive Regen is placed in a loop, everything in the loop will be executed until break is encountered. If the switch still is on, the loop will execute again, and it will keep executing until break is encountered, etc. Same for the loop of [Wait 200 frames -> increase HP by 1]. I never put the full common event in loops: I thought it didn't work :urgh:?

BTW, is there an on-battle state for Blizz ABS? Wow, I gotta check that out!
Title: Re: [XP]HELP: Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 15, 2010, 06:30:26 pm
->Actually, it's a "semi-dummy state" I made & gave monsters a skill called "Attack" that always inflicts it on a character, same goes to all monster skills. That way, when attacked, a character gains the "On-battle" state & disables the passive regen. But it doesn't seem to work. Maybe a script will be better?


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: SBR* on July 16, 2010, 04:53:07 am
And how does the player get rid of the state O.o?
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 16, 2010, 05:29:12 am
->They don't...  :uhm:

Just kidding, it's set to be released after 8 seconds...


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: SBR* on July 16, 2010, 06:36:30 am
I think that 'condition of CE is met?' is only executed when the CE is reexecuted, so whenever it is met, it will wait 600 frames, no matter what, and then execute the loop until break is encountered.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 16, 2010, 01:03:00 pm
Heres an event system you can use.
Spoiler: ShowHide
(http://i678.photobucket.com/albums/vv143/GameGuysProjects/regen.png)


Look at this line
$game_party.actors[0].states.include?(1)

replace the 1 in parenthesis with the regen state id. Do that for all branches.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: Blizzard on July 16, 2010, 01:24:14 pm
It's a bit ruggish, but it works.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 16, 2010, 02:51:37 pm
You could do this.
Wait 600 Frames
Script Call: $game_party.actors.each{|a|
if a.states.include?(1)
  a.hp += 1
end}

I think that'll work.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: Blizzard on July 16, 2010, 03:20:59 pm
Lol, I meant the delay. You'd be better off having a variable as counter and increasing it each time the parallel processes passes because if you call the menu every 14 seconds or change the map (which is very likely), there will be no healing at all.

if variable > 0
  variable -= 1
else
  # do healing
  variable = 600
end

Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 16, 2010, 04:35:13 pm
Quote from: Blizzard on July 16, 2010, 03:20:59 pm
Lol, I meant the delay. You'd be better off having a variable as counter and increasing it each time the parallel processes passes because if you call the menu every 14 seconds or change the map (which is very likely), there will be no healing at all.

if variable > 0
  variable -= 1
else
  # do healing
  variable = 600
end




This still works though doesnt it D:
Quote from: game_guy on July 16, 2010, 02:51:37 pm
You could do this.
Wait 600 Frames
Script Call: $game_party.actors.each{|a|
if a.states.include?(1)
  a.hp += 1
end}

I think that'll work.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: Blizzard on July 16, 2010, 05:06:01 pm
Sure it does. But it will have the problem I described from before because the 600 frames reset every time you reenter the map scene.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 16, 2010, 05:19:35 pm
I know, I was referring to the $game_party.actors.each part.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: Blizzard on July 16, 2010, 05:22:24 pm
As I said, it works fine. xD
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 16, 2010, 07:24:57 pm
->Looks good, I'll try it after classes later...  :)

BTW, does it need an "Always" switch or should I do another common event to make it only activate when off-battle?


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 16, 2010, 08:21:47 pm
if you check the picture theres a switch Regen. Could make a switch called Cutscene Off, flip that switch on when you want out of scene events to run, flip it off during a cutscene.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 17, 2010, 12:38:40 am
->Well, what I meant by my "Always switch" is, it is a switch used to activate common events that can be used anytime; it is ALWAYS ON. What I'm asking is:should the Regen switch be always on?


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 17, 2010, 01:11:36 am
yea if you want it to take effect. It wont add hp to actors unless they have hp. Also I recommend doing what blizz suggested.
Quote from: Blizzard on July 16, 2010, 03:20:59 pm
Lol, I meant the delay. You'd be better off having a variable as counter and increasing it each time the parallel processes passes because if you call the menu every 14 seconds or change the map (which is very likely), there will be no healing at all.

if variable > 0
  variable -= 1
else
  # do healing
  variable = 600
end




And also instead of what I did in the picture do this piece of code where it says #healing here.
Script Call: $game_party.actors.each{|a| 
if a.states.include?(1)
  a.hp += 1
end}


This should prevent errors when only having a party of 3 or less.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 18, 2010, 08:40:33 am
->Works like a charm! But, I wanted them to regen only when the state is not affecting any of the actors... :D


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 18, 2010, 09:54:24 am
Give them a state called Regen when you want them to regen. Then simply remove it when you dont.
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 19, 2010, 09:13:13 pm
->Changed to Event System template... Please move to Event Systems! :D


†
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: G_G on July 19, 2010, 09:32:23 pm
You didnt apply the template right.

http://forum.chaos-project.com/index.php/topic,1429.0.html
Title: Re: [XP] Evented Passive Regeneration System for BABS
Post by: ShadowPierce on July 20, 2010, 02:37:13 am
->Fixed! :haha:


†