So about RGSS...

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Projects come with a file called "Game.ini". But I noticed that the Inifile class was stripped out of RGSS.
 
Is there any sort of buildin ini-file support before I build a simple version myself? I need my own seperate inifile.
 
I changed the title to reflect the topic a bit better now. I kinda hijacked my own topic at the end of my 2nd post: Here.
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,202
First Language
Binary
Primarily Uses
RMMZ
There must be cause its the ini file that determines where you load your scripts.rvdata2 file from.
 

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
I looked in the RGGS RGSS helpfile and didn't find it. I looked on Google but got only results about people asking how to edit the existing inifile with notepad... And the original Ruby class is removed.

Am I forced to use API's? "GetPrivateProfileString". At least they gave use the Win32API along with 5 other libraries.

Update:

So... about 3 hours later I ended up writing my own file copy method (yes RGSS removed that as well from the File class, and the FileUtils and the File.write on top of that) and an ini class that uses win32 api's. Seriously, I'm so tired of rewriting removed existing Ruby libraries. It's really starting to piss me off lately. Why would Degica remove all those Ruby libraries? Like "hey, lets give them the Time library but we remove the Date library" or "Let's remove the inifile library but include the Win32api so they can recreate it"... WHY???
 
Last edited by a moderator:

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
216
Reaction score
97
Primarily Uses
No version of Ruby comes with a Inifile class. You can use the GetPrivateProfile* functions (preferably the “Unicode” version). And of course, you can always write a INI parser in Ruby by yourself. Or find one. I'm sure someone already wrote a good one.


If you want to support key–value–pairs only, Writing your own small parser should be good enough. Otherwise I think it's easier to call those functions. They work.


By the way, Time is a core class. FileUtils is part of the standard library. They haven't removed any core classes. But they have undefined Kernel#require in RGSS2. (I could be missing something. Haven't really used the RPG Maker for quite some time. Feel free to correct me.)


And you can use FileUtils. It's written in Ruby. If you really need it, just copy it into the Script Editor.
 

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Ah so RGSS is not a stripped down version. Most Ruby distributions are simply 'enhanced' instead? So RGSS is basically just the 'plainest form of Ruby' minus some standard libraries? I downloaded the 'original' Ruby distribution and it had way more libraries than RGSS has. Why did they remove those? It really really bothers me from time to time.

Some Ruby distributions come with an Inifile class (addon) I believe (Ruby Gems?). Perhaps not the default Ruby distribution. And FileUtils seems to be coming from "Ruby on Rails".

Okay but even so. If Degica creates a new 'Ruby distribution' called RGSS (or whatever I should call it). Shouldn't they also add such libraries to it, eventually?

About just adding those libraries to my game:

I did notice that some classes from the Ruby library are so intertwined with other classes (.rb files) that is was near impossible to add it to RPG Maker without adding an entire Ruby distribution to it.

What would be a good site to download standalone Ruby libraries like FileUtils? I tried downloading the entire Ruby package a while ago but those classes where all so heavily related to each other that I couldn't get the library that I needed out of it.

Also Ruby v2.1.x is out but we are still using 1.9.2. Does RPG Maker also upgrade it's Ruby version now and then or do we have to wait for the next RPG Maker? Not that I need 2.1, at least not now. But the online documentation will eventually no longer really exist on Google for 1.9.2 anymore. I just noticed that I was looking at documentations for the 2.1.x version... Even with 1.9.2 it was already a pain because quiet some methods that I looked up don't exist in our 'RGSS distribution'. The documentation will be even more inaccurate when the Ruby version itself differs.
 

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
216
Reaction score
97
Primarily Uses
RGSS includes all of Ruby's core classes and modules plus some standard libraries (zlib, Win32API, etc.).


I don't know why they removed (or didn't add) other libraries. Libraries written in C are easy to add. But how would you add Ruby files? To the Script Editor? In a seperate folder (%gamedir%\Scripts)? Most people don't need any standard libraries. And if they do, they (probably) also don't need most of them.


FileUtils comes with Ruby (RoR is horrible) and can be found here, for example:


https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb (most current version; maybe it isn't compatible with RGSS3 anymore)


https://github.com/ruby/ruby/blob/ruby_1_9_2/lib/fileutils.rb (most current version for Ruby 1.9.2; includes some fixes and I don't know if this version works.)


https://github.com/ruby/ruby/blob/v1_9_2_0/lib/fileutils.rb (RGSS3, Ruby 1.9.2p0; should work)


Or download the complete Ruby source from http://ftp.ruby-lang.org/pub/ruby/1.9, but copying from GitHub is easier. The Ruby ones can be found in /lib/. But some of them depend on C extensions (like net). Are there other standard libraries you are interested in? I could tell you which ones may work and which won't.


You can find the official docs here (Well, the content is. The sites or files itself aren't.):


http://ruby-doc.org/core-1.9.2/index.html


https://web.archive.org/web/20140513001019/http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/ruby-1.9.2-p0-doc-chm.7z


I don't think they will update RGSS3. I guess you have to wait for the next RPG Maker and see. I hope they update it, but there is a chance they don't (see RGSS2).
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top