The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: game_guy on February 26, 2012, 04:30:13 PM

Title: [VXA] Database Breaker
Post by: game_guy on February 26, 2012, 04:30:13 PM
Database Breaker
Authors: game_guy
Version: 1.0
Type: Data Modification

Introduction

Damn Enterbrain, putting those pesky limits on us again! >:/ Well this nifty script breaks just about every limit that they set on us again.
Warning! Its not my fault if your data gets corrupted in anyway of form, though its highly unlikely as this was tested with some pretty high numbers. Still, its important to backup your data first.

Features


Screenshots

N/A

Demo

No demo.

Script

Spoiler for:
Code: [Select]
#===============================================================================
# Database Breaker VX Ace
# Version 1.0
# Author: game_guy
#-------------------------------------------------------------------------------
# Intro:
# Damn Enterbrain, putting those pesky limits on us again! >:/ Well this nifty
# script breaks just about every limit that they set on us again.
#
# Features:
# Breaks just about every database limit.
#
# Instructions:
# Go down to the config below and edit the amount for each data type.
#
# Credits:
# game_guy ~ Creating it.
#===============================================================================
=begin
# Begin Config
# Anything less then 1 will omit the data from change.
Actors       = 50
Animations   = 50
Armors       = 50
Classes      = 50
CommonEvents = 50
Enemies      = 50
Items        = 50
Skills       = 50
States       = 50
Tilesets     = 50
Troops       = 50
Weapons      = 50
Variables    = 50
Switches     = 50
SkillTypes   = 50
WeaponTypes  = 50
ArmorTypes   = 50
Attributes   = 50
# End Config

def cap(num, filename, st)
  return if num < 1
  data = load_data(filename)
  num = num-data.size
  struct = eval(st)
  if num > 1
    num.times { data.push(struct) }
  else
    (-num).times { data.pop }
  end
  puts "Writing to #{filename}..."
  File.open(filename, 'wb') {|f| Marshal.dump(data, f) }
  puts "Done"
end

def system(num, filename, type)
  return if num == 0
  system = load_data(filename)
  case type
  when 0
    data = system.variables
  when 1
    data = system.switches
  when 2
    data = system.elements
  when 3
    data = system.skill_types
  when 4
    data = system.armor_types
  when 5
    data = system.weapon_types
  else
    return
  end
  num = num-data.size
  if num > 1
    num.times { data.push('') }
  else
    (-num).times { data.pop }
  end
  case type
  when 0
    system.variables = data
  when 1
    system.switches = data
  when 2
    system.elements = data
  when 3
    system.skill_types = data
  when 4
    system.armor_types = data
  when 5
    system.weapon_types = data
  end
  puts "Writing to Data/System.rvdata2"
  File.open(filename, 'wb') {|f| Marshal.dump(system, f) }
  puts "Done"
end

begin
  puts "Starting..."
  cap(Actors, 'Data/Actors.rvdata2', 'RPG::Actor.new')
  cap(Animations, 'Data/Animations.rvdata2', 'RPG::Animation.new')
  cap(Armors, 'Data/Armors.rvdata2', 'RPG::Armor.new')
  cap(Classes, 'Data/Classes.rvdata2', 'RPG::Class.new')
  cap(CommonEvents, 'Data/CommonEvents.rvdata2', 'RPG::CommonEvent.new')
  cap(Enemies, 'Data/Enemies.rvdata2', 'RPG::Enemy.new')
  cap(Items, 'Data/Items.rvdata2', 'RPG::Item.new')
  cap(Skills, 'Data/Skills.rvdata2', 'RPG::Skill.new')
  cap(States, 'Data/States.rvdata2', 'RPG::State.new')
  cap(Tilesets, 'Data/Tilesets.rvdata2', 'RPG::Tileset.new')
  cap(Troops, 'Data/Troops.rvdata2', 'RPG::Troop.new')
  cap(Weapons, 'Data/Weapons.rvdata2', 'RPG::Weapon.new')
  system(Variables, 'Data/System.rvdata2', 0)
  system(Switches, 'Data/System.rvdata2', 1)
  system(Attributes, 'Data/System.rvdata2', 2)
  system(SkillTypes, 'Data/System.rvdata2', 3)
  system(ArmorTypes, 'Data/System.rvdata2', 4)
  system(WeaponTypes, 'Data/System.rvdata2', 5)
  msgbox("Done")
  exit
end
=end

Instructions

In the script.

Compatibility

Should work with anything.

Credits and Thanks


Author's Notes

Enjoy! :)
Title: Re: [VXA] Database Breaker
Post by: Lytanathan on May 19, 2012, 06:15:44 AM
So, I'm a little confused.
I go into the config section and set Armors to 2000, because I need more armor, and... nothing happens? Tried running the game, got a message that read "Done," and... nothing. Database limit still 999.

Am I missing something?
Title: Re: [VXA] Database Breaker
Post by: Wiimeiser on August 08, 2013, 08:59:08 AM
Still broken? Not doing anything for me either, and I removed the =begin and =end...

EDIT: Worked, although it produced one less than the amount I entered. You need to refresh though.


EDIT2: Also, for some reason, it treats all undefined entries as a single entry. Change one and you change them all...
Title: Re: [VXA] Database Breaker
Post by: Wiimeiser on August 09, 2013, 01:12:43 PM
The game doesn't seem to read items past 999 in the database for some reason. I think this might be a hardcoded limitation of the .rvdata2 format, though strangely it seems only items are affected...


EDIT: Furthermore, it crashes the debug menu if you try to change it manually...

The affected block:
Code: [Select]
  #--------------------------------------------------------------------------
  # change_switch_colour
  #--------------------------------------------------------------------------
  def change_variable_colour(index)
    id = @list[index][:ext]
    enabled = $data_system.variables[id] != ""
    colour = $game_variables[id] != 0 ? crisis_color : normal_color
    if $game_variables[id] != 0 && $data_system.variables[id] == ""
      colour = knockout_color
      enabled = true
    end
    change_color(colour, enabled)
  end
 
end # Window_DebugVariable