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

Project1

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

[已经解决] 关于数据库破限的脚本问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
723
在线时间
530 小时
注册时间
2010-6-9
帖子
840
跳转到指定楼层
1
发表于 2015-3-1 01:09:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
因个人需求,数据库破限已经成功(SKILL2000个),但不了解该脚本的运行机制,是否存在什么副作用或者影响,希望能点明一二。
RUBY 代码复制
  1. #===============================================================
  2. # ● [XP/VX/VXA] ◦ Database Limit Breaker III ◦ □
  3. # * Break limit of data number in database files *
  4. #--------------------------------------------------------------
  5. # ◦ by Woratana [[email][email protected][/email]]
  6. # ◦ Thaiware RPG Maker Community
  7. # ◦ Originally released on: 22/02/2008
  8. # ◦ Ported to VXAce by Mr. Bubble on: 30/12/2011
  9. #--------------------------------------------------------------
  10.  
  11. #==========================================
  12. # ** HOW TO USE
  13. #------------------------------------------
  14. # [English]
  15. # 0. Open your project (Recommend to backup your database files first~)
  16. # 1. Paste this script in above 'Main'.
  17. # 2. Set DLB_USE_IT = true
  18. # 3. Setup database files you want to change, in DLB_DATA
  19. # 4. Run your game...
  20. # 5. When it finished, game will close itself
  21. # 6. Close your project *without save*
  22. # 7. Open your project again. Done!
  23. # 8. Set DLB_USE_IT = false. Leave this script in your Script Editor (XP/VX).
  24. #    If you are using VX Ace, you do not need to leave this script in your
  25. #    Script Editor.
  26. #==========================================
  27.  
  28.   #===========================================================================
  29.   # [ENG] Use limit breaker? (set this to false after you run this script,
  30.   # and haven't change anything in DLB_DATA after that)
  31.   # or REMOVE this script when finished~
  32.   #+==========================================================================
  33.   DLB_USE_IT = true # (true / false)
  34.  
  35.   if DLB_USE_IT # Do NOT edit this line
  36.     DLB_DATA = {
  37.     #======================================================
  38.     # [ENG] Database file you want to change their number~
  39.     # * Limit of normal database files are 999
  40.     # * Limit of variables and switches are 5000
  41.     # This script will allow you to change their number over their limit~
  42.     #===============================
  43.     # ** How to setup **
  44.     #-------------------------------
  45.     # Add 1 line below per 1 database file you want to change.
  46.     # Structure: 'Database_File' => (number),
  47.     # e.g. 'switch' => 5500,
  48.     # (* Don't forget to put , behind the line!)
  49.  
  50.     #==============================================
  51.     # ** [List] Database_File **
  52.     #----------------------------------------------
  53.     # 'switch' for Game Switches
  54.     # 'variable' for Game Variables
  55.     # 'actor' for Actors
  56.     # 'class' for Classes
  57.     # 'skill' for Skills
  58.     # 'item' for Items
  59.     # 'weapon' for Weapons
  60.     # 'armor' for Armors
  61.     # 'enemy' for Enemies
  62.     # 'troop' for Troops
  63.     # 'state' for States
  64.     # 'tileset' for Tilesets (RMXP/RMVXA only)
  65.     # 'animation' for Animations
  66.     # 'commonev' for Common Events
  67.     #======================================================
  68.     # * START to setup from here!
  69.     #======================================================
  70.  
  71.     'actor' => 1011,
  72.  
  73.     #========================================================
  74.     # * [END] Database Limit Breaker Setup Part
  75.     #========================================================
  76.     'end' => nil # Close hash
  77.     }
  78.  
  79.     if defined?(Audio.setup_midi) # VXA
  80.       dformat = '.rvdata2'
  81.     elsif defined?(Graphics.wait) # VX
  82.       dformat = '.rvdata'
  83.     else # XP
  84.       dformat = '.rxdata'
  85.     end
  86.     start_time = Time.now
  87.     DLB_DATA.each do |k,v|
  88.       dvar = nil
  89.       case k
  90.       when 'switch'; dname = 'System'; dvar = 'switches'; dnewdata = ''
  91.       when 'variable'; dname = 'System'; dvar = 'variables'; dnewdata = ''
  92.       when 'actor'; dname = 'Actors'; dnewdata = 'RPG::Actor.new'
  93.       when 'class'; dname = 'Classes'; dnewdata = 'RPG::Class.new'
  94.       when 'skill'; dname = 'Skills'; dnewdata = 'RPG::Skill.new'
  95.       when 'item'; dname = 'Items'; dnewdata = 'RPG::Item.new'
  96.       when 'weapon'; dname = 'Weapons'; dnewdata = 'RPG::Weapon.new'
  97.       when 'armor'; dname = 'Armors'; dnewdata = 'RPG::Armor.new'
  98.       when 'enemy'; dname = 'Enemies'; dnewdata = 'RPG::Enemy.new'
  99.       when 'troop'; dname = 'Troops'; dnewdata = 'RPG::Troop.new'
  100.       when 'state'; dname = 'States'; dnewdata = 'RPG::State.new'
  101.       when 'animation'; dname = 'Animations'; dnewdata = 'RPG::Animation.new'
  102.       when 'tileset'; dname = 'Tilesets'; dnewdata = 'RPG::Tileset.new'
  103.       when 'commonev'; dname = 'CommonEvents'; dnewdata = 'RPG::CommonEvent.new'
  104.       when 'end'; next
  105.       else; p 'unknown DLB_DATA!', 'Check carefully what you typed in DLB_DATA'
  106.       end
  107.       base_data = load_data('Data/' + dname + dformat)
  108.       data = dvar.nil? ? base_data : eval('base_data.' + dvar.to_s)
  109.       unless data.size > v and v - (data.size - 1) <= 0
  110.         add_data = Array.new(v - (data.size - 1)) { eval(dnewdata) }
  111.         data.push *add_data
  112.         save_data(base_data, 'Data/' + dname + dformat)
  113.       end
  114.     end
  115.     p 'Finished in ' + (Time.now - start_time).to_s + ' sec'
  116.     exit
  117.   end
  118.  
  119.  
  120. # checks for VXAce since these methods do not need to be overwritten
  121. # in RGSS3.
  122. unless defined?(Audio.setup_midi)
  123.  
  124. class Game_Switches
  125.   #--------------------------------------------------------------------------
  126.   # * Set Switch
  127.   #     Make the system be able to set switch ID more than 5000
  128.   #--------------------------------------------------------------------------
  129.   def []=(switch_id, value)
  130.     @data[switch_id] = value
  131.   end
  132. end
  133.  
  134. class Game_Variables
  135.   #--------------------------------------------------------------------------
  136.   # * Set Variable
  137.   #     Make the system be able to set switch ID more than 5000
  138.   #--------------------------------------------------------------------------
  139.   def []=(variable_id, value)
  140.     @data[variable_id] = value
  141.   end
  142. end
  143.  
  144. end # unless defined?(Audio.setup_midi)

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21666
在线时间
9418 小时
注册时间
2012-6-19
帖子
7118

开拓者短篇九导演组冠军

2
发表于 2015-3-1 02:52:53 | 只看该作者
除非破限过程中突然断电什么的否则一般是没有什么副作用的,

破限的原理很简单,对数据个数做出限制的是不是数据本身而是编辑器,所以脚本绕过了编辑器来添加数据从而实现了数据的破限

点评

3Q  发表于 2015-3-1 11:51

评分

参与人数 1星屑 +132 收起 理由
VIPArcher + 132 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3298
在线时间
1120 小时
注册时间
2009-4-15
帖子
815
3
发表于 2015-3-1 10:43:10 | 只看该作者
无副作用,一般也不会和别的脚本冲突,除非别的脚本有对class Game_Switches和class Game_Variables重写、大量修改等。

点评

3Q  发表于 2015-3-1 11:52

评分

参与人数 1星屑 +132 收起 理由
VIPArcher + 132 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-23 10:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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