Project1

标题: 求菜鸟横版战斗脚本 [打印本页]

作者: 寂夜幻想    时间: 2018-5-12 11:13
标题: 求菜鸟横版战斗脚本
本帖最后由 寂夜幻想 于 2018-5-12 11:40 编辑

如题..........
搜索过横版战斗
but要行走图
作者: Nil2018    时间: 2018-5-13 11:31
就算再简单的横版都需要行走图,我猜你想找的是就显示一个小人,不用设定动作那么多动作的横版脚本??问问题不要这么笼统,说详细一些别人好帮你,多打几个字不会死。
Fomar0153 简单横版(即插即用):
RUBY 代码复制
  1. =begin
  2. Sprite Based Side View Battle Script
  3. by Fomar0153
  4. Version 1.0
  5. ----------------------
  6. Notes
  7. ----------------------
  8. 无任何需求
  9. Displays battlers for the player's party.
  10. This script uses the player sprite facing left.
  11. ----------------------
  12. 介绍
  13. ----------------------
  14. Plug and play
  15. ----------------------
  16. Known bugs
  17. ----------------------
  18. None
  19. =end
  20. class Game_Actor < Game_Battler
  21.   #--------------------------------------------------------------------------
  22.   # ● Rewrites use_sprite?
  23.   #--------------------------------------------------------------------------
  24.   def use_sprite?
  25.     return true
  26.   end
  27.   #--------------------------------------------------------------------------
  28.   # ● New Method screen_x
  29.   #--------------------------------------------------------------------------
  30.   def screen_x
  31.     return 450
  32.   end
  33.   #--------------------------------------------------------------------------
  34.   # ● New Method screen_y
  35.   #--------------------------------------------------------------------------
  36.   def screen_y
  37.     return 120 + self.index * 40
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # ● New Method screen_z
  41.   #--------------------------------------------------------------------------
  42.   def screen_z
  43.     return 100
  44.   end
  45. end
  46.  
  47. class Spriteset_Battle
  48.   #--------------------------------------------------------------------------
  49.   # ● Rewrites create_actors
  50.   #--------------------------------------------------------------------------
  51.   def create_actors
  52.     @actor_sprites = $game_party.battle_members.reverse.collect do |actor|
  53.       Sprite_Battler.new(@viewport1, actor)
  54.     end
  55.   end
  56. end
  57.  
  58. class Sprite_Battler < Sprite_Base
  59.   #--------------------------------------------------------------------------
  60.   # * Update Transfer Origin Bitmap
  61.   #--------------------------------------------------------------------------
  62.   alias sbb_update_bitmap update_bitmap
  63.   def update_bitmap
  64.     if @battler.is_a?(Game_Actor)
  65.       char_bitmap = Cache.character(@battler.character_name)
  66.       sign = @battler.character_name[/^[\!\$]./]
  67.       if sign && sign.include?('$')
  68.         cw = char_bitmap.width / 3
  69.         ch = char_bitmap.height / 4
  70.       else
  71.         cw = char_bitmap.width / 12
  72.         ch = char_bitmap.height / 8
  73.       end
  74.       new_bitmap = Bitmap.new(cw, ch)
  75.       sx = (@battler.character_index % 4 * 3 + 1) * cw
  76.       sy = (@battler.character_index / 4 * 4 + 1) * ch
  77.       new_bitmap.blt(0, 0, char_bitmap, Rect.new(sx, sy, cw, ch))
  78.       if bitmap != new_bitmap
  79.         self.bitmap = new_bitmap
  80.         init_visibility
  81.       end
  82.     else
  83.       sbb_update_bitmap
  84.     end
  85.   end
  86. end



Fomar0153 - 简单横版(需角色图片):
RUBY 代码复制
  1. =begin
  2. Basic Side View Battle Script
  3. by Fomar0153
  4. Version 1.0
  5. ----------------------
  6. Notes
  7. ----------------------
  8. No requirements
  9. Displays battlers for the player's party.
  10. ----------------------
  11. 介绍
  12. ----------------------
  13. 在Battlers文件夹里放战斗时显示角色的图片命名规则:
  14. 角色名_battler.png
  15. 例如.
  16. Ralph_battler.png
  17. ----------------------
  18. Known bugs
  19. ----------------------
  20. None
  21. =end
  22. class Game_Actor < Game_Battler
  23.   #--------------------------------------------------------------------------
  24.   # ● New Method battler_name
  25.   #--------------------------------------------------------------------------
  26.   def battler_name
  27.     return actor.name + "_battler"
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● Rewrites use_sprite?
  31.   #--------------------------------------------------------------------------
  32.   def use_sprite?
  33.     return true
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # ● New Method screen_x
  37.   #--------------------------------------------------------------------------
  38.   def screen_x
  39.     return 450
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ● New Method screen_y
  43.   #--------------------------------------------------------------------------
  44.   def screen_y
  45.     return 120 + self.index * 40
  46.   end
  47.   #--------------------------------------------------------------------------
  48.   # ● New Method screen_z
  49.   #--------------------------------------------------------------------------
  50.   def screen_z
  51.     return 100
  52.   end
  53. end
  54.  
  55. class Spriteset_Battle
  56.   #--------------------------------------------------------------------------
  57.   # ● Rewrites create_actors
  58.   #--------------------------------------------------------------------------
  59.   def create_actors
  60.     @actor_sprites = $game_party.battle_members.reverse.collect do |actor|
  61.       Sprite_Battler.new(@viewport1, actor)
  62.     end
  63.   end
  64. end


作者: 1835590096    时间: 2018-8-12 15:32
Nil2018 发表于 2018-5-13 11:31
就算再简单的横版都需要行走图,我猜你想找的是就显示一个小人,不用设定动作那么多动作的横版脚本??问问 ...

请问大佬,简单横版,需要的一个图片可以是人物的小行走图跟卡通图吗?
作者: 1835590096    时间: 2018-8-12 15:35
1835590096 发表于 2018-8-12 15:32
请问大佬,简单横版,需要的一个图片可以是人物的小行走图跟卡通图吗? ...

而且怎么样才能让战斗图对照人物呢,比如说男一号,是不是战斗图也要改成男一号,
作者: 2597070043    时间: 2019-7-10 06:48
Nil2018 发表于 2018-5-13 11:31
就算再简单的横版都需要行走图,我猜你想找的是就显示一个小人,不用设定动作那么多动作的横版脚本??问问 ...

完全用不了,不过还是谢谢大佬!




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1