[RESOLVED] can someone help me?

Started by dark-archangel, March 18, 2008, 12:01:39 pm

Previous topic - Next topic

dark-archangel

I asked blizz and he told me to post.I asked Juan and he couldn't....do someone know how can I resize the save & load screen  and make them transparent?

fugibo


Sally

he wants to make the screens transparent and a diffrent size

Juan

I know how to resize the window but not sure on transparenty. Pss when you asked I had to get ready for school.
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Nortos

sure but can you put an example done in paint or something of the size and transparent u mean the window is clear? Like no opacity

Juan

March 18, 2008, 05:07:29 pm #5 Last Edit: March 18, 2008, 05:13:47 pm by Juan
Hes using my menu system. the opacity is set to 200. So I'm prety sure thats what he wants. I finally figured the opacity thing out.
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Nortos

u didn't already know about opacity? Or did u mean that you didn't know wat he meant by transparent

Blizzard

I suggest an opacity of 192 or 160, though.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Juan

I couldn't figure figure where to add opacity.
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

dark-archangel

March 19, 2008, 07:23:48 am #9 Last Edit: March 19, 2008, 07:24:47 am by dark-archangel
This is the normal one


And I want something like this....



Oh and if someone could,can make the characters more appropiate..?

Blizzard

Window_FileStatus and I think Window_Help. Just check Scene_File.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

March 19, 2008, 02:48:05 pm #11 Last Edit: March 19, 2008, 03:40:50 pm by Fantasist
And what do you mean "make the characters more appropiate..?"
I think I'll give it a try. Do you want to use the title pic (or any pic, or no pic) as a background?

EDIT: nvm, I got what you said. See if this is what you want. Paste it in a new slot above Main.

Spoiler: ShowHide
#============================================================================
# ** Scene_File Visual Fix (requested by dark angel)
#------------------------------------------------------------------------------------------------------------------------
# by Fantasist
# Version 1.0
# 20-Mar-2008
#============================================================================

Scene_File_BG = 'title' # 'title' for title pic, name of pic in Pictures folder for other pic, nil for nothing
Scene_File_Win_Opacity = 160  # opacity of windows
Center_Help_Text = true  # whether the help text is centered or not. Set to true or false.

#==============================================================================
# ** Window_SaveFile
#==============================================================================

class Window_SaveFile < Window_Base
 
  attr_reader   :filename, :selected
 
  def initialize(file_index, filename)
    super(64, 64 + file_index % 4 * 104, 512, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Scene_File_Win_Opacity
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    name = "File#{@file_index + 1}"
    self.contents.draw_text(4, 0, 472, 32, name)
    @name_width = contents.text_size(name).width
    if @file_exist
      (0...@characters.size).each {|i|
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 260 - @characters.size * 32 + i * 48 - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      }
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 472, 32, time_string, 2)
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 472, 32, time_string, 2)
    end
  end
 
end

#==============================================================================
# ** Window_Help
#==============================================================================

class Window_Help < Window_Base
 
  def initialize
    w = $scene.is_a?(Scene_File) ? 512 : 640
    x = $scene.is_a?(Scene_File) ? 64 : 0
    super(x, 0, w, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Scene_File_Win_Opacity if $scene.is_a?(Scene_File)
  end
 
  alias fant_scene_file_win_size_fix_set_text set_text
  def set_text(txt, align=0)
    align = $scene.is_a?(Scene_File) && Center_Help_Text ? 1 : 0
    fant_scene_file_win_size_fix_set_text(txt, align)
  end
 
end

#==============================================================================
# ** Scene_File
#==============================================================================

class Scene_File
 
  alias fant_scene_file_win_size_fix_main main
  def main
    @bg = Sprite.new
    @bg.bitmap = get_title
    fant_scene_file_win_size_fix_main
    @bg.dispose
  end
 
  def get_title
    if Scene_File_BG == 'title'
      RPG::Cache.title($data_system.title_name) rescue Bitmap.new(32, 32)
    else
      RPG::Cache.picture(Scene_File_BG) rescue Bitmap.new(32, 32)
    end
  end
 
end


Screenshot:


The BG is optional. You can use the title pic, or any pic in the Pictures folder.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




dark-archangel

March 20, 2008, 07:23:16 am #12 Last Edit: March 20, 2008, 07:30:54 am by dark-archangel
nearly perfect.....
can more appropiate?
And I want to ask you....can you era that lines between the save files (on save & load)
In the main menu(new game,continue...) to have the back tile,and in game to have the back the respective of mine position(its a bit hard to explain)

Anyway thanks for what you done since now :)

Fantasist

Quotecan more appropiate?

You mean about the background picture?

Scene_File_BG = <picname>


<picname> can be:

1. name of the picture you want to use as background, placed in the Graphics/Pictures folder
2. 'title' - uses the title pic as background
3. nil - no background

QuoteAnd I want to ask you....can you era that lines between the save files (on save & load)
I don't quite get you. Lines between the File1, File2, ... windows? That's because of the windowskin. Try another winskin and see.

QuoteIn the main menu(new game,continue...) to have the back tile,and in game to have the back the respective of mine position(its a bit hard to explain)

I don't understand...
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




dark-archangel

in the load and save are some lines,between the files ....Can you make them to dissapear



I mean the caracters,the actors,when you save you have actors on save & load pag(like mine in file1)...
They're too far away one of each other,can you cutomize the distance between them?
(I don't think that it's becuz of windowskin,becuz I saw somewhere something like that withno lines between files)

And,in the main menu you have command(new,load game,exit) and you have a tile picture.
I want that when I load the game from the main menu to have the background the tile picture.But when I load or save in game,I want that it's background to be the map where I am....


Fantasist

Okay, I got it about the BG. But those lines are because of the windowskin borders. Since the windows are touching each other, the border lines get thicker in a manner of speaking. Try a windowskin without a border. I can make it so that the save/load scene uses different windowskin.

And the distance between the actors is customizable. I'll post the new script in a bit.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




dark-archangel

but how can I put a window skin to load & save screen and other in game


Anyway Thanks :)

Fantasist

Quotebut how can I put a window skin to load & save screen and other in game

I took care of that.

Here's the new code. I've added windowskin selection, and two options to customize the position of the actor sprites.

#============================================================================
# ** Scene_File Visual Fix (requested by dark-archangel)
#------------------------------------------------------------------------------------------------------------------------
# by Fantasist
# Version 1.1
# 20-Mar-2008
#============================================================================

Scene_File_Windowskin = 'normal'  # Windowskin for the windows in the save/load scene.
                                                    # 'normal' for using the regular skin, nil for no skin,
                                                    # and <name of the skin> for any windowskin you like
Scene_File_Win_Opacity = 160  # Opacity of windows.
Center_Help_Text = false  # Whether the help text is centered or not. Set to true or false.
Actor_Gap = 32  # Distance between character sprites. Default is 32.
Actor_Offset = 300  # Just try it out yourself, it's easier to know that way. Default is 300.

#==============================================================================
# ** Window_SaveFile
#==============================================================================

class Window_SaveFile < Window_Base
 
  attr_reader   :filename, :selected
 
  def initialize(file_index, filename)
    super(64, 64 + file_index % 4 * 104, 512, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Scene_File_Win_Opacity
    unless Scene_File_Windowskin == 'normal'
      self.windowskin = RPG::Cache.windowskin(Scene_File_Windowskin) rescue nil
    end
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    name = "File#{@file_index + 1}"
    self.contents.draw_text(4, 0, 472, 32, name)
    @name_width = contents.text_size(name).width
    if @file_exist
      (0...@characters.size).each {|i|
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = Actor_Offset - @characters.size * 32 + i * Actor_Gap - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      }
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 472, 32, time_string, 2)
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 472, 32, time_string, 2)
    end
  end
 
end

#==============================================================================
# ** Window_Help
#==============================================================================

class Window_Help < Window_Base
 
  def initialize
    w = $scene.is_a?(Scene_File) ? 512 : 640
    x = $scene.is_a?(Scene_File) ? 64 : 0
    super(x, 0, w, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Scene_File_Win_Opacity if $scene.is_a?(Scene_File)
    if $scene.is_a?(Scene_File) && Scene_File_Windowskin != 'normal'
      self.windowskin = RPG::Cache.windowskin(Scene_File_Windowskin) rescue nil
    end
  end
 
  alias fant_scene_file_win_size_fix_set_text set_text
  def set_text(txt, align=0)
    align = $scene.is_a?(Scene_File) && Center_Help_Text ? 1 : 0
    fant_scene_file_win_size_fix_set_text(txt, align)
  end
 
end

#==============================================================================
# ** Scene_File
#==============================================================================

class Scene_File
 
  alias fant_scene_file_win_size_fix_main main
  def main
    if self.is_a?(Scene_Load) && $scene.title
      @bg = Sprite.new
      @bg.bitmap = RPG::Cache.title($data_system.title_name)
    else
      @bg = Spriteset_Map.new
    end
    fant_scene_file_win_size_fix_main
    @bg.dispose
  end
 
end

#==============================================================================
# ** Scene_Title_Load
#==============================================================================

class Scene_Load
 
  attr_accessor :title
 
  alias fant_scene_file_win_size_fix_sl_init initialize
  def initialize
    @title = false
    fant_scene_file_win_size_fix_sl_init
  end
 
end

#==============================================================================
# ** Scene_Title
#==============================================================================

class Scene_Title
 
  alias fant_scene_file_win_size_fix_st_cmdcont command_continue
  def command_continue
    fant_scene_file_win_size_fix_st_cmdcont
    $scene.title = true
  end
 
end
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Flermza


Fantasist

ty :) Hope dark-archangel likes it :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews