[Ace] Is there a full API reference?

I am a professional programmer who never touched Ruby before, and I'm learning the ropes of the language AND the library while developing my first game. While Ruby itself poses no problem at all (it's a pretty language indeed, quite logical, with lots of documentation and examples online), the RPG Maker specific libraries are a problem to me.

My understanding is that, while scripting, I work with three layers of libraries:

  • The default Ruby libraries. I've read that some are removed/modified, but anyway, their APIs are well documented.
  • The "Game" library. This is also documented (along with the previous layer) in the help available with RPG Maker.
  • The Scripts. When you create a new game, tons of classes are autogenerated in the Scripts section.
This last layer is my problem. Is there an official documentation for all the autogenerated scripts? I often would just need the API, telling me what's the general purpose of a class, and what the methods do. Just yesterday I wanted to use a Window_Selectable: the code itself, once I understood the class internal workings, was just twenty lines, but before I had to almost read and understand the whole Window_Selectable and part of Window_Base in order to use it, which has been a big waste of time (although my Ruby grasp improved through that!).
Yes, there is. It is extremely useful, especially when used along with the help file included in Ace. I'm assuming you have Ace.

rgss3doc.tk

Sorry i can't make links, I'm on my phone.
Here's the link:

http://rgss3doc.tk/en/rgss3/index.html
OMG!  That resource is SO gunna be awesome helpful!  Thanks for asking for it Mr. RedGlow, and thanks Zal and light for answering!  Marked!
Wow, even for me that'll prove extremely helpful. I currently don't plan on learning ruby for rpg maker, but my programming knowledge will at least let me modify current scripts on the fly with this.
Thank you, this is quite an useful resource! Yes, I'm using Ace, as pointed out by the tag in the title. Nonetheless, I notice this is an external resource: I wonder why there's no official source for this kind of data!
It's probably due to what RM is primarily designed and marketted for: hobby toy.  I mean.  Honestly, there'd be a lot of things Enterbrain and Degica should be doing that they're not if they wanted to try to push this into more markets as a serious developers tool.  Instead they're content with keeping RM a "toy".  It's gotten powerful enough that with just a few more tweaks it could easily be the standard for 2d rpg development.  Especially with proper documentation of ALL features and API especially...  Instead they focus on just the "easy stuff" and leave everything else to the community to discover and share.
Thank you, this is quite an useful resource! Yes, I'm using Ace, as pointed out by the tag in the title. Nonetheless, I notice this is an external resource: I wonder why there's no official source for this kind of data!
There is a lot of information in the help files; that is definitely official.


It lists all of the RPG objects along with various classes like Window, Sprite, etc.


The default project I would simply consider to be something that comes with the RTP; I don't think of it as part of the API. That's why there are just a bunch of comments for each method as well as comments for the class itself, but you won't find it in the help docs.


There is in fact no reason why ANYONE would need to use the default scripts.


It's just that


1: it's there, so why not use it


2: most people probably aren't scripters


3: even if I could script, do I want to spend the time to figure out how to use the API?


For the sake of user-convenience where I can just open the editor out of the box and throw Eric onto the screen and playtest and have a completely working game, that's why I use the default scripts.
1: it's there, so why not use it

2: most people probably aren't scripters

3: even if I could script, do I want to spend the time to figure out how to use the API?
I don't really agree with the observations you have made, but what I want to really answer is this third point, "do I want to spend the time to figure out how to use the API?".

Trust me, after 10+ years of software development the answer is: if the API is even just half decent, definitely yes. On the long run, it saves you a lots of work, avoids reinventing the wheel, makes your work more stable, based on better code and whose understanding is shared by a greater amount of people (who then can eventually help you), and these are just the advantages that come off the top of my head. Moreover, a documentation of these scripts would surely help the scripters, while the non-scripters would be just as happy as before: win-win! 🙂

But then, this is just too academic debate: there's not much I or anybody else can do to force an official documentation 🙂
I don't really agree with the observations you have made, but what I want to really answer is this third point, "do I want to spend the time to figure out how to use the API?".

Trust me, after 10+ years of software development the answer is: if the API is even just half decent, definitely yes. On the long run, it saves you a lots of work, avoids reinventing the wheel, makes your work more stable, based on better code and whose understanding is shared by a greater amount of people (who then can eventually help you), and these are just the advantages that come off the top of my head. Moreover, a documentation of these scripts would surely help the scripters, while the non-scripters would be just as happy as before: win-win! 🙂

But then, this is just too academic debate: there's not much I or anybody else can do to force an official documentation 🙂
You probably weren't around here long enough to know what Tsukihime likes most, but that answer was exactly from his/her point of view:

Tsukihime likes to create API's for others to use, not scripts needed for his/her own game...

In fact, Tsukihime usually creates new API-elements faster than many developers can implement them in their games;-)
I agree with using existing libraries to get stuff done. I have nothing against that. My philosophy is that I want to be as lazy as possible to get as much as possible done, and if someone is willing to spend 20 years to write a good library for me (and others) to use, then I will use it.

Moreover, a documentation of these scripts would surely help the scripters, while the non-scripters would be just as happy as before: win-win! 🙂
 
But I mean, each class file has a comment at the top explaining the purpose of the class, and each method also comes with a comment that explains what the method does. Isn't that good enough? I thought it was good enough, but I haven't been programming for 10+ years so my standards for documentation probably isn't as refined (like having stacks of physical paper and everything documenting every single little piece of information)


Overall, yes, the default script base for RM can be quite daunting, especially if you're unfamiliar with ruby, but I think if you just spend the time to look through it, the documentation (ie: those small, single-liner, usually obvious comments) provided helps a lot.


But my opinion is quite biased since I've stared at some of those classes for several months so it's obvious to me how it works. Looking at those method comments again, they're kind of useless lol.


A high-level overview of how classes interact with each other as well as code examples demonstrating how to use them would definitely be useful as reference so scripters wouldn't have to figure out how all the different windows are related.
But then, this is just too academic debate: there's not much I or anybody else can do to force an official documentation 🙂
We can push for it.

We can also create unofficial documentation. *hint hint*

I took a couple of random samples from http://rgss3doc.tk/en/stdscripts/index.html and it basically appeared to an extract of the comments Tsukihime mentioned.

A high-level overview of how classes interact with each other as well as code examples demonstrating how to use them would definitely be useful as reference so scripters wouldn't have to figure out how all the different windows are related.
And going further would be having their discussion and reasons for chosen certain designs excluding other designs.

You can try to guess at it and formulating the design in a tangible form such as a forum post.

I for one would very welcome endeavors which fills in the gap in the documentation, official or not.

*hugs*

 - Zeriab
Trust me, after 10+ years of software development the answer is: if the API is even just half decent, definitely yes. On the long run, it saves you a lots of work, avoids reinventing the wheel, makes your work more stable, based on better code and whose understanding is shared by a greater amount of people (who then can eventually help you), and these are just the advantages that come off the top of my head. Moreover, a documentation of these scripts would surely help the scripters, while the non-scripters would be just as happy as before: win-win! 🙂
This is something that I absolutely agree with. The lack of decent documentation for the base RPG Maker scripts is an aggravating oversight, particularly to someone who does know the language but isn't well-acquainted to working with the provided script base (which might as well be a part of the RPG Maker "API," as it's fully expected to be left intact). The comments written in the base scripts are bare-bones at best -- the worst kind of documentation. In order to document a script properly, it's far more useful to know why something (a module, class, method, anything) has been designed the way it has rather than documenting what each method does.

For example, let's pretend that I'm an experienced Ruby programmer who just picked up RPG Maker, and I feel like scripting a system that interacts with how the party gains items. I don't need to know that the gain_item method of Game_Party adds an item to the party, I want to know why it's using "item containers," why that method needs to grab the item numbers from elsewhere, and why $game_map needs to be refreshed once it's finished. None of that is explained by a one-line comment which essentially says "this method adds an item to the party," which makes me have to travel around the code base and start trying to piece together why all of these different elements are so important to a method which should have been simple to understand.

So yes, I fully support decent official documentation of the base RPG Maker scripts that doesn't require drowning in the source code.
I just have a quick question, didn't they say that Windows 8 ditched the Win32API? Wouldn't that cause issues on later Windows OS?
Not QUITE true, Archeia.  In fact, if you go digging around MSDN you can find they've not only kept it around, but expanded it some more.  Here's where that rumor comes from though:

http://stackoverflow.com/questions/9356925/winrt-as-a-replacement-of-win32-api

Basically, MS is pushing to wrap win32 into a more cross-platform api they're calling winRT.

Win32 is still around, and still being expanded, but they are working on phasing it out, basically.

That said, the next version of RM probably needs to support winRT instead of win32.  I'm sure the folks at ruby are already working on it, and then Enterbrain will just wrap their own stuff around it like they did with the current versions around win32api.
That makes sense! Thanks :3
I just have a quick question, didn't they say that Windows 8 ditched the Win32API? Wouldn't that cause issues on later Windows OS?
It's still there, my computer can work with it :3
It's still there, my computer can work with it :3
Thanks for the real-world confirmation!  I don't have win8, so my info comes only from msdn and stackoverflow and other dev sites.
But I mean, each class file has a comment at the top explaining the purpose of the class, and each method also comes with a comment that explains what the method does. Isn't that good enough?
Not really. Now, even if Microsoft has many defects, one thing they can do pretty well is documentation, and I take a quotation from an article of Peter Gruenbaum in the MSDN magazine to explain with better words than mine what I intend (and what should be taken as a best-practice) for "good API documentation":

  • Overview: Explain what advantages developers have in using the platform, and in some cases, provide an architectural description of the platform.
  • Getting started: Help the developer get started, in the form of step-by-step tutorials or simpler walkthroughs.
  • Sample code: Provide well-commented code samples that developers can build on.
  • Reference material: Provide detailed information about each class, member, function or XML element.
What you are thinking of is just the last point (and, please, printed paper! I don't read API documentation in printed paper since... I don't know how long 🙂 ), and even that, the informations given in the one-liners above methods are all but "detailed". And that's anyway not the most important part of an API documentation: the first three parts are much more important, and are what I always look for when I dive into a new API first. As noted by Solistra, this kind of documentation is exactly what should avoid to "drown in the source code". Its audience is not the experienced users like you clearly are, but rather for the newcomers, like... well, me  🙂 .Be aware: I'm not trying to bash you or anybody else (except Enterbrain). Good documentation is one of the MOST difficult parts of a project (as soon as the project is longer than a couple hundreds of lines or so), so much that many professional programmers aren't able to get it right, and I admit I'm not very good at it too!
Hello everyone. Looks like http://rgss3doc.tk/en/rgss3/index.html doesn't exist anymore. Do you have a new link for the API documentation?

Original thread: https://forums.rpgmakerweb.com/threads/ace-is-there-a-full-api-reference.12319/