Earthbound-Ish Battle System
Version: 1.0
Author: cozziekuns
Date: February 17, 2013
Version History
- <Version 1.0> 2013.02.17 - Original Release
Description
This script attempts to mimic the battle system of the Earthbound/Mother series; most notably Earthbound and Earthbound 2 (Mother 2 and 3).
Features
- Plug and play!
- Easy to customise with various addons.
- Odometer rolling health meter.
- Essentially lag-less (may lag for older computers).
Screenshots
Base Script
(https://dl.dropbox.com/s/qdbrx9m1p30ofwy/Earthbound3.png?token_hash=AAFpJboJjDeuS_ZpwGb8pc5YPxf9wa4uVuJ4wc7mrjaLkA&dl=1)
Base with Sprite Display
(https://dl.dropbox.com/s/s5358x7kkk3r1ld/Earthbound5.png?token_hash=AAGWunpLFueh9vxIpi44IFgCeGKfkiWco4pJNA_YvzRFdQ&dl=1)
Base with Sprite Display + Odometer
(https://dl.dropbox.com/s/xbsuax7fu1gseab/Earthbound4.png?token_hash=AAE3RhJhBlpeyArUrr8FFdWZxtdukOB5mNroud06kzsdCw&dl=1)
Instructions
See the script for instructions. The script is virtually plug and play, minus the need for the odometer graphics if you decide to use the odometer add-on. My template for an odometer graphic is attached.
Script
#==============================================================================
# ** Earthbound-Ish Battle Core
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to mimic the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3).
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials. Edit the modules to your liking.
#==============================================================================
#==============================================================================
# ** Cozziekuns
#==============================================================================
module Cozziekuns
module Earthboundish
ActorIcons ={
# Command Name => IconID
"Attack" => 116,
"Magic" => 152,
"Special" => 128,
"Guard" => 161,
"Items" => 260,
"Escape" => 474,
}
end
end
include Cozziekuns
#==============================================================================
# ** Sprite Battler
#==============================================================================
class Sprite_Battler
alias coz_ebish_spbtlr_update_effect update_effect
def update_effect(*args)
update_select_whiten if @effect_type == :select_white
if @battler.sprite_effect_type == :select_white_to_normal
revert_to_normal
@battler.sprite_effect_type = nil
end
coz_ebish_spbtlr_update_effect(*args)
end
def update_select_whiten
self.color.set(255, 255, 255, 0)
self.color.alpha = 128
end
end
#==============================================================================
# ** Window_ActorCommand
#==============================================================================
class Window_ActorCommand
def visible_line_number
return 1
end
def col_max
return 6
end
def contents_height
item_height
end
def top_col
ox / (item_width + spacing)
end
def top_col=(col)
col = 0 if col < 0
col = col_max - 1 if col > col_max - 1
self.ox = col * (item_width + spacing)
end
def bottom_col
top_col + col_max - 1
end
def bottom_col=(col)
self.top_col = col - (col_max - 1)
end
def ensure_cursor_visible
self.top_col = index if index < top_col
self.bottom_col = index if index > bottom_col
end
def item_rect(index)
rect = super
rect.x = index * (item_width + spacing)
rect.y = 0
rect
end
def window_width
Graphics.width - 224
end
def open
@help_window.open
super
end
def close
@help_window.close
super
end
def update
super
@help_window.update
end
def draw_item(index)
rect = item_rect_for_text(index)
x = rect.x + rect.width / 2 - 12
y = item_rect_for_text(index).y
draw_icon(Earthboundish::ActorIcons[command_name(index)], x, y, command_enabled?(index))
end
alias coz_ebish_waccmd_make_command_list make_command_list
def make_command_list(*args)
coz_ebish_waccmd_make_command_list(*args)
add_escape_command
end
def add_escape_command
add_command(Vocab::escape, :escape, BattleManager.can_escape?)
end
def update_help
@help_window.set_text(command_name(index))
end
end
#==============================================================================
# ** Window_BattleStatus
#==============================================================================
class Window_BattleStatus
[:basic_area_rect, :gauge_area_rect].each { |method|
define_method(method) { |index|
rect = item_rect(index)
rect
}
}
def col_max
$game_party.members.size
end
def window_width
Graphics.width / ( 4 / $game_party.members.size.to_f )
end
def window_height
fitting_height($data_system.opt_display_tp ? 5 : 4)
end
def item_width
(window_width - standard_padding * 2) / $game_party.members.size
end
def item_height
(window_height - standard_padding * 2)
end
def draw_basic_area(rect, actor)
draw_actor_name(actor, rect.x, rect.y, rect.width)
draw_actor_icons(actor, rect.x + 4, rect.y + line_height, rect.width)
end
def draw_gauge_area_with_tp(rect, actor)
draw_gauge_area_without_tp(rect, actor)
draw_actor_tp(actor, rect.x + 4, rect.y + line_height * 4, rect.width - 8)
end
def draw_gauge_area_without_tp(rect, actor)
draw_actor_hp(actor, rect.x + 4, rect.y + line_height * 2, rect.width - 8)
draw_actor_mp(actor, rect.x + 4, rect.y + line_height * 3, rect.width - 8)
end
def draw_actor_name(actor, x, y, width = 112)
change_color(hp_color(actor))
draw_text(x, y, width, line_height, actor.name, 1)
end
alias coz_ebish_wbtlsts_item_rect item_rect
def item_rect(index, *args)
rect = coz_ebish_wbtlsts_item_rect(index, *args)
rect.x = index % col_max * item_width
rect
end
def update
super
update_position
end
def update_position
self.x = (Graphics.width - window_width) / 2 + 128
end
end
#==============================================================================
# ** Window_BattleActor
#==============================================================================
class Window_BattleActor
def update_position
self.x = (Graphics.width - window_width) / 2
end
end
#==============================================================================
# ** Window_BattleEnemy
#==============================================================================
class Window_BattleEnemy
def cursor_left(wrap)
select((index - 1 + item_max) % item_max)
end
def cursor_right(wrap)
select((index + 1) % item_max)
end
def cursor_up(wrap)
cursor_left(true)
end
def cursor_down(wrap)
cursor_right(true)
end
def show
select(0)
self
end
def update_help
@help_window.set_text(enemy.name)
end
end
#==============================================================================
# ** Window_BattleSkill + Window_BattleItem
#==============================================================================
[:Window_BattleSkill, :Window_BattleItem].each { |klass|
Object.const_get(klass).send(:define_method, :show) {
select_last
super()
}
Object.const_get(klass).send(:define_method, :hide) { super() }
}
#==============================================================================
# ** Window_ActorHelp
#==============================================================================
class Window_ActorHelp < Window_Help
def initialize
super(1)
self.openness = 0
update_position
end
def update_position
self.x = Graphics.width - 224
self.width = 224
create_contents
end
def refresh
contents.clear
draw_text(4, 0, 224 - standard_padding * 2, line_height, @text, 1)
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
def start_party_command_selection
unless scene_changing?
@status_window.open
@status_window.refresh
if BattleManager.input_start
next_command
start_actor_command_selection
else
@party_command_window.deactivate
turn_start
end
end
end
def create_actor_command_window
@actor_command_window = Window_ActorCommand.new
@actor_command_window.set_handler(:attack, method(:command_attack))
@actor_command_window.set_handler(:skill, method(:command_skill))
@actor_command_window.set_handler(:guard, method(:command_guard))
@actor_command_window.set_handler(:item, method(:command_item))
@actor_command_window.set_handler(:escape, method(:command_escape))
@actor_command_window.set_handler(:cancel, method(:prior_command))
@actor_command_window.help_window = Window_ActorHelp.new
end
def create_help_window
@help_window = Window_Help.new(1)
@help_window.visible = false
end
alias coz_ebish_scbtl_create_enemy_window create_enemy_window
def create_enemy_window(*args)
coz_ebish_scbtl_create_enemy_window(*args)
@enemy_window.help_window = @actor_command_window.help_window
end
alias coz_ebish_scbtl_update_basic update_basic
def update_basic(*args)
old_enemy = @enemy_window.active ? @enemy_window.enemy : nil
coz_ebish_scbtl_update_basic(*args)
update_enemy_whiten(old_enemy)
end
def update_enemy_whiten(old_enemy)
if !@enemy_window.active or old_enemy != @enemy_window.enemy
old_enemy.sprite_effect_type = :select_white_to_normal if old_enemy && !old_enemy.dead?
end
@enemy_window.enemy.sprite_effect_type = :select_white if @enemy_window.active
end
def update_info_viewport
move_info_viewport(128)
end
end
Odometer Add-on:
#==============================================================================
# ** Earthbound-Ish Odometer Roll
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to emulate the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This
# certain addon addresses the infamous HP/MP scrolling system that made battles
# that much more intense.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials. Edit the modules to your liking.
#==============================================================================
# Graphics:
#------------------------------------------------------------------------------
# You must have two Odometer pictures in your Graphics/System folder. One of
# them must be named "Odometer_HP", and the other one must be named
# "Odometer_MP". Obviously, they represent the odometer for HP and MP values,
# respectively
#==============================================================================
#==============================================================================
# ** Cozziekuns
#==============================================================================
module Cozziekuns
module Earthboundish
Odometer_Roll_Speed = 4 # Smaller speeds are faster than larger speeds.
end
end
include Cozziekuns
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor
attr_accessor :odometer_hp
attr_accessor :odometer_mp
alias coz_ebisohd_gmactr_setup setup
def setup(actor_id, *args)
coz_ebisohd_gmactr_setup(actor_id, *args)
@odometer_hp = 0
@odometer_mp = 0
end
alias coz_ebishod_gmactr_execute_damage execute_damage
def execute_damage(user, *args)
if $game_party.in_battle
on_damage(@result.hp_damage) if @result.hp_damage > 0
@odometer_hp += @result.hp_damage
@odometer_mp += @result.mp_damage
user.hp += @result.hp_drain
user.mp += @result.mp_drain
else
coz_ebishod_gmactr_execute_damage(user, *args)
end
end
[:hp, :mp].each { |stat|
alias_method("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, "item_effect_recover_#{stat}".to_sym)
define_method("item_effect_recover_#{stat}".to_sym) { |user, item, effect|
if $game_party.in_battle
value = (send("m#{stat}".to_sym) * effect.value1 + effect.value2) * rec
value *= user.pha if item.is_a?(RPG::Item)
value = value.to_i
@result.send("#{stat}_damage=".to_sym, @result.send("#{stat}_damage".to_sym) - value)
@result.success = true
send("odometer_#{stat}=".to_sym, send("odometer_#{stat}".to_sym) - value)
else
send("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, user, item, effect)
end
}
}
end
#==============================================================================
# ** Game_Enemy
#==============================================================================
class Game_Enemy
def execute_damage(user)
on_damage(@result.hp_damage) if @result.hp_damage > 0
self.hp -= @result.hp_damage
self.mp -= @result.mp_damage
user.odometer_hp -= @result.hp_drain
user.odometer_mp -= @result.mp_drain
end
end
#==============================================================================
# ** Window_BattleStatus
#==============================================================================
class Window_BattleStatus
def refresh_hpmp(actor, index)
rect = item_rect(index)
if gauge_area_rect(index) == item_rect(index)
rect.y += line_height * 2
rect.height -= line_height * 2
contents.clear_rect(rect)
else
contents.clear_rect(gauge_area_rect(index))
end
draw_gauge_area(gauge_area_rect(index), actor)
end
[:hp, :mp].each { |stat|
define_method("draw_actor_#{stat}".to_sym) { |actor, x, y, width|
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab.send("#{stat}_a"))
od_x = x + contents.text_size(Vocab.send("#{stat}_a")).width + 4
actor_hp = actor.send("#{stat}".to_sym)
actor_od_hp = actor.send("odometer_#{stat}".to_sym)
draw_odometer(od_x, y, stat, actor_hp, actor_od_hp)
}
}
def draw_odometer(x, y, type, value, od_value)
bitmap = Cache.system("Odometer_#{type.upcase}")
places = [1000, 100, 10, 1]
od_ary = value.to_s.split("").collect { |str| str.to_i }
(4 - od_ary.size).times { od_ary.unshift(0) }
od_ary.each_index { |i|
src_y = (9 - od_ary[i]) * 20
if (od_ary.join.to_i) % places[i] == 0 and od_value != 0
src_y += 20 / Earthboundish::Odometer_Roll_Speed * (Graphics.frame_count % Earthboundish::Odometer_Roll_Speed)
end
contents.blt(x + i * 24, y + 2, bitmap, Rect.new(0, src_y, 24, 20))
}
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
alias coz_ebishod_scbtl_update_basic update_basic
def update_basic(*args)
coz_ebishod_scbtl_update_basic(*args)
update_odometer
end
def update_odometer
$game_party.members.each { |actor|
if actor.odometer_hp != 0 or actor.odometer_mp != 0
if actor.odometer_hp != 0 and Graphics.frame_count % Earthboundish::Odometer_Roll_Speed == 0
damage = actor.odometer_hp > 0 ? 1 : - 1
actor.hp -= damage
actor.odometer_hp -= damage
end
if actor.odometer_mp != 0 and Graphics.frame_count % Earthboundish::Odometer_Roll_Speed == 0
damage = actor.odometer_mp > 0 ? 1 : - 1
actor.mp -= damage
actor.odometer_mp -= damage
end
@status_window.refresh_hpmp(actor, actor.index)
end
}
end
end
Mother 3 Sprite Display Add-on:
#==============================================================================
# ** Earthbound-Ish Sprite Display
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to emulate the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This
# certain addon addresses the character sprite movements found in Mother 3,
# where active actors bobbed up and down the screen.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials.
#==============================================================================
#==============================================================================
# ** BattleManager
#==============================================================================
class << BattleManager
alias coz_ebishspd_btlmngr_init_members init_members
def init_members(*args)
coz_ebishspd_btlmngr_init_members(*args)
@dummy_battler = nil
end
def dummy_battler
@dummy_battler
end
def next_subject
loop do
battler = @action_battlers.shift
unless battler
@dummy_battler = nil
return nil
end
next unless battler.index && battler.alive?
@dummy_battler = battler
return battler
end
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor
def use_sprite?
true
end
end
#==============================================================================
# ** Sprite_BattlerCharacter
#==============================================================================
class Sprite_BattlerCharacter < Sprite_Battler
def initialize(viewport, battler = nil)
super(viewport, battler)
@y_offset = 0
end
def make_animation_sprites
@ani_sprites = []
@ani_duplicated = @@ani_checker.include?(@animation)
if !@ani_duplicated && @animation.position == 3
@@ani_checker.push(@animation)
end
end
def update
super
update_position
update_zoom
update_y_offset
end
def update_bitmap
new_bitmap = set_character_bitmap
if bitmap != new_bitmap
self.bitmap = new_bitmap
init_visibility
end
update_src_rect
end
def set_character_bitmap
bitmap = Cache.character(@battler.character_name)
sign = @battler.character_name[/^[\!\$]./]
if sign && sign.include?('$')
@cw = bitmap.width / 3
@ch = bitmap.height / 4
else
@cw = bitmap.width / 12
@ch = bitmap.height / 8
end
self.ox = @cw / 2
self.oy = @ch
bitmap
end
def update_origin
if bitmap
self.ox = @cw / 2
self.oy = 0
end
end
def update_src_rect
index = @battler.character_index
sx = (index % 4 * 3 + 1) * @cw
sy = (index / 4 * 4) * @ch
self.src_rect.set(sx, sy, @cw, @y_offset)
end
def update_position
width = Graphics.width / ( 4 / $game_party.members.size.to_f )
sx = (Graphics.width - width) / 2 + 128
self.x = @battler.index * 128 + sx / 2 + 12 + 32 * (4 - $game_party.members.size)
self.y = 296 - @y_offset * 2
end
def update_zoom
self.zoom_x = 2.0
self.zoom_y = 2.0
end
def update_y_offset
if BattleManager.actor == @battler or BattleManager.dummy_battler == @battler
@y_offset = [@y_offset + 4, 32].min
else
@y_offset = [@y_offset - 4, 0].max
end
end
end
#==============================================================================
# ** Spriteset_Battle
#==============================================================================
class Spriteset_Battle
def create_actors
@actor_sprites = $game_party.members.collect { |actor|
Sprite_BattlerCharacter.new(@viewport3, actor)
}
end
end
Credit
Thanks
- Earthbound, for being such a great game.
Support
Post below and I'll try to be prompt in my response.
Known Compatibility Issues
Please don't try and combine this with other battle systems.
Author's Notes
This was a long time coming.
Wow, this looks great cozzie. I can't wait to try it out.
Gotta try it. Kudos. I was going to attempt it, myself.
This is a pretty cool script. Though it's probably because I'm just a Mother 3 fanboy ::).
Anyways, in the future do you think it will be possible for you to make an add-on to this script where the "mortal damage" effect from Mother 2 and 3 is added? If you don't know what this is or you simply forget this is how it works: after taking damage that is more than your current HP on the odometer (for example you have 30 HP and the enemy casts an attack that deals 45) the screen shakes, makes a noise and after the enemy's attack is finished the text ____took Mortal Damage appears.
I think I'm doing something wrong. ;9
I got -
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi109.photobucket.com%2Falbums%2Fn52%2Fdreamslayer7%2Fsad_zpse01fa8c6.png&hash=f5e5c12add7d2a07618ea819097f41ec78bc17d5)
So I check, that line was -
168 damage = actor.odometer_hp > 0 ? 1 : - 1
So it's telling me that I don't have the Hp and Mp odometers?
But I...
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi109.photobucket.com%2Falbums%2Fn52%2Fdreamslayer7%2Fbuti_zps0617248c.png&hash=ebba9e840a55767af822ad0530f9dc2969141e5a)
@qwertyu: Thanks for the kind words! I'll consider adding a "mortal damage" feature in the future.
@Boe: Hmm.. That's weird. The error has nothing to do with the graphics. It's most likely an incompatibility with another script that you have, probably one that changes the way actors behave in some way or another. If you're not using any other scripts, or you can't find the incompatibility by yourself, then send me a copy of your project and I'll see if I can fix it.
I figured it out.
For some reason it wanted to be above the Sprite Display. I just changed the order and now it works.
Base Script
Sprite Display
Odometer
Glad you could resolve it. Still unsure why you got the problem, but its nice that everything works fine.
Sorry for Necro posting because this is a good script and i was having a few errors with it.
Anyway for some odd reasons,lets say their are 3 monsters in an encounter and 3 party members.When i choose one monster out of the three as a target for my individual party members the battle just kinda freezes and stops responding to button commands.
What i mean is i choose party member A to attack monster A,party member B to attack monster B and party member C to attack monsters C.As soon as one of the monsters dies the battle freezes.This doesn't happen if you gang up on one monster or battle with one party member.
The other thing is resolution.When you increase the resolution to 640 x 480 the characters get offsetted from the stat boxes and they kinda float in the air....is their a way to safely edit sprite positioning?
And the other thing is,is it possible to reduce the odometer digits from 4 to 3?
******EDIT*******
I have a semi fix for the sprite position problem and have managed to reduce the odometer to 3 digits.
So after playing around with the battle system i realized a few other bugs in the script and they all deal with the odometer.
1: The odometer Keeps rolling after death.When the character loses all hp it will roll until all the damage that would have taken is rolled down.I need to make the script stop rolling at 000 HP reached...If anyone has any tips or ideas to achieve this please post them here.
2:If damage was rolling on the odometer and the battle ends,when a new battle starts,i continues to roll until the damage from the previous fight is rolled down.This obviously needs to be fixed lol.I need damage to stop being taken when a battle ends.Any suggestions would be nice.
3:State damage such as poison don't roll down the odometer they just subtract the HP like regular damage would.
If anyone can poke around in the odometer script and see of they can come up with a fix It would be greatly appreciated!
************* EDIT NUMBER 2 *********************
In addition to the problems mentioned above their are a few more glaring issues.
The first deals with healing skils....When a healing skill/item is used on a party member with full HP,the odometer forces itself to spin and repeatedly show the current HP and 1 HP lower.In other words..in the same way the odometer doesn't stop rolling after death it also doesn't stop rolling when healed to full HP.
The second deals with MP.When an MP skill is used the MP odometer doesn't roll at all unlike the HP bar,it just subtracts like normal.
Having a problem with the script-
The problem is, when I initiate a battle, I get this error:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs22.postimg.org%2F7if2dvc0h%2FEBError.png&hash=abc1456b47e574b979e7e7125edc66b14afdbe47)
And here is that line:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs22.postimg.org%2Fq9gzo16kx%2FEBError2.png&hash=27dfc53cda358295517866f5f4c7e2ec4ccefc4b)
Cause of problem seems to be related to the battle core, as disabling just that script causes battles to function... with the odometer and the sprites (the sprites don't appear because they're obscured by the GUI).
It's also not affected by the use of other scripts, as just this script stops battles from functioning...
And yes, I am using this with VX Ace.
Are you using any other scripts that change the icons or the way the bs looks.
What this error is saying is that your icon_index = nil.
Meaning an icon is being drawn out without an index. This might have happened if another script over-writes that same method that is why I asked if you are using any other scripts.
Quote from: vindaca on October 17, 2013, 07:41:26 PM
Are you using any other scripts that change the icons or the way the bs looks.
What this error is saying is that your icon_index = nil.
Meaning an icon is being drawn out without an index. This might have happened if another script over-writes that same method that is why I asked if you are using any other scripts.
Scripts? No.
try replacing line 108 with this
rect = super(index)
One thing I noticed is he rewrote draw item_rect and didn't pass the index to the super. I don't know if that will fix it or not though I can't test it out from here.
Still get the error.
OK, well I just tested it out with just the battle core and the sprite add-on and it works fine.
Do you have the battle core above the other scripts in your list?
Also they should all be in-between the materials section and the main processing section?
It should look like this.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimageshack.us%2Fscaled%2Flarge%2F5%2Fj4wi.png&hash=e7bbfa30692d6c279c44627116e9f16f8b4537e9) (http://imageshack.us/photo/my-images/5/j4wi.png/)
Quote from: vindaca on October 18, 2013, 09:12:37 PM
OK, well I just tested it out with just the battle core and the sprite add-on and it works fine.
Do you have the battle core above the other scripts in your list?
Also they should all be in-between the materials section and the main processing section?
It should look like this.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs22.postimg.org%2F4ooveaac1%2Fping.png&hash=b9ac67d9f43517937385f775c3b1746649fe8add)
Yes, running just the EB scripts still gives me the error, too.
I asked if you were using any other scripts and you are. A couple of them might be your problem. Also I noticed you have an Event Jitter Fix script outside of your materials section. I would move that and any others below the materials section that could also create problems in the future.
Try removing the battle back stretch script and see if you still get the error.
If you still get the error try removing the Inventory plus.(I don't think it's this one but it could be.)
Quote from: vindaca on October 18, 2013, 11:18:00 PM
I asked if you were using any other scripts and you are.
No, you asked if I were using any other scripts
that changed the graphics.Quote from: vindaca on October 17, 2013, 07:41:26 PM
Are you using any other scripts that change the icons or the way the bs looks.
Quote from: vindaca on October 18, 2013, 11:18:00 PM
Also I noticed you have an Event Jitter Fix script outside of your materials section.
I didn't put that there (and yes, I will try that) That's a system script, and everything else you said showed you never paid attention to anything I said, because I said
Quote from: The True Nameless on October 18, 2013, 10:41:54 PM
Yes, running just the EB scripts still gives me the error, too.
Please don't scan my posts. You're wasting time.
:o Did I miss something... I'm not trying to make bad juju and I'm not scanning your posts. I was trying to help, but I've wasted my time wasting your time apparently.
I did see that you said that, but I tested it too with just the EB scripts, WITH NO PROBLEMS.
Quote from: vindaca on October 18, 2013, 09:12:37 PM
OK, well I just tested it out with just the battle core and the sprite add-on and it works fine.
If you don't want to get it to work that's fine with me. I'm sorry if you felt I was wasting your time. I could have helped you get it too work too or even set it up for you ( I do write scripts for a living and all ). Oh well, Good luck. If you change your mind you can always PM me.
Quote from: vindaca on October 19, 2013, 10:07:00 AM
I could have helped you get it too work too or even set it up for you ( I do write scripts for a living and all ).
>Writes scripts for a living (notes intelligence)
>Can't read
Troll?
Seriously, You've been a member of this site for 2 days???
I don't know what do you mean by "Troll?", your thoughts are backwards, I was just trying to help someone I thought needed help. I even offered to still help you after your rude comment and the offer still stands.
I wasn't saying I write scripts for a living so you can note my intelligence, I said that so you can regroup and realize your biting a hand that could possibly feed you.
Quote from: vindaca on October 19, 2013, 11:21:16 AM
Seriously, You've been a member of this site for 2 days???
I don't know what do you mean by "Troll?", your thoughts are backwards, I was just trying to help someone I thought needed help. I even offered to still help you after your rude comment and the offer still stands.
I wasn't saying I write scripts for a living so you can note my intelligence, I said that so you can regroup and realize your biting a hand that could possibly feed you.
Well what can I do that I haven't (or possibly) already done?
Quote from: Cuttershy on March 08, 2013, 03:07:33 PM
I figured it out.
For some reason it wanted to be above the Sprite Display. I just changed the order and now it works.
Base Script
Sprite Display
Odometer
As you can see placement does make a difference. I'm not saying that this will fix it but it's a start. You have to make sure you scripts are in order. All I can do is troubleshoot without having all your scripts.
If that still doesn't work you can PM me a demo of all the scripts your using and I will figure out the problem for you.
Really though, no hard feelings I'm just trying to help. I know how frustrating it can be, even more so when you find out your just missing a small detail.
Quote from: The True Nameless on October 19, 2013, 10:50:27 AM
Quote from: vindaca on October 19, 2013, 10:07:00 AM
I could have helped you get it too work too or even set it up for you ( I do write scripts for a living and all ).
>Writes scripts for a living (notes intelligence)
>Can't read
Troll?
vindaca's just trying to help you, and being very gracious about it at that. There's no call to be rude.
Quote from: vindaca on October 19, 2013, 11:53:06 AM
Quote from: Cuttershy on March 08, 2013, 03:07:33 PM
I figured it out.
For some reason it wanted to be above the Sprite Display. I just changed the order and now it works.
Base Script
Sprite Display
Odometer
As you can see placement does make a difference. I'm not saying that this will fix it but it's a start. You have to make sure you scripts are in order. All I can do is troubleshoot without having all your scripts.
If that still doesn't work you can PM me a demo of all the scripts your using and I will figure out the problem for you.
Really though, no hard feelings I'm just trying to help. I know how frustrating it can be, even more so when you find out your just missing a small detail.
They didn't get the same error I did and doing that doesn't work either.
I'll PM you a demo once it's made and uploaded.
Well, vindaca's identified the usual culprits, so since it's not them, my best guess is that you have previously changed the name of one of the commands in the database without also changing it in the icon setting part of the script.
Around lines 27-35 of the base, you should see:
ActorIcons ={
# Command Name => IconID
"Attack" => 116,
"Magic" => 152,
"Special" => 128,
"Guard" => 161,
"Items" => 260,
"Escape" => 474,
}
Thus, it chooses the icon by command name, not an ID system. It is thus susceptible to any variations in command name: if you have changed any of the command names in the database without also changing this, the error you report could be expected.
As such, I recommend that, right underneath the }, you add a line so that this part of the script looks like:
ActorIcons ={
# Command Name => IconID
"Attack" => 116,
"Magic" => 152,
"Special" => 128,
"Guard" => 161,
"Items" => 260,
"Escape" => 474,
}
ActorIcons.default = 0
Then, start the battle. If I am right, the error should not occur, but there will be one or more commands for which no icon is shown. Those commands are the culprits. If that doesn't work though, then I am sure the demo will be invaluable.
Good luck.
Quote from: modern algebra on October 19, 2013, 12:56:15 PM
Well, vindaca's identified the usual culprits, so since it's not them, my best guess is that you have previously changed the name of one of the commands in the database without also changing it in the icon setting part of the script.
Around lines 27-35 of the base, you should see:
Thus, it chooses the icon by command name, not an ID system. It is thus susceptible to any variations in command name: if you have changed any of the command names in the database without also changing this, the error you report could be expected.
As such, I recommend that, right underneath the }, you add a line so that this part of the script looks like:
Then, start the battle. If I am right, the error should not occur, but there will be one or more commands for which no icon is shown. Those commands are the culprits. If that doesn't work though, then I am sure the demo will be invaluable.
Good luck.
Works now, thankies very much~Except now that when I enter a battle in game I get the same error Cuttershy did and I have my scripts the right way around, sooo.
But now how do I choose the icons that the battle screen uses? Do I replace the values in the attack, magic, etc. line?Didn't read your post well enough. Changed them via editing the script.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs18.postimg.org%2Fm4zjbw96h%2FNICOLAS_CAGE.png&hash=305ed87ade05f6157f9959aba3fa26e49dbb20b0)
^ battle screen after changing the code as algebra said to (
not in game)
Also, during battle testing, the game likes to freeze at random intervals.
I also wanna fix the odometer getting cut off like it is in the picture. How would I go about this?
Well I'm not sure about the freezing, but right around line 173 you should see graphics width. That it what you will need to change. At line 227 you can adjust the x value of the window too. Adjusting it this way though will only work if you are doing a one member party, once the second member joins the windows will look funky. What I would suggest instead is resizing the odometer to fit the window not the other way around.
Quote from: vindaca on October 19, 2013, 08:21:38 PM
Well I'm not sure about the freezing, but right around line 173 you should see graphics width. That it what you will need to change. At line 227 you can adjust the x value of the window too. Adjusting it this way though will only work if you are doing a one member party, once the second member joins the windows will look funky. What I would suggest instead is resizing the odometer to fit the window not the other way around.
So how would I resize the odometer.
Also, what about my other bug where I get the same error as Cuttershy?
you can re-size it with Paint, Photoshop, Gimp just to name a few programs but any of them should work as long as you can save the image as a .png.
I'm assuming you tried what she did to fix it already? Did you by chance change anything else in the scripts?
Quote from: vindaca on October 19, 2013, 09:12:06 PM
you can re-size it with Paint, Photoshop, Gimp just to name a few programs but any of them should work as long as you can save the image as a .png.
I'm assuming you tried what she did to fix it already? Did you by chance change anything else in the scripts?
I did what she did when you told me to do it as part of my previous problem.
The only thing I have left to suggest is the demo then. You might want to post a copy of the link to this post too, so that others can check it out and maybe help out.
Quote from: vindaca on October 19, 2013, 09:12:06 PM
you can re-size it with Paint, Photoshop, Gimp just to name a few programs but any of them should work as long as you can save the image as a .png.
I'm assuming you tried what she did to fix it already? Did you by chance change anything else in the scripts?
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs7.postimg.org%2Fv4d63hxa3%2Fwhazafa.png&hash=01ba9e8cc441e31d1f71c011a58e9af492604781)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fbrucemctague.com%2Fwp-content%2Fuploads%2F2012%2F10%2Fbrilliant.jpg&hash=41c4a7f6e0c230920ceb201a25268b24c822041c)
You know what, I'll just resize the window, it's not that hard. Problem solved.
There's more to it then just resizing it, now you have to adjust the rect for the numbers, but great job getting it working!!!
I wish the odometer meter had a separate stand alone version add on also.
Quote from: WinglessRM on September 19, 2013, 02:49:10 AM
Sorry for Necro posting because this is a good script and i was having a few errors with it.
Anyway for some odd reasons,lets say their are 3 monsters in an encounter and 3 party members.When i choose one monster out of the three as a target for my individual party members the battle just kinda freezes and stops responding to button commands.
What i mean is i choose party member A to attack monster A,party member B to attack monster B and party member C to attack monsters C.As soon as one of the monsters dies the battle freezes.This doesn't happen if you gang up on one monster or battle with one party member.
The other thing is resolution.When you increase the resolution to 640 x 480 the characters get offsetted from the stat boxes and they kinda float in the air....is their a way to safely edit sprite positioning?
And the other thing is,is it possible to reduce the odometer digits from 4 to 3?
******EDIT*******
I have a semi fix for the sprite position problem and have managed to reduce the odometer to 3 digits.
So after playing around with the battle system i realized a few other bugs in the script and they all deal with the odometer.
1: The odometer Keeps rolling after death.When the character loses all hp it will roll until all the damage that would have taken is rolled down.I need to make the script stop rolling at 000 HP reached...If anyone has any tips or ideas to achieve this please post them here.
2:If damage was rolling on the odometer and the battle ends,when a new battle starts,i continues to roll until the damage from the previous fight is rolled down.This obviously needs to be fixed lol.I need damage to stop being taken when a battle ends.Any suggestions would be nice.
3:State damage such as poison don't roll down the odometer they just subtract the HP like regular damage would.
If anyone can poke around in the odometer script and see of they can come up with a fix It would be greatly appreciated!
************* EDIT NUMBER 2 *********************
In addition to the problems mentioned above their are a few more glaring issues.
The first deals with healing skils....When a healing skill/item is used on a party member with full HP,the odometer forces itself to spin and repeatedly show the current HP and 1 HP lower.In other words..in the same way the odometer doesn't stop rolling after death it also doesn't stop rolling when healed to full HP.
The second deals with MP.When an MP skill is used the MP odometer doesn't roll at all unlike the HP bar,it just subtracts like normal.
So.....i guess none of these problems are ever getting fixed?
Shame really since this is a genius battle script for VXA
Cozziekuns, I'm really digging this script, but it has a lot of problems;
-If a battle has more than two enemies, it freezes and stops responding to button inputs when an enemy is killed.
-It does the exact same thing when I use any script that creates and disposes of images (like Galv's Timed Button Hits or MOG Hunters Enemy HP Bar). This is regardless of the number of enemies.
-There are issues with the rolling odometer portion of the script, like when using a healing item or healing MP.
Is it possible that you, or anyone, can fix these issues? It's a great script that I would love to use. It's just annoying that I have to limit enemy numbers in an encounter or the use of scripts that use/dispose of images in battle, because it's an otherwise awesome script.
Looks awesome, I wish that XP/VX could have had the same type of coding, both of them have a lot of good scripts.
On the other hand, Demo?
Could you make it so script can be switched on/off (basically switching between basic battle system and this)? I want to use this system but only for specific encounters. Or perhaps other script that accomplishes similar thing is out there?
I'm a HUGE EB fan so I honestly jizzed mountains upon seeing this. Thank you thank you thank yooooou ;D ;D ;D ^-^
AWESOME SCRIPT! EARTHBOUND RULEZ
Anyone can help me?
I had same problem with Error 373. Seems to be a conflict with a script from RPG Maker (Window_Base). The print bellow show the line that had the conflict. I tried some of the things you mentioned before, but nothing worked.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs30.postimg.org%2Fafrg528i9%2Frpgmaker_error.png&hash=b4ea3ecec20b607ab4a0f245c4541db29e5120e5)
Cozziekun's script calls on that method to draw items in the Actor Command window. Specifically, in Window_ActorCommand#draw_item (~line 137): draw_icon(Earthboundish::ActorIcons[command_name(index)], x, y, command_enabled?(index))
Your error indicates that the value being passed to the method as the argument icon_index doesn't exist, or is 'empty' - it's a nil. The error is thrown and the program crashes because it's trying to process a mathematical equation with a nil, which isn't a thing.
As we can see, the argument being passed as icon_index is "Earthboundish::ActorIcons[command_name(index)]". This refers to a specific point in the configuration hash in Cozziekun's script as defined by the database commands for battle actions.
This leads me to believe that either you haven't configured a custom battle action, or you've accidentally deleted a previously existing one. I'll advise you to make sure all of your battle commands are present in the script's configuration, and paired with an icon ID.
At least, that's what it seems like to me, that's how I managed to duplicate the error. Good luck.
Edit: Just realised that MA explained this error (http://rmrk.net/index.php/topic,47693.msg549820.html#msg549820) at this page as well. See his post if you're confused, he offers a workaround solution of putting a default value for that hash.
Quote from: Baron von Pacman on June 03, 2014, 12:14:34 PM
Edit: Just realised that MA explained this error (http://rmrk.net/index.php/topic,47693.msg549820.html#msg549820) at this page as well. See his post if you're confused, he offers a workaround solution of putting a default value for that hash.
Just tried this and worked pretty well! Thank you very much!
Could someone modify or make another script like this that can be turned off/on at will (if off, default/another custom system is used, like eg. YanFly's or moghunter's)? I'd like to use system like this for boss battles and normal system for everything else.
can you make an addon for the combo system from Mother 3's(Earthbound 2's) battle system
QuoteQuote from: WinglessRM on September 19, 2013, 02:49:10 AM
Sorry for Necro posting because this is a good script and i was having a few errors with it.
Anyway for some odd reasons,lets say their are 3 monsters in an encounter and 3 party members.When i choose one monster out of the three as a target for my individual party members the battle just kinda freezes and stops responding to button commands.
What i mean is i choose party member A to attack monster A,party member B to attack monster B and party member C to attack monsters C.As soon as one of the monsters dies the battle freezes.This doesn't happen if you gang up on one monster or battle with one party member.
The other thing is resolution.When you increase the resolution to 640 x 480 the characters get offsetted from the stat boxes and they kinda float in the air....is their a way to safely edit sprite positioning?
And the other thing is,is it possible to reduce the odometer digits from 4 to 3?
******EDIT*******
I have a semi fix for the sprite position problem and have managed to reduce the odometer to 3 digits.
So after playing around with the battle system i realized a few other bugs in the script and they all deal with the odometer.
1: The odometer Keeps rolling after death.When the character loses all hp it will roll until all the damage that would have taken is rolled down.I need to make the script stop rolling at 000 HP reached...If anyone has any tips or ideas to achieve this please post them here.
2:If damage was rolling on the odometer and the battle ends,when a new battle starts,i continues to roll until the damage from the previous fight is rolled down.This obviously needs to be fixed lol.I need damage to stop being taken when a battle ends.Any suggestions would be nice.
3:State damage such as poison don't roll down the odometer they just subtract the HP like regular damage would.
If anyone can poke around in the odometer script and see of they can come up with a fix It would be greatly appreciated!
************* EDIT NUMBER 2 *********************
In addition to the problems mentioned above their are a few more glaring issues.
The first deals with healing skils....When a healing skill/item is used on a party member with full HP,the odometer forces itself to spin and repeatedly show the current HP and 1 HP lower.In other words..in the same way the odometer doesn't stop rolling after death it also doesn't stop rolling when healed to full HP.
The second deals with MP.When an MP skill is used the MP odometer doesn't roll at all unlike the HP bar,it just subtracts like normal.
So.....i guess none of these problems are ever getting fixed?
Shame really since this is a genius battle script for VXA
Is this Script really not getting updated anymore? ;9
It's really awesome besides these minor bugs :D
Edit: Sorry. but it seems i noticed yet another bug.
If any of my Party members gets Poisened, blind etc. the game freezes as well. But this seems to occure only on my side though...
I have problem with the Odometer Add-on.
In a middle of the final battle,it starts this error:
"Script: 'Odometer Add-on' line 101: NoMethodError occurred.
undefined method ` Odometer_hp' for
#<Game_Enemy: 0xa280be0>
the line is this: user.odometer_hp -= @result.hp_drain
What can I do?
Give an example odometer, please. Pics here is dead.
Quote from: WinglessRM on December 10, 2013, 02:51:09 AM
Quote from: WinglessRM on September 19, 2013, 02:49:10 AM
Sorry for Necro posting because this is a good script and i was having a few errors with it.
Anyway for some odd reasons,lets say their are 3 monsters in an encounter and 3 party members.When i choose one monster out of the three as a target for my individual party members the battle just kinda freezes and stops responding to button commands.
What i mean is i choose party member A to attack monster A,party member B to attack monster B and party member C to attack monsters C.As soon as one of the monsters dies the battle freezes.This doesn't happen if you gang up on one monster or battle with one party member.
The other thing is resolution.When you increase the resolution to 640 x 480 the characters get offsetted from the stat boxes and they kinda float in the air....is their a way to safely edit sprite positioning?
And the other thing is,is it possible to reduce the odometer digits from 4 to 3?
******EDIT*******
I have a semi fix for the sprite position problem and have managed to reduce the odometer to 3 digits.
So after playing around with the battle system i realized a few other bugs in the script and they all deal with the odometer.
1: The odometer Keeps rolling after death.When the character loses all hp it will roll until all the damage that would have taken is rolled down.I need to make the script stop rolling at 000 HP reached...If anyone has any tips or ideas to achieve this please post them here.
2:If damage was rolling on the odometer and the battle ends,when a new battle starts,i continues to roll until the damage from the previous fight is rolled down.This obviously needs to be fixed lol.I need damage to stop being taken when a battle ends.Any suggestions would be nice.
3:State damage such as poison don't roll down the odometer they just subtract the HP like regular damage would.
If anyone can poke around in the odometer script and see of they can come up with a fix It would be greatly appreciated!
************* EDIT NUMBER 2 *********************
In addition to the problems mentioned above their are a few more glaring issues.
The first deals with healing skils....When a healing skill/item is used on a party member with full HP,the odometer forces itself to spin and repeatedly show the current HP and 1 HP lower.In other words..in the same way the odometer doesn't stop rolling after death it also doesn't stop rolling when healed to full HP.
The second deals with MP.When an MP skill is used the MP odometer doesn't roll at all unlike the HP bar,it just subtracts like normal.
So.....i guess none of these problems are ever getting fixed?
Shame really since this is a genius battle script for VXA
Daym shame. I'm getting the same exact problem and I really want this to be updated. This script is perfect except for the bugs. Its just frustrated that It keeps crashing. Just thought id give my though on this.
Hey Cozzie! Loving the Script, except I have a problem:
While the Base script works just fine for me, I also want to use the Odometer add-on (I'm not planning on using the Sprite Display). The problem is that both of the Images (Odometer_HP & Odometer_MP) attached in the main post seem to be corrupted, as I can't open them in photo viewer and I can't edit them in Paint.NET. Would you be able to re-upload the original images or provide a template?
And to any users who may have been able to download it and use it before the corruption, if Cozzie doesn't, could you also be able to provide either the image you used or a template?
Either of these would be greatly appreciated.
I have a problem with this script. It works perfectly fine when i launch it in the battle test, but in the actual game an error comes up reading
"Earthbound-ish Odometer Roll" line 168: NoMethodError occurred
undefined method '>' for nil:NilClass
Can someone please tell me how to fix this????????
he/she still working on this script fix some bug or so so, btw love script on rpg maker vx version