RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Creating a New Database Category?

Started by shintashi, March 27, 2011, 02:29:12 AM

0 Members and 1 Guest are viewing this topic.

shintashi

So I decided I would create something similar to "skills" or "weapons", called "chants", but I'm not really sure what I'm doing, since I cant seem to edit the rxdata files even with an editor (save as autocrashes). So I decided to try a work around by constructing my own template and filling it in.



class RPG::Chant

 
#--------------------------------------------------------------------------
# * Get Chant ID
#--------------------------------------------------------------------------
  def id
    return @chant_id
  end
#--------------------------------------------------------------------------
# * Get Name
#--------------------------------------------------------------------------
  def name
    return $chant[@chant_id].name
  end
#--------------------------------------------------------------------------
# * Get Power (1, 2, or 3)
#--------------------------------------------------------------------------
def power
    return $chant[@chant_id].power
  end
#--------------------------------------------------------------------------
# * Get Description
#--------------------------------------------------------------------------
def description
    return $chant[@chant_id].description
  end
#--------------------------------------------------------------------------
# * Get Fragment (Element/Influence)
#--------------------------------------------------------------------------
def fragment
    return $chant[@chant_id].fragment
  end
   
 

end


Chants are supposed to be really simplified terms with very minimalistic attributes, including an id number, a name, a description, power on a 1-3 scale, and a special category called "fragment" that is the actual "function" of the the chant. If I can assign these attributes then everything should work out nicely.

Chants are part of a new game concept I have in the works, but I'm not sure where to go from here. I think I do the following, but am kind of lost:

1. create class
2. create class's definitions
3.??? make some sample members of my class.
4. make a display window similar to Window_Skill
5. give some actors access to some chants
6. add menu access to view actor's "chant" menu.

Somewhere between #2 and #5, I'm a bit fuzzy, especially around #3.

shintashi

wait.. why am I doing it this way instead of setting up an array of definitions? Is there a faster way to set up a series of objects with a short list of attributes, like a hash or something?

like I want something like this:

'chant[0] = {"ray",1,"Dimensional Ray FX", 1}'
'chant[1] = {"beam",1,"Dimensional Beam FX", 2}'
'chant[2] = {"sphere",3,"Dimensional Globe FX", 3}'
...

'chant[17] = {"cone",2,"Dimensional Cone FX", 17}'

And so on...