查看: 1886|回复: 3

[讨论] 在國外網站發現的有趣腳本 "Edit & Play" (XP和VX適用)

[复制链接]
梦石
0
星屑
55
在线时间
461 小时
注册时间
2008-11-19
回帖
525
发表于 2012-4-22 19:06:13 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 sai90306 于 2012-4-22 19:10 编辑

不知道有沒有人發過了
說明上寫說能夠同時編輯和玩自己的遊戲
有人要當小白鼠的嗎?

來源http://save-point.org/Thread-xp-vx-script-edit-play--3674
[pre lang="ruby" line="1"]    #===============================================================================
    # * Edit & Play
    #-------------------------------------------------------------------------------
    #   - Version: 2.1
    #   - Date   : 14 / 08 / 2011
    #   - Author : .:Fênix:.
    #   - MSN    : bmotamer@hotmail.com
    #-------------------------------------------------------------------------------
    #   - Description:
    #     Let you edit and play your game at the same time
    #-------------------------------------------------------------------------------
    #   - Compability:
    #     RPG Maker XP and RPG Maker VX
    #===============================================================================
     
    module Edit_and_Play
      # Activate the script? (true / false)
      Activate = true
      # Key which updates the game
      Update_Key = Input::ALT
      # Data files that won't be reloaded
      File_Exclude = []
      # Scripts that won't be reloaded
      Scripts_Exclude = ["Edit & Play", "Main"]
    end
     
    $VX ||= defined?(Graphics.wait)
     
    if ((Edit_and_Play::Activate) && !(File.file?("Game.rgss#{$VX ? '2a' : 'ad'}")))
     
      char     = $VX ? "v" : "x"
      old_file = "Data/BT_Actors.r#{char}data"
      new_file = "Data/BT_Actors2.r#{char}data"
     
      if ($TEST || $DEBUG)
        File.rename(old_file, new_file) if ($BTEST)
        Thread.new {system("Game.exe")}
        exit
      else
        $TEST = $DEBUG = true
        if (File.file?(new_file))
          File.rename(new_file, old_file)
          $BTEST = true
        end
      end
     
      unless ($VX)
        class Scene_Battle
         
          alias :edit_and_play_1 :main unless ($@)
         
          def main
            edit_and_play_1
            $scene = Scene_Battle.new if ($BTEST)
          end
         
        end
      end
     
      class << Input
      
        alias :edit_and_play_2 :update unless ($@)
      
        def update
          if (trigger?(Edit_and_Play::Update_Key))
            for file in (Dir.entries("Data") - [".", "..", *Edit_and_Play::File_Exclude])
              next if (file.include?("Map"))
              basename = File.basename(file, ".*").downcase!
              if (basename == "scripts")
                ($VX ? Cache : RPG::Cache).clear
                for data in load_data("Data/#{file}")
                  next if (Edit_and_Play::Scripts_Exclude.include?(data[1]))
                  eval(Zlib::Inflate.inflate(data[2]))
                end
                $game_map.setup($game_map.map_id) if ($game_map != nil && $game_map.map_id != 0)
                $scene = $scene.class.new
              else
                eval("$data_#{basename} = load_data('Data/#{file}')")
              end
            end        
          end
          edit_and_play_2
        end
      
      end
     
    end[/pre]

点评

好东西呀~~  发表于 2012-6-21 15:48
梦石
0
星屑
47
在线时间
175 小时
注册时间
2012-1-10
回帖
838
发表于 2012-4-22 19:30:15 | 显示全部楼层
我怎么看到是中文的?

#================================================= ==============================
    #*编辑及播放
    #------------------------------------------------- ------------------------------
    # - 版本:2.1
    # - 日期:14/08/2011
     - 作者:FENIX:。
    # -  MSN:[电子邮件] bmotamer@hotmail.com [/电子邮件]
    #------------------------------------------------- ------------------------------
    # - 描述:
    #让您编辑和播放在同一时间你的游戏
    #------------------------------------------------- ------------------------------
    # -  Compability:
    #的RPG MAKER XP和RPG MAKER VX的
    #================================================= ==============================

    模块 Edit_and_Play
      #启动脚本?(真/假)
      激活= TRUE
      #键更新游戏
      Update_Key = 输入:: ALT
      #数据文件不会被重载
      File_Exclude = [ ]
      #不会被重新加载脚本
      Scripts_Exclude = [ “编辑和播放”,“主” ]
    结束

    VX | | = 定义?(图形。等待)

     ((Edit_and_Play ::激活) &&! (档案文件(“Game.rgss#{$ VX '2 A吗?”:“广告”}“ )))

      字符= $ VX的“V” :“X”
      old_file = “数据/ BT_Actors.r#{char}上的数据”
      new_file =的“Data/BT_Actors2.r#{字符}数据”

      如果 ( $测试| | $调试)
        文件。重命名( old_file,new_file )  ( $ BTEST )
        主题。新 系统(“Game.exe” )}
        出口
      其他
        $测试 = $ DEBUG = 真
        如果 (文件。文件(new_file ))
          文件。重命名( new_file,old_file )
          美元BTEST = 真
        结束
      结束

      除非 ( $ VX的)
        类 Scene_Battle

          别名 :edit_and_play_1  :主要 除非 ( $ @ )

          DEF主
            edit_and_play_1
            $场景 = Scene_Battle。新  ( $ BTEST )
          结束

        结束
      结束

      类 <<输入

        别名 :edit_and_play_2  :更新 ,除非 ( $ @ )

        DEF更新
          如果 (触发(Edit_and_Play :: Update_Key ))
            文件(目录条目(“资料” ) - [ “。” ,“......” ,Edit_and_Play :: File_Exclude ] )
              未来 如果 (文件。包括?(“地图” ))
              基名= 文件基本名(文件,“*” ) 。downcase!
               (基名== “脚本” )
                ( $ VX的缓存:角色扮演::高速缓存)。明确
                在 load_data 数据(“数据/#{文件}” )
                  未来 如果 (包括Edit_and_Play :: Scripts_Exclude。?(数据[ 1 ] ))
                  EVAL (ZLIB ::充气膨胀(数据[ 2 ] ))
                结束
                美元game_map。设置( $ game_map。map_id )  ( $ = 零 && $ game_map。map_id game_map!!= 0 )
                $场景 = $场景。类。新
              其他
                EVAL (“$ data_中的#{基名} = load_data(数据/#{文件}')” )
              结束
            结束        
          结束
          edit_and_play_2
        结束

      结束

    结束

点评

要是是中文語法多好?  发表于 2012-6-21 20:13
如果Window是中国做的话,中文法语就会实现了  发表于 2012-4-22 19:36
不過中文好看多了!  发表于 2012-4-22 19:33
可能是翻譯的吧 中文語法...怪怪的?  发表于 2012-4-22 19:33
决心要开一个坑
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2300169753&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:2300169753:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
回复

使用道具 举报

梦石
0
星屑
803
在线时间
2068 小时
注册时间
2011-10-3
回帖
1620
发表于 2012-4-22 19:35:11 | 显示全部楼层
同时编辑和玩自己的游戏?这个不用脚本就能做到了吧


‘‘──布里蓝于2012-4-22 21:47补充以下内容

我的浏览器不能复制这种格式的代码……
所以只能等喽~
估计是用软件测试时也能编辑吧
’’

点评

所以很好奇這到底是做什麼用的  发表于 2012-4-22 19:36
回复

使用道具 举报

乌有君
乌有君  发表于 2012-4-22 23:44:12
這東西的用戶友好度絕對比目前石器內部的各種編輯器低。
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部