设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3315|回复: 4
打印 上一主题 下一主题

[已经过期] 新人求助:如何替换对话框素材

[复制链接]

Lv1.梦旅人

梦石
0
星屑
400
在线时间
4 小时
注册时间
2014-3-5
帖子
3
跳转到指定楼层
1
发表于 2014-3-5 19:38:13 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
有找到这个贴:
http://rpg.blue/thread-352897-1-2.html

然后我在System里放了叫“Window.png”的对话框素材之后,在脚本里直接粘贴了上面贴里的脚本,运行游戏之后没有变化,QAQ不知道该怎么改了。
如果是脚本里面还要改什么数值的话,求告知是第几行的什么要改的之类的?QAQ我这么笨真是对不起大家

Lv2.观梦者

梦石
0
星屑
457
在线时间
1409 小时
注册时间
2010-9-23
帖子
557
2
发表于 2014-3-5 19:43:08 | 只看该作者
那个链接不是VX的脚本么~?是共通的~? = =
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
413
在线时间
76 小时
注册时间
2014-2-2
帖子
43
3
发表于 2014-3-6 02:01:26 | 只看该作者
楼主找到的是VX的脚本,所以不太可能会有用.
这里用的是这个:
http://galvs-scripts.com/2012/12/02/message-background/
  1. #------------------------------------------------------------------------------#
  2. #  Galv's Message Background
  3. #------------------------------------------------------------------------------#
  4. #  For: RPGMAKER VX ACE
  5. #  Version 1.3
  6. #------------------------------------------------------------------------------#
  7. #  2013-04-01 - version 1.2 - added option to disable script in battle
  8. #  2013-02-10 - version 1.1 - dim and transparent settings work with image now
  9. #  2012-12-02 - version 1.0 - release
  10. #------------------------------------------------------------------------------#
  11. #  This script displays an image file for a message background instead of using
  12. #  the windowskin. If you are using Galv's Message Busts put this script ABOVE.
  13. #
  14. #  This image background will not stretch to fit, that's not it's purpose.
  15. #  I encourage you to make your own message background images, the ones in the
  16. #  demo are just quick examples!
  17. #------------------------------------------------------------------------------#
  18. #  INSTRUCTIONS:
  19. #  Put in script list below Materials and above Main.
  20. #
  21. #  Read the instructions
  22. #------------------------------------------------------------------------------#
  23. #  SCRIPT CALL
  24. #------------------------------------------------------------------------------#
  25. #  
  26. #  msgbg("ImageName", y_offset)     # To change message background during game
  27. #                                   # "ImageName" is the new file name to use
  28. #                                   # y_offset is the new IMAGE_Y for that bg
  29. #  EXAMPLE
  30. #  msgbg("MsgImage", -98)      
  31. #
  32. #------------------------------------------------------------------------------#

  33. ($imported ||= {})["Galvs_Message_Background"] = true
  34. module Galv_Msgbg

  35. #------------------------------------------------------------------------------#
  36. #  SCRIPT SETTINGS
  37. #------------------------------------------------------------------------------#

  38.   # DEFAULT MESSAGE #
  39.    
  40.   MESSAGE_IMAGE = "MsgImage"   # Name of image in /Graphics/System to use for
  41.                                # the message background.

  42.   IMAGE_Y = -98                # Y offset of image

  43.   DISABLE_SWITCH = 1   # Turn swith ON to disable image background
  44.    
  45.   DISABLE_IN_BATTLE = true  # Disable this script when in battle.
  46.    
  47.    
  48. #------------------------------------------------------------------------------#
  49. #  END SCRIPT SETTINGS
  50. #------------------------------------------------------------------------------#

  51. end


  52. class Window_Message < Window_Base
  53.   alias galv_msgbg_window_create_back_bitmap create_back_bitmap
  54.   def create_back_bitmap
  55.     @bg ||= Sprite.new
  56.     if !$game_message.message_bg.nil?
  57.       @bg.bitmap = Cache.system($game_message.message_bg)
  58.       @current_bg = $game_message.message_bg
  59.     end
  60.     @bg.z = z - 1
  61.     @bg.opacity = 0
  62.     galv_msgbg_window_create_back_bitmap
  63.   end
  64.    
  65.   alias galv_msgbg_window_dispose dispose
  66.   def dispose
  67.     galv_msgbg_window_dispose
  68.     dispose_msgbg if [email protected]?
  69.   end
  70.    
  71.   def dispose_msgbg
  72.     @bg.dispose
  73.     @bg.bitmap.dispose
  74.   end
  75.    
  76.   alias galv_msgbg_window_update_back_sprite update_back_sprite
  77.   def update_back_sprite
  78.     if !$game_switches[Galv_Msgbg::DISABLE_SWITCH] && !$game_temp.msg_off
  79.       update_msgbg if openness > 0
  80.       @bg.opacity = 0 if openness == 0
  81.     else
  82.       galv_msgbg_window_update_back_sprite
  83.       @bg.opacity = 0
  84.     end
  85.     @bg.update
  86.     @back_sprite.update
  87.   end
  88.    
  89.   def update_msgbg
  90.     if $game_message.message_bg != @current_bg
  91.       if !$game_message.message_bg.nil?
  92.         @bg.bitmap = Cache.system($game_message.message_bg)
  93.         @current_bg = $game_message.message_bg
  94.       end
  95.     end
  96.     @bg.y = self.y + $game_message.message_bg_y
  97.     case @background
  98.     when 0; @bg.opacity = openness
  99.     when 1; @bg.opacity = openness * 0.5
  100.     when 2; @bg.opacity = 0
  101.     end
  102.     @back_sprite.visible = false
  103.     self.opacity = 0
  104.   end

  105. end # Window_Message < Window_Base

  106. class Game_Message
  107.   attr_accessor :message_bg
  108.   attr_accessor :message_bg_y
  109.    
  110.   alias galv_msgbg_message_initialize initialize
  111.   def initialize
  112.     galv_msgbg_message_initialize
  113.     @message_bg = Galv_Msgbg::MESSAGE_IMAGE
  114.     @message_bg_y = Galv_Msgbg::IMAGE_Y
  115.   end
  116. end # Game_Message

  117. class Game_Temp
  118.   attr_accessor :msg_off
  119. end # Game_Temp

  120. class Scene_Battle < Scene_Base
  121.   alias galv_msgbg_sb_start start
  122.   def start
  123.     $game_temp.msg_off = true if Galv_Msgbg::DISABLE_IN_BATTLE
  124.     galv_msgbg_sb_start
  125.   end

  126.   alias galv_msgbg_sb_terminate terminate
  127.   def terminate
  128.     $game_temp.msg_off = nil
  129.     galv_msgbg_sb_terminate
  130.   end
  131. end # Scene_Battle < Scene_Base

  132. class Game_Interpreter
  133.   def msgbg(image,y_offset)
  134.     $game_message.message_bg = image
  135.     $game_message.message_bg_y = y_offset
  136.   end
  137. end # Game_Interpreter
复制代码
想在游戏中换背景的话,叫一下msgbg("ImageName", y_offset)就行了,Imagename替换成背景名称,yoffset是y轴修正.
这个应该是即插即用的.
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
400
在线时间
4 小时
注册时间
2014-3-5
帖子
3
4
 楼主| 发表于 2014-3-6 11:53:41 | 只看该作者
nemoma 发表于 2014-3-6 02:01
楼主找到的是VX的脚本,所以不太可能会有用.
这里用的是这个:
http://galvs-scripts.com/2012/12/02/message ...

谢谢!替换成功了,但是字变黑了,而且看起来有点糊……是被挡住了吗?……

点评

确实是带透明度的,是从びたちー素材館里拔下来的,但是字还是那么拙计QAQ  发表于 2014-3-6 19:58
你的那个对话框应该要带透明度的。RMVA的描绘方式可和2003的不一样。  发表于 2014-3-6 14:42
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
413
在线时间
76 小时
注册时间
2014-2-2
帖子
43
5
发表于 2014-3-6 22:31:49 | 只看该作者


我自己从那个素材站扒了一个素材,使用正常.

检查一下是不是有其他的脚本和这个冲突?
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-25 06:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表