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

Project1

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

[已经过期] 人物上方出现对话框

[复制链接]

Lv1.梦旅人

梦石
0
星屑
90
在线时间
28 小时
注册时间
2016-6-21
帖子
5
跳转到指定楼层
1
发表于 2016-12-7 00:50:41 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 蘋果派 于 2016-12-7 01:06 编辑

我找了好久都没有这种脚本。如果有用类似这种的脚本能不能告诉我要去哪里找?QAQ

10101.jpg (42.93 KB, 下载次数: 15)

示意圖01

示意圖01

開新影像.jpg (59.74 KB, 下载次数: 17)

示意圖02

示意圖02

Lv1.梦旅人

梦石
0
星屑
50
在线时间
188 小时
注册时间
2016-8-22
帖子
152
2
发表于 2016-12-7 08:01:54 | 只看该作者
  1. #==============================================================================
  2. #
  3. # ?¥ Yami Engine Ace - Pop Message
  4. # -- Last Updated: 2012.06.07
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YSE-PopMessage"] = true

  11. #==============================================================================
  12. # ?¥ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.06.07 - Fixed Compatible: YEA - Ace Message System.
  15. # 2012.05.11 - Fixed Message Position.
  16. #            - Remove Requirement: YSE - Fix Events Order.
  17. # 2012.05.07 - Fixed Face position.
  18. #            - Added Requirement: YSE - Fix Events Order.
  19. # 2012.04.06 - You can change Bubble Tag filename.
  20. # 2012.03.28 - Fixed Default Message Position and Sizes.
  21. # 2012.03.27 - Fixed Default Message.
  22. # 2012.03.27 - Added Bubble Tag.
  23. # 2012.03.25 - Fixed Escape Message.
  24. # 2012.03.24 - Fixed Battle Message.
  25. # 2012.03.24 - Rewrote script.
  26. #
  27. #==============================================================================
  28. # ?¥ Instructions
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # To install this script, open up your script editor and copy/paste this script
  31. # to an open slot below ?¥ Materials/‘f?T but above ?¥ Main. Remember to save.
  32. #
  33. # -----------------------------------------------------------------------------
  34. # Message Window text Codes - These go inside of your message window.
  35. # -----------------------------------------------------------------------------
  36. #  Position:   Effect:
  37. #    \bm[x]    - Sets Message Window position to event x. *Note
  38. #    \cbm      - Cancel bubble message.
  39. #
  40. #              *Note: Set to 0 to sets position to Game Player.
  41. #
  42. #==============================================================================
  43. # ?¥ Compatibility
  44. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  46. # it will run with RPG Maker VX without adjusting.
  47. #
  48. #==============================================================================

  49. module YSE
  50.   module POP_MESSAGE
  51.    
  52.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  53.     # - Visual Settings -
  54.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  55.     LIMIT = { # Start.
  56.       :limit_width    =>  0,  # Set to 0 to disable limit.
  57.       :limit_line     =>  6,  # Set to 0 to disable limit.
  58.     } # End.
  59.    
  60.     POSITION = { # Start.
  61.       :x_buffer       =>  0,
  62.       :y_buffer       =>  -36,
  63.       :face_x_buffer  =>  8,
  64.       :face_y_buffer  =>  24,
  65.       :tag_y_buffer   =>  -6,
  66.       :name_x_buffer  =>  112, # Require YEA - Message System.
  67.     } # End.
  68.    
  69.     EFFECT = { # Start.
  70.       :fade_face       =>  true,
  71.       :move_face       =>  true,
  72.       :use_bubble_tag  =>  true,
  73.       :bubble_tag_name => "BubbleTag",
  74.     } # End.
  75.    
  76.   end
  77. end

  78. #==============================================================================
  79. # ?¥ Editting anything past this point may potentially result in causing
  80. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  81. # halitosis so edit at your own risk.
  82. #==============================================================================

  83. #==============================================================================
  84. # ?? Spriteset_Map
  85. #==============================================================================

  86. class Spriteset_Map
  87.   
  88.   #--------------------------------------------------------------------------
  89.   # public instance variables
  90.   #--------------------------------------------------------------------------
  91.   attr_accessor :character_sprites
  92.   
  93. end # Spriteset_Map

  94. #==============================================================================
  95. # ?? Window_Message_Face
  96. #==============================================================================

  97. class Window_Message_Face < Window_Base
  98.   
  99.   #--------------------------------------------------------------------------
  100.   # initialize
  101.   #--------------------------------------------------------------------------
  102.   def initialize
  103.     super(0, 0, 120, 120)
  104.     self.opacity = 0
  105.     @face_name = ""
  106.     @face_index = 0
  107.     @move_x = 0
  108.     close
  109.   end
  110.   
  111.   #--------------------------------------------------------------------------
  112.   # message_window=
  113.   #--------------------------------------------------------------------------
  114.   def message_window=(window)
  115.     @message_window = window
  116.   end
  117.   
  118.   #--------------------------------------------------------------------------
  119.   # set_face
  120.   #--------------------------------------------------------------------------
  121.   def set_face
  122.     contents.clear
  123.     return unless @message_window
  124.     if !$game_message.face_name.empty?
  125.       draw_face($game_message.face_name, $game_message.face_index, 0, 0)
  126.       set_position
  127.       show_face
  128.     else
  129.       hide_face
  130.     end
  131.   end
  132.   
  133.   #--------------------------------------------------------------------------
  134.   # set_position
  135.   #--------------------------------------------------------------------------
  136.   def set_position
  137.     return unless @message_window
  138.     self.x = @message_window.x
  139.     self.y = @message_window.y - 96
  140.     self.x += YSE::POP_MESSAGE::POSITION[:face_x_buffer]
  141.     self.y += YSE::POP_MESSAGE::POSITION[:face_y_buffer]
  142.     self.y += (@message_window.real_lines - 1) * 24
  143.     self.z = @message_window.z + 1
  144.     if (@face_name != $game_message.face_name || @face_index != $game_message.face_index)
  145.       if YSE::POP_MESSAGE::EFFECT[:move_face]
  146.         @move_x = 30
  147.         self.x -= 30
  148.       end
  149.       @face_name = $game_message.face_name
  150.       @face_index = $game_message.face_index
  151.       self.contents_opacity = 0 if YSE::POP_MESSAGE::EFFECT[:fade_face]
  152.     end
  153.   end
  154.   
  155.   #--------------------------------------------------------------------------
  156.   # show_face
  157.   #--------------------------------------------------------------------------
  158.   def show_face
  159.     open
  160.   end
  161.   
  162.   #--------------------------------------------------------------------------
  163.   # hide_face
  164.   #--------------------------------------------------------------------------
  165.   def hide_face
  166.     contents.clear
  167.     close
  168.   end
  169.   
  170.   #--------------------------------------------------------------------------
  171.   # update
  172.   #--------------------------------------------------------------------------
  173.   def update
  174.     super
  175.     self.contents_opacity += 15 if self.contents_opacity < 255
  176.     unless @move_x <= 0
  177.       self.x += 2
  178.       @move_x -= 2
  179.     end
  180.   end
  181.   
  182. end # Sprite_Message_Face

  183. #==============================================================================
  184. # ?? Window_Message
  185. #==============================================================================

  186. class Window_Message < Window_Base
  187.   
  188.   #--------------------------------------------------------------------------
  189.   # new method: face_window=
  190.   #--------------------------------------------------------------------------
  191.   def face_window=(window)
  192.     @face_window = window
  193.   end
  194.   
  195.   #--------------------------------------------------------------------------
  196.   # new method: bubble_tag=
  197.   #--------------------------------------------------------------------------
  198.   def bubble_tag=(sprite)
  199.     @bubble_tag = sprite
  200.   end
  201.   
  202.   #--------------------------------------------------------------------------
  203.   # new method: message_escape_characters_pop_message
  204.   #--------------------------------------------------------------------------
  205.   def message_escape_characters_pop_message(result)
  206.     result.gsub!(/\eBM\[(\d+)\]/i) { event_pop_message_setup($1.to_i, false) }
  207.     result.gsub!(/\eBMF\[(\d+)\]/i) { event_pop_message_setup($1.to_i, true) }
  208.     result.gsub!(/\eCBM/i) { event_pop_message_setup(nil, false) }
  209.     result
  210.   end
  211.   
  212.   #--------------------------------------------------------------------------
  213.   # alias method: convert_escape_characters
  214.   #--------------------------------------------------------------------------
  215.   alias yse_convert_escape_characters_pm convert_escape_characters
  216.   def convert_escape_characters(text)
  217.     result = yse_convert_escape_characters_pm(text)
  218.     result = message_escape_characters_pop_message(result)
  219.     result
  220.   end
  221.   
  222.   #--------------------------------------------------------------------------
  223.   # new method: event_pop_message_setup
  224.   #--------------------------------------------------------------------------
  225.   def event_pop_message_setup(event_id, follower = false)
  226.     if follower && $game_player.followers[event_id].nil?
  227.       @event_pop_id = nil
  228.       @event_pop_follower = false
  229.       return ""
  230.     end
  231.     @event_pop_follower = follower
  232.     @event_pop_id = event_id
  233.     return ""
  234.   end
  235.   
  236.   #--------------------------------------------------------------------------
  237.   # new method: set_face_position
  238.   #--------------------------------------------------------------------------
  239.   def set_face_position
  240.     return unless SceneManager.scene_is?(Scene_Map)
  241.     return unless @event_pop_id
  242.     return unless @face_window
  243.     contents.clear
  244.     @face_window.set_face
  245.     return unless $imported["YEA-MessageSystem"]
  246.     return if @face_window.close?
  247.     #@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)
  248.   end
  249.   
  250.   #--------------------------------------------------------------------------
  251.   # alias method: new_page
  252.   #--------------------------------------------------------------------------
  253.   alias window_message_new_page_pm_yse new_page
  254.   def new_page(text, pos)
  255.     window_message_new_page_pm_yse(text, pos)
  256.     set_face_position
  257.   end
  258.   
  259.   #--------------------------------------------------------------------------
  260.   # alias method: close
  261.   #--------------------------------------------------------------------------
  262.   alias pop_message_close close
  263.   def close
  264.     pop_message_close
  265.     return unless SceneManager.scene_is?(Scene_Map)
  266.     return unless @event_pop_id
  267.     @event_pop_id = nil
  268.     @event_pop_follower = false
  269.     @face_window.hide_face
  270.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  271.     @bubble_tag.visible = false if @bubble_tag
  272.   end
  273.   
  274.   #--------------------------------------------------------------------------
  275.   # alias method: open_and_wait
  276.   #--------------------------------------------------------------------------
  277.   alias pop_message_open_and_wait open_and_wait
  278.   def open_and_wait
  279.     pop_message_open_and_wait
  280.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  281.     @bubble_tag.visible = true if @event_pop_id && @bubble_tag
  282.   end
  283.   
  284.   #--------------------------------------------------------------------------
  285.   # alias method: process_all_text
  286.   #--------------------------------------------------------------------------
  287.   alias pop_message_process_all_text process_all_text
  288.   def process_all_text
  289.     @event_pop_id = nil
  290.     convert_escape_characters($game_message.all_text)
  291.     update_placement
  292.     adjust_pop_message($game_message.all_text)
  293.     pop_message_process_all_text
  294.   end

  295.   #--------------------------------------------------------------------------
  296.   # alias method: update_placement
  297.   #--------------------------------------------------------------------------
  298.   alias event_pop_message_update_placement update_placement
  299.   def update_placement
  300.     if SceneManager.scene_is?(Scene_Map)
  301.       if @event_pop_id.nil?
  302.         fix_default_message
  303.         event_pop_message_update_placement
  304.       elsif @event_pop_id == 0
  305.         character = $game_player
  306.         self.y = character.screen_y - self.height + YSE::POP_MESSAGE::POSITION[:y_buffer]
  307.         self.x = character.screen_x - self.width / 2 + YSE::POP_MESSAGE::POSITION[:x_buffer]
  308.         fix_position_bubble(character)
  309.         set_bubble_tag(character)
  310.       elsif @event_pop_id > 0
  311.         hash = @event_pop_follower ? $game_player.followers : $game_map.events
  312.         character = hash[@event_pop_id]
  313.         self.y = character.screen_y - self.height + YSE::POP_MESSAGE::POSITION[:y_buffer]
  314.         self.x = character.screen_x - self.width / 2 + YSE::POP_MESSAGE::POSITION[:x_buffer]
  315.         fix_position_bubble(character)
  316.         set_bubble_tag(character)
  317.       end
  318.     else
  319.       event_pop_message_update_placement
  320.     end
  321.   end
  322.   
  323.   #--------------------------------------------------------------------------
  324.   # new method: fix_default_message
  325.   #--------------------------------------------------------------------------
  326.   def fix_default_message
  327.     self.width = window_width
  328.     self.height = window_height
  329.     self.x = 0
  330.     @face_window.hide_face if @face_window
  331.     create_contents
  332.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  333.     @bubble_tag.visible = false if @bubble_tag
  334.   end
  335.   
  336.   #--------------------------------------------------------------------------
  337.   # new method: fix_position_bubble
  338.   #--------------------------------------------------------------------------
  339.   def fix_position_bubble(character)
  340.     end_x = self.x + self.width
  341.     end_y = self.y + self.height
  342.     self.x = 0 if self.x < 0
  343.     self.y = character.screen_y if self.y < 0
  344.     self.x = Graphics.width - self.width if end_x > Graphics.width
  345.     self.y = Graphics.height - self.height if end_y > Graphics.height
  346.   end
  347.   
  348.   #--------------------------------------------------------------------------
  349.   # new method: set_bubble_tag
  350.   #--------------------------------------------------------------------------
  351.   def set_bubble_tag(character)
  352.     return unless YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  353.     return unless @bubble_tag
  354.     up = self.y == character.screen_y
  355.     self.y += up ? @bubble_tag.height / 2 : -@bubble_tag.height / 2
  356.     @bubble_tag.x = character.screen_x - @bubble_tag.width / 2
  357.     if up
  358.       @bubble_tag.src_rect.set(0, @bubble_tag.height, @bubble_tag.width, @bubble_tag.height)
  359.       @bubble_tag.y = self.y - @bubble_tag.height - YSE::POP_MESSAGE::POSITION[:tag_y_buffer]
  360.     else
  361.       @bubble_tag.src_rect.set(0, 0, @bubble_tag.width, @bubble_tag.height)
  362.       @bubble_tag.y = self.y + self.height + YSE::POP_MESSAGE::POSITION[:tag_y_buffer]
  363.     end
  364.   end
  365.   
  366.   #--------------------------------------------------------------------------
  367.   # new method: cal_number_line
  368.   #--------------------------------------------------------------------------
  369.   def cal_number_line(text)
  370.     result = 0
  371.     text.each_line { result += 1 }
  372.     return result
  373.   end
  374.   
  375.   #--------------------------------------------------------------------------
  376.   # new method: cal_width_line
  377.   #--------------------------------------------------------------------------
  378.   def cal_width_line(text)
  379.     result = 0
  380.     text.each_line { |line|
  381.       result = text_size(line).width if result < text_size(line).width
  382.     }
  383.     return result
  384.   end

  385.   #--------------------------------------------------------------------------
  386.   # alias method: adjust_message_window_size
  387.   #--------------------------------------------------------------------------
  388.   if $imported["YEA-MessageSystem"]
  389.   alias yse_pop_message_adjust_message_window_size adjust_message_window_size
  390.   def adjust_message_window_size
  391.     start_name_window if @event_pop_id
  392.     return if @event_pop_id
  393.     yse_pop_message_adjust_message_window_size
  394.   end
  395.   end
  396.   
  397.   #--------------------------------------------------------------------------
  398.   # new method: adjust_pop_message
  399.   #--------------------------------------------------------------------------
  400.   def adjust_pop_message(text = " ")
  401.     return unless SceneManager.scene_is?(Scene_Map)
  402.     unless @event_pop_id
  403.       if $imported["YEA-MessageSystem"]
  404.         #adjust_message_window_size
  405.       end
  406.       return
  407.     end
  408.     n_line = cal_number_line(text)
  409.     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]
  410.     @real_lines = n_line
  411.     self.height = fitting_height(n_line)
  412.     self.width = cal_width_line(text) + 24
  413.     self.width += new_line_x
  414.     if self.width > YSE::POP_MESSAGE::LIMIT[:limit_width] && YSE::POP_MESSAGE::LIMIT[:limit_width] > 0
  415.       self.width = YSE::POP_MESSAGE::LIMIT[:limit_width]
  416.     end
  417.     create_contents
  418.     update_placement
  419.   end
  420.   
  421.   #--------------------------------------------------------------------------
  422.   # overwrite method: new_line_x
  423.   #--------------------------------------------------------------------------
  424.   def new_line_x
  425.     if $game_message.face_name.empty?
  426.       return 0
  427.     else
  428.       result = YSE::POP_MESSAGE::POSITION[:face_x_buffer]
  429.       p_x = $imported["YEA-MessageSystem"] ? YEA::MESSAGE::FACE_INDENT_X : 112
  430.       result += p_x
  431.       return result
  432.     end
  433.   end
  434.   
  435.   #--------------------------------------------------------------------------
  436.   # new method: real_lines
  437.   #--------------------------------------------------------------------------
  438.   def real_lines
  439.     @real_lines
  440.   end
  441.   
  442. end # Window_Message

  443. #==============================================================================
  444. # ?? Scene_Map
  445. #==============================================================================

  446. class Scene_Map < Scene_Base
  447.   
  448.   #--------------------------------------------------------------------------
  449.   # alias method: create_message_window
  450.   #--------------------------------------------------------------------------
  451.   alias yse_pm_create_message_window create_message_window
  452.   def create_message_window
  453.     yse_pm_create_message_window
  454.     @face_window = Window_Message_Face.new
  455.     @face_window.message_window = @message_window
  456.     if YSE::POP_MESSAGE::EFFECT[:use_bubble_tag]
  457.       @bubble_tag_sprite = Sprite.new
  458.       @bubble_tag_sprite.visible = false
  459.       @bubble_tag_sprite.bitmap = Cache.system(YSE::POP_MESSAGE::EFFECT[:bubble_tag_name])
  460.       @bubble_tag_sprite.src_rect.set(0, 0, @bubble_tag_sprite.width, @bubble_tag_sprite.height / 2)
  461.       @message_window.bubble_tag = @bubble_tag_sprite
  462.     end
  463.     @message_window.face_window = @face_window
  464.   end
  465.   
  466.   #--------------------------------------------------------------------------
  467.   # alias method: dispose_spriteset
  468.   #--------------------------------------------------------------------------
  469.   alias pop_message_dispose_spriteset dispose_spriteset
  470.   def dispose_spriteset
  471.     pop_message_dispose_spriteset
  472.     return unless @bubble_tag_sprite
  473.     @bubble_tag_sprite.dispose
  474.   end
  475.   
  476. end # Scene_Map

  477. #==============================================================================
  478. #
  479. # ?¥ End of File
  480. #
  481. #==============================================================================
复制代码

点评

……?!我以为这个脚本VX也通用……啊呀!!抱歉了……  发表于 2016-12-7 12:28
(你这发的不是VA的脚本吗,另外我觉得楼主可能发错区了,再然后你在VX区发VA的东西不怕被怪蜀黍打吗(逃  发表于 2016-12-7 10:47

评分

参与人数 1星屑 +100 收起 理由
VIPArcher + 100 热心帮助(误

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
90
在线时间
28 小时
注册时间
2016-6-21
帖子
5
3
 楼主| 发表于 2016-12-7 18:02:12 | 只看该作者
我的版本是VX的喔,没关系看看有没有人有。
我找到的都是ACE版的QAQ

点评

图只是示意图啦~不过这种好像都是ACE版本  发表于 2016-12-7 18:30
因为我看到你截图里的游戏是VA做的,另外这游戏太醋辣(我在说啥?  发表于 2016-12-7 18:25

评分

参与人数 1星屑 +10 收起 理由
VIPArcher + 10 你可以去授权素材推广计划找找看.

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
90
在线时间
28 小时
注册时间
2016-6-21
帖子
5
4
 楼主| 发表于 2016-12-7 18:29:30 | 只看该作者
蘋果派 发表于 2016-12-7 18:02
我的版本是VX的喔,没关系看看有没有人有。
我找到的都是ACE版的QAQ

图只是示意图啦~不过这种好像都是ACE版本
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7936
在线时间
1127 小时
注册时间
2008-8-6
帖子
154

开拓者

5
发表于 2016-12-7 20:04:38 | 只看该作者
VX不是有 “漫画式对话框“”吗,善用搜索功能
趾高气昂只是我的外表,玩世不恭是因我青春年少
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
90
在线时间
28 小时
注册时间
2016-6-21
帖子
5
6
 楼主| 发表于 2016-12-12 00:33:38 | 只看该作者
蘋果派 发表于 2016-12-7 18:02
我的版本是VX的喔,没关系看看有没有人有。
我找到的都是ACE版的QAQ

我会去找找看的
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-21 21:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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