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

Project1

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

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
154 小时
注册时间
2013-12-20
帖子
66
跳转到指定楼层
发表于 2013-12-21 07:55:03 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

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

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

未命名.JPG (17.68 KB, 下载次数: 56)

未命名.JPG

点评

你单身的原因是:长得丑,还嫌别人长得丑  发表于 2013-12-21 08:26

Lv1.梦旅人

梦石
0
星屑
163
在线时间
445 小时
注册时间
2013-7-18
帖子
109
12
发表于 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  好用的,谢谢版版
我总问零碎问题,有点担心刷版不太好意思,下次会记得开新帖的  (´・ω・`)~
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

11
发表于 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
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
163
在线时间
445 小时
注册时间
2013-7-18
帖子
109
10
发表于 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
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
780
在线时间
350 小时
注册时间
2013-8-5
帖子
77
9
发表于 2014-3-4 18:58:57 | 只看该作者
本帖最后由 mileo 于 2014-3-7 01:25 编辑



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

RUBY 代码复制
  1. #==============================================================================
  2. # +++ MOG - Animated Cursor (V1.2) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # [url=http://www.atelier-rgss.com/]http://www.atelier-rgss.com/[/url]
  6. #==============================================================================
  7. # Adiciona um cursor animado nos menus de comandos.
  8. #==============================================================================
  9. # Será necessário ter a imagem
  10. #
  11. # Menu_Cursor.png
  12. #
  13. # gravado na pasta GRAPHICS/SYSTEM/
  14. #==============================================================================
  15. # Ativando a animação do cursor
  16. #
  17. # Basta criar uma imagem que tenha a largura com no minimo o dobro de altura da
  18. # imagem do cursor.
  19. #
  20. # EX
  21. # largura 32 pixel (width) altura 32 pixel = 1 frames de animação.(Sem animação)
  22. # largura 64 pixel (width) altura 32 pixel = 2 frames de animação.
  23. # largura 128 pixel (width) altura 32 pixel = 4 frames de animação.
  24. # largura 256 pixel (width) altura 32 pixel = 8 frames de animação
  25. # Etc...
  26. #
  27. # NOTA
  28. # Não há limite para quantidade de frames de animação, se não quiser a animação
  29. # basta criar uma imagem com a altura proporcional a largura da imagem.
  30. #
  31. #==============================================================================
  32. # ● Histórico (Version History)
  33. #==============================================================================
  34. # v 1.1 - Correção da posição do cursor na cena de batalha.
  35. #==============================================================================
  36.  
  37. module MOG_MENU_CURSOR
  38.   #Ativar animação do cursor se movimentando para os lados.
  39.   SIDE_ANIMATION = true
  40.   #Definição da posição do cursor. (Ajustes na posição)
  41.   CURSOR_POSITION = [0,0]
  42.   #Definição da velocidade da animação de frames.
  43.   CURSOR_ANIMATION_SPEED = 9
  44. end
  45.  
  46. #==============================================================================
  47. # ■ Game_System
  48. #==============================================================================
  49. class Game_System
  50.  
  51.   attr_accessor :menu_cursor_name
  52.  
  53.   #--------------------------------------------------------------------------
  54.   # ● Initialize
  55.   #--------------------------------------------------------------------------      
  56.   alias mog_menu_cursor_initialize initialize
  57.   def initialize
  58.       mog_menu_cursor_initialize
  59.       @menu_cursor_name = "Menu_Cursor"
  60.   end  
  61.  
  62. end  
  63.  
  64. #==============================================================================
  65. # ■ Game_Temp
  66. #==============================================================================
  67. class Game_Temp
  68.  
  69.   attr_accessor :menu_cursor   
  70.  
  71.   #--------------------------------------------------------------------------
  72.   # ● Initialize
  73.   #--------------------------------------------------------------------------      
  74.   alias mog_cursor_sprite_initialize initialize
  75.   def initialize
  76.       mog_cursor_sprite_initialize
  77.       @menu_cursor = [false,0,0,0]
  78.   end  
  79.  
  80. end  
  81.  
  82. #==============================================================================
  83. # ■ Sprite Cursor
  84. #==============================================================================
  85. class Sprite_Cursor < Sprite
  86.  
  87.   include MOG_MENU_CURSOR
  88.  
  89.   #--------------------------------------------------------------------------
  90.   # ● Initialize
  91.   #--------------------------------------------------------------------------   
  92.   def initialize(viewport = nil , x , y)
  93.       super(viewport)
  94.       @cursor_image = Cache.system($game_system.menu_cursor_name.to_s)
  95.       @frame_max = (@cursor_image.width / @cursor_image.height) rescue 1
  96.       @frame_range = @frame_max > 0 ? (@cursor_image.width  / @frame_max) : 1
  97.       @frame = 0
  98.       @ca_speed = CURSOR_ANIMATION_SPEED
  99.       self.bitmap = Bitmap.new(@frame_range,@frame_range)
  100.       self.z = 10000
  101.       self.opacity = 0
  102.       @cw = self.bitmap.width / 2
  103.       @c_p = [-@cw + CURSOR_POSITION[0],CURSOR_POSITION[1]]
  104.       [url=home.php?mod=space&uid=287812]@mx[/url] = [0,0,0]
  105.       refresh_animation(true)
  106.       update_move
  107.   end
  108.  
  109.   #--------------------------------------------------------------------------
  110.   # ● Dispose
  111.   #--------------------------------------------------------------------------   
  112.   def dispose
  113.       self.bitmap.dispose
  114.       self.bitmap = nil
  115.       @cursor_image.dispose
  116.       super
  117.   end  
  118.  
  119.   #--------------------------------------------------------------------------
  120.   # ● Update
  121.   #--------------------------------------------------------------------------  
  122.   def update
  123.       if cursor_visible?
  124.          self.visible = true
  125.          update_move
  126.          refresh_animation(false)
  127.       else   
  128.          self.visible = false
  129.       end  
  130.   end
  131.  
  132.   #--------------------------------------------------------------------------
  133.   # ● Initialize
  134.   #--------------------------------------------------------------------------      
  135.   def refresh_animation(start = false)
  136.       @ca_speed += 1
  137.       return if @frame_max == 1 and !start
  138.       return if @ca_speed < CURSOR_ANIMATION_SPEED
  139.       @ca_speed = 0
  140.       self.bitmap.clear
  141.       scr_rect = Rect.new(@frame_range * @frame,0,@frame_range,@frame_range)
  142.       self.bitmap.blt(0,0,@cursor_image, scr_rect)
  143.       @frame += 1
  144.       @frame = 0 if @frame >= @frame_max
  145.   end  
  146.  
  147.   #--------------------------------------------------------------------------
  148.   # ● Cursor Visible?
  149.   #--------------------------------------------------------------------------   
  150.   def cursor_visible?
  151.       px = $game_temp.menu_cursor[2]
  152.       py = $game_temp.menu_cursor[3]
  153.       return false if $game_temp.menu_cursor[1] == 0
  154.       return false if px < 0 or py < 0 or (px == 0 and py == 0)
  155.       return true
  156.   end  
  157.  
  158.   #--------------------------------------------------------------------------
  159.   # ● Update Move
  160.   #--------------------------------------------------------------------------   
  161.   def update_move
  162.       self.opacity += 25
  163.       @new_pos = [$game_temp.menu_cursor[2],$game_temp.menu_cursor[3]]
  164.       execute_animation_s
  165.       execute_move(0,self.x, @new_pos[0] + @mx[1] + @c_p[0])
  166.       execute_move(1,self.y, @new_pos[1] + @c_p[1])
  167.   end  
  168.  
  169.   #--------------------------------------------------------------------------
  170.   # ● Execute Animation S
  171.   #--------------------------------------------------------------------------      
  172.   def execute_animation_s
  173.       return if !SIDE_ANIMATION
  174.       @mx[2] += 1
  175.       return if @mx[2] < 4
  176.       @mx[2] = 0
  177.       @mx[0] += 1
  178.       case @mx[0]
  179.          when 1..7;  @mx[1] += 1            
  180.          when 8..14; @mx[1] -= 1
  181.          else
  182.            @mx[0] = 0
  183.            @mx[1] = 0
  184.       end
  185.   end
  186.  
  187.   #--------------------------------------------------------------------------
  188.   # ● Execute Move
  189.   #--------------------------------------------------------------------------      
  190.   def execute_move(type,cp,np)
  191.       sp = 5 + ((cp - np).abs / 5)
  192.       if cp > np
  193.          cp -= sp
  194.          cp = np if cp < np
  195.       elsif cp < np
  196.          cp += sp
  197.          cp = np if cp > np
  198.       end     
  199.       self.x = cp if type == 0
  200.       self.y = cp if type == 1
  201.   end  
  202.  
  203. end
  204.  
  205. #==============================================================================
  206. # ■ CURSOR_MENU SPRITE
  207. #==============================================================================
  208. module CURSOR_MENU_SPRITE
  209.  
  210.   #--------------------------------------------------------------------------
  211.   # ● Cursor Sprite Enable
  212.   #--------------------------------------------------------------------------      
  213.   def cursor_sprite_enable
  214.       return if self.index == nil rescue return
  215.       create_cursor_sprite
  216.       update_cursor_sprite
  217.       update_cusor_position
  218.       if !self.active
  219.          $game_temp.menu_cursor[1] -= 1 if $game_temp.menu_cursor[1] > 0
  220.       end
  221.   end
  222.  
  223.   #--------------------------------------------------------------------------
  224.   # ● Create Cursor Sprite
  225.   #--------------------------------------------------------------------------   
  226.   def create_cursor_sprite
  227.       return if @cursor != nil
  228.       return if $game_temp.menu_cursor[0]
  229.       $game_temp.menu_cursor[0] = true
  230.       reset_cursor_position
  231.       @cursor = Sprite_Cursor.new(nil,x,y)
  232.       @cursor_name = $game_system.menu_cursor_name
  233.   end   
  234.  
  235.   #--------------------------------------------------------------------------
  236.   # ● Dispose Cursor Sprite
  237.   #--------------------------------------------------------------------------      
  238.   def dispose_cursor_sprite
  239.       return if @cursor == nil
  240.       $game_temp.menu_cursor[0] = false
  241.       reset_cursor_position
  242.       @cursor.dispose
  243.       @cursor = nil
  244.   end  
  245.  
  246.   #--------------------------------------------------------------------------
  247.   # ● Reset Cursor Position
  248.   #--------------------------------------------------------------------------        
  249.   def reset_cursor_position
  250.       $game_temp.menu_cursor[1] = 0
  251.       $game_temp.menu_cursor[2] = -32
  252.       $game_temp.menu_cursor[3] = -32
  253.   end  
  254.  
  255.   #--------------------------------------------------------------------------
  256.   # ● Update Cursor
  257.   #--------------------------------------------------------------------------         
  258.   def update_cursor_sprite
  259.       return if @cursor == nil
  260.       @cursor.update
  261.       refresh_cursor_sprite if @cursor_name != $game_system.menu_cursor_name
  262.   end
  263.  
  264.   #--------------------------------------------------------------------------
  265.   # ● Refresh Cursor Sprite
  266.   #--------------------------------------------------------------------------            
  267.   def refresh_cursor_sprite
  268.       @cursor_name = $game_system.menu_cursor_name
  269.       dispose_cursor_sprite
  270.       create_cursor_sprite
  271.   end  
  272.  
  273.   #--------------------------------------------------------------------------
  274.   # ● Update Cursor Position
  275.   #--------------------------------------------------------------------------         
  276.   def update_cusor_position
  277.       return if !can_update_cursor_position?
  278.       x_v = [0,0]
  279.       if SceneManager.scene_is?(Scene_Battle)
  280.           if self.viewport != nil
  281.              x_v = [-self.viewport.ox, self.viewport.rect.y]
  282.           end
  283.       end      
  284.       x_e = (self.cursor_rect.x + self.x) - self.ox
  285.       $game_temp.menu_cursor[2] = x_e + x_v[0]
  286.       y_e = (self.cursor_rect.y + self.y + self.cursor_rect.height / 2) - self.oy
  287.       $game_temp.menu_cursor[3] = y_e + x_v[1]
  288.       $game_temp.menu_cursor[1] = 13
  289.    end
  290.  
  291.   #--------------------------------------------------------------------------
  292.   # ● Can Update Cursor
  293.   #--------------------------------------------------------------------------            
  294.    def can_update_cursor_position?
  295.        return false if !self.active     
  296.        return false if self.index < 0
  297.        return false if !self.visible
  298.        return true
  299.    end  
  300.  
  301. end
  302.  
  303. #==============================================================================
  304. # ■ Window Base
  305. #==============================================================================
  306. class Window_Base < Window
  307.   include CURSOR_MENU_SPRITE
  308.  
  309.   #--------------------------------------------------------------------------
  310.   # ● Dispose
  311.   #--------------------------------------------------------------------------              
  312.   alias mog_menu_cursor_base_dispose dispose
  313.   def dispose
  314.       mog_menu_cursor_base_dispose
  315.       dispose_cursor_sprite
  316.   end  
  317.  
  318.   #--------------------------------------------------------------------------
  319.   # ● Update
  320.   #--------------------------------------------------------------------------              
  321.   alias mog_cursor_update update
  322.   def update
  323.       mog_cursor_update
  324.       cursor_sprite_enable
  325.   end   
  326.  
  327. end
  328.  
  329. $mog_rgss3_animated_cursor = true




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

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

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

谢谢你



点评

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

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21484
在线时间
9389 小时
注册时间
2012-6-19
帖子
7114

开拓者短篇九导演组冠军

8
发表于 2014-1-4 10:57:19 | 只看该作者
ninesound 发表于 2014-1-4 06:24
我有用自制选单
因此连结到存档是Scene_Save

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

PS.我没收到@ .........
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
189 小时
注册时间
2013-1-26
帖子
72
7
发表于 2014-1-4 06:24:09 | 只看该作者


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

请问怎么解决呢

点评

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

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21484
在线时间
9389 小时
注册时间
2012-6-19
帖子
7114

开拓者短篇九导演组冠军

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

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

点评

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

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21484
在线时间
9389 小时
注册时间
2012-6-19
帖子
7114

开拓者短篇九导演组冠军

5
发表于 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
回复 支持 反对

使用道具 举报

Lv1.梦旅人

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

立绘放到Graphic ...

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

333.jpg (6.02 KB, 下载次数: 33)

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
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21484
在线时间
9389 小时
注册时间
2012-6-19
帖子
7114

开拓者短篇九导演组冠军

3
发表于 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
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-25 15:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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