注册 | 登录

游侠NETSHOW论坛





游侠NETSHOW论坛 游侠NETSHOW论坛 金庸群俠傳5+金庸无双 使用rpg maker进行简单的修改
楼主: oahp
打印 上一主题 下一主题

[心得] 使用rpg maker进行简单的修改  关闭 [复制链接]

帖子
13
精华
0
积分
7
金钱
128
荣誉
0
人气
0
评议
0
141#
发表于 2013-8-28 23:31:05 |只看该作者
话说咱不喜欢改技能什么的=-=RPG Maker XP还在学习之中=-=就是想加点喜欢人物的故事什么才去学的=-=之前学过点C++=-=勉强可以改一点=-=目前因为不想把苏荃交给韦小宝所以在想剧情中=-=

使用道具 举报

帖子
99
精华
0
积分
50
金钱
748
荣誉
0
人气
0
评议
0
142#
发表于 2013-8-30 14:09:54 |只看该作者
问一下为什么我用rpgvx打开它说载入主角档案失败?

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
143#
发表于 2013-8-30 14:28:20 |只看该作者
a838695857 发表于 2013-8-30 14:09
问一下为什么我用rpgvx打开它说载入主角档案失败?

用xp吧

使用道具 举报

帖子
12
精华
0
积分
6
金钱
195
荣誉
0
人气
0
评议
0
144#
发表于 2013-9-5 23:00:10 |只看该作者
好嘛 高手果然都在民间啊

使用道具 举报

帖子
3720
精华
0
积分
1865
金钱
7190
荣誉
0
人气
50
评议
0

145#
发表于 2013-9-8 22:23:04 |只看该作者
請問人物移動速度要怎麼改阿  跑地圖好累阿

終結世界的力量,於毀滅的光芒中行走的七個身影,他們是最初與最後的人。

使用道具 举报

帖子
3720
精华
0
积分
1865
金钱
7190
荣誉
0
人气
50
评议
0

146#
发表于 2013-9-10 22:00:32 |只看该作者
可以問一下 如果我想設定拿金蛇劍 可以增加使用金蛇劍法的威力 要怎麼修改呢?

終結世界的力量,於毀滅的光芒中行走的七個身影,他們是最初與最後的人。

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
147#
发表于 2013-9-10 22:06:21 |只看该作者
29800020 发表于 2013-9-10 22:00
可以問一下 如果我想設定拿金蛇劍 可以增加使用金蛇劍法的威力 要怎麼修改呢? ...

这个修改有些麻烦了

需要修改脚本,发动技能的时候,获取金蛇剑法技能id。如果是这个id.再获取持有武器的id
如果两个id是一致的,重新计算伤害



使用道具 举报

帖子
32
精华
0
积分
16
金钱
286
荣誉
0
人气
0
评议
0
148#
发表于 2013-9-11 05:53:59 |只看该作者
问个问题,修改状态,比如33楼说的时乘六龙的效果,是否需要重新开档才能生效?

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
149#
发表于 2013-9-11 08:17:35 |只看该作者
lazyang 发表于 2013-9-11 05:53
问个问题,修改状态,比如33楼说的时乘六龙的效果,是否需要重新开档才能生效?
...

如果是存储后就需要重新开档,如果是定义的新武功,不需要重新开档

使用道具 举报

帖子
176
精华
0
积分
88
金钱
1102
荣誉
0
人气
0
评议
0
150#
发表于 2013-9-11 16:51:48 |只看该作者
完善物品栏修改这个还没实现

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
151#
发表于 2013-9-11 21:26:42 |只看该作者
今天讲一个金庸无双小地图的设计

感觉拥抱今天帮我找的脚本

这个功能如下,按0键,出现小地图

首先我们实现按0键触发一个事件的功能,在实现地图脚本


这个公共事件就是实现一个变量的修改。
然后我们把1151变量的运用到脚本里就可以了

下面把完整的脚本贴出来
附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
152#
发表于 2013-9-11 21:27:16 |只看该作者
本帖最后由 oahp 于 2013-9-11 21:34 编辑

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# ■ 縮小地图的表示+地图显示地图名和坐标 (ver 1.19)
# by ピニョン clum-sea
# 修改by精灵使者
#2013.09.11 by左岸 专为金庸无双优化修改。其他游戏慎用。
#
#修正了在某些模版下读档产生的Window_base中x和y为nil的错误。
#修正了大地图下的can't create bitmap的错误
#修改了事件静止状态的时候事件图形发生的BUG和色调出现的严重错误。
#修正了色调同步的时候viewport黑块的BUG。
#增加了小地图和大地图的色调同步(感谢orzfly的viewport脚本)
#增加了刷新速度,解决了从菜单返回地图的卡bug(地图重新生成的时候引起的)
#解决了F12引起的dispose error错误(真累死我了……)
#继续添加了变量的入口,改进了地图的事件效果和事件算法。
#增加了小地图不显示主角的开关,防止某些特殊场合显示主角
#增添了雾图形的描绘,完善了自动元件的算法。调整了地图的z坐标。
#继续增添一些变量的入口,减少了XY坐标的刷新量,优化了BLUR的效果。
#增加了小地图模糊效果,感谢忧雪の伤
#添加了一些变量入口,增加了坐标背景图等
#整合了小地图和坐标两个脚本,请去掉显示地图名的原始脚本(可以退休了)
#去掉了一些老版本使用的旧常量,修正了窗口皮肤和初始可见变量,增添了
#手动刷新开关。
#增添了事件图等,完善了一些开关和变量
#修正了场所移动的时候远景图变黑的问题,感谢忧雪の伤
#精灵再度更新:支持地图的远景图显示(如果有的话)
#冬夜更新说明
#更改了小地图的位置,Q是开启小地图跟随开关
#更新了场所移动时地图的不同步,更新了战斗后的地图不同步
#小地图默认成为false,只在第一次登入时是,以后跟随开关的指示
#修正了由于小地图变化引起的不能转换问题,修整了房间内的地图原先的那个羁押功能
#==============================================================================
#==============================================================================
# □ 前期定义
#==============================================================================
module PLAN_Map_Window
  WIN_WIDTH   = 250               # 地图的宽度
  WIN_HEIGHT  = 200               # 地图的高度
  ZOOM        = 6.0             # 地图的放缩比例
  WINDOWSKIN  = ""                # 自定义地图窗口素材,如果留空则是默认的
  ON_OFF_KEY  = Input::A     # 打开地图的按钮,A就是键盘的Z键
  SWITCH      = 490                 # 禁用地图功能的开关,默认这个就是打开100号
                                  # 开关则禁止使用地图功能,关闭则可以使用地图功能
  WINDOW_MOVE = true              # 窗口中的地图跟随移动,(true:跟随, false:固定)
  OPACITY     = 255               # 窗口的透明度
  C_OPACITY   = 255               # 地图的透明度
  VISIBLE     = false             # 最初是否可见(如果是事件标题请置false)
  SWITCH_KEY  = Input::L          # Q键锁定/解锁小地图(可以用上下左右切换小地图的位置)
  MAP_VISIBLE = 491                 # 地图/地图名显示开关状态
  MAP_SWITCH = 492                  # 地图锁定开关状态
  MAP_DIRECTION = 11               # 地图方向变量
  MINI_MAP = [30,30]              # 小地图和中地图范围
  LARGE_MAP = [70,70]             # 中地图和大地图范围
  EXTRA_MAP = [800,800]           # 超过地图所能显示范围的上限
  MINIMAP_ZOOM = 0.5              # 小地图相对于放缩比的比率
  LARGEMAP_ZOOM = 1.5             # 大地图相对于放所比的比率
  COVER_SWITCH = true             # 是否图块遮掩的时候不显示主角
  MANUAL_REFRESH = 12              # 手动刷新事件开关号
                                  # ,打开即刷新一次,无需手动关闭
  MOVE_REFRESH = 493                # 事件移动时刷新小地图事件开关号
                                  #(效果较好,但耗费内存,请谨慎开启!)
                                  # 可以和手动刷新事件开关配合使用
  AUTO_REFRESH = 494                # 所有小地图事件强制刷新开关号
                                  #(效果最好,严重耗费内存,请谨慎开启!)
  WINDOW_XY = MAP_VISIBLE         # XY坐标窗口开关(和默认地图开关相同,如果不需要
                                  # 相同请单独设置开关号
  MAPNAME_COLOR =
  Color.new(255, 255, 255)        # 地图名颜色,如果是其他颜色请指定
  XYNAME_COLOR =
  Color.new(192, 224, 255)        # XY名字的颜色,如果是其他颜色请指定
  XYNUMBER_COLOR =
  Color.new(255, 255, 255)        # XY数字的颜色,如果是其他颜色请指定
  XY_OPACITY = 0                  # XY窗口的透明度,默认完全透明
  XY_B_OPACITY = 0                # XY窗口背景的透明度,默认完全透明
  XY_C_OPACITY = 255              # XY窗口内容的透明度,默认完全不透明
  XYBACK_PNG = ""                 # XY背景图片文件名(注:背景图片会遮挡小地图)
  XYBACK_OPATITY = 192            # XY背景透明度(建议透明,否则会完全盖住)
  XY_WORD_X = "X:"                # 表示X坐标的用语
  XY_WORD_Y = "Y:"                # 表示Y坐标的用语
  BLUR = true                     # 柔化开关,对地图统一柔化
  NO_ACTOR_SWITCH = 495             # 不显示主角的开关
  ACTOR_MOVE = false              # 主角走路开关(会占用些许内存,请谨慎开启)
end

#=============================================================================
# ■ Bitmap重定义
#=============================================================================

class Bitmap
  def blur(strength = 1, opacity = 10)
   (-strength).upto(strength) do |x|
     (-strength).upto(strength) do |y|
      next if x.zero? and y.zero?
      src_rect = Rect.new(0, 0, width - x, height - y)
      blt(x, y, self, src_rect, opacity)
     end
    end
  end
end

#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp
  attr_accessor  :map_visible     # 地图的表示状态
  attr_accessor  :xy_visible      # XY地图的表示状态
  attr_accessor  :back_visible    # 背景图表示状态
end

#==============================================================================
# ■ Window_XY
#------------------------------------------------------------------------------
#  显示坐标的窗口。
#==============================================================================
class Window_xy < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
   super(0, 0, 280, 96)
   @mapnames = load_data("Data/MapInfos.rxdata")
   self.contents = Bitmap.new(width - 32, height - 32)
   self.back_opacity = PLAN_Map_Window::XY_B_OPACITY
   self.opacity = PLAN_Map_Window::XY_OPACITY
   self.contents.font.bold = true
   self.contents_opacity = PLAN_Map_Window::XY_C_OPACITY
   self.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
   refresh if self.visible
   @x = $game_player.x
   @y = $game_player.y
   @id = $game_map.map_id
end

#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
    if $game_switches[PLAN_Map_Window::WINDOW_XY]
     @x = $game_player.x
     @y = $game_player.y
     @id = $game_map.map_id
    self.contents.clear
    map_name = @mapnames[@id].name
    self.contents.font.color = PLAN_Map_Window::MAPNAME_COLOR
    self.contents.draw_text(0, 0, 175, 32, map_name,1)
    self.contents.font.color = PLAN_Map_Window::XYNAME_COLOR
    self.contents.draw_text(0, 32, 175, 32, PLAN_Map_Window::XY_WORD_X)
    self.contents.font.color = PLAN_Map_Window::XYNUMBER_COLOR
    self.contents.draw_text(0, 32, 80, 32, @x.to_s,2)
    self.contents.font.color = PLAN_Map_Window::XYNAME_COLOR
    self.contents.draw_text(95, 32, 175, 32, PLAN_Map_Window::XY_WORD_Y)
    self.contents.font.color = PLAN_Map_Window::XYNUMBER_COLOR
    self.contents.draw_text(0, 32, 175, 32, @y.to_s,2)
   end
end

#--------------------------------------------------------------------------
# ● 判断文字刷新。节约内存用
#--------------------------------------------------------------------------
def judge
   return true if @x != $game_player.x
   return true if @y != $game_player.y
   return true if @id != $game_map.map_id
   return false
end
end

#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # ● 主处理
  #--------------------------------------------------------------------------
  alias plan_map_window_main main unless $@
  def main
  $minimap = false
  @map_window = Window_Map.new
  @xy_window = Window_xy.new
  @xy_window.x = 640 - 230
  @xy_window.y = 480 - 101
  @xy_window.z = 1500
  @map_window.z = 1000
  vx = @map_window.x + 16
  vy = @map_window.y + 16
  vw = @map_window.contents.width
  vh = @map_window.contents.height
  @viewport = Viewport.new(vx,vy,vw,vh)
  @sprite = Sprite.new(@viewport)
  @sprite.bitmap = $sprite_bitmap.clone
  @sprite.tone = $game_screen.tone.clone
  @sprite.opacity = PLAN_Map_Window::C_OPACITY
  @viewport.z = @map_window.z
  @viewport.visible = $game_switches[PLAN_Map_Window::MAP_VISIBLE]
  @xy_window.opacity = PLAN_Map_Window::XY_OPACITY
  @xy_window.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
  @xy_window.refresh if @xy_window.visible
  @map_window.visible = $game_switches[PLAN_Map_Window::MAP_VISIBLE]
  @back = Sprite.new
  unless PLAN_Map_Window::XYBACK_PNG.empty?
  @back.bitmap = Bitmap.new("Graphics/Pictures/"+PLAN_Map_Window::XYBACK_PNG)
  @back.x = 640 - 16 - @back.bitmap.width
  @back.y = 480 - 16 - @back.bitmap.height
  @back.z = 1250
  end
  @back.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
  @back.opacity = PLAN_Map_Window::XYBACK_OPATITY
  plan_map_window_main
  @map_window.dispose
  @xy_window.dispose
  @back.dispose
  @sprite.dispose
  @viewport.dispose
  end
  #--------------------------------------------------------------------------
  # ● 更新
  #--------------------------------------------------------------------------
  alias plan_map_window_update update unless $@
  def update
    $game_temp.map_visible = @map_window.visible
    $game_temp.xy_visible = @xy_window.visible
    $game_temp.back_visible = @back.visible
    @xy_window.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
    @xy_window.refresh if (@xy_window.judge and @xy_window.visible)
    @back.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
    plan_map_window_update
     if PLAN_Map_Window::VISIBLE and !@first_open
      @map_window.visible = true
      $game_switches[PLAN_Map_Window::MAP_VISIBLE]= true
      @xy_window.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
      @xy_window.refresh if @xy_window.visible
      @back.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
      $map_close = false
      @first_open = true
     end
    if $game_switches[PLAN_Map_Window::SWITCH]
      if @map_window.visible
      @map_window.visible = false
      $game_switches[PLAN_Map_Window::MAP_VISIBLE]= false
      $game_switches[PLAN_Map_Window::MAP_SWITCH] = false
      $game_variables[PLAN_Map_Window::MAP_DIRECTION] = $direction
      $map_close = true
      end  
    else
      if $map_close
         @map_window.visible = true
         $game_switches[PLAN_Map_Window::MAP_VISIBLE]= true
         @xy_window.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
         @xy_window.refresh if @xy_window.visible
         @back.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
         $map_close = false
      end
    if !$game_temp.in_battle
      if  $game_variables[1151]==0
        if @map_window.visible
          $game_system.se_play($data_system.cancel_se)
          @map_window.visible = false
          $game_switches[PLAN_Map_Window::MAP_VISIBLE]= false
          $game_switches[PLAN_Map_Window::MAP_SWITCH] = false
          $game_variables[PLAN_Map_Window::MAP_DIRECTION] = $direction
        else
          $game_system.se_play($data_system.decision_se)
          @map_window.visible = true
          $game_switches[PLAN_Map_Window::MAP_VISIBLE]= true
          @xy_window.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
          @xy_window.refresh if @xy_window.visible
          @back.visible = $game_switches[PLAN_Map_Window::WINDOW_XY]
        end
      end
      if Kboard.trigger?($R_Key_0)
        if @map_window.visible
        if $game_switches[PLAN_Map_Window::MAP_SWITCH]
          $game_system.se_play($data_system.cancel_se)
          $game_switches[PLAN_Map_Window::MAP_SWITCH] = false
          $game_variables[PLAN_Map_Window::MAP_DIRECTION] = $direction
         else
          $game_system.se_play($data_system.decision_se)
          $game_switches[PLAN_Map_Window::MAP_SWITCH] = true
         end
       end
     end
   end
    end
      @map_window.update if @map_window.visible
     vx = @map_window.x + 16
     vy = @map_window.y + 16
     vw = @map_window.contents.width
     vh = @map_window.contents.height
    @viewport.rect = Rect.new(vx,vy,vw,vh)
    @sprite.bitmap = $sprite_bitmap.clone
    @sprite.tone = $game_screen.tone.clone
    @viewport.visible = $game_switches[PLAN_Map_Window::MAP_VISIBLE]
    @sprite.update if @viewport.visible
  end
  #--------------------------------------------------------------------------
  # ● 场所移动的变化
  #--------------------------------------------------------------------------
alias plan_map_window_transfer_player transfer_player unless $@
  def transfer_player
    old_map_id = $game_map.map_id
    plan_map_window_transfer_player
    if old_map_id != $game_map.map_id
    GC.start
    @map_window.visible = false
    @viewport.visible = false
    @map_window.dispose
    @sprite.dispose
    @viewport.dispose
    @map_window = Window_Map.new
    vx = @map_window.x + 16
    vy = @map_window.y + 16
    vw = @map_window.contents.width
    vh = @map_window.contents.height
    @viewport = Viewport.new(vx,vy,vw,vh)
    @sprite = Sprite.new(@viewport)
    @sprite.bitmap = $sprite_bitmap.clone
    @sprite.tone = $game_screen.tone.clone
    @sprite.opacity = PLAN_Map_Window::C_OPACITY
    @viewport.z = @map_window.z
    @viewport.visible = $game_switches[PLAN_Map_Window::MAP_VISIBLE]
    end
  end
end
#==============================================================================
# ■ Window_Map
#==============================================================================
class Window_Map < Window_Base
  #--------------------------------------------------------------------------
  # ● 初始化
  #--------------------------------------------------------------------------
  def initialize
   $direction = $game_variables[PLAN_Map_Window::MAP_DIRECTION]
   if $win_x != nil
      x = $win_x
      y = $win_y
   else
   case $direction
     when 0
     x = 8
     y = 8
     $win_x = x
     $win_y = y
     when 1
     x = 382
     y = 8
     $win_x = x
     $win_y = y
     when 2
     x = 8
     y = 280 - 8
     $win_x = x
     $win_y = y
     when 3
     x = 382
     y = 280 - 8
     $win_x = x
     $win_y = y
     end
   end
    w = PLAN_Map_Window::WIN_WIDTH
    h = PLAN_Map_Window::WIN_HEIGHT
  $minimap = true
   super(x, y, w, h)
  $minimap = false
    self.contents = Bitmap.new(width - 32, height - 32)
    $sprite_bitmap = Bitmap.new(width - 32, height - 32)
    self.opacity = PLAN_Map_Window::OPACITY
    self.contents_opacity = 0
    self.z = 1000
    @map_data = $game_map.data
    @tileset = RPG::Cache.tileset($game_map.tileset_name)
    @autotiles = []
    for i in 0..6
      autotile_name = $game_map.autotile_names
      @autotiles = RPG::Cache.autotile(autotile_name)
    end
    @old_event = $game_map.events
    @old_real_x = $game_player.real_x
    @old_real_y = $game_player.real_y
    @old_char_name = $game_party.actors[0].character_name if $game_party.actors.size > 0
    @old_pattern = $game_player.pattern if $game_party.actors.size > 0
    @old_panorama = $game_map.panorama_name
    @old_fog = $game_map.fog_name
  if $game_map.width > PLAN_Map_Window::LARGE_MAP[0] or $game_map.height > PLAN_Map_Window::LARGE_MAP[1]
      $ZOOM = PLAN_Map_Window::LARGEMAP_ZOOM * PLAN_Map_Window::ZOOM
  else   
    if $game_map.width < PLAN_Map_Window::MINI_MAP[0] or $game_map.height < PLAN_Map_Window::MINI_MAP[1]
      $ZOOM = PLAN_Map_Window::MINIMAP_ZOOM * PLAN_Map_Window::ZOOM
    else
      $ZOOM = PLAN_Map_Window::ZOOM
    end
  end
    @panorama = make_panorama
    @all_map = make_all_map
    @make_event = make_event
    @all_fog = make_fog
    self.visible = $game_switches[PLAN_Map_Window::MAP_VISIBLE]
     unless PLAN_Map_Window::WINDOWSKIN.empty?
       self.windowskin = RPG::Cache.windowskin(PLAN_Map_Window::WINDOWSKIN)
     end
    refresh
  end
#--------------------------------------------------------------------------
# ● 自动元件相关
#--------------------------------------------------------------------------
def make_one_autotile(id)
one_autotile = Bitmap.new(32,32)
case id
# 中间的空白部分
   when 0 : w = 2 ; h = 4 ; #中间空白
# 四周的方框
   when 1 : w = 0 ; h = 0 ; #左上
   when 2 : w = 1 ; h = 0 ; #右上
   when 3 : w = 0 ; h = 1 ; #左下
   when 4 : w = 1 ; h = 1 ; #右下
# 四周的边角
   when 5 : w = 4 ; h = 0 ; #左上
   when 6 : w = 5 ; h = 0 ; #右上
   when 7 : w = 4 ; h = 1 ; #左下
   when 8 : w = 5 ; h = 1 ; #右下
# 四周的直线
   when 9 : w = 0 ; h = 4 ; #左边
   when 10 : w = 5 ; h = 4 ; #右边
   when 11 : w = 2 ; h = 2 ; #上边
   when 12 : w = 2 ; h = 7 ; #下边
  end
  src_rect = Rect.new(w * 16, h * 16, 16, 16)
  one_autotile.blt(0,0,@autotiles[@tile_num / 48],src_rect)
  return one_autotile
end
def make_autotile(id)
  full_autotile = Bitmap.new(32,32)
  autotile_table = [0,0,0,0]
  case id
  # 左上右上左下右下
  when 0 : autotile_table = [ 0, 0, 0, 0 ]
  when 1 : autotile_table = [ 5, 0, 0, 0 ]
  when 2 : autotile_table = [ 0, 6, 0, 0 ]
  when 3 : autotile_table = [ 5, 6, 0, 0 ]
  when 4 : autotile_table = [ 0, 0, 0, 8 ]
  when 5 : autotile_table = [ 5, 0, 0, 8 ]
  when 6 : autotile_table = [ 0, 6, 0, 8 ]
  when 7 : autotile_table = [ 5, 6, 0, 8 ]

  when 8 : autotile_table = [ 0, 0, 7, 0 ]
  when 9 : autotile_table = [ 5, 0, 7, 0 ]
  when 10 : autotile_table = [ 0, 6, 7, 0 ]
  when 11 : autotile_table = [ 5, 6, 7, 0 ]
  when 12 : autotile_table = [ 0, 0, 7, 8 ]
  when 13 : autotile_table = [ 5, 0, 7, 8 ]
  when 14 : autotile_table = [ 0, 6, 7, 8 ]
  when 15 : autotile_table = [ 5, 6, 7, 8 ]

  when 16 : autotile_table = [ 9, 0, 9, 0 ]
  when 17 : autotile_table = [ 9, 6, 9, 0 ]
  when 18 : autotile_table = [ 9, 0, 9, 8 ]
  when 19 : autotile_table = [ 9, 6, 9, 8 ]
  when 20 : autotile_table = [ 11, 11, 0, 0 ]
  when 21 : autotile_table = [ 11, 11, 0, 8 ]
  when 22 : autotile_table = [ 11, 11, 7, 0 ]
  when 23 : autotile_table = [ 11, 11, 7, 8 ]

  when 24 : autotile_table = [ 0, 10, 0, 10 ]
  when 25 : autotile_table = [ 0, 10, 7, 10 ]
  when 26 : autotile_table = [ 5, 10, 0, 10 ]
  when 27 : autotile_table = [ 5, 10, 7, 10 ]
  when 28 : autotile_table = [ 0, 0, 12, 12 ]
  when 29 : autotile_table = [ 5, 0, 12, 12 ]
  when 30 : autotile_table = [ 0, 6, 12, 12 ]
  when 31 : autotile_table = [ 5, 6, 12, 12 ]

  when 32 : autotile_table = [ 9, 10, 9, 10 ]
  when 33 : autotile_table = [ 11, 11, 12, 12 ]
  when 34 : autotile_table = [ 1, 11, 9, 0 ]
  when 35 : autotile_table = [ 1, 11, 9, 8 ]
  when 36 : autotile_table = [ 11, 2, 0, 10 ]
  when 37 : autotile_table = [ 11, 2, 7, 10 ]
  when 38 : autotile_table = [ 0, 10, 12, 4 ]
  when 39 : autotile_table = [ 5, 10, 12, 4 ]

  when 40 : autotile_table = [ 9, 0, 3, 12 ]
  when 41 : autotile_table = [ 9, 6, 3, 12 ]
  when 42 : autotile_table = [ 1, 2, 9, 10 ]
  when 43 : autotile_table = [ 1, 11, 3, 12 ]
  when 44 : autotile_table = [ 9, 10, 3, 4 ]
  when 45 : autotile_table = [ 11, 2, 12, 4 ]
  when 46 : autotile_table = [ 1, 2, 3, 4 ]
  when 47 : autotile_table = [ 1, 2, 3, 4 ]
end
  one_autotile1 = make_one_autotile(autotile_table[0])
  one_autotile2 = make_one_autotile(autotile_table[1])
  one_autotile3 = make_one_autotile(autotile_table[2])
  one_autotile4 = make_one_autotile(autotile_table[3])
  src_rect = Rect.new( 0, 0,16,16)
  full_autotile.blt( 0, 0,one_autotile1,src_rect)
  full_autotile.blt(16, 0,one_autotile2,src_rect)
  full_autotile.blt( 0,16,one_autotile3,src_rect)
  full_autotile.blt(16,16,one_autotile4,src_rect)
  return full_autotile
  end

  #--------------------------------------------------------------------------
  # ● 缩小图做成
  #--------------------------------------------------------------------------
  def make_all_map
    load_backup = $ret_bitmap.nil? ? false : !$ret_bitmap.disposed?
    if ($game_map.map_id == $old_map_id) and load_backup
      ret_bitmap = $ret_bitmap.clone
  else
    all_map = Bitmap.new($game_map.width * 32, $game_map.height * 32)
    for y in 0...$game_map.height
      for x in 0...$game_map.width
        for z in 0...3
          @tile_num = @map_data[x, y, z]
          next if @tile_num == nil
          if @tile_num < 384
            if @tile_num >= 48
              @tile_num -= 48
              tile_id = @tile_num % 48
              src_rect = Rect.new(0,0,32,32)
              autotile = make_autotile(tile_id)
              all_map.blt(x * 32, y * 32, autotile , src_rect)
            end
          else
            @tile_num -= 384
            src_rect = Rect.new(@tile_num % 8 * 32, @tile_num / 8 * 32, 32, 32)
            all_map.blt(x * 32, y * 32, @tileset, src_rect)
          end
        end
      end
    end
    w = ($game_map.width / $ZOOM) * 32
    h = ($game_map.height / $ZOOM) * 32
    ret_bitmap = Bitmap.new(w, h)
    src_rect = Rect.new(0, 0, all_map.width, all_map.height)
    dest_rect = Rect.new(0, 0, ret_bitmap.width, ret_bitmap.height)
    ret_bitmap.stretch_blt(dest_rect, all_map, src_rect)
    $ret_bitmap = ret_bitmap.clone
    $old_map_id = $game_map.map_id
    end
    all_map.dispose unless all_map.nil?
    autotile.dispose unless autotile.nil?
    return ret_bitmap
  end
  #--------------------------------------------------------------------------
  # ● 远景图做成
  #--------------------------------------------------------------------------
  def make_panorama
    all_panorama = RPG::Cache.panorama($game_map.panorama_name,$game_map.panorama_hue).clone
    w = ($game_map.width / $ZOOM) * 32
    h = ($game_map.height / $ZOOM) * 32
    ret_bitmap = Bitmap.new(w, h)
    src_rect = Rect.new(0, 0, all_panorama.width, all_panorama.height)
    dest_rect = Rect.new(0, 0, ret_bitmap.width, ret_bitmap.height)
    ret_bitmap.stretch_blt(dest_rect, all_panorama, src_rect)
    all_panorama.dispose
    return ret_bitmap
  end
  #--------------------------------------------------------------------------
  # ● 缩小事件做成
  #--------------------------------------------------------------------------
  def make_event
    all_event = Bitmap.new($game_map.width * 32, $game_map.height * 32)
    for event in $game_map.events.values
     x = event.x
     y = event.y
     @tile_id = event.tile_id
     @character_name = event.character_name
     @character_hue = event.character_hue
     @direction = event.direction
     @pattern = event.pattern
     @opacity = event.opacity
     if @character_name != ""
       temp_b = RPG::Cache.character(@character_name,@character_hue).clone
       @cw = temp_b.width / 8
       @ch = temp_b.height / 8
       sx = @pattern * @cw
       sy = (@direction - 2) / 2 * @ch
       src_rect = Rect.new(sx,sy,@cw,@ch)
       all_event.blt(((x * 32)-((@cw-32)/2)), ((y * 32) - (@ch-32)), temp_b, src_rect ,@opacity)
       temp_b.dispose
     elsif @tile_id != 0
       @tile_id -= 384
       src_rect = Rect.new(@tile_id % 8 * 32, @tile_id / 8 * 32, 32, 32)
       all_event.blt(x * 32, y * 32, @tileset, src_rect)
     end
    end
    w = ($game_map.width / $ZOOM) * 32
    h = ($game_map.height / $ZOOM) * 32
    ret_bitmap = Bitmap.new(w, h)
    src_rect = Rect.new(0, 0, all_event.width, all_event.height)
    dest_rect = Rect.new(0, 0, ret_bitmap.width, ret_bitmap.height)
    ret_bitmap.stretch_blt(dest_rect, all_event, src_rect)
    all_event.dispose
    return ret_bitmap
  end
  #--------------------------------------------------------------------------
  # ● 移动事件判断
  #--------------------------------------------------------------------------
  def event_move_judge
    moving = false
    if $game_switches[PLAN_Map_Window::MOVE_REFRESH]
     for event in $game_map.events.values
       event_old = @old_event[event.id]
       moving = true if event.moving? or event.jumping?
       moving = true if event.character_name != event_old.character_name
       moving = true if event.character_hue != event_old.character_hue
       moving = true if event.tile_id != event_old.tile_id
       moving = true if event.direction != event_old.direction
       moving = true if event.pattern != event_old.pattern
       moving = true if event.opacity != event_old.opacity
     end
    end
    moving = true if $game_switches[PLAN_Map_Window::AUTO_REFRESH]
    if $game_switches[PLAN_Map_Window::MANUAL_REFRESH]
      moving = true
      $game_switches[PLAN_Map_Window::MANUAL_REFRESH] = false
    end
      @old_event = $game_map.events
    return moving
  end

  #--------------------------------------------------------------------------
  # ● 雾图形做成
  #--------------------------------------------------------------------------
  def make_fog
    all_fog = Bitmap.new($game_map.width * 32, $game_map.height * 32)
    fog_name = $game_map.fog_name
    fog_hue = $game_map.fog_hue
    fog_bitmap = RPG::Cache.fog(fog_name, fog_hue).clone
    num_x = $game_map.width * 32 / fog_bitmap.width
    num_y = $game_map.height * 32 / fog_bitmap.height
    for x in 0..num_x
     for y in 0..num_y
      src_rect = Rect.new(0, 0, fog_bitmap.width, fog_bitmap.height)
      all_fog.blt((x * fog_bitmap.width),(y * fog_bitmap.height),
      fog_bitmap,src_rect)
     end
    end
    w = ($game_map.width / $ZOOM) * 32
    h = ($game_map.height / $ZOOM) * 32
    ret_bitmap = Bitmap.new(w, h)
    src_rect = Rect.new(0, 0, all_fog.width, all_fog.height)
    dest_rect = Rect.new(0, 0, ret_bitmap.width, ret_bitmap.height)
    ret_bitmap.stretch_blt(dest_rect, all_fog, src_rect,50)
    return ret_bitmap
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.x = $win_x.nil? ? 0 : $win_x
    self.y = $win_y.nil? ? 0 : $win_y
    self.z = 1000
  @small_map = false
  if $game_map.width < PLAN_Map_Window::LARGE_MAP[0] or $game_map.height < PLAN_Map_Window::LARGE_MAP[1]
    #这个是当地图大小宽和高小于指定大小时才改变大小,限制小地图窗口大小
    if $game_map.width < PLAN_Map_Window::MINI_MAP[0] or $game_map.height < PLAN_Map_Window::MINI_MAP[1]
      #这同时限制了变换小地图的大小,防止因为地图宽长无法切换
      self.width = [@all_map.width,PLAN_Map_Window::WIN_WIDTH].min
      self.height = [@all_map.height,PLAN_Map_Window::WIN_HEIGHT].min
      self.contents = Bitmap.new(width-32, height-32)
     #让改变的小地图X坐标紧贴边缘
    if self.x + self.width > 250
      self.x = 625 - self.width
    end
      #让改变的小地图Y左边紧贴边缘
    if self.y + self.height > 380
      self.y = 470 - self.height
    end
     @small_map = true
  end
end
   if self.windowskin == nil
   @windowskin_name = $game_system.windowskin_name
   self.windowskin = RPG::Cache.windowskin(@windowskin_name)
   end
    one_tile_size = 32 / $ZOOM
    x = $game_player.real_x - 64 * (self.contents.width / one_tile_size)
    y = $game_player.real_y - 64 * (self.contents.height / one_tile_size)
    x = x * one_tile_size / 128
    y = y * one_tile_size / 128
    px = 0
    py = 0
    half_width = self.contents.width * 128 / 2
    rest_width = ($game_map.width * 128 - $game_player.real_x) * one_tile_size
    rev_x = 0
    if @all_map.width < self.contents.width
      rev_x = (half_width - $game_player.real_x * one_tile_size) / 128
      rev_x -= (self.contents.width - @all_map.width) / 2
      x += rev_x
  
    elsif half_width > $game_player.real_x * one_tile_size
      rev_x = (half_width - $game_player.real_x * one_tile_size) / 128
      x += rev_x
  
    elsif half_width > rest_width
      rev_x = -((half_width - rest_width) / 128)
      x += rev_x
   
    end
    half_height = self.contents.height * 128 / 2
    rest_height = ($game_map.height * 128 - $game_player.real_y) * one_tile_size
    rev_y = 0
    if @all_map.height < self.contents.height
      rev_y = (half_height - $game_player.real_y * one_tile_size) / 128
      rev_y -= (self.contents.height - @all_map.height) / 2
      y += rev_y
    elsif half_height > $game_player.real_y * one_tile_size
      rev_y = (half_height - $game_player.real_y * one_tile_size) / 128
      y += rev_y
    elsif half_height > rest_height
      rev_y = -((half_height - rest_height) / 128)
      y += rev_y
    end
    src_rect = Rect.new(x, y, self.contents.width, self.contents.height)
    $sprite_bitmap.blt(0, 0, @panorama, src_rect)
    $sprite_bitmap.blt(0, 0, @all_map, src_rect)
    $sprite_bitmap.blt(0, 0, @make_event, src_rect)
    $sprite_bitmap.blt(0, 0, @all_fog, src_rect)
     if PLAN_Map_Window::WINDOW_MOVE
      w = self.x - 32 .. self.x + self.width + 32
      h = self.y - 64 .. self.y + self.height + 64
      if w === $game_player.screen_x and h === $game_player.screen_y
        if !@small_map
      case self.x
       when 8; self.x = 382
       when 382; self.x = 8
      end
      case self.y
       when 272; self.y = 8
       when 8; self.y = 272
      end
      else
       case self.x
       when  625 - self.width ;self.x = 8
       when 8; self.x = 625 - self.width
       end
       case self.y
       when 470 - self.height; self.y = 8
       when 8; self.y = 470 - self.height
       end
      end
    end
   end
     #主角位置
    if $game_party.actors.size > 0
      if $game_switches[PLAN_Map_Window::NO_ACTOR_SWITCH]
        $sprite_bitmap.blur if PLAN_Map_Window::BLUR
        return
      end
      if PLAN_Map_Window::COVER_SWITCH
      for i in [0]
        tile = @map_data[$game_player.x, $game_player.y, i]
        next if tile == 0
        if $game_map.priorities[tile] > 0
        $sprite_bitmap.blur if PLAN_Map_Window::BLUR
        return
        end
      end
      end
      actor = $game_party.actors[0]
      if actor.character_name == "" or $game_player.opacity == 0
      $sprite_bitmap.blur if PLAN_Map_Window::BLUR  
      return
      end
      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue).clone
      width = bitmap.width/ 8
      height = bitmap.height / 8
      pattern = $game_player.pattern
      sx = PLAN_Map_Window::ACTOR_MOVE ? pattern * width : 0
      sy = ($game_player.direction - 2) / 2 * height
      #原始行走图大小矩形
      src_rect = Rect.new(sx, sy, width, height)
      if $ZOOM > 7
      w = width / 5
      h = height / 5
      else  
      w = width / $ZOOM
      h = height / $ZOOM
      end
      x = self.contents.width / 2 - w / 2 + one_tile_size / 2 - rev_x
      y = self.contents.height / 2 - h / 2 - rev_y
      
      #小地图上的行走图大小
      dest_rect = Rect.new($game_player.x*4, $game_player.y*3, w, h)
      $sprite_bitmap.stretch_blt(dest_rect, bitmap, src_rect, $game_player.opacity)
      bitmap.dispose
    end
    $sprite_bitmap.blur if PLAN_Map_Window::BLUR
    end
  #--------------------------------------------------------------------------
  # ● 更新
  #--------------------------------------------------------------------------
  def update
    super
    if @old_real_x != $game_player.real_x or @old_real_y != $game_player.real_y or
     @old_real_direction != $game_player.direction
      refresh
      @old_real_x = $game_player.real_x
      @old_real_y = $game_player.real_y
      @old_real_direction = $game_player.direction
    end
    if $game_party.actors.size > 0
      if @old_char_name != $game_party.actors[0].character_name
       refresh
       @old_char_name = $game_party.actors[0].character_name
      end
    end
    if PLAN_Map_Window::ACTOR_MOVE and @old_pattern != $game_player.pattern
      refresh
      @old_pattern = $game_player.pattern
    end
    if event_move_judge
      @make_event = make_event
      refresh
    end
    if @old_panorama != $game_map.panorama_name
      @panorama = make_panorama
      refresh
      @old_panorama = $game_map.panorama_name
    end
    if @old_fog != $game_map.fog_name
       @all_fog = make_fog
       refresh
       @old_fog = $game_map.fog_name
     end
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    super
    @panorama.dispose unless @panorama.disposed?
    @all_map.dispose unless @all_map.disposed?
    @make_event.dispose unless @make_event.disposed?
    @all_fog.dispose unless @all_fog.disposed?
  end
end

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
153#
发表于 2013-9-11 21:30:32 |只看该作者
本帖最后由 oahp 于 2013-9-11 21:35 编辑

注意上面的脚本。与网上找的原脚本已经稍有不同了
是我专门为金庸无双修改优化的

其中用了 if  $game_variables[1151]==0

来判断。如果使用其他变量也可以。

之所以修改原来的脚本原因有两个

第一:原先网上的脚本是按Z键,与我们游戏冲突了
第二:原先网上的脚本,严重的重影,我们的游戏无法使用

最后,只要把这个脚本插入到main脚本的上面就可以了





此功能计划做入3.68

附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
154#
发表于 2013-9-11 21:51:55 |只看该作者
3.67技能解析之斗转星移

3。67的最大亮点就是武功,而武功中,我个人最得意的就是斗转星移。虽然斗转星移威力不如无剑,实用不如古一阳指。
但是从程序设计上说,是我最爱的

下面的斗转星移的实现


实现很简单,就是当技能是攻击技能的时候
使用了
       damage = event_damage_skill(user,user,skill)
       dagame_acon(user,damage,skill.animation2_id)

这样就是按敌人自己的攻击防御,计算自己打自己造成多少伤害。

而且连负面的状态,也转移给敌人自己!!!

如果技能的补给型技能
则使用
       damage = event_damage_skill(user,user,skill)
       @actor.hp -= damage.to_i
       user.sp -= skill.sp_cost

把敌人补血的数量,给了主角自己。这里damage一定是负数。。

可见,斗转星移绝对不是普通意义上的反伤

一般反伤的定义就是敌人打我1000点血,我按1000点的比例伤害敌人多少

而斗转星移的严格意义上的转移技能,就像是主角使用了这个技能一样的效果

既有护体作用,也有攻击作用!!!
附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
155#
发表于 2013-9-11 21:56:50 |只看该作者


以上是冷月窥人,古一阳指,古左右的实现

冷月技能其实就是判断一下是否启用,如果启用,取技能的范围都是3*3

古一阳指,其实就是改变敌人的移动状态

古左右,就是随机取一个技能。


附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

帖子
382
精华
0
积分
192
金钱
1842
荣誉
0
人气
6
评议
0
156#
发表于 2013-9-11 22:00:15 |只看该作者
嚎腻害

使用道具 举报

帖子
356
精华
0
积分
178
金钱
4466
荣誉
0
人气
2
评议
0
157#
发表于 2013-9-11 22:25:17 |只看该作者
能讲一下功体免疫debuff这方面的设置吗?

使用道具 举报

帖子
3720
精华
0
积分
1865
金钱
7190
荣誉
0
人气
50
评议
0

158#
发表于 2013-9-11 23:41:07 |只看该作者
oahp 发表于 2013-9-11 21:56
以上是冷月窥人,古一阳指,古左右的实现

冷月技能其实就是判断一下是否启用,如果启用,取技能的范围都 ...

左右技能傷害是不是看當前用的技能的傷害?感覺傷害都差不多 變成了二連擊

終結世界的力量,於毀滅的光芒中行走的七個身影,他們是最初與最後的人。

使用道具 举报

帖子
3720
精华
0
积分
1865
金钱
7190
荣誉
0
人气
50
评议
0

159#
发表于 2013-9-11 23:47:46 |只看该作者
順便問問莫軒大大那個補丁裡面的增加經驗倍率的戒指要怎麼做出來?

終結世界的力量,於毀滅的光芒中行走的七個身影,他們是最初與最後的人。

使用道具 举报

金庸无双工作组【技术】

帖子
437
精华
1
积分
628
金钱
7330
荣誉
19
人气
190
评议
0
160#
发表于 2013-9-13 22:17:14 |只看该作者
修改标题






附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

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

手机版|Archiver|游侠NETSHOW论坛 ( 苏ICP备2023007791号 )

GMT+8, 2025-6-3 13:41 , Processed in 0.338000 second(s), 9 queries , Gzip On, Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

分享到