查看: 3033|回复: 2

[已经解决] 关于读档界面的存档名称的修改

[复制链接]
梦石
0
星屑
75
在线时间
345 小时
注册时间
2011-10-13
回帖
380
发表于 2015-12-1 17:47:52 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 zx903193387 于 2015-12-1 17:51 编辑

就是原本读档界面的存档名称不是叫存档1和存档2么,我想让它叫做“自动存档”和“手动存档”,一共就两个档。存档的数量已经修改好了,但是名字没法解决。

梦石
1
星屑
23246
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 2015-12-2 09:24:24 | 显示全部楼层

点评

好吧是被后面的脸图存档脚本复写了……  发表于 2015-12-2 13:42
不知道为什么完全没有效果……我也装了你的脚本的前置脚本,还把它放到最前面了,但是跟没用一样  发表于 2015-12-2 13:23
回复

使用道具 举报

漾夕☽星化残月☾

梦石
0
星屑
8611
在线时间
3858 小时
注册时间
2015-5-12
回帖
2022

剧作品鉴家

发表于 2015-12-2 12:08:46 | 显示全部楼层
本帖最后由 御曹司 于 2015-12-2 14:03 编辑

呜喵5大大那个方法只能用于默认模式。
如果有其它脚本的话容易产生各种各样奇妙的问题。
其实这个直接改脚本就可以。
非常非常容易改、我这种小白都行
用if句式即可。


位置的话  搜索 name =
找到和存档相关的。
下面是我改造的Declare War的脚本。
饭粒
改造的地方是四行加了“改造处”的地方
如果还想修改存档二、存档三的话、套用相同的句式就行


[pre lang="ruby"]=begin #-----------------------------------------------------------------------

●セーブレイアウト【RGSS3 by Declare War】

セーブ画面のレイアウトを変更する
(VXのネオメモさんのセーブレイアウトカスタム版 風)

【利用規約】
著作権明記と利用報告は不要、加工自由、転載と配布は禁止

=end #-------------------------------------------------------------------------
module Declare_War
  module Save_Layout
    # 画像の設定(使わないなら""のまま、使うならGraphics/Pictureに入れる)
    Cursor_Picture = ""         # カーソル画像
    Back_Picture   = ""         # 背景画像
   
    # 右のウィンドウの不透明度(0で枠だけ)
    Back_Opacity = 128
   
    # 色の設定
    Cursor = Color.new(196, 224, 255, 196) # カーソル(画像無しのとき使う)
    Base   = Color.new(0, 0, 0)            # ベース色
    Back   = Color.new(0, 0, 128, 64)      # コマンド背景色
    Text   = Color.new(0, 208, 0)          # テキスト文字(マップ名とか)
    Time   = Color.new(255, 255, 255)      # 時間文字色
    Help   = Color.new(0 ,0, 0, 80)        # ヘルプの背景色
  end
end

class << DataManager
  #--------------------------------------------------------------------------
  # ● セーブヘッダの作成(alias)
  #--------------------------------------------------------------------------
  alias custom_save_layout_make_save_header make_save_header
  def make_save_header
    header = custom_save_layout_make_save_header
    header[:leader] = $game_party.leader
    header[:map_name] = $game_map.display_name
    header
  end
end

class Sprite_Save_Cursol < Sprite
  #--------------------------------------------------------------------------
  # ● インクルード
  #--------------------------------------------------------------------------
  include Declare_War::Save_Layout
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(nil)
    self.x = 12
    self.z = 90
    create_cursol
    @count = 0
  end
  #--------------------------------------------------------------------------
  # ● カーソルを作成
  #--------------------------------------------------------------------------
  def create_cursol
    if !Cursor_Picture.empty?
      return self.bitmap = Cache.picture(Cursor_Picture)
    end
    self.bitmap = Bitmap.new(304, 26)
    color = Cursor.dup
    color.alpha = 128
    bitmap.fill_rect(1, 1, 275, 24, color)
    bitmap.fill_rect(0, 1, 1, 24, Cursor)
    bitmap.fill_rect(1, 25, 302, 1, Cursor)
    bitmap.fill_rect(288, 24, 12, 1, Cursor)
    bitmap.fill_rect(287, 23, 10, 1, Cursor)
    bitmap.fill_rect(287, 22,  7, 1, Cursor)
    bitmap.fill_rect(286, 21,  5, 1, Cursor)
    bitmap.fill_rect(286, 20,  2, 1, Cursor)
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    super
    update_count
  end
  #--------------------------------------------------------------------------
  # ● 点滅の更新
  #--------------------------------------------------------------------------
  def update_count
    if @count < 160
      self.opacity = 255 - @count
      @count += 4
    else
      self.opacity = @count - 64
      @count += 4
    end
    @count = 0 if @count >= 320
  end
end

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # ● インクルード
  #--------------------------------------------------------------------------
  include Declare_War::Save_Layout
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader :header
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化(overwrite)
  #--------------------------------------------------------------------------
  def initialize(height, index)
    super(0, calc_y(index), 300, window_height)
    self.opacity = 0
    @file_index = index
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # ● ウィンドウの縦幅
  #--------------------------------------------------------------------------
  def window_height
    26 + standard_padding * 2
  end
  #--------------------------------------------------------------------------
  # ● 計算したY座標を取得
  #--------------------------------------------------------------------------
  def calc_y(index)
    -standard_padding + index * window_height - index * standard_padding * 2
  end
  #--------------------------------------------------------------------------
  # ● ヘッダーをロード
  #--------------------------------------------------------------------------
  def load_header
    @header = DataManager.load_header(@file_index)
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_back_graphic
    load_header
    contents.font.size = 20
    draw_file_info
    draw_playtime(72, 0, contents.width - 76, 2)
    draw_mapname(72, 0, 160, 0)
  end
  #--------------------------------------------------------------------------
  # ● 背景の描画
  #--------------------------------------------------------------------------
  def draw_back_graphic
    contents.fill_rect(0,  0, contents.width, 1, Base)
    contents.fill_rect(0, 23, contents.width, 1, Base)
    contents.fill_rect(66, 1, 1, 22, Base)
    color = Base.dup
    color.alpha = 0
    contents.gradient_fill_rect(0, 1, 64, 22, color, Base)
    contents.fill_rect(67, 1, contents.width - 67, 22, Back)
  end
  #--------------------------------------------------------------------------
  # ● ファイル情報の描画
  #--------------------------------------------------------------------------
  def draw_file_info
    change_color(normal_color)
    if @file_index == 0 #  改造处
    name = "自动存档"  # 改造处
    else #  改造处
    name = "File" + " #{@file_index}"
    end #改造处
    draw_text(4, 0, 200, line_height, name)
    @name_width = text_size(name).width
  end
  #--------------------------------------------------------------------------
  # ● プレイ時間の描画(overwrite)
  #--------------------------------------------------------------------------
  def draw_playtime(x, y, width, align)
    return if !@header
    change_color(Time)
    draw_text(x, y, width, line_height, @header[:playtime_s], align)
  end
  #--------------------------------------------------------------------------
  # ● マップ名の描画
  #--------------------------------------------------------------------------
  def draw_mapname(x, y, width, align)
    return if !@header || !@header[:map_name]
    change_color(Text)
    draw_text(x, y, width, line_height, @header[:map_name], align)
  end
  #--------------------------------------------------------------------------
  # ● カーソルの更新(overwrite)
  #--------------------------------------------------------------------------
  def update_cursor
  end
end

class Window_Save_Leader < Window_Base
  #--------------------------------------------------------------------------
  # ● インクルード
  #--------------------------------------------------------------------------
  include Declare_War::Save_Layout
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(316, 56, 212, 344)
    self.back_opacity = Back_Opacity
    refresh(actor)
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh(actor)
    contents.clear
    draw_leader_info(actor)
  end
  #--------------------------------------------------------------------------
  # ● リーダーの情報を描画
  #--------------------------------------------------------------------------
  def draw_leader_info(actor)
    return if !actor
    draw_actor_battler(actor)
    draw_actor_face(actor, center_x(96), 4)
    draw_actor_simple_status(actor, 0, 98)
    draw_param(actor, 174)
  end
  #--------------------------------------------------------------------------
  # ● 中心を取得
  #--------------------------------------------------------------------------
  def center_x(num)
    (contents.width - num) / 2
  end
  #--------------------------------------------------------------------------
  # ● アクターのバトラーグラフィックの描画
  #--------------------------------------------------------------------------
  def draw_actor_battler(actor)
    draw_battler(actor.battler_name, actor.battler_hue)
  end
  #--------------------------------------------------------------------------
  # ● バトラーグラフィックの描画
  #--------------------------------------------------------------------------
  def draw_battler(battler_name, battler_hue)
    bmp = Cache.battler(battler_name, battler_hue)
    rect   = Rect.new(0, 0, bmp.width, bmp.height)
    x = (contents.width - bmp.width) / 2
    y = contents.height - bmp.height
    contents.blt(x, y, bmp, rect)
  end
  #--------------------------------------------------------------------------
  # ● シンプルなステータスの描画
  #--------------------------------------------------------------------------
  def draw_actor_simple_status(actor, x, y)
    draw_actor_name(actor, x, y)
    draw_actor_level(actor, x+120, y)
    draw_actor_hp(actor, x, y + line_height * 1)
    draw_actor_mp(actor, x, y + line_height * 2)
  end
  #--------------------------------------------------------------------------
  # ● パラメータの描画
  #--------------------------------------------------------------------------
  def draw_param(actor, base_y)
    space = 16
    str_width = contents.width - space
    (2..7).each do |i|
      y = base_y + (i - 2) * line_height
      change_color(system_color)
      draw_text(space / 2, y, str_width, 24, $data_system.terms.params)
      change_color(normal_color)
      draw_text(space / 2, y, str_width, 24, actor.param(i).to_s, 2)
    end
  end
end

class Window_LineHelp < Window_Base
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  BACK_COLOR = Declare_War::Save_Layout::Help
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(-16, 0, 576, 24 + 24)
    self.opacity = 0
  end
  #--------------------------------------------------------------------------
  # ● テキスト設定
  #--------------------------------------------------------------------------
  def set_text(text)
    if text != @text
      contents.clear
      refresh(text)
    end
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh(text)
    contents.fill_rect(0, 12, contents.width, 12, BACK_COLOR)
    change_color(normal_color)
    contents.draw_text(20, 0, width - 72, 24, text)
    @text = text
  end
end

class Scene_File
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  Back_Picture = Declare_War::Save_Layout::Back_Picture
  #--------------------------------------------------------------------------
  # ● 画面内に表示するセーブファイル数を取得(overwrite)
  #--------------------------------------------------------------------------
  def visible_max
    12
  end
  #--------------------------------------------------------------------------
  # ● ヘルプウィンドウの作成(overwrite)
  #--------------------------------------------------------------------------
  def create_help_window
    @help_window = Window_LineHelp.new
    @help_window.set_text(help_window_text)
  end
  #--------------------------------------------------------------------------
  # ● データウィンドウの作成
  #--------------------------------------------------------------------------
  def create_data_window
    actor = @savefile_windows[index].header[:leader] rescue nil
    @data_window = Window_Save_Leader.new(actor)
  end
  #--------------------------------------------------------------------------
  # ● セーブファイルビューポートの作成(overwrite)
  #--------------------------------------------------------------------------
  def create_savefile_viewport
    @savefile_viewport = Viewport.new
    @savefile_viewport.rect.y = 56
    @savefile_viewport.rect.height = 312
  end
  #--------------------------------------------------------------------------
  # ● 背景の作成(alias)
  #--------------------------------------------------------------------------
  alias custom_save_layout_create_background create_background
  def create_background
    if !Back_Picture.empty?
      @background_sprite = Cache.picture(Back_Picture)
    else
      custom_save_layout_create_background
    end
  end
  #--------------------------------------------------------------------------
  # ● 開始処理(alias)
  #--------------------------------------------------------------------------
  alias custom_save_layout_start start
  def start
    custom_save_layout_start
    create_data_window
    create_cursol
  end
  #--------------------------------------------------------------------------
  # ● カーソルの作成
  #--------------------------------------------------------------------------
  def create_cursol
    @cursol   = Sprite_Save_Cursol.new
    set_cursol_y
  end
  #--------------------------------------------------------------------------
  # ● カーソルの高さ調節
  #--------------------------------------------------------------------------
  def set_cursol_y
    @cursol.y = 55 + (@index - top_index) * 26
  end
  #--------------------------------------------------------------------------
  # ● 終了処理(alias)
  #--------------------------------------------------------------------------
  alias custom_save_layout_terminate terminate
  def terminate
    custom_save_layout_terminate
    @cursol.dispose
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新(alias)
  #--------------------------------------------------------------------------
  alias custom_save_layout_update update
  def update
    custom_save_layout_update
    set_cursol_y
    @cursol.update
  end
  #--------------------------------------------------------------------------
  # ● カーソルの更新(alias)
  #--------------------------------------------------------------------------
  alias custom_save_layout_update_cursor update_cursor
  def update_cursor
    last_index = @index
    custom_save_layout_update_cursor
    data_window_refresh if last_index != @index
  end
  #--------------------------------------------------------------------------
  # ● データウィンドウのリフレッシュ
  #--------------------------------------------------------------------------
  def data_window_refresh
    actor = @savefile_windows[index].header[:leader] rescue nil
    @data_window.refresh(actor)
  end
end
[/pre]
我是真小白~下面是大触们...
@taroxd  @RaidenInfinity @喵呜喵5

点评

原来你真用用了存档脚本啊... 我的担心是对的。。。(喵大大那个方法不能使用与改造过的)  发表于 2015-12-2 13:53
不过你的脚本给了我提示,我已经土法炼钢地把这几行改名字的脚本给插到脸图存档的脚本里面了  发表于 2015-12-2 13:43
这个脚本有个巨大的问题:无法完全显示存档的地图名,只显示两到三个字  发表于 2015-12-2 13:29

评分

参与人数 2星屑 +1 梦石 +1 收起 理由
taroxd + 1 认可答案
RaidenInfinity + 1 渣渣路过

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部