Victory counter in menu
#1
Victory counter in menu
by garfunkle
Jan 5 2006

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


This is a really easy edit that will be good for beginner scripters like me.


Above main create Window_Victory and place this code inside it

Code:
#==============================================================================
# ¦ Window_Victory
#------------------------------------------------------------------------------
# ??????????????????????
#==============================================================================

class Window_Victory < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Number of Victorys" window font
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Victorys")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_variables[2].to_s, 2)
end
end

Then go to Scene_Menu and find line 45-48

Code:
REPLACE

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



WITH

# Make victory window
@victory_window = Window_Victory.new
@victory_window.x = 0
@victory_window.y = 320

Still in Scene_Menu find line 77

Code:
REPLACE

@steps_window.dispose



WITH

@victory_window.dispose

Then find line 88

Code:
REPLACE

@steps_window.update


WITH

@victory_window.update




NOTE by GoldenShadow: it doesn't count anything. I'll tell you when it counts:

Code:
REPLACE

#--------------------------------------------------------------------------
  # * Battle Ends
  #     result : results (0:win 1:lose 2:escape)
  #--------------------------------------------------------------------------
  def battle_end(result)
    # Clear in battle flag
    $game_temp.in_battle = false
    # Clear entire party actions flag
    $game_party.clear_actions
    # Remove battle states
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    # Clear enemies
    $game_troop.enemies.clear
    # Call battle callback
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(result)
      $game_temp.battle_proc = nil
    end
    # Switch to map screen
    $scene = Scene_Map.new
  end

WITH

#--------------------------------------------------------------------------
  # * Battle Ends
  #     result : results (0:win 1:lose 2:escape)
  #--------------------------------------------------------------------------
  def battle_end(result)
    # Clear in battle flag
    $game_temp.in_battle = false
    # Clear entire party actions flag
    $game_party.clear_actions
    # Remove battle states
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    # Clear enemies
    $game_troop.enemies.clear
    # Call battle callback
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(result)
      $game_temp.battle_proc = nil
    end
    # Switch to map screen
    $game_variables[2] += 1  ############ <== Added line
    $scene = Scene_Map.new
  end

NOW it counts. Next time, take SephirothSpawn serious, he's a master in scripts.
If he says it's not counting, it ain't counting. Say, wasn't there another guy who made
something like this before? It's so vague...
Anyway, good work so far, garfunkle!

Peace.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fyre < Status Menu FyreXKnight 0 2,688 07-01-2008, 01:00 PM
Last Post: FyreXKnight
  Run Common Events in Menu GubiD 0 2,515 08-12-2007, 01:00 PM
Last Post: GubiD
  GameOver Menu sasuke89 0 2,438 09-18-2006, 01:00 PM
Last Post: sasuke89
  GameOver Menu Script sasuke89 0 2,486 06-08-2006, 01:00 PM
Last Post: sasuke89
  Ten items in equip menu! Jimmie 0 2,663 08-13-2005, 01:00 PM
Last Post: Jimmie
  Bag item menu rune76 0 2,230 08-12-2005, 01:00 PM
Last Post: rune76



Users browsing this thread: 1 Guest(s)