查看: 3102|回复: 2

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

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

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

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

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

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

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 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的脚本。
饭粒
改造的地方是四行加了“改造处”的地方
如果还想修改存档二、存档三的话、套用相同的句式就行


  1. =begin #-----------------------------------------------------------------------

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

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

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

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

  26. class << DataManager
  27.   #--------------------------------------------------------------------------
  28.   # ● セーブヘッダの作成(alias)
  29.   #--------------------------------------------------------------------------
  30.   alias custom_save_layout_make_save_header make_save_header
  31.   def make_save_header
  32.     header = custom_save_layout_make_save_header
  33.     header[:leader] = $game_party.leader
  34.     header[:map_name] = $game_map.display_name
  35.     header
  36.   end
  37. end

  38. class Sprite_Save_Cursol < Sprite
  39.   #--------------------------------------------------------------------------
  40.   # ● インクルード
  41.   #--------------------------------------------------------------------------
  42.   include Declare_War::Save_Layout
  43.   #--------------------------------------------------------------------------
  44.   # ● オブジェクト初期化
  45.   #--------------------------------------------------------------------------
  46.   def initialize
  47.     super(nil)
  48.     self.x = 12
  49.     self.z = 90
  50.     create_cursol
  51.     @count = 0
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● カーソルを作成
  55.   #--------------------------------------------------------------------------
  56.   def create_cursol
  57.     if !Cursor_Picture.empty?
  58.       return self.bitmap = Cache.picture(Cursor_Picture)
  59.     end
  60.     self.bitmap = Bitmap.new(304, 26)
  61.     color = Cursor.dup
  62.     color.alpha = 128
  63.     bitmap.fill_rect(1, 1, 275, 24, color)
  64.     bitmap.fill_rect(0, 1, 1, 24, Cursor)
  65.     bitmap.fill_rect(1, 25, 302, 1, Cursor)
  66.     bitmap.fill_rect(288, 24, 12, 1, Cursor)
  67.     bitmap.fill_rect(287, 23, 10, 1, Cursor)
  68.     bitmap.fill_rect(287, 22,  7, 1, Cursor)
  69.     bitmap.fill_rect(286, 21,  5, 1, Cursor)
  70.     bitmap.fill_rect(286, 20,  2, 1, Cursor)
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● フレーム更新
  74.   #--------------------------------------------------------------------------
  75.   def update
  76.     super
  77.     update_count
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # ● 点滅の更新
  81.   #--------------------------------------------------------------------------
  82.   def update_count
  83.     if @count < 160
  84.       self.opacity = 255 - @count
  85.       @count += 4
  86.     else
  87.       self.opacity = @count - 64
  88.       @count += 4
  89.     end
  90.     @count = 0 if @count >= 320
  91.   end
  92. end

  93. class Window_SaveFile < Window_Base
  94.   #--------------------------------------------------------------------------
  95.   # ● インクルード
  96.   #--------------------------------------------------------------------------
  97.   include Declare_War::Save_Layout
  98.   #--------------------------------------------------------------------------
  99.   # ● 公開インスタンス変数
  100.   #--------------------------------------------------------------------------
  101.   attr_reader :header
  102.   #--------------------------------------------------------------------------
  103.   # ● オブジェクト初期化(overwrite)
  104.   #--------------------------------------------------------------------------
  105.   def initialize(height, index)
  106.     super(0, calc_y(index), 300, window_height)
  107.     self.opacity = 0
  108.     @file_index = index
  109.     refresh
  110.     @selected = false
  111.   end
  112.   #--------------------------------------------------------------------------
  113.   # ● ウィンドウの縦幅
  114.   #--------------------------------------------------------------------------
  115.   def window_height
  116.     26 + standard_padding * 2
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 計算したY座標を取得
  120.   #--------------------------------------------------------------------------
  121.   def calc_y(index)
  122.     -standard_padding + index * window_height - index * standard_padding * 2
  123.   end
  124.   #--------------------------------------------------------------------------
  125.   # ● ヘッダーをロード
  126.   #--------------------------------------------------------------------------
  127.   def load_header
  128.     @header = DataManager.load_header(@file_index)
  129.   end
  130.   #--------------------------------------------------------------------------
  131.   # ● リフレッシュ
  132.   #--------------------------------------------------------------------------
  133.   def refresh
  134.     contents.clear
  135.     draw_back_graphic
  136.     load_header
  137.     contents.font.size = 20
  138.     draw_file_info
  139.     draw_playtime(72, 0, contents.width - 76, 2)
  140.     draw_mapname(72, 0, 160, 0)
  141.   end
  142.   #--------------------------------------------------------------------------
  143.   # ● 背景の描画
  144.   #--------------------------------------------------------------------------
  145.   def draw_back_graphic
  146.     contents.fill_rect(0,  0, contents.width, 1, Base)
  147.     contents.fill_rect(0, 23, contents.width, 1, Base)
  148.     contents.fill_rect(66, 1, 1, 22, Base)
  149.     color = Base.dup
  150.     color.alpha = 0
  151.     contents.gradient_fill_rect(0, 1, 64, 22, color, Base)
  152.     contents.fill_rect(67, 1, contents.width - 67, 22, Back)
  153.   end
  154.   #--------------------------------------------------------------------------
  155.   # ● ファイル情報の描画
  156.   #--------------------------------------------------------------------------
  157.   def draw_file_info
  158.     change_color(normal_color)
  159.     if @file_index == 0 #  改造处
  160.     name = "自动存档"  # 改造处
  161.     else #  改造处
  162.     name = "File" + " #{@file_index}"
  163.     end #改造处
  164.     draw_text(4, 0, 200, line_height, name)
  165.     @name_width = text_size(name).width
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # ● プレイ時間の描画(overwrite)
  169.   #--------------------------------------------------------------------------
  170.   def draw_playtime(x, y, width, align)
  171.     return if !@header
  172.     change_color(Time)
  173.     draw_text(x, y, width, line_height, @header[:playtime_s], align)
  174.   end
  175.   #--------------------------------------------------------------------------
  176.   # ● マップ名の描画
  177.   #--------------------------------------------------------------------------
  178.   def draw_mapname(x, y, width, align)
  179.     return if !@header || !@header[:map_name]
  180.     change_color(Text)
  181.     draw_text(x, y, width, line_height, @header[:map_name], align)
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ● カーソルの更新(overwrite)
  185.   #--------------------------------------------------------------------------
  186.   def update_cursor
  187.   end
  188. end

  189. class Window_Save_Leader < Window_Base
  190.   #--------------------------------------------------------------------------
  191.   # ● インクルード
  192.   #--------------------------------------------------------------------------
  193.   include Declare_War::Save_Layout
  194.   #--------------------------------------------------------------------------
  195.   # ● オブジェクト初期化
  196.   #--------------------------------------------------------------------------
  197.   def initialize(actor)
  198.     super(316, 56, 212, 344)
  199.     self.back_opacity = Back_Opacity
  200.     refresh(actor)
  201.   end
  202.   #--------------------------------------------------------------------------
  203.   # ● リフレッシュ
  204.   #--------------------------------------------------------------------------
  205.   def refresh(actor)
  206.     contents.clear
  207.     draw_leader_info(actor)
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ● リーダーの情報を描画
  211.   #--------------------------------------------------------------------------
  212.   def draw_leader_info(actor)
  213.     return if !actor
  214.     draw_actor_battler(actor)
  215.     draw_actor_face(actor, center_x(96), 4)
  216.     draw_actor_simple_status(actor, 0, 98)
  217.     draw_param(actor, 174)
  218.   end
  219.   #--------------------------------------------------------------------------
  220.   # ● 中心を取得
  221.   #--------------------------------------------------------------------------
  222.   def center_x(num)
  223.     (contents.width - num) / 2
  224.   end
  225.   #--------------------------------------------------------------------------
  226.   # ● アクターのバトラーグラフィックの描画
  227.   #--------------------------------------------------------------------------
  228.   def draw_actor_battler(actor)
  229.     draw_battler(actor.battler_name, actor.battler_hue)
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● バトラーグラフィックの描画
  233.   #--------------------------------------------------------------------------
  234.   def draw_battler(battler_name, battler_hue)
  235.     bmp = Cache.battler(battler_name, battler_hue)
  236.     rect   = Rect.new(0, 0, bmp.width, bmp.height)
  237.     x = (contents.width - bmp.width) / 2
  238.     y = contents.height - bmp.height
  239.     contents.blt(x, y, bmp, rect)
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● シンプルなステータスの描画
  243.   #--------------------------------------------------------------------------
  244.   def draw_actor_simple_status(actor, x, y)
  245.     draw_actor_name(actor, x, y)
  246.     draw_actor_level(actor, x+120, y)
  247.     draw_actor_hp(actor, x, y + line_height * 1)
  248.     draw_actor_mp(actor, x, y + line_height * 2)
  249.   end
  250.   #--------------------------------------------------------------------------
  251.   # ● パラメータの描画
  252.   #--------------------------------------------------------------------------
  253.   def draw_param(actor, base_y)
  254.     space = 16
  255.     str_width = contents.width - space
  256.     (2..7).each do |i|
  257.       y = base_y + (i - 2) * line_height
  258.       change_color(system_color)
  259.       draw_text(space / 2, y, str_width, 24, $data_system.terms.params[i])
  260.       change_color(normal_color)
  261.       draw_text(space / 2, y, str_width, 24, actor.param(i).to_s, 2)
  262.     end
  263.   end
  264. end

  265. class Window_LineHelp < Window_Base
  266.   #--------------------------------------------------------------------------
  267.   # ● 定数
  268.   #--------------------------------------------------------------------------
  269.   BACK_COLOR = Declare_War::Save_Layout::Help
  270.   #--------------------------------------------------------------------------
  271.   # ● オブジェクト初期化
  272.   #--------------------------------------------------------------------------
  273.   def initialize
  274.     super(-16, 0, 576, 24 + 24)
  275.     self.opacity = 0
  276.   end
  277.   #--------------------------------------------------------------------------
  278.   # ● テキスト設定
  279.   #--------------------------------------------------------------------------
  280.   def set_text(text)
  281.     if text != @text
  282.       contents.clear
  283.       refresh(text)
  284.     end
  285.   end
  286.   #--------------------------------------------------------------------------
  287.   # ● リフレッシュ
  288.   #--------------------------------------------------------------------------
  289.   def refresh(text)
  290.     contents.fill_rect(0, 12, contents.width, 12, BACK_COLOR)
  291.     change_color(normal_color)
  292.     contents.draw_text(20, 0, width - 72, 24, text)
  293.     @text = text
  294.   end
  295. end

  296. class Scene_File
  297.   #--------------------------------------------------------------------------
  298.   # ● 定数
  299.   #--------------------------------------------------------------------------
  300.   Back_Picture = Declare_War::Save_Layout::Back_Picture
  301.   #--------------------------------------------------------------------------
  302.   # ● 画面内に表示するセーブファイル数を取得(overwrite)
  303.   #--------------------------------------------------------------------------
  304.   def visible_max
  305.     12
  306.   end
  307.   #--------------------------------------------------------------------------
  308.   # ● ヘルプウィンドウの作成(overwrite)
  309.   #--------------------------------------------------------------------------
  310.   def create_help_window
  311.     @help_window = Window_LineHelp.new
  312.     @help_window.set_text(help_window_text)
  313.   end
  314.   #--------------------------------------------------------------------------
  315.   # ● データウィンドウの作成
  316.   #--------------------------------------------------------------------------
  317.   def create_data_window
  318.     actor = @savefile_windows[index].header[:leader] rescue nil
  319.     @data_window = Window_Save_Leader.new(actor)
  320.   end
  321.   #--------------------------------------------------------------------------
  322.   # ● セーブファイルビューポートの作成(overwrite)
  323.   #--------------------------------------------------------------------------
  324.   def create_savefile_viewport
  325.     @savefile_viewport = Viewport.new
  326.     @savefile_viewport.rect.y = 56
  327.     @savefile_viewport.rect.height = 312
  328.   end
  329.   #--------------------------------------------------------------------------
  330.   # ● 背景の作成(alias)
  331.   #--------------------------------------------------------------------------
  332.   alias custom_save_layout_create_background create_background
  333.   def create_background
  334.     if !Back_Picture.empty?
  335.       @background_sprite = Cache.picture(Back_Picture)
  336.     else
  337.       custom_save_layout_create_background
  338.     end
  339.   end
  340.   #--------------------------------------------------------------------------
  341.   # ● 開始処理(alias)
  342.   #--------------------------------------------------------------------------
  343.   alias custom_save_layout_start start
  344.   def start
  345.     custom_save_layout_start
  346.     create_data_window
  347.     create_cursol
  348.   end
  349.   #--------------------------------------------------------------------------
  350.   # ● カーソルの作成
  351.   #--------------------------------------------------------------------------
  352.   def create_cursol
  353.     @cursol   = Sprite_Save_Cursol.new
  354.     set_cursol_y
  355.   end
  356.   #--------------------------------------------------------------------------
  357.   # ● カーソルの高さ調節
  358.   #--------------------------------------------------------------------------
  359.   def set_cursol_y
  360.     @cursol.y = 55 + (@index - top_index) * 26
  361.   end
  362.   #--------------------------------------------------------------------------
  363.   # ● 終了処理(alias)
  364.   #--------------------------------------------------------------------------
  365.   alias custom_save_layout_terminate terminate
  366.   def terminate
  367.     custom_save_layout_terminate
  368.     @cursol.dispose
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ● フレーム更新(alias)
  372.   #--------------------------------------------------------------------------
  373.   alias custom_save_layout_update update
  374.   def update
  375.     custom_save_layout_update
  376.     set_cursol_y
  377.     @cursol.update
  378.   end
  379.   #--------------------------------------------------------------------------
  380.   # ● カーソルの更新(alias)
  381.   #--------------------------------------------------------------------------
  382.   alias custom_save_layout_update_cursor update_cursor
  383.   def update_cursor
  384.     last_index = @index
  385.     custom_save_layout_update_cursor
  386.     data_window_refresh if last_index != @index
  387.   end
  388.   #--------------------------------------------------------------------------
  389.   # ● データウィンドウのリフレッシュ
  390.   #--------------------------------------------------------------------------
  391.   def data_window_refresh
  392.     actor = @savefile_windows[index].header[:leader] rescue nil
  393.     @data_window.refresh(actor)
  394.   end
  395. end
复制代码

我是真小白~下面是大触们...
@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.

在本版发帖返回顶部