The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: fadark on January 30, 2007, 02:16:26 AM

Title: Can anyone make a script that.....
Post by: fadark on January 30, 2007, 02:16:26 AM
I need a cms. The format of it is at the following link: http://www.freewebs.com/thedarkcoven/rmxpcms.htm (http://www.freewebs.com/thedarkcoven/rmxpcms.htm)

If anyone can help, thanks!
Title: Re: Can anyone make a script that.....
Post by: fadark on January 30, 2007, 02:18:32 AM
This cms is very important that it is exactly how I put it.
Title: Re: Can anyone make a script that.....
Post by: italianstal1ion on January 30, 2007, 05:30:07 AM
try using http://www.photobucket.com or imageshack
Title: Re: Can anyone make a script that.....
Post by: fadark on February 01, 2007, 12:26:49 AM
I need a cms. The format of it is at the following link: http://www.freewebs.com/thedarkcoven/rmxpcms.htm

If anyone can help, thanks!
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 01, 2007, 01:31:16 AM
I follow the link and can't see the picture.  :-[
Title: Re: Can anyone make a script that.....
Post by: italianstal1ion on February 01, 2007, 02:45:03 AM
Quote from: fadark on February 01, 2007, 12:26:49 AM
I need a cms. The format of it is at the following link: http://www.freewebs.com/thedarkcoven/rmxpcms.htm

If anyone can help, thanks!

Yeah, copy pasting the same unworking link over and over isnt going to get you anywhere. Thats why I said
Quote from: italianstal1ion on January 30, 2007, 05:30:07 AM
try using http://www.photobucket.com or imageshack
Use one of those. It will take one minute, and someone might even take your request.
Title: Re: Can anyone make a script that.....
Post by: &&&&&&&&&&&&& on February 01, 2007, 05:20:38 AM
I think it's a trap. He seems pretty set on us using the link.

And no, I'm not kidding...
Title: Re: Can anyone make a script that.....
Post by: fadark on February 01, 2007, 04:47:30 PM
QuoteI follow the link and can't see the picture.  Embarrassed

your right1 when i posted it, it worked, but not any more i guess. i'll use that image shack thing.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 01, 2007, 05:00:48 PM
Here: (Thanks for the image shack btw!  :D)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg02.picoodle.com%2Fimg%2Fimg02%2F7%2F2%2F1%2Ff_figurenesi_de2bm_07e3538.png&hash=d3ee1e2126ed9775d951e5d27f1c8c6dfbe807b7) (http://www.picoodle.com/view.php?srv=img02&img=/7/2/1/f_figurenesi_de2bm_07e3538.png)

Ignore the numbers and arrows.
And I don't want a "save" button.
Thanks!
Title: Re: Can anyone make a script that.....
Post by: fadark on February 01, 2007, 05:05:41 PM
Btw: let's say I used a cms that showed the current chapter. How do I make the chapter change?

In other words: how do I have chapters in my game?
Title: Re: Can anyone make a script that.....
Post by: Snailer on February 01, 2007, 05:11:14 PM
Uhm.. a script.. ?

And ohw 1 thing




USE THE FREAKING EDIT BUTTON
Title: Re: Can anyone make a script that.....
Post by: Irock on February 01, 2007, 05:25:29 PM
He can't make it show the location of the map and the real time by editing.

And learn how to edit posts.
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 01, 2007, 09:29:03 PM
I'll give it a go. I am not particularly good at scripting, so if it's not what you want feel free to trash it and ask for another.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 01, 2007, 09:50:12 PM
QuoteAnd I don't want a "save" button.

Actually, I change my mind. I do want a save button. I hope you don't get mad for me changing my mind. Thanks!  :D
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 01, 2007, 11:21:48 PM
What is the name of the game?
Title: Re: Can anyone make a script that.....
Post by: fadark on February 02, 2007, 01:48:59 AM
QuoteWhat is the name of the game?

The name of the game is  "Light's Shadow"
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 02, 2007, 04:35:07 AM
Ok, it's done. It looks like this:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Ffarm1.static.flickr.com%2F147%2F377678173_2f0839f63f.jpg%3Fv%3D0&hash=0fe5a48549cbb2e99560ed8ce64c349f8db4a9a2)

  I'd suggest trying it in a new game to test it before putting into your main file. To use it, first find this line under "def initialize in the class: Window_Command

    super(0, 0, width, commands.size * 32 + 32)

and change it to:

    super(500, 205, width, commands.size * 32 + 32)


Then, in a new script above main, paste this code into it:

#==============================================================================
# ? Window_PlayTime
#------------------------------------------------------------------------------
# This window displays play time on the menu screen.
#==============================================================================

class Window_PlayTime < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 140, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -5, 120, 32, "Play Time")
    @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(-15, 15, 120, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 140, 54)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh

    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(-20, -5, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(104-cx, -5, cx, 32, $data_system.words.gold, 2)
  end
end

#Displays Real Time

class Window_RealTime < Window_Base

#Object Initialization
  def initialize
    super(0, 0, 140, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
#Refresh
  def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(10, -5, 120, 32, "Real Time")
   @time_string = Time.now
   text = @time_string.strftime("%A %H:%M:%S")
   self.contents.font.color = normal_color
   self.contents.draw_text(-3, 20, 110, 32, text, 2)
  end
#Time changes in menu
    def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#     Displays Location in Menu

class Window_Location < Window_Base

def initialize
   super(0, 0, 500, 50)
   self.contents = Bitmap.new(width - 32, height - 32)
   refresh
end
def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   $data_location = load_data("Data/MapInfos.rxdata")
   self.contents.draw_text(200, -9, 124, 32, $data_location[$game_map.map_id].name, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(0, -9, 120, 32, "Location")
end
end

# Displays Game Name

class Window_GameName < Window_Base

  def initialize
    super(0, 0, 500, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.draw_text(100, -9, 120, 32, "Light's Shadow")
  end
end


# Displays the Word "Menu"


class Window_MenuWord < Window_Base

  def initialize
    super(0, 0, 140, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.font.color = crisis_color
    self.contents.draw_text(10, -10, 120, 32, "Menu")
  end
end

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 500, 400)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def draw_actor_battler(actor, x, y, opacity = 255)
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
     cw = bitmap.width
     ch = bitmap.height
     src_rect = Rect.new(0, 0, cw, ch)
     x = i * 120
     y = 180
  self.contents.blt(x, y, bitmap, src_rect, opacity)
   end
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 118
      y = 0
      actor = $game_party.actors[i]
      draw_actor_battler(actor, x, y - 10)
      self.contents.font.color = knockout_color
      self.contents.draw_text(x, -10, 45, 32, actor.name, 2)
      self.contents.font.color = normal_color
      draw_actor_class(actor, x, 15)
      draw_actor_state(actor, x, 40)
      draw_actor_level(actor, x, 110)
    # draw exp
    self.contents.font.color = system_color
    self.contents.draw_text(x, 130, 80, 32, "Exp")
    self.contents.draw_text(x, 150, 80, 32, "Next Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 20, 130, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 20, 150, 84, 32, actor.next_rest_exp_s, 2)
    # draw hp
       self.contents.font.color = system_color
    self.contents.draw_text(x, 65, 32, 32, "HP") 
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
     self.contents.draw_text(x + 10, 65, 48, 32, actor.hp.to_s, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 60, 65, 12, 32, "/", 1)
      self.contents.draw_text(x + 75, 65, 48, 32, actor.maxhp.to_s)
    #draw sp
    self.contents.font.color = system_color
    self.contents.draw_text(x, 85, 32, 32, "SP") 
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
     self.contents.draw_text(x + 10, 85, 48, 32, actor.sp.to_s, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 60, 85, 12, 32, "/", 1)
      self.contents.draw_text(x + 75, 85, 48, 32, actor.maxsp.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 118, 0, 118, 400)
    end
  end
end


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # ????????????
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "Exit"
    @command_window = Window_Command.new(140, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index 
    # If # Party Members = 0
    if $game_party.actors.size == 0
      # Disable Items, Skills, Equipment, and Status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If Save is Forbidden
    if $game_system.save_disabled
      # Disable Save
      @command_window.disable_item(4)
    end
    # Displays Play Time
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 500
    @playtime_window.y = 50
    # Displays the "Word Menu" Window
    @wordmenu_window = Window_MenuWord.new
    @wordmenu_window.x = 500
    @wordmenu_window.y = 0
    # Displays the Gold Window
    @gold_window = Window_Gold.new
    @gold_window.x = 500
    @gold_window.y = 426
    # The Menu Status Screen
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # Game Name Window
    @gamename_window = Window_GameName.new
    @gamename_window.x = 0
    @gamename_window.y = 400
    # Location Window
    @map_window = Window_Location.new
    @map_window.x = 0
    @map_window.y = 440
    # Real Time Window
    @realtime_window = Window_RealTime.new
    @realtime_window.x = 500
    @realtime_window.y = 130
    # Execute Transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @wordmenu_window.dispose
    @map_window.dispose
    @realtime_window.dispose
    @gamename_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    @map_window.update
    @realtime_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end


Ok, that's it. If there are any errors or it isn't the way you want it, just message and I'll work it out. You may notice that there are some duplicate classes which I made minor changes to. If you like, you can delete the original classes of the same name. Also, when you want to go to Status or Skills you use the UP and DOWN arrow keys, not the LEFT and RIGHT. I know, it's a little anti-intuitive, but I didn't want to touch that tonight.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 02, 2007, 10:42:27 PM
I can see the battlers and the menu selecting works fine.


But the word: "menu",
the real time,
the play time,
the gold,
the heroes' stats (hp, sp, level, exp for next level etc.)(in other words: the stuff that's supossed to be above the battler)
the game title,
and the location are blank.  :( ???
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 02, 2007, 10:58:53 PM
It must have something to do with fonts. Here's a demo. Tell me if it doesn't work and if it does, I should be able to find the problem with yours.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 03, 2007, 03:58:49 AM
I download it but it keeps trying to open with microsoft publisher.  ???
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 03, 2007, 08:07:32 AM
That's strange. It shouldn't matter if you open it from RPG Maker though. Just open it from within the program. I think the problem has to do with undefined fonts though. In any case, just give me ffedback once you open it.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 03, 2007, 04:38:42 PM
I think it's the font
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 03, 2007, 05:03:10 PM
Yeah, try replacing the entire script with this:


#==============================================================================
# ? Window_PlayTime
#------------------------------------------------------------------------------
# This window displays play time on the menu screen.
#==============================================================================

class Window_PlayTime < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 140, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.size = 20
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -5, 120, 32, "Play Time")
    @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(-15, 15, 120, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 140, 54)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.size = 20
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh

    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(-20, -5, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(104-cx, -5, cx, 32, $data_system.words.gold, 2)
  end
end

#Displays Real Time

class Window_RealTime < Window_Base

#Object Initialization
  def initialize
    super(0, 0, 140, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
#Refresh
  def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(10, -5, 120, 32, "Real Time")
   @time_string = Time.now
   text = @time_string.strftime("%A %H:%M:%S")
   self.contents.font.color = normal_color
   self.contents.draw_text(-3, 20, 110, 32, text, 2)
  end
#Time changes in menu
    def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#     Displays Location in Menu

class Window_Location < Window_Base

def initialize
   super(0, 0, 500, 50)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.size = 20
   refresh
end
def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   $data_location = load_data("Data/MapInfos.rxdata")
   self.contents.draw_text(200, -9, 124, 32, $data_location[$game_map.map_id].name, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(0, -9, 120, 32, "Location")
end
end

# Displays Game Name

class Window_GameName < Window_Base

  def initialize
    super(0, 0, 500, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.draw_text(100, -9, 120, 32, "Light's Shadow")
  end
end


# Displays the Word "Menu"


class Window_MenuWord < Window_Base

  def initialize
    super(0, 0, 140, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.font.color = crisis_color
    self.contents.draw_text(10, -10, 120, 32, "Menu")
  end
end

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 500, 400)
    self.contents = Bitmap.new(width - 32, height - 32)  # "Main" window font
    self.contents.font.size = 20
    refresh
    self.active = false
    self.index = -1
  end
  def draw_actor_battler(actor, x, y, opacity = 255)
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
     cw = bitmap.width
     ch = bitmap.height
     src_rect = Rect.new(0, 0, cw, ch)
     x = i * 120
     y = 180
  self.contents.blt(x, y, bitmap, src_rect, opacity)
   end
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 118
      y = 0
      actor = $game_party.actors[i]
      draw_actor_battler(actor, x, y - 10)
      self.contents.font.color = knockout_color
      self.contents.draw_text(x, -9, 45, 32, actor.name, 2)
      self.contents.font.color = normal_color
      draw_actor_class(actor, x, 15)
      draw_actor_state(actor, x, 40)
      draw_actor_level(actor, x, 110)
    # draw exp
      self.contents.font.color = system_color
      self.contents.draw_text(x, 130, 80, 32, "Exp")
      self.contents.draw_text(x, 150, 80, 32, "Next Level")
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 20, 130, 84, 32, actor.exp_s, 2)
      self.contents.draw_text(x + 20, 150, 84, 32, actor.next_rest_exp_s, 2)
    # draw hp
      self.contents.font.color = system_color
      self.contents.draw_text(x, 65, 32, 32, "HP") 
      self.contents.font.color = actor.hp == 0 ? knockout_color :
    actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
      self.contents.draw_text(x + 10, 65, 48, 32, actor.hp.to_s, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 60, 65, 12, 32, "/", 1)
      self.contents.draw_text(x + 75, 65, 48, 32, actor.maxhp.to_s)
    #draw sp
      self.contents.font.color = system_color
      self.contents.draw_text(x, 85, 32, 32, "SP") 
      self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
     self.contents.draw_text(x + 10, 85, 48, 32, actor.sp.to_s, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 60, 85, 12, 32, "/", 1)
      self.contents.draw_text(x + 75, 85, 48, 32, actor.maxsp.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 118, 0, 118, 400)
    end
  end
end


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # ????????????
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "Exit"
    @command_window = Window_Command.new(140, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index 
    # If # Party Members = 0
    if $game_party.actors.size == 0
      # Disable Items, Skills, Equipment, and Status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If Save is Forbidden
    if $game_system.save_disabled
      # Disable Save
      @command_window.disable_item(4)
    end
    # Displays Play Time
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 500
    @playtime_window.y = 50
    # Displays the "Word Menu" Window
    @wordmenu_window = Window_MenuWord.new
    @wordmenu_window.x = 500
    @wordmenu_window.y = 0
    # Displays the Gold Window
    @gold_window = Window_Gold.new
    @gold_window.x = 500
    @gold_window.y = 426
    # The Menu Status Screen
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # Game Name Window
    @gamename_window = Window_GameName.new
    @gamename_window.x = 0
    @gamename_window.y = 400
    # Location Window
    @map_window = Window_Location.new
    @map_window.x = 0
    @map_window.y = 440
    # Real Time Window
    @realtime_window = Window_RealTime.new
    @realtime_window.x = 500
    @realtime_window.y = 130
    # Execute Transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @wordmenu_window.dispose
    @map_window.dispose
    @realtime_window.dispose
    @gamename_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    @map_window.update
    @realtime_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
Title: Re: Can anyone make a script that.....
Post by: fadark on February 03, 2007, 07:41:57 PM
QuoteYeah, try replacing the entire script with this:

Same problem as before (nothing changed)
Title: Re: Can anyone make a script that.....
Post by: Blizzard on February 03, 2007, 07:52:24 PM
Add this scripted part here in main under "begin":

Font.default_name = $defaultfonttype = $fontface = "FONTNAME"
Font.default_size = $defaultfontsize = $fontsize = SIZE


If there is already something similar like this ($fontface, etc.), replace it.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 03, 2007, 10:38:07 PM
My main looks like this:

#==============================================================================
# ? Main
#------------------------------------------------------------------------------
# ???????????????????????????????
#==============================================================================

begin

# This variable determines the default font type
  $defaultfonttype = "Tahoma"
  # This variable determines the default font size
  $defaultfontsize = 22

  # ?????????
  Graphics.freeze
  # ????????? (??????) ???
  $scene = Scene_Title.new
  # $scene ?????? main ?????????
  while $scene != nil
    $scene.main
  end
  # ???????
  Graphics.transition(20)
rescue Errno::ENOENT
  # ?? Errno::ENOENT ???
  # ????????????????????????????????
  filename = $!.message.sub("No such file or directory - ", "")
  print("File #{filename} not found.")
end


what do you want me to replace?
(in other words: whats the format?)


(btw, i'm glad your here bliz :) )
Title: Re: Can anyone make a script that.....
Post by: Blizzard on February 04, 2007, 03:17:35 PM
No problem. :) Replace these lines:

# This variable determines the default font type
  $defaultfonttype = "Tahoma"
  # This variable determines the default font size
  $defaultfontsize = 22


with these here:

Font.default_name = $defaultfonttype = $fontface = "Tahoma"
Font.default_size = $defaultfontsize = $fontsize = 22

Title: Re: Can anyone make a script that.....
Post by: fadark on February 04, 2007, 03:56:49 PM
Holy crap! Thanks a ton to bliz and modern algebra! Thanks guys! now that my game is done, do you two want it? It's my first game so it's only like 5 hours long. :(

Do you guys want to try it out?
Title: Re: Can anyone make a script that.....
Post by: Blizzard on February 04, 2007, 04:21:23 PM
Wow, 5 hours, that's actually not little.
You should post a topic in the Projects/Games section.
Title: Re: Can anyone make a script that.....
Post by: modern algebra on February 04, 2007, 04:32:05 PM
Yeah, post it. I'd love to try it out. 5 hours is probably the perfect length for a game. I'm running into the problem that my game is far, far too long and nobody will ever want to play it. Yeah, and thanks Blizz for the troubleshooting - it was my first script.
Title: Re: Can anyone make a script that.....
Post by: fadark on February 05, 2007, 12:16:02 AM
okay
Title: Re: Can anyone make a script that.....
Post by: fadark on February 10, 2007, 03:43:05 PM
How do I post it?
Title: Re: Can anyone make a script that.....
Post by: kathis on February 10, 2007, 10:48:31 PM
Chapters.... well you could use a varible and then in the cms you could add a window section where it will have the current title of the chaper

self.contents.draw_text(2,0,120,32,  "Chapter",  0)
self.contents.draw_text(90,0,120,32,  $game_variables[1].to_s, 0)


Of course youw will have to inport the correct numbers such as the loction of the text to display and the varible.  (sorry didn't even realise there was 3 other pages when I posted this XD sorry ))
Title: Re: Can anyone make a script that.....
Post by: fadark on February 10, 2007, 11:16:41 PM
lol, it's okay
Title: Re: Can anyone make a script that.....
Post by: Me™ on February 11, 2007, 11:24:04 AM
Nice site...

<img src="file:///C:%5CDOCUME%7E1%5COwner%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_image002.jpg"

yeah.. that will work -_-
Title: Re: Can anyone make a script that.....
Post by: fadark on February 11, 2007, 03:55:18 PM
Quote<img src="file:///C:%5CDOCUME%7E1%5COwner%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_image002.jpg"


what is the code you just posted?
Title: Re: Can anyone make a script that.....
Post by: fadark on March 18, 2007, 02:07:52 PM
thanks!