查看: 2572|回复: 10

[已经解决] 想请教各位如何在游戏里切换系统皮肤

[复制链接]
梦石
0
星屑
387
在线时间
25 小时
注册时间
2023-7-27
回帖
18
发表于 2023-9-16 16:38:14 | 显示全部楼层 |阅读模式

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

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

×
是这样的 本人在做一个野生同人 但是现在需要在游戏过程中切换Window图形
(例如:在游戏中与一个事件交互后切换到指定的窗口皮肤)
可是RMVXAce没有2000/2003的切换窗口图形命令
所以想知道有没有方法可以实现
求教:)
何为正义?无何永劫。
梦石
0
星屑
983
在线时间
71 小时
注册时间
2021-4-13
回帖
34
发表于 2023-9-18 20:31:40 | 显示全部楼层
本帖最后由 AshhsA 于 2023-9-18 20:32 编辑

如果仅限对话框相关的话可以试试老鹰的对话框扩展:https://rpg.blue/thread-476586-1-1.html
回复

使用道具 举报

梦石
0
星屑
387
在线时间
25 小时
注册时间
2023-7-27
回帖
18
 楼主| 发表于 2023-9-24 08:31:37 | 显示全部楼层
AshhsA 发表于 2023-9-18 20:31
如果仅限对话框相关的话可以试试老鹰的对话框扩展:https://rpg.blue/thread-476586-1-1.html ...

好的谢谢(跑去上学了没看到)
何为正义?无何永劫。
回复

使用道具 举报

梦石
0
星屑
387
在线时间
25 小时
注册时间
2023-7-27
回帖
18
 楼主| 发表于 2023-9-24 08:42:13 | 显示全部楼层
呃 不过刚刚看了一下似乎这个脚本好像不能实现我需要的功能(在游戏里更换Window.png) 捕获.PNG
所以想知道有没有别的方法
就是下图所示的功能(这个在2000/2003里面有)

RM2003里面的这个相关功能

RM2003里面的这个相关功能
何为正义?无何永劫。
回复

使用道具 举报

梦石
0
星屑
983
在线时间
71 小时
注册时间
2021-4-13
回帖
34
发表于 2023-9-24 15:11:16 | 显示全部楼层
本帖最后由 AshhsA 于 2023-9-24 15:13 编辑
智将Jesse 发表于 2023-9-24 08:42
呃 不过刚刚看了一下似乎这个脚本好像不能实现我需要的功能(在游戏里更换Window.png)
所以想知道有没有别 ...

我在外网论坛找到了这个脚本,你可以试试
https://rmrk.net/index.php/topic,48076.0.html
用法是用脚本执行$game_system.windowskin = "窗口图名"(?)
[fold=脚本原文]
  1. #==============================================================================
  2. #    Change Windowskin
  3. #    Version: 1.0.1
  4. #    Author: modern algebra (rmrk.net)
  5. #    Date: 27 July 2013
  6. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7. #  Description:
  8. #   
  9. #    This script allows you to change the windowskin in-game.
  10. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  11. #  Instructions:
  12. #   
  13. #    Paste this script into its own slot in the Script Editor, above Main but
  14. #   below Materials.
  15. #
  16. #    To set the initial filename for the windowskin, go to line 46 and change
  17. #   the portion between quotation marks to the name of the desired windowskin.
  18. #
  19. #    To change the windowskin in-game, use the following code in a Script call
  20. #   event command (last button on the last page of event commands)
  21. #
  22. #        $game_system.windowskin = "filename"
  23. #
  24. #    Replace filename with the name of the windowskin graphic you intend to
  25. #   use.
  26. #
  27. #    If you are using another script that allows you to select a windowskin for
  28. #   some windows and do not want it to be affected by this script, then be
  29. #   sure to use a skin that you never use for this script. If you do want it
  30. #   to be controlled by this script, then set it to "Window"
  31. #``````````````````````````````````````````````````````````````````````````````
  32. #  EXAMPLE:
  33. #
  34. #        $game_system.windowskin = "Window"
  35. #
  36. #    Will set the windowskin to the file named Window in the System folder of
  37. #   Graphics.
  38. #==============================================================================

  39. $imported = {} unless $imported
  40. $imported[:MA_ChangeWindowSkin] = true

  41. #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  42. #    BEGIN Editable Region
  43. #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  44. MACW_WINDOWSKIN = "Window"  # Set this to the name of the window file to use.
  45. #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  46. #    END Editable Region
  47. #//////////////////////////////////////////////////////////////////////////////
  48. if !MACW_WINDOWSKIN.is_a?(String) || MACW_WINDOWSKIN.empty?
  49.   MACW_WINDOWSKIN = "Window"
  50.   msgbox("Error at line 41 of Change Windowskin script:\nMACW_WINDOWSKIN must be a non-empty string!")
  51. end

  52. #==============================================================================
  53. # *** Cache
  54. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  55. #  Summary of Changes:
  56. #    aliased method - self.system
  57. #==============================================================================

  58. class << Cache
  59.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60.   # * System
  61.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62.   alias macw_systm_2mf0 system
  63.   def system(filename, *args)
  64.     filename = $game_system.macw_windowskin if filename == "Window"
  65.     macw_systm_2mf0(filename, *args) # Call original method
  66.   end
  67. end

  68. #==============================================================================
  69. # ** Game_System
  70. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  71. #  Summary of Changes:
  72. #    new attr_accessor - macw_windowskin
  73. #    new attr_reader - macw_old_windowskin
  74. #    aliased method - initialize
  75. #==============================================================================

  76. class Game_System
  77.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78.   # * Public Instance Variables
  79.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80.   attr_reader   :macw_old_windowskin
  81.   attr_accessor :macw_windowskin
  82.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83.   # * Object Initialization
  84.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  85.   alias macw_ilze_2bd4 initialize
  86.   def initialize(*args)
  87.     @macw_old_windowskin = "Window"
  88.     @macw_windowskin = MACW_WINDOWSKIN
  89.     macw_ilze_2bd4(*args) # Call original method
  90.   end
  91.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92.   # * Set Windowskin
  93.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  94.   def windowskin=(filename)
  95.     @macw_old_windowskin = @macw_windowskin
  96.     @macw_windowskin = filename
  97.   end
  98. end

  99. #==============================================================================
  100. # ** Window_Base
  101. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  102. #  Summary of Changes:
  103. #    aliased method - update
  104. #==============================================================================

  105. class Window_Base
  106.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  107.   # * Update
  108.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  109.   alias macw_pdat_5ht8 update
  110.   def update(*args)
  111.     macw_pdat_5ht8(*args) # Call original method
  112.     macw_update_windowskin
  113.   end
  114.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  115.   # * Update Windowskin
  116.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  117.   def macw_update_windowskin
  118.     if $game_system.macw_windowskin != @macw_check_windowskin
  119.       @macw_check_windowskin = $game_system.macw_windowskin
  120.       $game_system.macw_windowskin = "Window" # Disallow interference w/ check
  121.       # If windowskin governed by this script and no other
  122.       if windowskin == Cache.system($game_system.macw_old_windowskin) ||
  123.         windowskin == Cache.system("Window")
  124.         self.windowskin = Cache.system(@macw_check_windowskin)
  125.       end
  126.       $game_system.macw_windowskin = @macw_check_windowskin # Restore
  127.     end
  128.   end
  129. end
复制代码
[/fold]
回复

使用道具 举报

梦石
0
星屑
387
在线时间
25 小时
注册时间
2023-7-27
回帖
18
 楼主| 发表于 2023-10-1 18:46:04 | 显示全部楼层
AshhsA 发表于 2023-9-24 15:11
我在外网论坛找到了这个脚本,你可以试试
https://rmrk.net/index.php/topic,48076.0.html
用法是用脚本执 ...

好的,谢谢大佬;)
何为正义?无何永劫。
回复

使用道具 举报

梦石
0
星屑
387
在线时间
25 小时
注册时间
2023-7-27
回帖
18
 楼主| 发表于 2023-10-1 18:55:57 | 显示全部楼层
不过这个插件脚本似乎和Cache处理出了娄子
weixin截图_20231001185500.png
在读取完存档之后立即出现这种状况
不太清楚要怎么解决:(
何为正义?无何永劫。
回复

使用道具 举报

梦石
0
星屑
387
在线时间
25 小时
注册时间
2023-7-27
回帖
18
 楼主| 发表于 2023-10-1 19:00:57 | 显示全部楼层
似乎是在读取文件名称方面出了问题
weixin截图_20231001185947.png
这是脚本编辑器自动定位的报错位置
何为正义?无何永劫。
回复

使用道具 举报

梦石
0
星屑
983
在线时间
71 小时
注册时间
2021-4-13
回帖
34
发表于 2023-10-2 02:14:34 | 显示全部楼层
本帖最后由 AshhsA 于 2023-10-2 19:28 编辑
智将Jesse 发表于 2023-10-1 19:00
似乎是在读取文件名称方面出了问题

这是脚本编辑器自动定位的报错位置


我的锅,这个脚本已经停止维护了
回复

使用道具 举报

梦石
0
星屑
983
在线时间
71 小时
注册时间
2021-4-13
回帖
34
发表于 2023-10-2 20:18:44 | 显示全部楼层
智将Jesse 发表于 2023-10-1 18:55
不过这个插件脚本似乎和Cache处理出了娄子

在读取完存档之后立即出现这种状况

看了一下,这类脚本最好开新存档,旧存档不兼容
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部