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

Project1

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

[已经解决] 半身像脚本和pop message对话框脚本冲突

[复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
32 小时
注册时间
2016-6-23
帖子
24
跳转到指定楼层
1
发表于 2016-12-23 23:47:16 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 RaidenInfinity 于 2016-12-24 00:12 编辑

大家好这里音无!
初次制作va作品,请多多关照!{:2_249:}

现在是遇到了这样的状况:当半身像脚本和pop message对话框(显示在人物头顶的那种)脚本同时存在时,半身像脚本的文字缩进功能就会失效(见图。p1是矢效的情况,p2为单独使用半身像脚本的情况)——

所以说,这两种脚本是鱼和熊掌不可兼得的吗?{:2_263:}

求解!谢谢!


附上脚本:
pop message:

RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ?¥ Yami Engine Ace - Pop Message
  4. # -- Last Updated: 2012.06.07
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YSE-PopMessage"] = true
  12.  
  13. #==============================================================================
  14. # ?¥ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.06.07 - Fixed Compatible: YEA - Ace Message System.
  17. # 2012.05.11 - Fixed Message Position.
  18. #            - Remove Requirement: YSE - Fix Events Order.
  19. # 2012.05.07 - Fixed Face position.
  20. #            - Added Requirement: YSE - Fix Events Order.
  21. # 2012.04.06 - You can change Bubble Tag filename.
  22. # 2012.03.28 - Fixed Default Message Position and Sizes.
  23. # 2012.03.27 - Fixed Default Message.
  24. # 2012.03.27 - Added Bubble Tag.
  25. # 2012.03.25 - Fixed Escape Message.
  26. # 2012.03.24 - Fixed Battle Message.
  27. # 2012.03.24 - Rewrote script.
  28. #
  29. #==============================================================================
  30. # ?¥ Instructions
  31. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32. # To install this script, open up your script editor and copy/paste this script
  33. # to an open slot below ?¥ Materials/‘f?T but above ?¥ Main. Remember to save.
  34. #
  35. # -----------------------------------------------------------------------------
  36. # Message Window text Codes - These go inside of your message window.
  37. # -----------------------------------------------------------------------------
  38. #  Position:   Effect:
  39. #    \bm[x]    - Sets Message Window position to event x. *Note
  40. #    \cbm      - Cancel bubble message.
  41. #
  42. #              *Note: Set to 0 to sets position to Game Player.
  43. #
  44. #==============================================================================
  45. # ?¥ Compatibility
  46. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  47. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  48. # it will run with RPG Maker VX without adjusting.
  49. #
  50. #==============================================================================
  51.  
  52. module YSE
  53.   module POP_MESSAGE
  54.  
  55.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  56.     # - Visual Settings -
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     LIMIT = { # Start.
  59.       :limit_width    =>  0,  # Set to 0 to disable limit.
  60.       :limit_line     =>  6,  # Set to 0 to disable limit.
  61.     } # End.
  62.  
  63.     POSITION = { # Start.
  64.       :x_buffer       =>  0,
  65.       :y_buffer       =>  -36,
  66.       :face_x_buffer  =>  8,
  67.       :face_y_buffer  =>  24,
  68.       :tag_y_buffer   =>  -6,
  69.       :name_x_buffer  =>  112, # Require YEA - Message System.
  70.     } # End.
  71.  
  72.     EFFECT = { # Start.
  73.       :fade_face       =>  true,
  74.       :move_face       =>  true,
  75.       :use_bubble_tag  =>  true,
  76.       :bubble_tag_name => "BubbleTag",
  77.     } # End.
  78.  
  79.   end
  80. end
  81.  
  82. #==============================================================================
  83. # ?¥ Editting anything past this point may potentially result in causing
  84. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  85. # halitosis so edit at your own risk.
  86. #==============================================================================
  87.  
  88. #==============================================================================
  89. # ?? Spriteset_Map
  90. #==============================================================================
  91.  
  92. class Spriteset_Map
  93.  
  94.   #--------------------------------------------------------------------------
  95.   # public instance variables
  96.   #--------------------------------------------------------------------------
  97.   attr_accessor :character_sprites
  98.  
  99. end # Spriteset_Map
  100.  
  101. #==============================================================================
  102. # ?? Window_Message_Face
  103. #==============================================================================
  104.  
  105. class Window_Message_Face < Window_Base
  106.  
  107.   #--------------------------------------------------------------------------
  108.   # initialize
  109.   #--------------------------------------------------------------------------
  110.   def initialize
  111.     super(0, 0, 120, 120)
  112.     self.opacity = 0
  113.     @face_name = ""
  114.     @face_index = 0
  115.     @move_x = 0
  116.     close
  117.   end
  118.  
  119.   #--------------------------------------------------------------------------
  120.   # message_window=
  121.   #--------------------------------------------------------------------------
  122.   def message_window=(window)
  123.     @message_window = window
  124.   end
  125.  
  126.   #--------------------------------------------------------------------------
  127.   # set_face
  128.   #--------------------------------------------------------------------------
  129.   def set_face
  130.     contents.clear
  131.     return unless @message_window
  132.     if !$game_message.face_name.empty?
  133.       draw_face($game_message.face_name, $game_message.face_index, 0, 0)
  134.       set_position
  135.       show_face
  136.     else
  137.       hide_face
  138.     end
  139.   end
  140.  
  141.   #--------------------------------------------------------------------------
  142.   # set_position
  143.   #--------------------------------------------------------------------------
  144.   def set_position
  145.     return unless @message_window
  146.     self.x = @message_window.x
  147.     self.y = @message_window.y - 96
  148.     self.x += YSE::POP_MESSAGE::POSITION[:face_x_buffer]
  149.     self.y += YSE::POP_MESSAGE::POSITION[:face_y_buffer]
  150.     self.y += (@message_window.real_lines - 1) * 24
  151.     self.z = @message_window.z + 1
  152.     if (@face_name != $game_message.face_name || @face_index != $game_message.face_index)
  153.       if YSE::POP_MESSAGE::EFFECT[:move_face]
  154.         @move_x = 30
  155.         self.x -= 30
  156.       end
  157.       @face_name = $game_message.face_name
  158.       @face_index = $game_message.face_index
  159.       self.contents_opacity = 0 if YSE::POP_MESSAGE::EFFECT[:fade_face]
  160.     end
  161.   end
  162.  
  163.   #--------------------------------------------------------------------------
  164.   # show_face
  165.   #--------------------------------------------------------------------------
  166.   def show_face
  167.     open
  168.   end
  169.  
  170.   #--------------------------------------------------------------------------
  171.   # hide_face
  172.   #--------------------------------------------------------------------------
  173.   def hide_face
  174.     contents.clear
  175.     close
  176.   end
  177.  
  178.   #--------------------------------------------------------------------------
  179.   # update
  180.   #--------------------------------------------------------------------------
  181.   def update
  182.     super
  183.     self.contents_opacity += 15 if self.contents_opacity < 255
  184.     unless @move_x <= 0
  185.       self.x += 2
  186.       @move_x -= 2
  187.     end
  188.   end
  189.  
  190. end # Sprite_Message_Face
  191.  
  192. #==============================================================================
  193. # ?? Window_Message
  194. #==============================================================================
  195.  
  196. class Window_Message < Window_Base
  197.  
  198.   #--------------------------------------------------------------------------
  199.   # new method: face_window=
  200.   #--------------------------------------------------------------------------
  201.   def face_window=(window)
  202.     @face_window = window
  203.   end
  204.  
  205.   #--------------------------------------------------------------------------
  206.   # new method: bubble_tag=
  207.   #--------------------------------------------------------------------------
  208.   def bubble_tag=(sprite)
  209.     @bubble_tag = sprite
  210.   end
  211.  
  212.   #--------------------------------------------------------------------------
  213.   # new method: message_escape_characters_pop_message
  214.   #--------------------------------------------------------------------------
  215.   def message_escape_characters_pop_message(result)
  216.     result.gsub!(/\eBM\[(\d+)\]/i) { event_pop_message_setup($1.to_i, false) }
  217.     result.gsub!(/\eBMF\[(\d+)\]/i) { event_pop_message_setup($1.to_i, true) }
  218.     result.gsub!(/\eCBM/i) { event_pop_message_setup(nil, false) }
  219.     result
  220.   end
  221.  
  222.   #--------------------------------------------------------------------------
  223.   # alias method: convert_escape_characters
  224.   #--------------------------------------------------------------------------
  225.   alias yse_convert_escape_characters_pm convert_escape_characters
  226.   def convert_escape_characters(text)
  227.     result = yse_convert_escape_characters_pm(text)
  228.     result = message_escape_characters_pop_message(result)
  229.     result
  230.   end
  231.  
  232.   #--------------------------------------------------------------------------
  233.   # new method: event_pop_message_setup
  234.   #--------------------------------------------------------------------------
  235.   def event_pop_message_setup(event_id, follower = false)
  236.     if follower && $game_player.followers[event_id].nil?
  237.       @event_pop_id = nil
  238.       @event_pop_follower = false
  239.       return ""
  240.     end
  241.     @event_pop_follower = follower
  242.     @event_pop_id = event_id
  243.     return ""
  244.   end
  245.  
  246.   #--------------------------------------------------------------------------
  247.   # new method: set_face_position
  248.   #--------------------------------------------------------------------------
  249.   def set_face_position
  250.     return unless SceneManager.scene_is?(Scene_Map)
  251.     return unless @event_pop_id
  252.     return unless @face_window
  253.     contents.clear
  254.     @face_window.set_face
  255.     return unless $imported["YEA-MessageSystem"]
  256.     return if @face_window.close?
  257.     #@name_window.x = self.x + YSE::POP_MESSAGE::POSITION[:face_x_buffer] + YSE::POP_MESSAGE::POSITION[:name_x_buffer] if (@name_position == 1 || @name_position == 2)
  258.   end
  259.  
  260.   #--------------------------------------------------------------------------
  261.   # alias method: new_page
  262.   #--------------------------------------------------------------------------
  263.   alias window_message_new_page_pm_yse new_page
  264.   def new_page(text, pos)
  265.     window_message_new_page_pm_yse(text, pos)
  266.     set_face_position
  267.   end
  268.  
  269.   #--------------------------------------------------------------------------
  270.   # alias method: close
  271.   #--------------------------------------------------------------------------
  272.   alias pop_message_close close
  273.   def close
  274.     pop_message_close
  275.     return unless SceneManager.scene_is?(Scene_Map)
  276.     return unless @event_pop_id
  277.     @event_pop_id = nil
  278.     @event_pop_follower = false
  279.     @face_window.hide_face
  280.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  281.     @bubble_tag.visible = false if @bubble_tag
  282.   end
  283.  
  284.   #--------------------------------------------------------------------------
  285.   # alias method: open_and_wait
  286.   #--------------------------------------------------------------------------
  287.   alias pop_message_open_and_wait open_and_wait
  288.   def open_and_wait
  289.     pop_message_open_and_wait
  290.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  291.     @bubble_tag.visible = true if @event_pop_id && @bubble_tag
  292.   end
  293.  
  294.   #--------------------------------------------------------------------------
  295.   # alias method: process_all_text
  296.   #--------------------------------------------------------------------------
  297.   alias pop_message_process_all_text process_all_text
  298.   def process_all_text
  299.     @event_pop_id = nil
  300.     convert_escape_characters($game_message.all_text)
  301.     update_placement
  302.     adjust_pop_message($game_message.all_text)
  303.     pop_message_process_all_text
  304.   end
  305.  
  306.   #--------------------------------------------------------------------------
  307.   # alias method: update_placement
  308.   #--------------------------------------------------------------------------
  309.   alias event_pop_message_update_placement update_placement
  310.   def update_placement
  311.     if SceneManager.scene_is?(Scene_Map)
  312.       if @event_pop_id.nil?
  313.         fix_default_message
  314.         event_pop_message_update_placement
  315.       elsif @event_pop_id == 0
  316.         character = $game_player
  317.         self.y = character.screen_y - self.height + YSE::POP_MESSAGE::POSITION[:y_buffer]
  318.         self.x = character.screen_x - self.width / 2 + YSE::POP_MESSAGE::POSITION[:x_buffer]
  319.         fix_position_bubble(character)
  320.         set_bubble_tag(character)
  321.       elsif @event_pop_id > 0
  322.         hash = @event_pop_follower ? $game_player.followers : $game_map.events
  323.         character = hash[@event_pop_id]
  324.         self.y = character.screen_y - self.height + YSE::POP_MESSAGE::POSITION[:y_buffer]
  325.         self.x = character.screen_x - self.width / 2 + YSE::POP_MESSAGE::POSITION[:x_buffer]
  326.         fix_position_bubble(character)
  327.         set_bubble_tag(character)
  328.       end
  329.     else
  330.       event_pop_message_update_placement
  331.     end
  332.   end
  333.  
  334.   #--------------------------------------------------------------------------
  335.   # new method: fix_default_message
  336.   #--------------------------------------------------------------------------
  337.   def fix_default_message
  338.     self.width = window_width
  339.     self.height = window_height
  340.     self.x = 0
  341.     @face_window.hide_face if @face_window
  342.     create_contents
  343.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  344.     @bubble_tag.visible = false if @bubble_tag
  345.   end
  346.  
  347.   #--------------------------------------------------------------------------
  348.   # new method: fix_position_bubble
  349.   #--------------------------------------------------------------------------
  350.   def fix_position_bubble(character)
  351.     end_x = self.x + self.width
  352.     end_y = self.y + self.height
  353.     self.x = 0 if self.x < 0
  354.     self.y = character.screen_y if self.y < 0
  355.     self.x = Graphics.width - self.width if end_x > Graphics.width
  356.     self.y = Graphics.height - self.height if end_y > Graphics.height
  357.   end
  358.  
  359.   #--------------------------------------------------------------------------
  360.   # new method: set_bubble_tag
  361.   #--------------------------------------------------------------------------
  362.   def set_bubble_tag(character)
  363.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  364.     return unless @bubble_tag
  365.     up = self.y == character.screen_y
  366.     self.y += up ? @bubble_tag.height / 2 : [email]-@bubble_tag.height[/email] / 2
  367.     @bubble_tag.x = character.screen_x - @bubble_tag.width / 2
  368.     if up
  369.       @bubble_tag.src_rect.set(0, @bubble_tag.height, @bubble_tag.width, @bubble_tag.height)
  370.       @bubble_tag.y = self.y - @bubble_tag.height - YSE::POP_MESSAGE::POSITION[:tag_y_buffer]
  371.     else
  372.       @bubble_tag.src_rect.set(0, 0, @bubble_tag.width, @bubble_tag.height)
  373.       @bubble_tag.y = self.y + self.height + YSE::POP_MESSAGE::POSITION[:tag_y_buffer]
  374.     end
  375.   end
  376.  
  377.   #--------------------------------------------------------------------------
  378.   # new method: cal_number_line
  379.   #--------------------------------------------------------------------------
  380.   def cal_number_line(text)
  381.     result = 0
  382.     text.each_line { result += 1 }
  383.     return result
  384.   end
  385.  
  386.   #--------------------------------------------------------------------------
  387.   # new method: cal_width_line
  388.   #--------------------------------------------------------------------------
  389.   def cal_width_line(text)
  390.     result = 0
  391.     text.each_line { |line|
  392.       result = text_size(line).width if result < text_size(line).width
  393.     }
  394.     return result
  395.   end
  396.  
  397.   #--------------------------------------------------------------------------
  398.   # alias method: adjust_message_window_size
  399.   #--------------------------------------------------------------------------
  400.   if $imported["YEA-MessageSystem"]
  401.   alias yse_pop_message_adjust_message_window_size adjust_message_window_size
  402.   def adjust_message_window_size
  403.     start_name_window if @event_pop_id
  404.     return if @event_pop_id
  405.     yse_pop_message_adjust_message_window_size
  406.   end
  407.   end
  408.  
  409.   #--------------------------------------------------------------------------
  410.   # new method: adjust_pop_message
  411.   #--------------------------------------------------------------------------
  412.   def adjust_pop_message(text = " ")
  413.     return unless SceneManager.scene_is?(Scene_Map)
  414.     unless @event_pop_id
  415.       if $imported["YEA-MessageSystem"]
  416.         #adjust_message_window_size
  417.       end
  418.       return
  419.     end
  420.     n_line = cal_number_line(text)
  421.     n_line = YSE::POP_MESSAGE::LIMIT[:limit_line] if YSE::POP_MESSAGE::LIMIT[:limit_line] > 0 && cal_number_line(text) > YSE::POP_MESSAGE::LIMIT[:limit_line]
  422.     @real_lines = n_line
  423.     self.height = fitting_height(n_line)
  424.     self.width = cal_width_line(text) + 24
  425.     self.width += new_line_x
  426.     if self.width > YSE::POP_MESSAGE::LIMIT[:limit_width] && YSE::POP_MESSAGE::LIMIT[:limit_width] > 0
  427.       self.width = YSE::POP_MESSAGE::LIMIT[:limit_width]
  428.     end
  429.     create_contents
  430.     update_placement
  431.   end
  432.  
  433.   #--------------------------------------------------------------------------
  434.   # overwrite method: new_line_x
  435.   #--------------------------------------------------------------------------
  436.   def new_line_x
  437.     if $game_message.face_name.empty?
  438.       return 0
  439.     else
  440.       result = YSE::POP_MESSAGE::POSITION[:face_x_buffer]
  441.       p_x = $imported["YEA-MessageSystem"] ? YEA::MESSAGE::FACE_INDENT_X : 112
  442.       result += p_x
  443.       return result
  444.     end
  445.   end
  446.  
  447.   #--------------------------------------------------------------------------
  448.   # new method: real_lines
  449.   #--------------------------------------------------------------------------
  450.   def real_lines
  451.     @real_lines
  452.   end
  453.  
  454. end # Window_Message
  455.  
  456. #==============================================================================
  457. # ?? Scene_Map
  458. #==============================================================================
  459.  
  460. class Scene_Map < Scene_Base
  461.  
  462.   #--------------------------------------------------------------------------
  463.   # alias method: create_message_window
  464.   #--------------------------------------------------------------------------
  465.   alias yse_pm_create_message_window create_message_window
  466.   def create_message_window
  467.     yse_pm_create_message_window
  468.     @face_window = Window_Message_Face.new
  469.     @face_window.message_window = @message_window
  470.     if YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  471.       @bubble_tag_sprite = Sprite.new
  472.       @bubble_tag_sprite.visible = false
  473.       @bubble_tag_sprite.bitmap = Cache.system(YSE::POP_MESSAGE::EFFECT[:bubble_tag_name])
  474.       @bubble_tag_sprite.src_rect.set(0, 0, @bubble_tag_sprite.width, @bubble_tag_sprite.height / 2)
  475.       @message_window.bubble_tag = @bubble_tag_sprite
  476.     end
  477.     @message_window.face_window = @face_window
  478.   end
  479.  
  480.   #--------------------------------------------------------------------------
  481.   # alias method: dispose_spriteset
  482.   #--------------------------------------------------------------------------
  483.   alias pop_message_dispose_spriteset dispose_spriteset
  484.   def dispose_spriteset
  485.     pop_message_dispose_spriteset
  486.     return unless @bubble_tag_sprite
  487.     @bubble_tag_sprite.dispose
  488.   end
  489.  
  490. end # Scene_Map
  491.  
  492. #==============================================================================
  493. #
  494. # ?¥ End of File
  495. #
  496. #==============================================================================




半身像:
RUBY 代码复制
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ 半身像对话框 by LBQ
  4. #------------------------------------------------------------------------------
  5. #  一个简单的半身像对话框罢了= =
  6. #------------------------------------------------------------------------------
  7. # ■ 用法一览
  8. #     1:如何将半身像应用到游戏中?
  9. #       ——如果想要把一个脸图替换成半身像,则需要找到这个脸图的编号,比如说拉尔
  10. #           夫,就是Actor1的编号0,之后去在Graphics/Busts这个文件夹里面拷贝一个
  11. #           叫做Actor1_0的图像,这个图像会被当做半身像替换原有图像。
  12. #==============================================================================
  13. $imported ||= {}
  14. $imported[:LBQ_Bust]=true
  15.  
  16. module LBQ
  17.   module Bust
  18.     FOLDER="Busts"
  19.     SUB1=[/【/,    "\\{\\c[6]-- "]
  20.     SUB2=[/】/,    " --\\c[0]\\}"]
  21.  
  22.     TEXT_FOR_NEXT="[next]"
  23.     TEXT_FOR_END ="[end]"
  24.  
  25.     INDENT=175 #半身像的缩进
  26.   end
  27. end
  28.  
  29. module Cache
  30.   def self.busts(filename)
  31.     load_bitmap("Graphics/#{LBQ::Bust::FOLDER}/", filename)
  32.   end
  33. end
  34.  
  35.  
  36.  
  37. class Sprite_Bust < Sprite_Base
  38.   attr_accessor   :bust_graphics
  39.   attr_accessor   :status
  40.  
  41.   def initialize(vp=nil)
  42.     super(vp)
  43.     @bust_graphics=nil
  44.     @status=:nothing
  45.   end
  46.  
  47.   def slide_in
  48.     @status=:sliding_in
  49.   end
  50.  
  51.   def slide_out
  52.     @status=:sliding_out
  53.     if $game_message.do_not_slide_out
  54.       @status=:slided_out
  55.       set_pos
  56.     end
  57.   end
  58.  
  59.  
  60.  
  61.  
  62.   def set_pos(slide_in=true)
  63.     self.x=0 - self.bitmap.width
  64.     self.y=Graphics.height-self.bitmap.height
  65.  
  66.     self.x=0 unless slide_in
  67.   end
  68.  
  69.  
  70.   def set_graphics(bust_graphics)
  71.     self.bitmap=Cache.busts(bust_graphics)
  72.   end
  73.  
  74.  
  75.  
  76.   def update
  77.     super
  78.     case @status
  79.     when :nothing
  80.       # Do Nothing
  81.     when :sliding_in
  82.       #Slide In
  83.       self.x+=12
  84.       if self.x>=0
  85.         self.x=0
  86.         @status=:slided_in
  87.       end
  88.  
  89.     when :sliding_out
  90.       self.x-=12
  91.       if self.x<= -self.bitmap.width
  92.         self.x= -self.bitmap.width
  93.         @status=:slided_out
  94.       end
  95.       #Slide Out
  96.     when :slided_in
  97.       #Slided in
  98.     when :slided_out
  99.       #Sliede out
  100.     end
  101.  
  102.   end
  103.  
  104.  
  105. end
  106.  
  107.  
  108. class Game_Message
  109.   attr_accessor   :bust_name
  110.   attr_accessor   :bust
  111.   attr_accessor   :have_bust
  112.   attr_accessor   :do_not_slide_out
  113.  
  114.   alias lbq_bust_shot_game_message_init initialize
  115.   def initialize
  116.     lbq_bust_shot_game_message_init
  117.     @bust_name=""
  118.     @bust=nil
  119.     @have_bust=false
  120.     @do_not_slide_out=false
  121.   end
  122.  
  123.  
  124.  
  125.   #--------------------------------------------------------------------------
  126.   # ● 添加内容
  127.   #--------------------------------------------------------------------------
  128.   def add(text)
  129.     new_text=text.gsub(LBQ::Bust::SUB1[0],LBQ::Bust::SUB1[1])
  130.     new_text2=new_text.gsub(LBQ::Bust::SUB2[0],LBQ::Bust::SUB2[1])
  131.     if new_text2.include? LBQ::Bust::TEXT_FOR_NEXT
  132.       new_text2.delete!(LBQ::Bust::TEXT_FOR_NEXT)
  133.       $game_message.do_not_slide_out=true
  134.     end
  135.  
  136.     if new_text2.include? LBQ::Bust::TEXT_FOR_END
  137.       new_text2.delete!(LBQ::Bust::TEXT_FOR_END)
  138.       $game_message.do_not_slide_out=false
  139.     end
  140.     @texts.push(new_text2)
  141.   end
  142. end
  143.  
  144.  
  145.  
  146. class Game_Interpreter
  147.   alias lbq_bust_shot_command_101 command_101
  148.   #--------------------------------------------------------------------------
  149.   # ● 显示文字
  150.   #--------------------------------------------------------------------------
  151.   def command_101
  152.     $game_message.bust=nil
  153.       unless @params[0].empty?
  154.         if File.exist?("Graphics/#{LBQ::Bust::FOLDER}/#{@params[0]}_#{@params[1]}.png")
  155.           $game_message.have_bust=true
  156.         else
  157.           $game_message.have_bust=false
  158.           $game_message.bust_name=""
  159.         end
  160.       end
  161.  
  162.     unless @params[3] == 2
  163.       $game_message.have_bust=false
  164.     end
  165.  
  166.     if $game_message.have_bust
  167.       $game_message.bust_name="#{@params[0]}_#{@params[1]}"
  168.       $game_message.bust=nil
  169.       $game_message.bust=Sprite_Bust.new
  170.       $game_message.bust.set_graphics($game_message.bust_name)
  171.       $game_message.bust.z=99999
  172.       unless $game_message.do_not_slide_out
  173.         $game_message.bust.set_pos
  174.         $game_message.bust.slide_in
  175.       else
  176.         $game_message.bust.set_pos(false)
  177.         $game_message.bust.slide_in
  178.       end
  179.     end
  180.  
  181.     lbq_bust_shot_command_101
  182.     if $game_message.have_bust
  183.         $game_message.bust.slide_out
  184.         Fiber.yield until $game_message.bust.status==:slided_out
  185.     end
  186.     $game_message.have_bust=false
  187.     $game_message.bust_name=""
  188.  
  189.   end
  190.  
  191.  
  192.   alias lbq_bust_int_update update
  193.   def update
  194.     lbq_bust_int_update
  195.     $game_message.bust.update unless $game_message.bust.nil?
  196.   end
  197.  
  198. end
  199.  
  200.  
  201. class Window_Message
  202.   #--------------------------------------------------------------------------
  203.   # ● 获取换行位置
  204.   #--------------------------------------------------------------------------
  205.   def new_line_x
  206.     value=0
  207.     value=112 unless $game_message.face_name.empty?
  208.     unless $game_message.face_name.empty? && $game_message.bust_name.empty?
  209.       value=LBQ::Bust::INDENT
  210.     end
  211.  
  212.     return value
  213.   end
  214. end
  215.  
  216.  
  217. class Window_Message
  218.   #--------------------------------------------------------------------------
  219.   # ● 翻页处理
  220.   #--------------------------------------------------------------------------
  221.   def new_page(text, pos)
  222.     contents.clear
  223.     draw_face($game_message.face_name, $game_message.face_index, 0, 0) if $game_message.bust_name.empty?
  224.     reset_font_settings
  225.     pos[:x] = new_line_x
  226.     pos[:y] = 0
  227.     pos[:new_x] = new_line_x
  228.     pos[:height] = calc_line_height(text)
  229.     clear_flags
  230.   end
  231. end

QQ图片20161223232835.png (3.95 KB, 下载次数: 18)

QQ图片20161223232835.png

QQ图片20161223234558.png (5.77 KB, 下载次数: 22)

QQ图片20161223234558.png

点评

这是可以解决的,只要找到冲突的位置并修正就行了。建议将脚本附上,以便观察。另外请注意下版规增修预告,因为明年起附脚本是必须的了。  发表于 2016-12-23 23:52

评分

参与人数 1星屑 +50 收起 理由
VIPArcher + 50 结贴

查看全部评分

Lv4.逐梦者 (版主)

梦石
0
星屑
6901
在线时间
7028 小时
注册时间
2013-11-2
帖子
1344

开拓者剧作品鉴家

2
发表于 2016-12-24 00:23:52 | 只看该作者
本帖最后由 RaidenInfinity 于 2016-12-24 00:25 编辑

主要冲突的地方在Window_Message类的new_line_x方法。两个脚本都有各自的定义,所以在列表内偏下面的脚本会抵消上面脚本对此方法的定义。

那么我大概整合一下:

RUBY 代码复制
  1. class Window_Message
  2.  
  3.   def new_line_x
  4.     return LBQ::Bust::INDENT if !$game_message.bust_name.empty? #如果半身立绘存在就用半身立绘的缩进
  5.     return 0 if $game_message.face_name.empty? #如果没有脸图就不用缩进
  6.     value = YSE::POP_MESSAGE::POSITION[:face_x_buffer] #以上两种情况都没有,就使用pop message的脸图缩进
  7.     value += $imported["YEA-MessageSystem"] ? YEA::MESSAGE::FACE_INDENT_X : 112
  8.     return value
  9.   end
  10.  
  11. end


你只要把这个插件脚本放在两个脚本的底下就行了,不需要改动脚本本身(怕出乱子)。
顺便说,如果你没有使用YEA Message System这个脚本的话,可以用这个比较简短的:
RUBY 代码复制
  1. class Window_Message
  2.  
  3.   def new_line_x
  4.     return LBQ::Bust::INDENT if !$game_message.bust_name.empty? #如果半身立绘存在就用半身立绘的缩进
  5.     return 0 if $game_message.face_name.empty? #如果没有脸图就不用缩进
  6.     return YSE::POP_MESSAGE::POSITION[:face_x_buffer] + 112#以上两种情况都没有,就使用pop message的脸图缩进
  7.   end
  8.  
  9. end

因为省略了判定。

评分

参与人数 1梦石 +1 收起 理由
VIPArcher + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
32 小时
注册时间
2016-6-23
帖子
24
3
 楼主| 发表于 2016-12-24 00:49:40 | 只看该作者
RaidenInfinity 发表于 2016-12-24 00:23
主要冲突的地方在Window_Message类的new_line_x方法。两个脚本都有各自的定义,所以在列表内偏下面的脚本会 ...

解决了!!!!
谢谢版主!!!!!!!!!{:2_249:}
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-6 06:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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