Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

No damage display

I've switched to using this CBS here..
http://www.rmxp.org/forums/showthread.php?t=4971
the problem with it is that it doesn't display the damage you deal when you hit an enemy or when an enemy deals damage to you. For example:
There should be the numbers showing the amount of damage i've been dealt...but they're not showing up.

Sorry, but would anyone know how to fix this, or another script i should try to add to overcome this?

Edit: Other scripts i'm using that might be contributing to the problem
Guillaume777s multi-equip script
dubealex AMS
Largeparty script by squall
Skill detail script (can't find who made it)
 
Well, I updated to the more current version of the RTAB script, which worked. http://www.rmxp.org/forums/showthread.php?t=4732

However, now i have a new problem. Every time I try doing anything after a battle, I get this error


Thing it, the problem doesn't seem to be with the aforementioned script. The error only occurs when I have the Largeparty script written by Squall. Its listed below...anyone have any idea whats causing this problem?

# script made by squall from rmxp.net / squall@loeher.zzn.com

# don't really need to give me credit for this.

# please paste the script in a new section ABOVE "main"

# this allow to have an unlimited number of actor in party.

# to change the max actors that can be in the party look just below.

# the party is cut down to 4 actor in battles

# some windows are compacted or re-made to fit with some other ones. those are

# Window_Gold and Window_PlayTime. feel free to remove them if you don't like

# the way they are...

# Enjoy!

#==============================================================================
# â–  Game_Party
#==============================================================================

class Game_Party
#--------------------------------------------------------------------------
# ● define instance variable
#--------------------------------------------------------------------------
attr_accessor :actors
#--------------------------------------------------------------------------
# ● add an actor to the party the number (red) is
# the max actors to be in party
#--------------------------------------------------------------------------
def add_actor(actor_id)
actor = $game_actors[actor_id]
if @actors.size < 200 and not @actors.include?(actor)
@actors.push(actor)
$game_player.refresh
end
end
end

#==============================================================================
# â–  Window_Base
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# ● draw character's battle sprite
#--------------------------------------------------------------------------
def draw_actor_battlegraphic(actor, x, y, opacity = 255)
bitmap = RPG::Cache.battler(actor.character_name, actor.character_hue)
src_rect = Rect.new(0, 0, 111, 111)
self.contents.blt(x, y, bitmap, src_rect, opacity)
end
#--------------------------------------------------------------------------
# ● draw character's HP meter
#--------------------------------------------------------------------------
def draw_actor_hp_meter(actor, x, y, width = 70, type = 0)
if type == 1 and actor.hp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,5, Color.new(0, 0, 0, 255))
w = width * actor.hp / actor.maxhp
self.contents.fill_rect(x, y+28, w,1, Color.new(174, 68, 89, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(156, 61, 80, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(138, 53, 70, 255))
end
#--------------------------------------------------------------------------
# ● draw character's SP meter
#--------------------------------------------------------------------------
def draw_actor_sp_meter(actor, x, y, width = 70, type = 0)
if type == 1 and actor.sp == 0
return
end
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,5, Color.new(0, 0, 0, 255))
w = width * actor.sp / actor.maxsp
self.contents.fill_rect(x, y+28, w,1, Color.new(62, 72, 164, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(55, 65, 149, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(49, 57, 130, 255))
end
#--------------------------------------------------------------------------
# ● define method to draw squares
#--------------------------------------------------------------------------
def draw_square(x, y, width, color)
self.contents.fill_rect(x, y, width, 1, color)
self.contents.fill_rect(x, y, 1, width, color)
self.contents.fill_rect(x + width, y, 1, width + 1, color)
self.contents.fill_rect(x, y + width, width + 1, 1, color)
end
end

#==============================================================================
# â–  Window_Gold
#------------------------------------------------------------------------------
#  in this one the text has been replaced by an icon. ^^
#==============================================================================

class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = 24
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
bitmap = RPG::Cache.icon("032-Item01")
rect = Rect.new(0, 0, 24, 24)
self.contents.blt(124-cx, 0, bitmap, rect)
end
end

#==============================================================================
# â–  Window_PlayTime
#------------------------------------------------------------------------------
#  This window has been compacted a bit to show every command in the menu
#==============================================================================

class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
refresh
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# ● redefine update method
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end

#==============================================================================
# â–  Window_MenuStatus
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
@column_max = 4
@item_max = $game_party.actors.size
self.contents = Bitmap.new(width - 32, row_max * 112)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize/1.2
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = i % 4 * 112
y = i / 4 * 112
actor = $game_party.actors
#draw a square to seperate chars, change disabled color with whatever
#color you want... (method to draw square is below...)
draw_square(x, y, 111, disabled_color)
draw_actor_battlegraphic(actor, x, y, 50)
draw_actor_graphic(actor, x + 90, y + 50)
draw_actor_name(actor, x + 5, y)
self.contents.draw_text(x + 5, y + 20, 112, 32, "HP : #{actor.hp}")
self.contents.draw_text(x + 5, y + 40, 112, 32, "MP : #{actor.sp}")
draw_actor_level(actor, x + 5, y + 60)
draw_actor_state(actor, x + 5, y + 80)
draw_actor_hp_meter(actor, x + 5, y + 17)
draw_actor_sp_meter(actor, x + 5, y + 37)
end
end
#--------------------------------------------------------------------------
# ● define the page's top row
#--------------------------------------------------------------------------
def top_row
return self.oy / 112
end
#--------------------------------------------------------------------------
# ● define the page maximum rows
#--------------------------------------------------------------------------
def page_row_max
return (self.height - 32) / 112
end
#--------------------------------------------------------------------------
# ● defines a method to change the page's top row
#--------------------------------------------------------------------------
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 112
end
#--------------------------------------------------------------------------
# ● update the cursor movement
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
self.cursor_rect.set(@index % 4 * 112, @index / 4 * 112 - self.oy, 112, 112)
end
end


#==============================================================================
# â–  Window_Target
#==============================================================================

class Window_Target < Window_Selectable
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize
super(0, 0, 336, 480)
@column_max = 2
@item_max = $game_party.actors.size
self.contents = Bitmap.new(width - 32, row_max * 112)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize/1.2
self.z += 10
refresh
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = i % 2 * 112 + 36
y = i / 2 * 112
actor = $game_party.actors
#draw a square to seperate chars, change disabled color with whatever
#color you want... (method to draw square is below...)
draw_square(x, y, 111, disabled_color)
draw_actor_battlegraphic(actor, x, y, 50)
draw_actor_graphic(actor, x + 90, y + 50)
draw_actor_name(actor, x + 5, y)
self.contents.draw_text(x + 5, y + 20, 112, 32, "HP : #{actor.hp}")
self.contents.draw_text(x + 5, y + 40, 112, 32, "MP : #{actor.sp}")
draw_actor_level(actor, x + 5, y + 60)
draw_actor_state(actor, x + 5, y + 80)
draw_actor_hp_meter(actor, x + 5, y + 17)
draw_actor_sp_meter(actor, x + 5, y + 37)
end
end
#--------------------------------------------------------------------------
# ● define the page's top row
#--------------------------------------------------------------------------
def top_row
return self.oy / 112
end
#--------------------------------------------------------------------------
# ● define the page maximum rows
#--------------------------------------------------------------------------
def page_row_max
return (self.height - 32) / 112
end
#--------------------------------------------------------------------------
# ● defines a method to change the page's top row
#--------------------------------------------------------------------------
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 112
end
#--------------------------------------------------------------------------
# ● update the cursor movement
#--------------------------------------------------------------------------
def update_cursor_rect
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
if @index <= -2
self.cursor_rect.empty
elsif @index == -1
self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
else
self.cursor_rect.set(@index % 2 * 112 + 36, @index / 2 * 112 - self.oy, 112, 112)
end
end
end

#==============================================================================
# â–  Scene_Menu
#==============================================================================

class Scene_Menu
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
@actor_change = false
end
#--------------------------------------------------------------------------
# ● main
#--------------------------------------------------------------------------
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "End Game"
s7 = "Party"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 256 #224

@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320

@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416

@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0

Graphics.transition

loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze

@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# ● update the windows
#--------------------------------------------------------------------------
def update
@command_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update

if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# ● update the command window
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0 # Item
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1 # Skill
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # Equip
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3 # Status
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4 # Save
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5 # End
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
when 6 # party actors switch
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
end
return
end
end
#--------------------------------------------------------------------------
# ● update the status window
#--------------------------------------------------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
@actor_change = false
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1 # Skill
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2 # Equip
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3 # Status
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
when 6 # party actors switch
if @actor_change == true
$game_party.actors[@old_index] = $game_party.actors[@status_window.index]
$game_party.actors[@status_window.index] = @new_actor
@actor_change = false
@status_window.refresh
return
end
@old_index = @status_window.index
@new_actor = $game_party.actors[@status_window.index]
@actor_change = true
end
return
end
end
end

#==============================================================================
# â–  Scene_Battle (Part 1)
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
# ● main
#--------------------------------------------------------------------------
def main
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
$game_system.battle_interpreter.setup(nil, 0)
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
#memorize actors in party and cut the party down to 4 actors
@party_mem = $game_party.actors
$game_party.actors = $game_party.actors[0..3]
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
@spriteset = Spriteset_Battle.new
@wait_count = 0
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
start_phase1
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
$game_map.refresh
Graphics.freeze
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
@spriteset.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end
#--------------------------------------------------------------------------
# ● battle end
#--------------------------------------------------------------------------
def battle_end(result)
$game_temp.in_battle = false
$game_party.clear_actions
for actor in $game_party.actors
actor.remove_states_battle
end
$game_troop.enemies.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
$game_party.actors = @party_mem
$scene = Scene_Map.new
end
end
 

khmp

Sponsor

You have an odd problem friend. I've tested it after updating the SDK section from 1.5 to 2.1 of your game and I got the same error Kaze mentioned. I did not get the error involving a nil party member. Those globals however need to be intialized. To resolve this issue at the top of the squallparty script add these two lines:

Code:
$fontface = 'Arial'
$fontsize = 22

Good luck with it m_artist200! :thumb:
 
Hrm....where do I add said lines in the script?

:-/ also, in the event I completely botched up my rmxp copy somehow (yes, its the legal copy), can you upload the fixed version w/ the script changes? There -might- be something wrong with my rmxp copy, but to just to double check. If it works fine on your end, but not on mine, and it has NOTHING to do with my lack of script-literacy, i might end up trying to reinstall my copy.

Also, sorry to ask again, but do you have the link to the updated SDK kit? The latest version i can find is 1.6, not 2.1.

Thanks for the help thus far.
 

khmp

Sponsor

SDK is apparently up to version 2.3 not 2.1 like I said :)
http://www.creationasylum.net/index.php?showtopic=7481

If your project copy is screwed just download the demo you upped at megaupload. ;)

Lastly those two lines of code can go at the very top of the squall-party script. So here's the entire script with those two lines at the top.

Code:
# script made by squall from rmxp.net / squall@loeher.zzn.com

# don't really need to give me credit for this.

# please paste the script in a new section ABOVE "main"

# this allow to have an unlimited number of actor in party.

# to change the max actors that can be in the party look just below.

# the party is cut down to 4 actor in battles

# some windows are compacted or re-made to fit with some other ones. those are

# Window_Gold and Window_PlayTime. feel free to remove them if you don't like

# the way they are...

# Enjoy!

$fontface = 'Arial'
$fontsize = 22

#==============================================================================
# â–  Game_Party
#==============================================================================

class Game_Party
 #--------------------------------------------------------------------------
 # ● define instance variable
 #--------------------------------------------------------------------------
 attr_accessor :actors
 #--------------------------------------------------------------------------
 # ● add an actor to the party the number (red) is 
 #    the max actors to be in party
 #--------------------------------------------------------------------------
 def add_actor(actor_id)
   actor = $game_actors[actor_id]
   if @actors.size < 200 and not @actors.include?(actor)
     @actors.push(actor)
     $game_player.refresh
   end
 end
end

#==============================================================================
# â–  Window_Base
#==============================================================================

class Window_Base < Window
 #--------------------------------------------------------------------------
 # ● draw character's battle sprite
 #--------------------------------------------------------------------------
 def draw_actor_battlegraphic(actor, x, y, opacity = 255)
   bitmap = RPG::Cache.battler(actor.character_name, actor.character_hue)
   src_rect = Rect.new(0, 0, 111, 111)
   self.contents.blt(x, y, bitmap, src_rect, opacity)
 end
 #--------------------------------------------------------------------------
 # ● draw character's HP meter
 #--------------------------------------------------------------------------
 def draw_actor_hp_meter(actor, x, y, width = 70, type = 0)
   if type == 1 and actor.hp == 0
     return
   end
   self.contents.font.color = system_color
   self.contents.fill_rect(x-1, y+27, width+2,5, Color.new(0, 0, 0, 255))
   w = width * actor.hp / actor.maxhp
   self.contents.fill_rect(x, y+28, w,1, Color.new(174, 68, 89, 255))
   self.contents.fill_rect(x, y+29, w,1, Color.new(156, 61, 80, 255))
   self.contents.fill_rect(x, y+30, w,1, Color.new(138, 53, 70, 255))
 end
 #--------------------------------------------------------------------------
 # ● draw character's SP meter
 #--------------------------------------------------------------------------
 def draw_actor_sp_meter(actor, x, y, width = 70, type = 0)
   if type == 1 and actor.sp == 0
     return
   end
   self.contents.font.color = system_color
   self.contents.fill_rect(x-1, y+27, width+2,5, Color.new(0, 0, 0, 255))
   w = width * actor.sp / actor.maxsp
   self.contents.fill_rect(x, y+28, w,1, Color.new(62, 72, 164, 255))
   self.contents.fill_rect(x, y+29, w,1, Color.new(55, 65, 149, 255))
   self.contents.fill_rect(x, y+30, w,1, Color.new(49, 57, 130, 255))
 end
 #--------------------------------------------------------------------------
 # ● define method to draw squares
 #--------------------------------------------------------------------------
 def draw_square(x, y, width, color)
   self.contents.fill_rect(x, y, width, 1, color)
   self.contents.fill_rect(x, y, 1, width, color)
   self.contents.fill_rect(x + width, y, 1, width + 1, color)
   self.contents.fill_rect(x, y + width, width + 1, 1, color)
 end
end

#==============================================================================
# â–  Window_Gold
#------------------------------------------------------------------------------
#  in this one the text has been replaced by an icon. ^^
#==============================================================================

class Window_Gold < Window_Base
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = 'Arial'
   self.contents.font.size = 22
   refresh
 end
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   cx = 24
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
   self.contents.font.color = system_color
   bitmap = RPG::Cache.icon("032-Item01")
   rect = Rect.new(0, 0, 24, 24)
   self.contents.blt(124-cx, 0, bitmap, rect)
 end
end

#==============================================================================
# â–  Window_PlayTime
#------------------------------------------------------------------------------
#  This window has been compacted a bit to show every command in the menu
#==============================================================================

class Window_PlayTime < Window_Base
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   refresh
 end
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   @total_sec = Graphics.frame_count / Graphics.frame_rate
   hour = @total_sec / 60 / 60
   min = @total_sec / 60 % 60
   sec = @total_sec % 60
   text = sprintf("%02d:%02d:%02d", hour, min, sec)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 0, 120, 32, text, 2)
 end
 #--------------------------------------------------------------------------
 # ● redefine update method
 #--------------------------------------------------------------------------
 def update
   super
   if Graphics.frame_count / Graphics.frame_rate != @total_sec
     refresh
   end
 end
end

#==============================================================================
# â–  Window_MenuStatus
#==============================================================================

class Window_MenuStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 480, 480)
   @column_max = 4
   @item_max = $game_party.actors.size
   self.contents = Bitmap.new(width - 32, row_max * 112)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize/1.2
   refresh
   self.active = false
   self.index = -1
 end
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   for i in 0...$game_party.actors.size
     x = i % 4 * 112
     y = i / 4 * 112
     actor = $game_party.actors[i]
     #draw a square to seperate chars, change disabled color with whatever
     #color you want... (method to draw square is below...)
     draw_square(x, y, 111, disabled_color) 
     draw_actor_battlegraphic(actor, x, y, 50)
     draw_actor_graphic(actor, x + 90, y + 50)
     draw_actor_name(actor, x + 5, y)
     self.contents.draw_text(x + 5, y + 20, 112, 32, "HP : #{actor.hp}")
     self.contents.draw_text(x + 5, y + 40, 112, 32, "MP : #{actor.sp}")
     draw_actor_level(actor, x + 5, y + 60)
     draw_actor_state(actor, x + 5, y + 80)
     draw_actor_hp_meter(actor, x + 5, y + 17)
     draw_actor_sp_meter(actor, x + 5, y + 37)
   end
 end
 #--------------------------------------------------------------------------
 # ● define the page's top row
 #--------------------------------------------------------------------------
 def top_row
   return self.oy / 112
 end
 #--------------------------------------------------------------------------
 # ● define the page maximum rows
 #--------------------------------------------------------------------------
 def page_row_max
   return (self.height - 32) / 112
 end
 #--------------------------------------------------------------------------
 # ● defines a method to change the page's top row
 #--------------------------------------------------------------------------
 def top_row=(row)
   if row < 0
     row = 0
   end
   if row > row_max - 1
     row = row_max - 1
   end
   self.oy = row * 112
 end
 #--------------------------------------------------------------------------
 # ● update the cursor movement
 #--------------------------------------------------------------------------
 def update_cursor_rect
   if @index < 0
     self.cursor_rect.empty
     return
   end
   row = @index / @column_max
   if row < self.top_row
     self.top_row = row
   end
   if row > self.top_row + (self.page_row_max - 1)
     self.top_row = row - (self.page_row_max - 1)
   end
   self.cursor_rect.set(@index % 4 * 112, @index / 4 * 112 - self.oy, 112, 112)
 end
end


#==============================================================================
# â–  Window_Target
#==============================================================================

class Window_Target < Window_Selectable
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 336, 480)
   @column_max = 2
   @item_max = $game_party.actors.size
   self.contents = Bitmap.new(width - 32, row_max * 112)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize/1.2
   self.z += 10
   refresh
 end
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   for i in 0...$game_party.actors.size
     x = i % 2 * 112 + 36
     y = i / 2 * 112
     actor = $game_party.actors[i]
     #draw a square to seperate chars, change disabled color with whatever
     #color you want... (method to draw square is below...)
     draw_square(x, y, 111, disabled_color) 
     draw_actor_battlegraphic(actor, x, y, 50)
     draw_actor_graphic(actor, x + 90, y + 50)
     draw_actor_name(actor, x + 5, y)
     self.contents.draw_text(x + 5, y + 20, 112, 32, "HP : #{actor.hp}")
     self.contents.draw_text(x + 5, y + 40, 112, 32, "MP : #{actor.sp}")
     draw_actor_level(actor, x + 5, y + 60)
     draw_actor_state(actor, x + 5, y + 80)
     draw_actor_hp_meter(actor, x + 5, y + 17)
     draw_actor_sp_meter(actor, x + 5, y + 37)
   end
 end
 #--------------------------------------------------------------------------
 # ● define the page's top row
 #--------------------------------------------------------------------------
 def top_row
   return self.oy / 112
 end
 #--------------------------------------------------------------------------
 # ● define the page maximum rows
 #--------------------------------------------------------------------------
 def page_row_max
   return (self.height - 32) / 112
 end
 #--------------------------------------------------------------------------
 # ● defines a method to change the page's top row
 #--------------------------------------------------------------------------
 def top_row=(row)
   if row < 0
     row = 0
   end
   if row > row_max - 1
     row = row_max - 1
   end
   self.oy = row * 112
 end
 #--------------------------------------------------------------------------
 # ● update the cursor movement
 #--------------------------------------------------------------------------
 def update_cursor_rect
   row = @index / @column_max
   if row < self.top_row
     self.top_row = row
   end
   if row > self.top_row + (self.page_row_max - 1)
     self.top_row = row - (self.page_row_max - 1)
   end
   if @index <= -2
     self.cursor_rect.empty
   elsif @index == -1
     self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
   else
     self.cursor_rect.set(@index % 2 * 112 + 36, @index / 2 * 112 - self.oy, 112, 112)
   end
 end
end

#==============================================================================
# â–  Scene_Menu
#==============================================================================

class Scene_Menu
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
   @actor_change = false
 end
 #--------------------------------------------------------------------------
 # ● main
 #--------------------------------------------------------------------------
 def main
   s1 = $data_system.words.item
   s2 = $data_system.words.skill
   s3 = $data_system.words.equip
   s4 = "Status"
   s5 = "Save"
   s6 = "End Game"
   s7 = "Party"
   @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
   @command_window.index = @menu_index
   if $game_party.actors.size == 0
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
   end
   if $game_system.save_disabled
     @command_window.disable_item(4)
   end
   @playtime_window = Window_PlayTime.new
   @playtime_window.x = 0
   @playtime_window.y = 256 #224
   
   @steps_window = Window_Steps.new
   @steps_window.x = 0
   @steps_window.y = 320

   @gold_window = Window_Gold.new
   @gold_window.x = 0
   @gold_window.y = 416

   @status_window = Window_MenuStatus.new
   @status_window.x = 160
   @status_window.y = 0
   
   Graphics.transition

   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze

   @command_window.dispose
   @playtime_window.dispose
   @steps_window.dispose
   @gold_window.dispose
   @status_window.dispose
 end
 #--------------------------------------------------------------------------
 # ● update the windows
 #--------------------------------------------------------------------------
 def update
   @command_window.update
   @playtime_window.update
   @steps_window.update
   @gold_window.update
   @status_window.update

   if @command_window.active
     update_command
     return
   end
   if @status_window.active
     update_status
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● update the command window
 #--------------------------------------------------------------------------
 def update_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     if $game_party.actors.size == 0 and @command_window.index < 4
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     case @command_window.index
     when 0  # Item
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Item.new
     when 1  # Skill
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2  # Equip
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3  # Status
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4  # Save
       if $game_system.save_disabled
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new
     when 5  # End
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_End.new
     when 6 # party actors switch
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● update the status window
 #--------------------------------------------------------------------------
 def update_status
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     @actor_change = false
     return
   end
   if Input.trigger?(Input::C)
     case @command_window.index
     when 1  # Skill
       if $game_party.actors[@status_window.index].restriction >= 2
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Skill.new(@status_window.index)
     when 2  # Equip
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Equip.new(@status_window.index)
     when 3  # Status
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Status.new(@status_window.index)
     when 6 # party actors switch
       if @actor_change == true
         $game_party.actors[@old_index] = $game_party.actors[@status_window.index]
         $game_party.actors[@status_window.index] = @new_actor
         @actor_change = false
         @status_window.refresh
         return
       end
       @old_index = @status_window.index
       @new_actor = $game_party.actors[@status_window.index]
       @actor_change = true
     end
     return
   end
 end
end

#==============================================================================
# â–  Scene_Battle (Part 1)
#==============================================================================

class Scene_Battle
 #--------------------------------------------------------------------------
 # ● main
 #--------------------------------------------------------------------------
 def main
   $game_temp.in_battle = true
   $game_temp.battle_turn = 0
   $game_temp.battle_event_flags.clear
   $game_temp.battle_abort = false
   $game_temp.battle_main_phase = false
   $game_temp.battleback_name = $game_map.battleback_name
   $game_temp.forcing_battler = nil
   $game_system.battle_interpreter.setup(nil, 0)
   @troop_id = $game_temp.battle_troop_id
   $game_troop.setup(@troop_id)
   #memorize actors in party and cut the party down to 4 actors
   @party_mem = $game_party.actors
   $game_party.actors = $game_party.actors[0..3]
   s1 = $data_system.words.attack
   s2 = $data_system.words.skill
   s3 = $data_system.words.guard
   s4 = $data_system.words.item
   @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
   @actor_command_window.y = 160
   @actor_command_window.back_opacity = 160
   @actor_command_window.active = false
   @actor_command_window.visible = false
   @party_command_window = Window_PartyCommand.new
   @help_window = Window_Help.new
   @help_window.back_opacity = 160
   @help_window.visible = false
   @status_window = Window_BattleStatus.new
   @message_window = Window_Message.new
   @spriteset = Spriteset_Battle.new
   @wait_count = 0
   if $data_system.battle_transition == ""
     Graphics.transition(20)
   else
     Graphics.transition(40, "Graphics/Transitions/" +
       $data_system.battle_transition)
   end
   start_phase1
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   $game_map.refresh
   Graphics.freeze
   @actor_command_window.dispose
   @party_command_window.dispose
   @help_window.dispose
   @status_window.dispose
   @message_window.dispose
   if @skill_window != nil
     @skill_window.dispose
   end
   if @item_window != nil
     @item_window.dispose
   end
   if @result_window != nil
     @result_window.dispose
   end
   @spriteset.dispose
   if $scene.is_a?(Scene_Title)
     Graphics.transition
     Graphics.freeze
   end
   if $BTEST and not $scene.is_a?(Scene_Gameover)
     $scene = nil
   end
 end
 #--------------------------------------------------------------------------
 # ● battle end
 #--------------------------------------------------------------------------
 def battle_end(result)
   $game_temp.in_battle = false
   $game_party.clear_actions
   for actor in $game_party.actors
     actor.remove_states_battle
   end
   $game_troop.enemies.clear
   if $game_temp.battle_proc != nil
     $game_temp.battle_proc.call(result)
     $game_temp.battle_proc = nil
   end
   $game_party.actors = @party_mem
   $scene = Scene_Map.new
 end
end
 
...I feel like a n00b for asking this, but where is this script thats mentioned in the instructions?

B2) Copy and paste all the text in the document in your script editor below the MACL Setup.
I've got no idea right now what the MACL setup is...

Also, i did the changes listed to the Squall-party with the un-updated SDK script and i'm still getting the error:

Script 'Game_party' line 293: NoMethodError occured
undefined method 'each' for nil:NilClass

Does this go away with the updated SDK?
 

khmp

Sponsor

Ahh no problem. I don't believe you need the Method and Class Library. To use the SDK that's just an option. What they mean by copying the text from the documentation into your script listing is copying. So copy everything inside 'The RMXP Standard Development Kit 2.3 Complete.txt' and in your game in the script listing section create an open slot right below Scene_Debug. Paste the code into that open slot.

You should delete the older version that you have after all is said and done. If you still get the error just post the newer version of your demo.
 
Well, it turns out i was getting the same error because I forgot to remove the CBS that I was originally had (the one listed in the first post). Once I removed that....
...well, I got this
This seems to only occur when the 3rd and 4th sections of the SDK 2.3 are active. Basically, none of the battlers, actions, or anything else are showing up or moving. It doesn't seem to have frozen, but...

When I disable these two scripts, it reverts back to the standard battle system. I was hoping it would operate with a agility-based cogwheel that I thought was included with the SDK....was I wrong?


http://www.megaupload.com/?d=LD55TUJC
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top