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

Project1

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

[随意闲聊] vx帧数党的福音,vx使用rgss3运行库,亲测可用

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
8 小时
注册时间
2008-5-6
帖子
7
跳转到指定楼层
1
 楼主| 发表于 2013-2-22 11:28:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 白加黑 于 2013-2-22 12:13 编辑

原帖地址:
ht该死的“新手”限制,权限你妹! tp://forums.rpgmakerweb.com/index.php?/topic/3114-updated-using-rgss3-with-rpg-maker-vx/

va的好处不用多说了,速度快效率高,分辨率解放,等同于vx的改良版,但是固守vx的玩家也很多,主要就是自己所用的游戏脚本系统没有替代品(+1),亦或是素材地图是vx格式无法移植
此方法可以在不破坏游戏文件夹结构的同时让你的游戏轻松搞到120fps,1024*768,请严格按照下面方法执行(第五步除外),执行前备份游戏文件夹
原帖提供的两段代码需要翻墙,特此予以转载
RUBY 代码复制
  1. #===============================================================================
  2.     #         RAFAEL_SOL_MAKER's RGSS2 DATA STRUCTURE FOR ACE (BETA)
  3.     #     SLIM VERSION: LESS 542 LINES IF COMPARED WITH THE PREVIOUS VERSION
  4.     #_______________________________________________________________________________
  5.     #   Description  | It's simply part of the RPG Module Data Structure, extracted
  6.     #                | originally from RPG Maker VX Help file. This version is
  7.     #                | tweaked and intended to run only with the RGSS3 game player.
  8.     #________________|______________________________________________________________
  9.     #     Usage      | Just plug it before any other scripts, including the ones
  10.     #                | from default game engine. Yes, this will be the very first!
  11.     #________________|______________________________________________________________
  12.     # Specifications | Difficulty to Use:
  13.     #                |  * (almost none at all, just plug it correctly)
  14.     #                | Scripting Difficulty:
  15.     #                |  * (few, it's only a data structure after all)
  16.     #                | Compatibility:
  17.     #                |  ??? (it's already made to create compatibility!)
  18.     #                | New Methods:
  19.     #                |  - (none, only old methods already made for RPG Module)
  20.     #                | Overwritten Methods:
  21.     #                |  - (depends on what are you using for)
  22.     #                | Aliased Methods:
  23.     #                |  - RPG::Actor.new
  24.     #                |  - RPG::UsableItem.new
  25.     #                |  - RPG::Skill.new
  26.     #                |  - RPG::Item.new
  27.     #                |  - RPG::EquipItem.new
  28.     #                |  - RPG::Weapon.new
  29.     #                |  - RPG::Enemy.new
  30.     #                |  - RPG::Troop.new
  31.     #                |  - RPG::State.new
  32.     #                |  - RPG::System.new
  33.     #                |  - RPG::System::TestBattler.new
  34.     #________________|______________________________________________________________
  35.     # Special Thanks | -
  36.     #________________|______________________________________________________________
  37.     #===============================================================================
  38.  
  39.     module RPG
  40.       class Area
  41.         def initialize
  42.           @id = 0
  43.           @name = ""
  44.           @map_id = 0
  45.           @rect = Rect.new(0,0,0,0)
  46.           @encounter_list = []
  47.           @order = 0
  48.         end
  49.         attr_accessor :id
  50.         attr_accessor :name
  51.         attr_accessor :map_id
  52.         attr_accessor :rect
  53.         attr_accessor :encounter_list
  54.         attr_accessor :order
  55.       end  
  56.  
  57.       class Actor
  58.           alias rgss2to3_initialize initialize
  59.           def initialize
  60.             rgss2to3_initialize
  61.           @id = 0
  62.           @name = ""
  63.           @exp_basis = 25
  64.           @exp_inflation = 35
  65.           @parameters = Table.new(6,100)
  66.           for i in 1..99
  67.             @parameters[0,i] = 400+i*50
  68.             @parameters[1,i] = 80+i*10
  69.             @parameters[2,i] = 15+i*5/4
  70.             @parameters[3,i] = 15+i*5/4
  71.             @parameters[4,i] = 20+i*5/2
  72.             @parameters[5,i] = 20+i*5/2
  73.           end
  74.           @weapon_id = 0
  75.           @armor1_id = 0
  76.           @armor2_id = 0
  77.           @armor3_id = 0
  78.           @armor4_id = 0
  79.           @two_swords_style = false
  80.           @fix_equipment = false
  81.           @auto_battle = false
  82.           @super_guard = false
  83.           @pharmacology = false
  84.           @critical_bonus = false
  85.         end
  86.         attr_accessor :id
  87.         attr_accessor :name
  88.         attr_accessor :exp_basis
  89.         attr_accessor :exp_inflation
  90.         attr_accessor :parameters
  91.         attr_accessor :weapon_id
  92.         attr_accessor :armor1_id
  93.         attr_accessor :armor2_id
  94.         attr_accessor :armor3_id
  95.         attr_accessor :armor4_id
  96.         attr_accessor :two_swords_style
  97.         attr_accessor :fix_equipment
  98.         attr_accessor :auto_battle
  99.         attr_accessor :super_guard
  100.         attr_accessor :pharmacology
  101.         attr_accessor :critical_bonus
  102.       end
  103.  
  104.       class Class
  105.         def initialize
  106.           @id = 0
  107.           @name = ""
  108.           @position = 0
  109.           @weapon_set = []
  110.           @armor_set = []
  111.           @element_ranks = Table.new(1)
  112.           @state_ranks = Table.new(1)
  113.           @learnings = []
  114.           @skill_name_valid = false
  115.           @skill_name = ""
  116.         end
  117.         attr_accessor :id
  118.         attr_accessor :name
  119.         attr_accessor :position
  120.         attr_accessor :weapon_set
  121.         attr_accessor :armor_set
  122.         attr_accessor :element_ranks
  123.         attr_accessor :state_ranks
  124.         attr_accessor :learnings
  125.         attr_accessor :skill_name_valid
  126.         attr_accessor :skill_name
  127.       end
  128.  
  129.       class UsableItem < BaseItem
  130.         alias rgss2to3_initialize initialize
  131.         def initialize
  132.           rgss2to3_initialize
  133.           super
  134.           @common_event_id = 0
  135.           @base_damage = 0
  136.           @variance = 20
  137.           @atk_f = 0
  138.           @spi_f = 0
  139.           @physical_attack = false
  140.           @damage_to_mp = false
  141.           @absorb_damage = false
  142.           @ignore_defense = false
  143.           @element_set = []
  144.           @plus_state_set = []
  145.           @minus_state_set = []
  146.         end
  147.         def for_one? # Overwrite: +4
  148.           return [1, 3, 4, 7, 9, 11].include?(@scope)
  149.         end
  150.         def for_two?
  151.           return [5].include?(@scope)
  152.         end
  153.         def for_three?
  154.           return [6].include?(@scope)
  155.         end
  156.         def for_random? # Overwrite: -3
  157.           return [4, 5, 6].include?(@scope)
  158.         end
  159.         def dual?
  160.           return [3].include?(@scope)
  161.         end
  162.         def need_selection? # Overwrite: +3
  163.           return [1, 3, 7, 9].include?(@scope)
  164.         end
  165.         attr_accessor :common_event_id
  166.         attr_accessor :base_damage
  167.         attr_accessor :variance
  168.         attr_accessor :atk_f
  169.         attr_accessor :spi_f
  170.         attr_accessor :physical_attack
  171.         attr_accessor :damage_to_mp
  172.         attr_accessor :absorb_damage
  173.         attr_accessor :ignore_defense
  174.         attr_accessor :element_set
  175.         attr_accessor :plus_state_set
  176.         attr_accessor :minus_state_set
  177.       end
  178.  
  179.       class Skill < UsableItem
  180.         alias rgss2to3_initialize initialize
  181.         def initialize
  182.           rgss2to3_initialize
  183.           super
  184.           @hit = 100
  185.         end
  186.         attr_accessor :hit
  187.       end
  188.  
  189.       class Item < UsableItem
  190.         alias rgss2to3_initialize initialize
  191.         def initialize
  192.           rgss2to3_initialize
  193.           super
  194.           @hp_recovery_rate = 0
  195.           @hp_recovery = 0
  196.           @mp_recovery_rate = 0
  197.           @mp_recovery = 0
  198.           @parameter_type = 0
  199.           @parameter_points = 0
  200.         end
  201.         attr_accessor :hp_recovery_rate
  202.         attr_accessor :hp_recovery
  203.         attr_accessor :mp_recovery_rate
  204.         attr_accessor :mp_recovery
  205.         attr_accessor :parameter_type
  206.         attr_accessor :parameter_points
  207.       end
  208.  
  209.       class EquipItem  < BaseItem  
  210.         alias rgss2to3_initialize initialize
  211.         def initialize
  212.           rgss2to3_initialize
  213.           super
  214.           @atk = 0
  215.           @def = 0
  216.           @spi = 0
  217.           @agi = 0
  218.           @element_set = []
  219.           @state_set = []
  220.         end   
  221.         attr_accessor :atk
  222.         attr_accessor :def
  223.         attr_accessor :spi
  224.         attr_accessor :agi
  225.         attr_accessor :element_set
  226.         attr_accessor :state_set
  227.       end
  228.  
  229.       class Weapon < EquipItem  
  230.         alias rgss2to3_initialize initialize
  231.         def initialize
  232.           rgss2to3_initialize
  233.           super
  234.           @hit = 95
  235.           @two_handed = false
  236.           @fast_attack = false
  237.           @dual_attack = false
  238.           @critical_bonus = false
  239.         end   
  240.         attr_accessor :hit
  241.         attr_accessor :two_handed
  242.         attr_accessor :fast_attack
  243.         attr_accessor :dual_attack
  244.         attr_accessor :critical_bonus
  245.       end
  246.  
  247.       class Armor < EquipItem
  248.         def initialize
  249.           super
  250.           @kind = 0
  251.           @eva = 0
  252.           @prevent_critical = false
  253.           @half_mp_cost = false
  254.           @double_exp_gain = false
  255.           @auto_hp_recover = false
  256.         end   
  257.         attr_accessor :kind
  258.         attr_accessor :eva
  259.         attr_accessor :prevent_critical
  260.         attr_accessor :half_mp_cost
  261.         attr_accessor :double_exp_gain
  262.         attr_accessor :auto_hp_recover
  263.       end
  264.  
  265.       class Enemy
  266.         alias rgss2to3_initialize initialize
  267.         def initialize
  268.           rgss2to3_initialize
  269.           @id = 0
  270.           @name = ""
  271.           @maxhp = 10
  272.           @maxmp = 10
  273.           @atk = 10
  274.           @def = 10
  275.           @spi = 10
  276.           @agi = 10
  277.           @hit = 95
  278.           @eva = 5
  279.           @drop_item1 = RPG::Enemy::DropItem.new
  280.           @drop_item2 = RPG::Enemy::DropItem.new
  281.           @levitate = false
  282.           @has_critical = false
  283.           @element_ranks = Table.new(1)
  284.           @state_ranks = Table.new(1)
  285.           @note = ""
  286.         end
  287.         attr_accessor :id
  288.         attr_accessor :name
  289.         attr_accessor :maxhp
  290.         attr_accessor :maxmp
  291.         attr_accessor :atk
  292.         attr_accessor :def
  293.         attr_accessor :spi
  294.         attr_accessor :agi
  295.         attr_accessor :hit
  296.         attr_accessor :eva
  297.         attr_accessor :drop_item1
  298.         attr_accessor :drop_item2
  299.         attr_accessor :levitate
  300.         attr_accessor :has_critical
  301.         attr_accessor :element_ranks
  302.         attr_accessor :state_ranks
  303.         attr_accessor :note
  304.  
  305.         class DropItem
  306.           def initialize
  307.             @kind = 0
  308.             @item_id = 1
  309.             @weapon_id = 1
  310.             @armor_id = 1
  311.             @denominator = 1
  312.           end
  313.           attr_accessor :kind
  314.           attr_accessor :item_id
  315.           attr_accessor :weapon_id
  316.           attr_accessor :armor_id
  317.           attr_accessor :denominator
  318.         end
  319.  
  320.         class Action
  321.           def initialize
  322.             @kind = 0
  323.             @basic = 0
  324.             @skill_id = 1
  325.             @condition_type = 0
  326.             @condition_param1 = 0
  327.             @condition_param2 = 0
  328.             @rating = 5
  329.           end
  330.           def skill?
  331.             return @kind == 1
  332.           end
  333.           attr_accessor :kind
  334.           attr_accessor :basic
  335.           attr_accessor :skill_id
  336.           attr_accessor :condition_type
  337.           attr_accessor :condition_param1
  338.           attr_accessor :condition_param2
  339.           attr_accessor :rating
  340.         end
  341.       end
  342.  
  343.       class Troop
  344.         class Member
  345.           alias rgss2to3_initialize initialize
  346.           def initialize
  347.             rgss2to3_initialize
  348.             @immortal = false
  349.           end
  350.           attr_accessor :immortal
  351.         end
  352.       end
  353.  
  354.       class State
  355.         alias rgss2to3_initialize initialize
  356.         def initialize
  357.           rgss2to3_initialize
  358.           @id = 0
  359.           @name = ""
  360.           @icon_index = 0
  361.           @priority = 5 # Overwrite: 5 instead 50
  362.           @atk_rate = 100
  363.           @def_rate = 100
  364.           @spi_rate = 100
  365.           @agi_rate = 100
  366.           @nonresistance = false
  367.           @offset_by_opposite = false
  368.           @slip_damage = false
  369.           @reduce_hit_ratio = false
  370.           @battle_only = true
  371.           @release_by_damage = false
  372.           @hold_turn = 0
  373.           @auto_release_prob = 0
  374.           @element_set = []
  375.           @state_set = []
  376.           @note = ""
  377.         end
  378.         attr_accessor :id
  379.         attr_accessor :name
  380.         attr_accessor :icon_index
  381.         attr_accessor :atk_rate
  382.         attr_accessor :def_rate
  383.         attr_accessor :spi_rate
  384.         attr_accessor :agi_rate
  385.         attr_accessor :nonresistance
  386.         attr_accessor :offset_by_opposite
  387.         attr_accessor :slip_damage
  388.         attr_accessor :reduce_hit_ratio
  389.         attr_accessor :battle_only
  390.         attr_accessor :release_by_damage
  391.         attr_accessor :hold_turn
  392.         attr_accessor :auto_release_prob
  393.         attr_accessor :element_set
  394.         attr_accessor :state_set
  395.         attr_accessor :note   
  396.       end
  397.  
  398.       class System
  399.         alias rgss2to3_initialize initialize
  400.         def initialize
  401.           rgss2to3_initialize
  402.           @passages = Table.new(8192)
  403.         end
  404.         attr_accessor :passages
  405.  
  406.         class Terms
  407.           def initialize
  408.             @level = ""
  409.             @level_a = ""
  410.             @hp = ""
  411.             @hp_a = ""
  412.             @mp = ""
  413.             @mp_a = ""
  414.             @atk = ""
  415.             @def = ""
  416.             @spi = ""
  417.             @agi = ""
  418.             @weapon = ""
  419.             @armor1 = ""
  420.             @armor2 = ""
  421.             @armor3 = ""
  422.             @armor4 = ""
  423.             @weapon1 = ""
  424.             @weapon2 = ""
  425.             @attack = ""
  426.             @skill = ""
  427.             @guard = ""
  428.             @item = ""
  429.             @equip = ""
  430.             @status = ""
  431.             @save = ""
  432.             @game_end = ""
  433.             @fight = ""
  434.             @escape = ""
  435.             @new_game = ""
  436.             @continue = ""
  437.             @shutdown = ""
  438.             @to_title = ""
  439.             @cancel = ""
  440.             @gold = ""
  441.           end
  442.           attr_accessor :level
  443.           attr_accessor :level_a
  444.           attr_accessor :hp
  445.           attr_accessor :hp_a
  446.           attr_accessor :mp
  447.           attr_accessor :mp_a
  448.           attr_accessor :atk
  449.           attr_accessor :def
  450.           attr_accessor :spi
  451.           attr_accessor :agi
  452.           attr_accessor :weapon
  453.           attr_accessor :armor1
  454.           attr_accessor :armor2
  455.           attr_accessor :armor3
  456.           attr_accessor :armor4
  457.           attr_accessor :weapon1
  458.           attr_accessor :weapon2
  459.           attr_accessor :attack
  460.           attr_accessor :skill
  461.           attr_accessor :guard
  462.           attr_accessor :item
  463.           attr_accessor :equip
  464.           attr_accessor :status
  465.           attr_accessor :save
  466.           attr_accessor :game_end
  467.           attr_accessor :fight
  468.           attr_accessor :escape
  469.           attr_accessor :new_game
  470.           attr_accessor :continue
  471.           attr_accessor :shutdown
  472.           attr_accessor :to_title
  473.           attr_accessor :cancel
  474.           attr_accessor :gold
  475.  
  476.           class TestBattler
  477.             alias rgss2to3_initialize initialize
  478.             def initialize
  479.               rgss2to3_initialize
  480.               @weapon_id = 0
  481.               @armor1_id = 0
  482.               @armor2_id = 0
  483.               @armor3_id = 0
  484.               @armor4_id = 0
  485.             end
  486.             attr_accessor :weapon_id
  487.             attr_accessor :armor1_id
  488.             attr_accessor :armor2_id
  489.             attr_accessor :armor3_id
  490.             attr_accessor :armor4_id
  491.           end
  492.         end
  493.       end
  494.     end


RUBY 代码复制
  1. #===============================================================================
  2.     #        RAFAEL_SOL_MAKER's RGSS2 TO RGSS3 FIXES(Work-in-Progress) v0.2
  3.     #_______________________________________________________________________________
  4.     #   Description  | Some fixes if you plan to put your Ace game to run on RGSS3.
  5.     #                | It was proven it's not hard at all, and there are some
  6.     #                | advantages, like a faster and better Ruby, improved Audio
  7.     #                | classes, creation of bitmaps with more than 2048x2048 pixels,
  8.     #                | using a exclusive (and coding flexible) layer to autoshadows,
  9.     #                | and some other cool features.
  10.     #________________|______________________________________________________________
  11.     #     Usage      | Plug it above any custom scripts, below default engine ones.
  12.     #________________|______________________________________________________________
  13.     # Specifications | Difficulty to Use:
  14.     #                |  * (almost none at all)
  15.     #                | Scripting Difficulty:
  16.     #                |  * * ½ (I particularly don't recommend to edit it)
  17.     #                | Compatibility:
  18.     #                |  ??? (it's already made to create compatibility!)
  19.     #                | New Methods:
  20.     #                |  - Tilemap.passages
  21.     #                | Overwritten Methods:
  22.     #                |  - (none)
  23.     #                | Aliased Methods:
  24.     #                |  - Game_Map.setup
  25.     #                |  - Window_Base.initialize
  26.     #                |  - Spriteset_Map.create_tilemap
  27.     #________________|______________________________________________________________
  28.     #  Known Issues  | This is a W.I.P. version, so, it's expected to be incomplete.
  29.     #                | Probably with more tests some problems and bugs can appear...
  30.     #________________|______________________________________________________________
  31.     # Special Thanks | Migetman12
  32.     #________________|______________________________________________________________
  33.     #===============================================================================
  34.  
  35.  
  36.     #===============================================================================
  37.     #   Tilemap Fix  | Well, it's surprising that only it's needed to fix Tilemap!
  38.     #________________|______________________________________________________________
  39.     #===============================================================================
  40.     class Tilemap
  41.       def passages=(value)
  42.         @passages = value
  43.       end  
  44.     end
  45.  
  46.     #===============================================================================
  47.     # Autoshadow Fix | Here let's use the RGSS3 fourth Tilemap layer to do it
  48.     #________________|______________________________________________________________
  49.     #===============================================================================
  50.     class Game_Map
  51.       alias __setup setup
  52.       def setup(map_id)   
  53.         __setup(map_id)
  54.         __data = data   
  55.         __data.resize(__data.xsize,  __data.xsize, 4)
  56.         for x in 0...(__data.xsize - 1)
  57.           for y in 0...(__data.ysize - 1)  
  58.             if __data[x, y, 0] >= 4352 && __data[x, y + 1 ,0] >= 4352 &&
  59.             __data[x + 1, y + 1, 0] < 4352
  60.                       # If you dont want to use autoshadows, change the 5 below to 0
  61.               __data[x + 1, y + 1, 3] = 5
  62.             end        
  63.           end
  64.         end
  65.       end  
  66.     end
  67.  
  68.     #===============================================================================
  69.     # Window Padding | Only changing its default from 12 to 16
  70.     #________________|______________________________________________________________
  71.     #===============================================================================
  72.     class Window_Base < Window
  73.       alias __initialize initialize
  74.       def initialize(x, y, width, height)
  75.         __initialize(x, y, width, height)
  76.         self.padding = 16
  77.       end
  78.     end
  79.  
  80.     #===============================================================================
  81.     #  Tile Priority | To show some tiles above the hero correctly
  82.     #________________|______________________________________________________________
  83.     #===============================================================================
  84.     class Spriteset_Map  
  85.       alias __create_tilemap create_tilemap
  86.       def create_tilemap
  87.         __create_tilemap
  88.         @tilemap.flags = $game_map.passages # $data_system.passages
  89.       end
  90.     end


使用方法:(我这里写的简略不明,最好查看原帖)
准备工作:安装va和vx,提取需要的文件及vx rtp,备份原来的工程,建议使用容错脚本
1.将你游戏中需要的所有素材拷贝到游戏文件夹内,最好包括rtp,新工程将不能识别系统默认的rtp位置(但是能识别va的)
2.拷贝rmva的game.exe(原来游戏的exe没用了)和rgss300.dll到游戏所在的文件夹中,将rmva的game.ini改名为Game_Ace.ini拷贝放入,请将game.ini和Game_Ace.ini中的“RTP=RPGVX”都改为“RTP=”以避免素材混乱
3.新建一个批处理文件,内容如下

@echo off
COPY Game_Ace.ini Game.ini
COPY Data\Scripts.rvdata Data\Scripts.rvdata2
START Game.exe
将此bat放在游戏根目录下

4.打开游戏,将最上面的两段代码插入到main上面,删除main并用以下代码替换原来的main
  1. rgss_main{
  2. Graphics.freeze
  3. Font.default_name = [ "SimHei", "黑体", "DFKai-SB", "標楷體", "Verdana"]#带注释的为转载者添加,恢复vx默认字体
  4. Graphics.resize_screen(640,480)#分辨率随意改~1024也能支持
  5. $scene = Scene_Title.new
  6. #Graphics.frame_rate = 120#这句看情况自行diy
  7. $scene.main while $scene != nil
  8. Graphics.transition(30)
  9. }
复制代码
5.删除你游戏所在的文件夹并清空回收站,最好对游戏所在的硬盘进行完全擦除或低级格式化(这句是里人格写的,与作者和转载者无关)
6.关于改完后的工程:
  #那个bat文件的作用就是将你当前编辑好的脚本转化为rgss3可是别的脚本格式,外加重定位game.ini,再不修改脚本的情况下无需重复运行
  #在每次脚本修改后需要运行一次bat文件,以将脚本更新为rgss3所支持的格式,技术党可以将game.exe和bat打包成一个exe即可解决所有问题
  #使用的编辑工具依然是rmvx,兼容之前的vx脚本~
  #vx编辑器中直接测试游戏依然可用
7.作者说这个还只是beta版,有bug,不过经过测试,即使是极复杂的脚本系统也没有发现错误,万一出现bug,请诸位多从自己身上找原因,谢谢

评分

参与人数 2星屑 +18 收起 理由
summer92 + 6 我很赞同
sai90306 + 12 塞糖

查看全部评分

Lv3.寻梦者

梦石
0
星屑
1282
在线时间
670 小时
注册时间
2009-11-11
帖子
2790
2
发表于 2013-3-19 07:12:39 | 只看该作者
好- -,VX效率好象比ACE高点

嘿。嘿。嘿
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-22 03:03

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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