查看: 4585|回复: 1

[已经过期] 不知道是不是使用"ARPG整合製作包"少了什麼,開始就卡著

[复制链接]
梦石
0
星屑
50
在线时间
158 小时
注册时间
2016-1-7
回帖
102
发表于 2016-4-25 03:54:55 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 燕征 于 2016-4-25 04:09 编辑

最近看見了[RMXP发布] 【整合製作包】ARPG整合製作包覺得應該比xas好上手一點吧,於是想把手上的東西改過去

原範例檔我更動了以下
1. 資料庫>>主角,地圖元件,系統(最初陣容清空)
2. 腳本 >> 多了:  "Start選擇面板"和"Start:角色選擇(Scene_Title)"
2. 腳本 >> 註解 :"截圖存檔","◆Arpg_Scene_Map" 42行
3. 左下地圖設置區塊 >> Map001~序章
4. 主角初始位置設到Map001這張地圖

想說先測試按開始遊戲後的一小部分能用否(因為開始遊戲後要放op要選角,很擔心)
然後該放的素材和涉及的資料庫等,能想到的都照原來的設了
然而他就是會炸掉...目前已知會在"◆Arpg_Scene_Map" 第78行炸掉,訊息是
NoMethodError occurred. Undefined method '[]' for nil:NilCalss

初始的Map001是我用來放op結束後選角用的,按下鍵盤c鍵後本來應該可以跳過動過,這邊不按畫面不動(也不會有動畫),按了就炸掉
不知道是我異動的哪個東西或還少弄了什麼才讓遊戲掛掉的呢?

然後很抱歉我專案檔放在雲端上只能用連結讓人下載,因為檔案一次可傳大小超過了
GoogleDrive :附件
微盤: 附件    密码:P133

点评

你应该加了很多脚本进去吧  发表于 2016-4-25 18:44
很显然就是和你手上的东西冲突  发表于 2016-4-25 18:43
什麼都不動就是原本的範例檔,那是可以運行的。  发表于 2016-4-25 14:16
不知道,多半是和你手上的东西冲突。你什么都不动运行看看  发表于 2016-4-25 12:43
梦石
0
星屑
50
在线时间
158 小时
注册时间
2016-1-7
回帖
102
 楼主| 发表于 2016-4-25 22:02:04 | 显示全部楼层
本帖最后由 燕征 于 2016-4-25 22:13 编辑

@yang1zhi
我用線上比對軟體比較了 "Start:角色選擇(Scene_Title)" 和 "Scene_Title"
發現是前者複寫到後者,把"Start:角色選擇(Scene_Title)"刪掉就好了, 因為 "Scene_Title"  有加了一些原作者自定義的東西剛好就是訊息提示找不到的東西

然後要播swf影片,這裡的問題就是...
我自己本來"Flash.ocx"和"RMFlash.dll"是直接跟"Game.rxproj"和"Game.exe"放在放在同一層
範例檔特別整理到了Lib資料夾放著
[fold=相對應使用的"RMFlash"腳本的相關路徑設定在64-80行也進行了相關變動(就是+上了Lib/這個路徑)][pre lang="ruby"]        API_NEW                      = Win32API.new("Lib/RMFlash", "_new", "piil", "l")
        API_UPDATE            = Win32API.new("Lib/RMFlash", "_update", "l", "v")
        API_FREE              = Win32API.new("Lib/RMFlash", "_free", "l", "v")
        API_PLAYING     = Win32API.new("Lib/RMFlash", "_is_playing", "l", "i")
        API_PAUSE              = Win32API.new("Lib/RMFlash", "_pause", "l", "v")
        API_RESUME            = Win32API.new("Lib/RMFlash", "_resume", "l", "v")
        API_BACK              = Win32API.new("Lib/RMFlash", "_back", "l", "v")
        API_REWIND            = Win32API.new("Lib/RMFlash", "_rewind", "l", "v")
        API_FORWARD            = Win32API.new("Lib/RMFlash", "_forward", "l", "v")
        API_CURFRAME          = Win32API.new("Lib/RMFlash", "_cur_frame", "l", "i")
        API_TOTALFRAME        = Win32API.new("Lib/RMFlash", "_total_frames", "l", "i")
        API_GOTOFRAME          = Win32API.new("Lib/RMFlash", "_goto_frame", "li", "v")
        API_GETLOOP                  = Win32API.new("Lib/RMFlash", "_get_loop", "l", "i")
        API_SETLOOP                  = Win32API.new("Lib/RMFlash", "_set_loop", "li", "v")
        API_CLEARALL          = Win32API.new("Lib/RMFlash", "_clear_all", "v", "v")
  API_VALID       = Win32API.new("Lib/RMFlash", "_valid", "l", "i")
  API_SENDMSG     = Win32API.new("Lib/RMFlash", "_send_message", "liii", "l")
        [/pre][/fold]

讀取影片的路徑設定在93,94行
[pre lang="ruby"]    new("#{CUR_PATH}/#{name}".u2s, width, height)
    #new("#{CUR_PATH}/#{name}".u2s, width, height, v)[/pre]
對比我之前使用的是下面,所以我就把註解上面93行,94行改成
[pre lang="ruby"]new("../Graphics/movie/#{name}".u2s, width, height, v)[/pre]

但我不知道是腳本的路徑寫法不對或是事件的還要再加什麼東西
事件在Map001主角下面(ID:005)

[fold=目前被我更動第94行的RMFlash整個腳本][pre lang="ruby"]#Flash 播放器 v1.3   作者:灼眼的夏娜

class String
  
  CP_ACP = 0
  CP_UTF8 = 65001
  
  def u2s
    m2w = Win32API.new("kernel32", "MultiByteToWideChar", "ilpipi", "i")
    w2m = Win32API.new("kernel32", "WideCharToMultiByte", "ilpipipp", "i")
   
    len = m2w.call(CP_UTF8, 0, self, -1, nil, 0)
    buf = "\0" * (len*2)
    m2w.call(CP_UTF8, 0, self, -1, buf, buf.size/2)
   
    len = w2m.call(CP_ACP, 0, buf, -1, nil, 0, nil, nil)
    ret = "\0" * len
    w2m.call(CP_ACP, 0, buf, -1, ret, ret.size, nil, nil)
   
    return ret
  end
  
  def s2u
    m2w = Win32API.new("kernel32", "MultiByteToWideChar", "ilpipi", "i")
    w2m = Win32API.new("kernel32", "WideCharToMultiByte", "ilpipipp", "i")
  
    len = m2w.call(CP_ACP, 0, self, -1, nil, 0);
    buf = "\0" * (len*2)
    m2w.call(CP_ACP, 0, self, -1, buf, buf.size/2);
  
    len = w2m.call(CP_UTF8, 0, buf, -1, nil, 0, nil, nil);
    ret = "\0" * len
    w2m.call(CP_UTF8, 0, buf, -1, ret, ret.size, nil, nil);
     
    return ret
  end

  def s2u!
    self[0, length] = s2u
  end  
  
  def u2s!
    self[0, length] = u2s
  end
  
end

class Bitmap
  
  RtlMoveMemory_pi = Win32API.new('kernel32', 'RtlMoveMemory', 'pii', 'i')
  RtlMoveMemory_ip = Win32API.new('kernel32', 'RtlMoveMemory', 'ipi', 'i')

  def address
    buffer, ad = "xxxx", object_id * 2 + 16
    RtlMoveMemory_pi.call(buffer, ad, 4); ad = buffer.unpack("L")[0] + 8
    RtlMoveMemory_pi.call(buffer, ad, 4); ad = buffer.unpack("L")[0] + 16
    RtlMoveMemory_pi.call(buffer, ad, 4); return buffer.unpack("L")[0]
  end
  
end

class RMFlash

        API_NEW                      = Win32API.new("Lib/RMFlash", "_new", "piil", "l")
        API_UPDATE            = Win32API.new("Lib/RMFlash", "_update", "l", "v")
        API_FREE              = Win32API.new("Lib/RMFlash", "_free", "l", "v")
        API_PLAYING     = Win32API.new("Lib/RMFlash", "_is_playing", "l", "i")
        API_PAUSE              = Win32API.new("Lib/RMFlash", "_pause", "l", "v")
        API_RESUME            = Win32API.new("Lib/RMFlash", "_resume", "l", "v")
        API_BACK              = Win32API.new("Lib/RMFlash", "_back", "l", "v")
        API_REWIND            = Win32API.new("Lib/RMFlash", "_rewind", "l", "v")
        API_FORWARD            = Win32API.new("Lib/RMFlash", "_forward", "l", "v")
        API_CURFRAME          = Win32API.new("Lib/RMFlash", "_cur_frame", "l", "i")
        API_TOTALFRAME        = Win32API.new("Lib/RMFlash", "_total_frames", "l", "i")
        API_GOTOFRAME          = Win32API.new("Lib/RMFlash", "_goto_frame", "li", "v")
        API_GETLOOP                  = Win32API.new("Lib/RMFlash", "_get_loop", "l", "i")
        API_SETLOOP                  = Win32API.new("Lib/RMFlash", "_set_loop", "li", "v")
        API_CLEARALL          = Win32API.new("Lib/RMFlash", "_clear_all", "v", "v")
  API_VALID       = Win32API.new("Lib/RMFlash", "_valid", "l", "i")
  API_SENDMSG     = Win32API.new("Lib/RMFlash", "_send_message", "liii", "l")
        
  CUR_PATH        = Dir.pwd
  
        def self.get_version

        end

        def self.clear_all
                API_CLEARALL.call
        end
  
  def self.load(name, width, height, v = nil) #v=nil
    #new("#{CUR_PATH}/#{name}".u2s, width, height)
    new("../Graphics/movie/#{name}".u2s, width, height, v)
  end
  
  attr_reader   :valid

        def initialize(flash_name, flash_width, flash_height, viewport = nil)
                @sprite = Sprite.new(viewport)
                @sprite.bitmap = Bitmap.new(flash_width, flash_height)
                @value = API_NEW.call(flash_name, flash_width, flash_height, @sprite.bitmap.address)
                @loop = API_GETLOOP.call(@value) > 0
    @valid = API_VALID.call(@value) > 0
        end

        def viewport
                @sprite.viewport
        end

        def update
                API_UPDATE.call(@value)
        end

        def dispose
                API_FREE.call(@sprite.bitmap.address)
                @sprite.bitmap.dispose
                @sprite.dispose#AVG
        end

        def playing?
                API_PLAYING.call(@value) > 0
        end

        def pause
                API_PAUSE.call(@value)
        end

        def resume
                API_RESUME.call(@value)
        end

        def back
                API_BACK.call(@value)
        end

        def rewind
                API_REWIND.call(@value)
        end

        def forward
                API_FORWARD.call(@value)
        end

        def current_frame
                API_CURFRAME.call(@value)
        end

        def total_frames
                API_TOTALFRAME.call(@value)
        end

        def goto_frame(goal_frame)
                API_GOTOFRAME.call(@value, goal_frame)
        end

        def x
                @sprite.x
        end

        def x=(v)
                @sprite.x = v
        end

        def y
                @sprite.y
        end

        def y=(v)
                @sprite.y = v
        end

        def z
                @sprite.z
        end

        def z=(v)
                @sprite.z = v
        end

        def width
                @sprite.bitmap.width
        end

        def height
                @sprite.bitmap.height
        end

        def loop?
                @loop
        end

        def loop=(v)
                if @loop != v
                        @loop = v
                        API_SETLOOP.call(@value, v)
                end
        end
  
  def msg_to_flash(msg, wParam, lParam)
    return API_SENDMSG.call(@value, msg, wParam, lParam)
  end
  
  #  例
  WM_MOUSEMOVE  = 0x0200
  
  def make_long(a, b)
    return (a & 0xffff ) | (b & 0xffff) << 16
  end
  
  def on_mouse_move(x, y)
    return msg_to_flash(WM_MOUSEMOVE, 0, make_long(x, y))
  end

end

module Kernel

  alias origin_exit exit unless method_defined? :exit
  
  def exit(*args)
    RMFlash.clear_all
    origin_exit(*args)
  end
  
end[/pre][/fold]
[fold=事件設定截圖][/fold]  
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部