[XP] Evented Passive Regeneration System for BABS

Started by ShadowPierce, July 15, 2010, 11:18:34 am

Previous topic - Next topic

ShadowPierce

July 15, 2010, 11:18:34 am Last Edit: July 24, 2010, 06:35:55 am by ShadowPierce
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


  • Regeneration when not being attacked.
  • Applies to the whole party.
  • Adjustable regen interval.
  • Adjustable regen value.



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

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

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

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

7. Lastly, remove all monster's attack & replace it with the "Attack" skill you just made.
Spoiler: ShowHide


Voila! Passive Regeneration System Complete!  :haha:



Credits and Thanks


  • Me (ShadowPierce)
  • game_guy
  • Blizzard




Author's Notes

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




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

SBR*

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!

ShadowPierce

->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?



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

SBR*

And how does the player get rid of the state O.o?

ShadowPierce

->They don't...  :uhm:

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



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

SBR*

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.

G_G

Heres an event system you can use.
Spoiler: ShowHide


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.

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

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.

Blizzard

July 16, 2010, 03:20:59 pm #9 Last Edit: July 16, 2010, 03:22:35 pm by Blizzard
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

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

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.

Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I know, I was referring to the $game_party.actors.each part.

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ShadowPierce

July 16, 2010, 07:24:57 pm #14 Last Edit: July 16, 2010, 07:28:14 pm by ShadowPierce
->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?



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

G_G

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.

ShadowPierce

->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?



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

G_G

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.

ShadowPierce

->Works like a charm! But, I wanted them to regen only when the state is not affecting any of the actors... :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

G_G

Give them a state called Regen when you want them to regen. Then simply remove it when you dont.

ShadowPierce

July 19, 2010, 09:13:13 pm #20 Last Edit: July 27, 2010, 07:36:56 am by ShadowPierce
->Changed to Event System template... Please move to Event Systems! :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

G_G


ShadowPierce


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