Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Adding skills in script to surpass database limit

Hyetal

Member

Hey, gang.

The standard database in RMXP only lets you add 999 skills. How can I manually create more skills in scripts so that I can surpass that limit?

I'm not asking for anything intricate; I'm content with the default system. It's just not big enough.

The help file includes this jazz, which looks like what I think I'm looking for, but I don't know what to do with it.

Code:
module RPG

  class Skill

    def initialize

      @id = 0

      @name = ""

      @icon_name = ""

      @description = ""

      @scope = 0

      @occasion = 1

      @animation1_id = 0

      @animation2_id = 0

      @menu_se = RPG::AudioFile.new("", 80)

      @common_event_id = 0

      @sp_cost = 0

      @power = 0

      @atk_f = 0

      @eva_f = 0

      @str_f = 0

      @dex_f = 0

      @agi_f = 0

      @int_f = 100

      @hit = 100

      @pdef_f = 0

      @mdef_f = 100

      @variance = 15

      @element_set = []

      @plus_state_set = []

      @minus_state_set = []

    end

    attr_accessor :id

    attr_accessor :name

    attr_accessor :icon_name

    attr_accessor :description

    attr_accessor :scope

    attr_accessor :occasion

    attr_accessor :animation1_id

    attr_accessor :animation2_id

    attr_accessor :menu_se

    attr_accessor :common_event_id

    attr_accessor :sp_cost

    attr_accessor :power

    attr_accessor :atk_f

    attr_accessor :eva_f

    attr_accessor :str_f

    attr_accessor :dex_f

    attr_accessor :agi_f

    attr_accessor :int_f

    attr_accessor :hit

    attr_accessor :pdef_f

    attr_accessor :mdef_f

    attr_accessor :variance

    attr_accessor :element_set

    attr_accessor :plus_state_set

    attr_accessor :minus_state_set

  end

end

 

In the meantime, I'll continue experimenting and see if I can figure it out myself.

Thanks for your time.
 
First Question: Do you have 999 skills now?

If the Answer is yes...Well you are a God, there is a script created by Woratana, this script allow you to break the database limit (Actors, items, SKILLS), search for it in the script forum.

If the Answer is No.... I think, it's Impossible to create 999 skills, so, don't worry.

:grin:
 

Hyetal

Member

Well, the reason it's an issue is because I was planning on doing a system where the character can level up their skills. I was going to enter a separate skill in the database for each level; at 30+ skills per character, 10 levels per skill, and 20 characters—whoops, that's way too many.

But, with my mediocre skills, I devised a way to achieve my objective despite the cap. Basically, I think I can create a global variable, like $hero1_skill1_level, examine it on loading, and change the name, power, cost, etc., of existing database skills.

The second phase of the cap is I want to use a wide variety of monster skills. But, likewise, I can set aside a small number of "filler" skills for bosses, and change them with a script called in the boss-fight-triggering-event, since I know I won't be just putting those skills on another monster that might be fought without my knowledge.

Assuming that this works.

Anyway, thanks for the response and the tip. ;) I'll check into that script and see if it works for me.

Ciao,

Hy.
 

Atoa

Member

EDIT.: an far better solution

After reading and posting here i looked for Woratana's Database Limit Breaker, to see if it was possible to make it work in XP... and it was REALLY EASY '-'

so here the script. Follow the instructions so you can break the limits for the entries in the database.
Code:
#===============================================================

# ● [VX/XP] ◦ Database Limit Breaker ◦ □

# * Break limit of data number in database files *

#--------------------------------------------------------------

# â—¦ by Woratana [woratana@hotmail.com]

# â—¦ XP/VX option added by Atoa

# â—¦ Thaiware RPG Maker Community

# â—¦ Released on: 22/05/2008

# â—¦ Version: 1.1

#--------------------------------------------------------------

 

#==========================================

# * HOW TO USE

#------------------------------------------

# 0. Open your project (Recommend to backup your database files first~)

# 1. Paste this script in above 'Main'.

# 2. Set DLB_USE_IT = true

# 3. Set DLB_USE_IT = "VX" if using VX or set DLB_USE_IT = "XP" if using XP

# 4. Setup database files you want to change, in DLB_DATA

# 5. Run your game...

# 6. When it finished, game will close itself

# 7. Close your project *without save*

# 8. Open your project again. Done!

# 9. You can either remove this script, or set DLB_USE_IT = false

#==========================================

 

#===========================================================================

# Use limit breaker? (set this to false after you run this script,

# and haven't change anything in DLB_DATA after that)

# or REMOVE this script when finished~

#===========================================================================

DLB_USE_IT = true # (true / false)

 

XP_OR_VX = 'XP' # set here wich maker you using

 

DLB_DATA = {

#======================================================

# Database file you want to change their number:

# * Limit of normal database files are 999

# * Limit of variables and switches are 5000

# This script will allow you to change their number over their limit~

#===============================

# * How to setup *

#-------------------------------

# Add 1 line below per 1 database file you want to change.

# Structure: 'Database_File' => (number),

# e.g. 'switch' => 5500,

# (* Don't forget to put , behind the line!)

 

#==============================================

# *[list] Database_File

#----------------------------------------------

# 'switch' for Game Switches

# 'variable' for Game Variables

# 'actor' for Actors

# 'class' for Classes

# 'skill' for Skills

# 'item' for Items

# 'weapon' for Weapons

# 'armor' for Armors

# 'enemy' for Enemies

# 'troop' for Troops

# 'state' for States

# 'animation' for Animations

# 'commonev' for Common Events

#======================================================

# * START to setup from here!

#======================================================

'actor' => 1011,

'class' => 1011,

'skill' => 1011,

'item' => 1011,

'weapon' => 1011,

'troop' => 1011,

'enemy' => 1011,

'state' => 1011,

'armor' => 1001,

'animation' => 1011,

'commonev' => 1011,

'switch' => 6000,

'variable' => 6000,

#========================================================

# * [END] Database Limit Breaker Setup Part

#========================================================

'end' => nil # End

}

if DLB_USE_IT

  start_time = Time.now

  DLB_DATA.each do |k,v|

    dvar = nil

    case k

    when 'switch'; dname = 'System'; dvar = 'switches'; dnewdata = ''

    when 'variable'; dname = 'System'; dvar = 'variables'; dnewdata = ''

    when 'actor'; dname = 'Actors'; dnewdata = 'RPG::Actor.new'

    when 'class'; dname = 'Classes'; dnewdata = 'RPG::Class.new'

    when 'skill'; dname = 'Skills'; dnewdata = 'RPG::Skill.new'

    when 'item'; dname = 'Items'; dnewdata = 'RPG::Item.new'

    when 'weapon'; dname = 'Weapons'; dnewdata = 'RPG::Weapon.new'

    when 'armor'; dname = 'Armors'; dnewdata = 'RPG::Armor.new'

    when 'enemy'; dname = 'Enemies'; dnewdata = 'RPG::Enemy.new'

    when 'troop'; dname = 'Troops'; dnewdata = 'RPG::Troop.new'

    when 'state'; dname = 'States'; dnewdata = 'RPG::State.new'

    when 'animation'; dname = 'Animations'; dnewdata = 'RPG::Animation.new'

    when 'commonev'; dname = 'CommonEvents'; dnewdata = 'RPG::CommonEvent.new'

    when 'end'; next

    else; p 'unknown DLB_DATA!', 'Check carefully what you typed in DLB_DATA'

    end

    case XP_OR_VX

    when 'XP';  data_type = '.rxdata'

    when 'VX';  data_type = '.rvdata'

    end

    base_data = load_data('Data/' + dname + data_type)

    data = dvar.nil? ? base_data : eval('base_data.' + dvar.to_s)

    unless data.size > v and v - (data.size - 1) <= 0

      add_data = Array.new(v - (data.size - 1)) { eval(dnewdata) }

      data.push * add_data

      save_data(base_data, 'Data/' + dname + data_type)

    end

  end

  p 'Finished in ' + (Time.now - start_time).to_s + ' sec'

  exit

end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top