查看: 8525|回复: 12

[已经解决] 带着立绘的截图存档

[复制链接]
梦石
0
星屑
50
在线时间
154 小时
注册时间
2013-12-20
回帖
56
发表于 2013-12-21 07:55:03 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 丽塔菌 于 2013-12-21 20:14 编辑

希望可以把存档的样式改成这个样子,附带着游戏立绘。
因为嫌截图存档脚本有点烂大街了,自己又不会脚本什么的,于是来求助一下【捂脸
希望有人帮忙呢嗯
未命名.JPG

点评

你单身的原因是:长得丑,还嫌别人长得丑  发表于 2013-12-21 08:26
梦石
0
星屑
163
在线时间
445 小时
注册时间
2013-7-18
回帖
90
发表于 2014-7-2 20:45:03 | 显示全部楼层
taroxd 发表于 2014-7-2 07:07
改成  $game_party.members[0].class.id.to_s  试试看,图片放 4.png

再不行的话你可以去艾特一下喵呜喵 ...

$game_party.members[0].class.id.to_s  好用的,谢谢版版
我总问零碎问题,有点担心刷版不太好意思,下次会记得开新帖的  (´・ω・`)~
回复

使用道具 举报

…あたしは天

梦石
0
星屑
2308
在线时间
4033 小时
注册时间
2010-10-4
回帖
10548

开拓者贵宾

发表于 2014-7-2 07:07:13 | 显示全部楼层
lottesong 发表于 2014-7-2 06:33
打扰了,如果按他的职业来显示立绘
header[:lihuiname]  = $game_party.members[0].nickname  改成   $gam ...

改成  $game_party.members[0].class.id.to_s  试试看,图片放 4.png

再不行的话你可以去艾特一下喵呜喵5

下次记得开新帖提问题哦{:8_431:}

点评

这个其实无所谓啦,RPG::BaseItem 有定义方法 id 的 当然 class_id 更好就是……  发表于 2014-7-2 11:50
class_id 23333  发表于 2014-7-2 11:42
回复

使用道具 举报

梦石
0
星屑
163
在线时间
445 小时
注册时间
2013-7-18
回帖
90
发表于 2014-7-2 06:33:34 | 显示全部楼层
打扰了,如果按他的职业来显示立绘
header[:lihuiname]  = $game_party.members[0].nickname  改成   $game_party.members[0].class.id 这样可以吗?
不知道哪里出错   {:8_439:}  
比如是004号职业的话   图片夹里应该放 3.png 还是4.png 还是04.png  还是  职业名称.png? 都试了一下好像不行…

点评

谢谢喵呜君(ΦωΦ)我这里这么改好像不行~大概哪里冲突了  发表于 2014-7-2 20:39
$game_party.members[0].class_id  发表于 2014-7-2 11:43
回复

使用道具 举报

梦石
0
星屑
785
在线时间
351 小时
注册时间
2013-8-5
回帖
62
发表于 2014-3-4 18:58:57 | 显示全部楼层
本帖最后由 mileo 于 2014-3-7 01:25 编辑

未命名.png

用了一个MOG_Menu_Cursor的脚本,就变这样了 (如图~

[pre lang="ruby" line="1"]#==============================================================================
# +++ MOG - Animated Cursor (V1.2) +++
#==============================================================================
# By Moghunter
# http://www.atelier-rgss.com/
#==============================================================================
# Adiciona um cursor animado nos menus de comandos.
#==============================================================================
# Será necessário ter a imagem
#
# Menu_Cursor.png
#
# gravado na pasta GRAPHICS/SYSTEM/
#==============================================================================
# Ativando a animação do cursor
#
# Basta criar uma imagem que tenha a largura com no minimo o dobro de altura da
# imagem do cursor.
#
# EX
# largura 32 pixel (width) altura 32 pixel = 1 frames de animação.(Sem animação)
# largura 64 pixel (width) altura 32 pixel = 2 frames de animação.
# largura 128 pixel (width) altura 32 pixel = 4 frames de animação.
# largura 256 pixel (width) altura 32 pixel = 8 frames de animação
# Etc...
#
# NOTA
# Não há limite para quantidade de frames de animação, se não quiser a animação
# basta criar uma imagem com a altura proporcional a largura da imagem.
#
#==============================================================================
# ● Histórico (Version History)
#==============================================================================
# v 1.1 - Correção da posição do cursor na cena de batalha.
#==============================================================================

module MOG_MENU_CURSOR
  #Ativar animação do cursor se movimentando para os lados.
  SIDE_ANIMATION = true
  #Definição da posição do cursor. (Ajustes na posição)
  CURSOR_POSITION = [0,0]
  #Definição da velocidade da animação de frames.
  CURSOR_ANIMATION_SPEED = 9
end

#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
  
  attr_accessor :menu_cursor_name
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------      
  alias mog_menu_cursor_initialize initialize
  def initialize
      mog_menu_cursor_initialize
      @menu_cursor_name = "Menu_Cursor"
  end  
  
end  

#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp
  
  attr_accessor :menu_cursor   
   
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------      
  alias mog_cursor_sprite_initialize initialize
  def initialize
      mog_cursor_sprite_initialize
      @menu_cursor = [false,0,0,0]
  end  
  
end  

#==============================================================================
# ■ Sprite Cursor
#==============================================================================
class Sprite_Cursor < Sprite
  
  include MOG_MENU_CURSOR
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------   
  def initialize(viewport = nil , x , y)
      super(viewport)
      @cursor_image = Cache.system($game_system.menu_cursor_name.to_s)
      @frame_max = (@cursor_image.width / @cursor_image.height) rescue 1
      @frame_range = @frame_max > 0 ? (@cursor_image.width  / @frame_max) : 1
      @frame = 0
      @ca_speed = CURSOR_ANIMATION_SPEED
      self.bitmap = Bitmap.new(@frame_range,@frame_range)
      self.z = 10000
      self.opacity = 0
      @cw = self.bitmap.width / 2
      @c_p = [-@cw + CURSOR_POSITION[0],CURSOR_POSITION[1]]
      @mx = [0,0,0]
      refresh_animation(true)
      update_move
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------   
  def dispose
      self.bitmap.dispose
      self.bitmap = nil
      @cursor_image.dispose
      super
  end  
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------  
  def update
      if cursor_visible?
         self.visible = true
         update_move
         refresh_animation(false)
      else   
         self.visible = false
      end  
  end

  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------      
  def refresh_animation(start = false)
      @ca_speed += 1
      return if @frame_max == 1 and !start
      return if @ca_speed < CURSOR_ANIMATION_SPEED
      @ca_speed = 0
      self.bitmap.clear
      scr_rect = Rect.new(@frame_range * @frame,0,@frame_range,@frame_range)
      self.bitmap.blt(0,0,@cursor_image, scr_rect)
      @frame += 1
      @frame = 0 if @frame >= @frame_max
  end  
   
  #--------------------------------------------------------------------------
  # ● Cursor Visible?
  #--------------------------------------------------------------------------   
  def cursor_visible?
      px = $game_temp.menu_cursor[2]
      py = $game_temp.menu_cursor[3]
      return false if $game_temp.menu_cursor[1] == 0
      return false if px < 0 or py < 0 or (px == 0 and py == 0)
      return true
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Move
  #--------------------------------------------------------------------------   
  def update_move
      self.opacity += 25
      @new_pos = [$game_temp.menu_cursor[2],$game_temp.menu_cursor[3]]
      execute_animation_s
      execute_move(0,self.x, @new_pos[0] + @mx[1] + @c_p[0])
      execute_move(1,self.y, @new_pos[1] + @c_p[1])
  end  
  
  #--------------------------------------------------------------------------
  # ● Execute Animation S
  #--------------------------------------------------------------------------      
  def execute_animation_s
      return if !SIDE_ANIMATION
      @mx[2] += 1
      return if @mx[2] < 4
      @mx[2] = 0
      @mx[0] += 1
      case @mx[0]
         when 1..7;  @mx[1] += 1            
         when 8..14; @mx[1] -= 1
         else
           @mx[0] = 0
           @mx[1] = 0
      end
  end
  
  #--------------------------------------------------------------------------
  # ● Execute Move
  #--------------------------------------------------------------------------      
  def execute_move(type,cp,np)
      sp = 5 + ((cp - np).abs / 5)
      if cp > np
         cp -= sp
         cp = np if cp < np
      elsif cp < np
         cp += sp
         cp = np if cp > np
      end     
      self.x = cp if type == 0
      self.y = cp if type == 1
  end  
  
end

#==============================================================================
# ■ CURSOR_MENU SPRITE
#==============================================================================
module CURSOR_MENU_SPRITE
  
  #--------------------------------------------------------------------------
  # ● Cursor Sprite Enable
  #--------------------------------------------------------------------------      
  def cursor_sprite_enable
      return if self.index == nil rescue return
      create_cursor_sprite
      update_cursor_sprite
      update_cusor_position
      if !self.active
         $game_temp.menu_cursor[1] -= 1 if $game_temp.menu_cursor[1] > 0
      end
  end
   
  #--------------------------------------------------------------------------
  # ● Create Cursor Sprite
  #--------------------------------------------------------------------------   
  def create_cursor_sprite
      return if @cursor != nil
      return if $game_temp.menu_cursor[0]
      $game_temp.menu_cursor[0] = true
      reset_cursor_position
      @cursor = Sprite_Cursor.new(nil,x,y)
      @cursor_name = $game_system.menu_cursor_name
  end   
  
  #--------------------------------------------------------------------------
  # ● Dispose Cursor Sprite
  #--------------------------------------------------------------------------      
  def dispose_cursor_sprite
      return if @cursor == nil
      $game_temp.menu_cursor[0] = false
      reset_cursor_position
      @cursor.dispose
      @cursor = nil
  end  

  #--------------------------------------------------------------------------
  # ● Reset Cursor Position
  #--------------------------------------------------------------------------        
  def reset_cursor_position
      $game_temp.menu_cursor[1] = 0
      $game_temp.menu_cursor[2] = -32
      $game_temp.menu_cursor[3] = -32
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Cursor
  #--------------------------------------------------------------------------         
  def update_cursor_sprite
      return if @cursor == nil
      @cursor.update
      refresh_cursor_sprite if @cursor_name != $game_system.menu_cursor_name
  end
  
  #--------------------------------------------------------------------------
  # ● Refresh Cursor Sprite
  #--------------------------------------------------------------------------            
  def refresh_cursor_sprite
      @cursor_name = $game_system.menu_cursor_name
      dispose_cursor_sprite
      create_cursor_sprite
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Cursor Position
  #--------------------------------------------------------------------------         
  def update_cusor_position
      return if !can_update_cursor_position?
      x_v = [0,0]
      if SceneManager.scene_is?(Scene_Battle)
          if self.viewport != nil
             x_v = [-self.viewport.ox, self.viewport.rect.y]
          end
      end      
      x_e = (self.cursor_rect.x + self.x) - self.ox
      $game_temp.menu_cursor[2] = x_e + x_v[0]
      y_e = (self.cursor_rect.y + self.y + self.cursor_rect.height / 2) - self.oy
      $game_temp.menu_cursor[3] = y_e + x_v[1]
      $game_temp.menu_cursor[1] = 13
   end
   
  #--------------------------------------------------------------------------
  # ● Can Update Cursor
  #--------------------------------------------------------------------------            
   def can_update_cursor_position?
       return false if !self.active     
       return false if self.index < 0
       return false if !self.visible
       return true
   end  

end

#==============================================================================
# ■ Window Base
#==============================================================================
class Window_Base < Window
  include CURSOR_MENU_SPRITE
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------              
  alias mog_menu_cursor_base_dispose dispose
  def dispose
      mog_menu_cursor_base_dispose
      dispose_cursor_sprite
  end  

  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------              
  alias mog_cursor_update update
  def update
      mog_cursor_update
      cursor_sprite_enable
  end   
  
end

$mog_rgss3_animated_cursor = true[/pre]



图书馆的截图存档貌似有同样问题~~
光标位置不正确的话不知道是要改光标脚本还是改存档脚本

(使用默认存档的话则是光标不显示

不知道有没有高手可以帮忙>"<

谢谢你



点评

用了土法炼钢的方式自己搞定了啊~ 不过还是在此求有无大神可以直接脚本搞定~~ 感谢!!  发表于 2014-3-7 12:37
回复

使用道具 举报

梦石
1
星屑
23246
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 2014-1-4 10:57:19 | 显示全部楼层
ninesound 发表于 2014-1-4 06:24
我有用自制选单
因此连结到存档是Scene_Save

自制选单的脚本发上来一下,不然我没法改.........

PS.我没收到@ .........
回复

使用道具 举报

梦石
0
星屑
50
在线时间
189 小时
注册时间
2013-1-26
回帖
31
发表于 2014-1-4 06:24:09 | 显示全部楼层
問題.jpg

我有用自制选单
因此连结到存档是Scene_Save

请问怎么解决呢

点评

我只能为你@喵呜喵5  发表于 2014-1-4 09:30
回复

使用道具 举报

梦石
1
星屑
23246
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 2013-12-21 20:32:54 | 显示全部楼层
喵呜喵5 发表于 2013-12-21 20:05
真的删干净了吗?要删除的全部内容是这个脚本中的下面这段哦,你有没有错删除什么地方了? ...

请检查以下几件事:
1.这个脚本不兼容旧的存档,要使用的话请使用新的存档
2.这个脚本和显示立绘的菜单脚本显示立绘的方式一样,请直接对立绘素材动手
3.脚本显示的立绘文件名为队伍中第一名角色的昵称,请检查这个昵称是不是没有设置的
4.附带一个测试脚本时我用的立绘素材(商业素材,仅供交流学习,请勿用于游戏中)
1.png

点评

【不知道为什么喜欢定义为主角姓名【喂  发表于 2013-12-21 21:08
原来我不能显示是因为旧存档,可是游戏的昵称由于都是使用主角的,于是造成点击读档的时候显示的是菜单立绘,那么这个该怎么处理  发表于 2013-12-21 20:53
回复

使用道具 举报

梦石
1
星屑
23246
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 2013-12-21 20:05:45 | 显示全部楼层
丽塔菌 发表于 2013-12-21 19:45
试用了一下跳出了错误窗口
要改的地方也都改了QAQ

真的删干净了吗?要删除的全部内容是这个脚本中的下面这段哦,你有没有错删除什么地方了?
  1. module Cache
  2.   def self.m5lihui(filename)
  3.     load_bitmap("Graphics/m5lihui/", filename)
  4.   end
  5. end
复制代码

点评

谢谢,问题成功解决·  发表于 2013-12-21 21:33
【QAQ【测试了一下发现游戏立绘没有显示,可是立绘已经放入文件夹里面了,是要在脚本改坐标吗?  发表于 2013-12-21 20:25
【QAQ【测试了一下发现游戏立绘没有显示,可是立绘已经放入文件夹里面了,是要在脚本改坐标吗?  发表于 2013-12-21 20:24
啊发现错误了【自己原来的截图存档没有删除,谢谢QAQ问题解决了  发表于 2013-12-21 20:14
回复

使用道具 举报

梦石
0
星屑
50
在线时间
154 小时
注册时间
2013-12-20
回帖
56
 楼主| 发表于 2013-12-21 19:45:31 | 显示全部楼层
喵呜喵5 发表于 2013-12-21 15:45
完成了,你自己先试试有没有BUG,这玩意儿主要就是修改坐标修改的挺烦,本质上并不难,

立绘放到Graphic ...

试用了一下跳出了错误窗口
要改的地方也都改了QAQ
333.jpg

点评

135行 header[:lihuiname] = $game_party.members[0].nickname 改成 header[:lihuiname] = $game_party.members[0].name  发表于 2013-12-21 21:11
你希望用什么方式来定义立绘的名字?(主角的姓名?某个变量的数值?)  发表于 2013-12-21 21:07
回复

使用道具 举报

梦石
1
星屑
23246
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 2013-12-21 19:43:23 | 显示全部楼层
如果有使用立绘菜单的话,请把本脚本316~320行删掉

点评

测试了一下发现其实不删除也可以的,不过算了,删除了也不会出错就是了  发表于 2013-12-21 20:16
……哎?  发表于 2013-12-21 19:58
删掉了还是会出现下面那情况  发表于 2013-12-21 19:47
啊看见了我去试试  发表于 2013-12-21 19:46
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部