The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: cozziekuns on August 13, 2010, 07:57:13 PM

Title: Earthbound-ish Battle System
Post by: cozziekuns on August 13, 2010, 07:57:13 PM
Earthbound-ish Battle System
Version: 1.0h
Author: cozziekuns
Date: October 24, 2010

Version History



Planned Future Versions


Description


My first battle system, so I hope it's a half-decent one. It basically a remade version of the different Earthbound battle systems. Features from both Earthbound and Earthbound 2 come in this battle system, and maybe one or two things snuck in from Earthbound Zero. The rest of the battle system is purely custom.

There might be a bit of lag from the odometer, but it shouldn't be too bad.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi37.tinypic.com%2F2ijpul4.png&hash=52849be5d917b21821194a5f4430538170b5f970)

Enemies whiten when selected, like in Earthbound 2

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi38.tinypic.com%2Fa44cgk.png&hash=aeb95e9f1a4806c8d9f96f7694cbe89272494dc5)

Escape Animation, cause I can

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi37.tinypic.com%2F2v11739.png&hash=7342a4c82207d30777a97010976934377a96dce6)

Random picture of Duster Attacking


Instructions

See header.

Script


Way too long. Please retrieve it from the attached .txt document.

Credit



Thanks


Support


Just post down here.

Known Compatibility Issues

None so far, but I imagine it won't be very compatible.

Author's Notes


Sorry about the roulette being just like a normal health bar, but I didn't have the time or experience to make that system. However, it should work exactly the same way.
Title: Re: Earthbound-ish Battle System
Post by: Zero2008 on August 15, 2010, 06:44:57 AM
Wow, looks great!
Title: Re: Earthbound-ish Battle System
Post by: modern algebra on August 15, 2010, 10:25:28 PM
Wow, looks awesome cozzie. I'll definitely take a look at it soon. Three yays for cozziekuns!
Title: Re: Earthbound-ish Battle System
Post by: wltr3565 on August 20, 2010, 02:29:36 PM
I do love how you make the battle system, a simple plug and play battle system and more graphical add ons at once, but this one has some fatal bugs...

- For some reason I can't switch targets...
- The HP scroll is pretty working, but doesn't that informative to the players. And you forgot to inform the mortal damage as well (where the damage makes the character's HP to 0)

Keep this up, this must be favorited! :twisted:
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 20, 2010, 09:47:38 PM
Fixed the target problem. Forgot that command windows become inactive when invisible :-[ I'm probably going to change the rolling hit point algorithm, but it won't show mortal damage for a while.
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 22, 2010, 05:24:12 PM
~ Legitimate Double Post ~

Updated to 1.0b. A few bugfixes, a slightly slower hit point system (will be customisable later), and you can now have inanimate sprites upon death if you choose.
Title: Re: Earthbound-ish Battle System
Post by: Joshi on October 17, 2010, 10:11:54 PM
Hi
Well, i must admit that this is a great system battle, i'm using it (of course i give you the credits).
But i detected 2 problems, and its that when an enemy uses an "absorb" attack, you don't lose any HP or MP  =/
the other one is that when you set that you can't scape from the battle, during the battle you can do it  u.u
(sorry for my english skills, i'm not very good u.u)

Well... that's what i detected. And thanks for this great script  :)
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on October 17, 2010, 10:38:29 PM
Fixed the escape problem. The drain problem is harder to fix, but I'll see what I can do.
Title: Re: Earthbound-ish Battle System
Post by: $uper To@d on October 24, 2010, 10:57:32 AM
Is there a way that the character sprite only show up when it's is turn, like in Mother 3?
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on October 24, 2010, 04:44:07 PM
Added a minor feature that allows you to set a characters transparency when it's not active. Still working on that drain glitch.
Title: Re: Earthbound-ish Battle System
Post by: Joshi on October 26, 2010, 06:37:48 AM
You are great! :D
I'm testing the last version :p
Thanks!
Title: Re: Earthbound-ish Battle System
Post by: enemene on November 25, 2010, 06:12:21 AM
I love how this script works but I found some problems...

first when you use an item on the menue screen...it dosent heal them untile you enter a battle...

second bug is the game crashes after a little while...and I have no clue why and it dosent give me a scripting error...usually trhis accures when a battle is finished...
Title: Re: Earthbound-ish Battle System
Post by: Organ House on December 14, 2010, 02:28:24 AM
Is there any way to make this compatible with Dargor's custom commands and party switcher scripts?
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on December 14, 2010, 03:21:09 AM
Hmm... Sorry about all these problems. Unfortunately, I'm a bit busy with the winter solstice competition, but I'll be sure to fix them as soon as possible.
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on December 21, 2010, 06:05:50 PM
Alright, fixed enemene's item problem since that seemed like the biggest issue. I'll try fix some of the incompatabilites later, when I have more time.
Title: Re: Earthbound-ish Battle System
Post by: pacdiggity on December 31, 2010, 08:28:55 AM
Is there anyway to make this script compatible with Wora's SceneVictory script? The system is amazing but I don't want to have the boring old victory screen and Wora's script is amazing. Also, can you have more than 4 members in your party? That would be absolutely amazing.
Title: Re: Earthbound-ish Battle System
Post by: NastyMann on January 30, 2011, 05:03:42 AM
Where do I click so I can download it?
Title: Re: Earthbound-ish Battle System
Post by: pacdiggity on January 30, 2011, 05:06:06 AM
The attachment at the end of the post, naturally.
Title: Re: Earthbound-ish Battle System
Post by: NastyMann on January 30, 2011, 05:08:07 AM
Ah. I see it. I feel stupid :/
Title: Re: Earthbound-ish Battle System
Post by: NastyMann on January 31, 2011, 10:17:03 PM
Fantastic system, dude. But I've ran into some problems :S

Whilst the odometer is quite awesome, it seems that let's say my character has 78 health, andhe gets dealt with 100, he will die. (That's normal.)

But after he dies and I revive him, the remaining 22 damage suddenly starts running down again! This is a problem, because not only is it kind of weird, it also makes reviving difficult.

That, and I noticed after I sued your script, my game randomly crashes :(.

I think the problem might be fixed if you could find a way so that it won't drop the remaining health after death.

Thanks again, though. Great job on it!
Title: Re: Earthbound-ish Battle System
Post by: heheta123 on March 27, 2011, 11:53:39 AM
Where is the attached .txt file? :blizj:
Title: Re: Earthbound-ish Battle System
Post by: modern algebra on March 27, 2011, 05:30:29 PM
It's at the very bottom of the first post. http://rmrk.net/index.php?action=dlattach;topic=39830.0;attach=22067
Title: Re: Earthbound-ish Battle System
Post by: M@pple on May 09, 2011, 10:34:24 PM
Its a very good script but the kicker is:

Sometimes the thing just crashes...

Also i would like to see it work with any "battle aftermath-like" scripts and  the large party ones because a few people use them.

Thanks
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on May 09, 2011, 10:52:18 PM
Well I'm not sure why it crashes; can you give some examples of why it crashed and try to recreate the scenario?
Title: Re: Earthbound-ish Battle System
Post by: TDS on May 09, 2011, 11:00:32 PM
If I had to make a guess about why it's crashing, I would say it's because of any new sprite classes created for the script.

I looked a bit at the script and noticed that the "Sprite_BattleActor" class lacks a dispose method with a super.

It might not sound like much, but after making a lot of battle systems I've learned that Sprites need to have a dispose method with super even if you're not terminating anything within it.

Of course all of this is just speculation based on experience, and the crashes could be caused by something else, but most of the time a battle scene crashes for no reason after a few uses it's usually due to not disposing sprites properly.
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on May 09, 2011, 11:15:54 PM
Thanks for the advice TDS! I went ahead and changed that (I was under the assumption that a dispose method wasn't needed, but better safe than sorry). Lets hope it works.

Also went ahead and cleaned up the script a bit.
Title: Re: Earthbound-ish Battle System
Post by: linktoot@gmail.com on May 14, 2011, 07:20:35 AM
It's just a cosmetic issue, but it'd be great if you updated the HP windows into four separate boxes.
Title: Re: Earthbound-ish Battle System
Post by: pacdiggity on May 14, 2011, 08:10:56 AM
What do you mean?
Do you not like that they don't have borders? Coz I could do that for you, easy. I could also do a guage.
In fact, I'm gonna do that as soon as I can. Of course, I wouldn't post it unless it was okay with Cozzie.
Title: Re: Earthbound-ish Battle System
Post by: Nitromatic on May 16, 2011, 05:49:09 PM
Heh, I've been waiting for Earthbound battle system! Thanks or making it, but I seem to get error when I try to engage in battle.

Script '' line 993 NoMethodError occured, undefined method `+' for nilclass

And the line 993 states, @spriteset.active_battler += 1
What shall be the problem? ???
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on May 17, 2011, 01:12:36 AM
Sure Pacman, I wouldn't mind if you did that.

@Nitromatic: Not sure why you get that problem; it's probably a script incompatability because I didn't alias the classes very well. Could you press Shift+Ctrl+F on the Script Menu and tell me which scripts contain the phrase "Spriteset_Battle" (excluding the RTP Scripts of course).
Title: Re: Earthbound-ish Battle System
Post by: Nitromatic on May 17, 2011, 12:55:49 PM
I got this. It's script that turns battle background black. But I don't think it is the reason for crashes. I think it's the line,  @spriteset.active_battler += 1. I took '+' from it, and it works! (but the graphics don't seem to work.)

But if you want, here's the script for the background.
Spoiler for:
#==============================================================================
# ** Spriteset_Battle - Black Battleback
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  def create_battleback
    bitmap = Bitmap.new(640, 480)
    black = Color.new(0,0,0,255)
    bitmap.fill_rect(0, 0, 640, 480, black)
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battleback Bitmap
  #--------------------------------------------------------------------------
  def dispose_battleback_bitmap
    #@battleback_sprite.bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battleback Sprite
  #--------------------------------------------------------------------------
  def dispose_battleback
    #@battleback_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Battleback
  #--------------------------------------------------------------------------
  def update_battleback
    #@battleback_sprite.update
  end

end[spoilerend]
Title: Re: Earthbound-ish Battle System
Post by: pacdiggity on May 17, 2011, 01:30:02 PM
You need the + in there for the script to work properly. You can't just take out operands. There's nothing wrong with either of the scripts, they're just incompatible. I'd take a look at it, but I'm so tired I'm about to collapse on the fhyaqoieljfsd keyboard. Whoops.
Title: Re: Earthbound-ish Battle System
Post by: Nitromatic on May 18, 2011, 02:53:51 PM
You need the + in there for the script to work properly. You can't just take out operands. There's nothing wrong with either of the scripts, they're just incompatible. I'd take a look at it, but I'm so tired I'm about to collapse on the fhyaqoieljfsd keyboard. Whoops.

Yes, I know. Script finally crashed because of it. I just have to test out what scripts don't work with this. ???

Thank you, everyone!
Title: Re: Earthbound-ish Battle System
Post by: linktoot@gmail.com on May 19, 2011, 03:32:48 PM
What do you mean?
Do you not like that they don't have borders? Coz I could do that for you, easy. I could also do a guage.
In fact, I'm gonna do that as soon as I can. Of course, I wouldn't post it unless it was okay with Cozzie.

Er, I should of used a screenshot.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FtPA0T.png&hash=f69bbbc13d60ed766721bc3a70435e8cb8f9ed5a)
Like this, each party member has it's own window.

VS the current version
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FHgUdO.jpg&hash=416ed7ba8aa3c7009b03adf929e4e59709b3590f)

Where things are all connected. I just find that separating them gives it a nicer look.
Title: Re: Earthbound-ish Battle System
Post by: JetKirby on June 02, 2011, 01:00:44 AM
I'm new to RPG Maker VX. I did all the Instructions, but the Battle System doesn't show up. Is there a script that I need to edit to make it work?
Title: Re: Earthbound-ish Battle System
Post by: pacdiggity on June 02, 2011, 07:29:55 AM
Are you using the battle scene?
You need to enter a battle to see the battle system.
Title: Re: Earthbound-ish Battle System
Post by: m3aga1n on July 08, 2011, 10:23:50 PM
It works perfectly, i created a suicide move and i killed the enemies quick enough. just like earthbound :zwink: :) ;)
Title: Re: Earthbound-ish Battle System
Post by: JackHGardner on July 09, 2011, 05:32:12 AM
Any chance of making an XP version?

Actually, all I would be interested in would be the odometer system.

How easy would it be to make the odometer code suitable for XP?
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on July 09, 2011, 02:31:44 PM
Unfortunately, backward combatability isn't high on my to do list, but an odometer system is easy enough to do.
Title: Re: Earthbound-ish Battle System
Post by: JackHGardner on July 09, 2011, 04:19:14 PM
Yeah, the script is awesome! But for my XP project I only need rolling HP/MP.

I figure it's pretty easy to code, but I'd have a hard time extracting just that part from your code.
If you could take just the odometer bit and make it backwards compatible, I'd be in your debt.

Heck, even if you just made an odometer only script I could take a whack at making it for XP myself.
Title: Re: Earthbound-ish Battle System
Post by: JDLXYZ on August 04, 2011, 01:48:40 AM
Was the drain/absorb HP problem ever fixed?
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 04, 2011, 02:16:41 AM
I recall that it was.
Title: Re: Earthbound-ish Battle System
Post by: JDLXYZ on August 08, 2011, 06:12:46 AM
This works great! I only have one comment. When selecting a skill or spell, the skill window doesn't go away, so I'm peering through the window to see what I want to hit. Other than that, works great!
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 08, 2011, 04:18:57 PM
Apologies to everyone for not updating this topic as hastily as I should have; I've been neglecting what's probably my most popular topic.

@JDLXYZ: Thanks for the bug report! Fixed.
Title: Re: Earthbound-ish Battle System
Post by: Kail200X on August 09, 2011, 10:29:57 PM
Is it possible to set it up to where you can change how high above the status window the actor sprite is? I could look around and screw with the numbers, but I don't want to destroy the script @.@

I also noticed something funny about targeting: When you only have one party member and you're trying to use an item or spell on that party member, it creates a separate window like this:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fdl.dropbox.com%2Fu%2F509157%2FIMAGES%2FScript%2520Stuff%2Fwat.PNG&hash=ecbdd1058928b5d591fcd0794fed71be1e02cb9b)

One last nitpick: If you have the actors turn when attacking, they don't turn back and face the screen when it's their turn again.
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 09, 2011, 11:02:59 PM
Thanks for finding those bugs! They should all be fixed (I hope). Also added the feature you suggested. You can now set the Y-Offset of the actors.
Title: Re: Earthbound-ish Battle System
Post by: Kail200X on August 09, 2011, 11:24:43 PM
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fdl.dropbox.com%2Fu%2F509157%2FIMAGES%2FScript%2520Stuff%2Fwat2.PNG&hash=279f16592aae0ac63b65303f501b9f5e82957f30)

This occurred when I tried to use an item on the actor again. It didn't show any selection window this time, it just immediately did this, and has done it multiple times @.@;

One final other nitpick too--when the odometer has a high delay and the actor takes damage, the odometer stops after the monster's turn ends, and then immediately changes to however much HP the actor has left. In other words, the HP reduction doesn't occur in real-time, it only occurs during an active turn. This may or not be because of Yanfly's turn order fix, but I dunno.
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 09, 2011, 11:27:34 PM
Fixed.

As for your other problem, I guessing that this is being caused by YF's Turn Order Fix.
Title: Re: Earthbound-ish Battle System
Post by: Kail200X on August 10, 2011, 12:06:12 AM
Nope, it's not the turn-order fix--I took it out and the problem was still there.

I checked to see if it was because I had it not playing any sound while the odometer was rolling (I simply deleted the "Shop" out of the line of code where you set SFX to play), and that didn't fix it either.

I put it in a normal project though, and it was fine... not sure what's causing it.

I'm using the following scripts:

o Font Change - Basic script that allows you to change the system font.
o AutoStep by ExHydra - Causes actors and events to step in-place at the same speed when the stepping animation is on.
o Scene_Menu Edit + Mother Menu by Modern Algebra, Woratana, and Arrow-1 - Edits scene_menu in order to create a menu style like Mother / Earthbound.
o Equip Edit by DerVVulfman - Changes how many equip slots are available in the equip menu.
o Dash Speed edit (YanFly Engine RD) - Allows you to alter dash speed.
o Encounter rate change (YanFly Engine RD) - Allows you to alter the encounter rate and allows you to allot a certain number of steps that MUST be taken before battle.
o Poison Damage Add-on by you (Cozziekuns) - Shows a message for poison damage (haven't tested it yet).
o Earthbound Battle System by you
o YanFly Engine Melody Core Fixes - A bunch of scripts in one:
 - Animation Overlay Fix
 - Bitmap Error Fix
 - Disposed Window Debug
 - Enemy Reappear Fix
 - Game Interpreter Fix
 - Help Window Codes Upgrade
 - Menu Actor Switch Fix
 - Message Window Actor Fix
 - Outlined Text and Gauge upgrade
 - Prevent Skill Scene Actor Switch
 - Shown States Fix and Upgrade
 - State Resist Fix
 - Turn Order Fix
 - Usable Item Fix
 - Wait for Animation Fix
 - Variance Fix
(Yes, I did remove this and attempt to run the project to see if it would fix the problem, but it didn't).
o YanFly Engine RD Animation Fix (for the sake of setting specific animations and preventing the overlap bug).


Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on August 10, 2011, 12:36:16 AM
Sorry for being so bothersome, but it's easier for me if you can isolate the incompatability. To try find the incompatability, do as outlined by Modern Algebra in his tutorial (http://rmrk.net/index.php/topic,40220.0.html).
Title: Re: Earthbound-ish Battle System
Post by: Kail200X on August 10, 2011, 04:42:05 AM
Alrighty. Honestly I'm the one that feels like a bother, lol.

It might take awhile to get back to you, but I'll do the best I can at trying to figure out what's doing what.
Title: Re: Earthbound-ish Battle System
Post by: digdarkevil on August 20, 2011, 01:37:28 AM
NIIICE  ;)
Backside Battle System Release :lol:
Title: Re: Earthbound-ish Battle System
Post by: CrashPilgrim on January 18, 2012, 06:08:29 PM
Ummm... hello?

First, i'd like to say that you made a nice job!
I really like this battle interface!

Second, i'd like to point out some bugs...

1) The worst of them all: the game crashes after a certain time!

I don't know why, but after some minutes of playing the game, the game crashes for no reason!

2) When you select an action (in battle) to the first character, you get to select the next character's action, but when you want to go back to the other character, it only shows the last character's sprite that appeared over the status box.

I think that's it!
Other that that, it's a really great idea to have this kind of battle system =D

Greetings!
Title: Re: Earthbound-ish Battle System
Post by: aitherion on February 19, 2012, 05:42:34 AM
Something that's really bothering me... on this script for some reason, when I use it, the following thing:

Code: [Select]
     if actor.class.skill_name_valid     # Skill command name is valid?
      s2 = actor.class.skill_name       # Replace command name

Doesn't work. Just plain doesn't work. No matter what I do, it always reads as my vocab for skills instead of as the proper class skill.

Is there something special I've got to do? Other than SwapXT and a status screen thing I'm running, I have no other scripts, nothing in battle or anything.

EDIT: For reference, it DOES work the rest of the time- if I disable the EB script entirely it shows my class skill name as it should.
Title: Re: Earthbound-ish Battle System
Post by: cozziekuns on February 19, 2012, 06:03:17 AM
Noted and fixed. Just grab a new copy.

Think I'll update this to 2.0 soon; if not, I plan on making a new one for Ace. So yeah. Really needs an update.
Title: Re: Earthbound-ish Battle System
Post by: aitherion on February 19, 2012, 06:05:43 AM
Awesome, thanks. :x
Title: Re: Earthbound-ish Battle System
Post by: SBolt on March 05, 2012, 09:27:43 PM
I know VX Ace is on the way soon and you're probably going to rewrite this battle system for it, so in the interests of improvement I thought I would point out a few bugs:


Title: Re: Earthbound-ish Battle System
Post by: pacdiggity on March 06, 2012, 09:40:33 AM
Cozzie, if you have no intentions for an Ace port, I'd be more than happy to try.
As for your problems, SBolt, the first 3 of those 5 problems are very easy to fix. The next one might be a bit more difficult (I didn't really look into it), and the last one is a bit ambiguous.
Title: Re: Earthbound-ish Battle System
Post by: Ageha on March 14, 2012, 06:11:58 PM
A little problem...

It works all fine and dandy when I am in a new game, but when I get out and load a different game, some error reads about line 856.... Can help if I can get some advice about it.
Title: Re: Earthbound-ish Battle System
Post by: D&P3 on March 15, 2012, 12:08:13 AM
This is one of those scripts that needs to be initialised by starting a new game.

That is the reason why it isn't working when you load up a previous save file.


It works like this, you start a new game with the script already installed, you can now save the game and the script works fine whenever you load THAT save file.

Any other save file that didn't use the script before you initialised it will not work with it.



To put it simply, you'll need to start a new game and replay all the way back up to where you were.
Title: Re: Earthbound-ish Battle System
Post by: Fall From Eden on March 15, 2012, 12:13:59 AM
This is one of those scripts that needs to be initialised by starting a new game.

Marc: This is a general rule for many scripts, by the way, not just this one. For future reference. ;)
Title: Re: Earthbound-ish Battle System
Post by: thomasbradley on March 25, 2012, 03:01:54 AM
For some reason the sprite y offset isn't working for me. My characters appear in middle of the screen, constantly doing a walking animation (I don't know if it's supposed to be like this). Changing the offset does nothing for me.
EDIT: Nevermind, only changing the offset to a negative number has an effect.
Title: Re: Earthbound-ish Battle System
Post by: Darkrai1276 on March 30, 2012, 06:49:05 PM
exelent script, been looking for a good front view script for a while and this is very good ;D
but
1) Somtimes it will show the actor ahead's grapic moving when selecting a move
2) the oddmeter is good but when and actor is defeated e.g. he has 100 hp and is dealt 180 the extra 80 will hit him even after being revived, making it near impossible to revive actors who have been overkilled  :-X
no other problems as far as i know