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.

Script Tool - RSC Require

Status
Not open for further replies.
It's okay to have the .rsc extansion at the end.
Code:
filename += '.rsc' unless filename.split('.')[-1] == 'rsc'

This is a problem that I am trying to figure out. A p command right before there reports a non-NilClass object, so I'm stumped.
 
BADABUMP! Updated to version 1.2.0, which now gets rid of the require alias. I got rid of it because it was causing unknown errors and stuff. Now this means you'll have to update your scripts to use the new method (rsc_require). Version 1.2.0 also includes comments!

*runs off to update the SDK-Autoloader in some of his scripts*
 
Meh, updated 1 hour after I rewrite my project with "require" and .rsc >_<

I see you haven't protected the script against malicious use yet. You should check if the file is encrypted (I think checking the existence of the rgssad should be enough, but you can get more paranoid than that) and, if it is, don't allow load_data to open external rsc files (by checking their non-existance when using FileTest).

I quote someone I won't name (take that, Tr...someone I won't name !), NOW GO BACK TO WORK !!!!!
 
Yeah, yeah... I still have bugs to work out (A crazy Reset one).
Code:
Script `Window_Base' line 13: NoMethodError occurred.
undefined method `each' for nil:NilClass

    self.x = x
Silly errors indeed.

EDIT: Fixed the bug. Turned out that it was because of the $" global. I just scrapped that bit, so it's all good. Now I just have to secure it up a notch. :)

EDIT2: Turns out that the $" was the true cause of the errors. Updated the script once again so you don't have to rsc_require but you can just require. rsc_require still works, though :)
 
Woopy! The script is now version 1.3.0 which is now SECURE! Now you can't load a real file when there is the Game.rgssad file!
And as a bonus, ScriptEditor is now version 0.9.1. This new version now has that oh-so-useful "dirty" flag. No more accidentally losing data when you quit!

What fun this has been :P


EDIT: I've compiled a stand-alone Win32 version of the ScriptEditor program. You can download the installer here.
 
Hey Yeyinde,

I like the idea of editing the scripts outside RMXP. But this is not about the script, but the editor. I would like to suggest some useful features we have in RMXP script editor that I just can't find in yours. Maybe they are there, but I just can't figure out where. Let's to the point:

- How can I insert a script between two others, you know in the middle of the list?
- You could add some find and replace dialogs because they help a lot.

Thanks for the script and for the editor... Keep the good work...
 
Glad you like the editor. As you can see by the version(0.9.1), there is still a good number of things to add. The potential list of these things are:
  • Password protection (Will only available with the 'RSC' extension)
  • Find/Find&Replace (There are pre-made dialogs for this)
  • Insertion (I just need to make a little method in Array for this)
  • Syntax Highlighting (If I can ever get the WxScintilla object working)
  • Other features
Hopefully, Version 1.0.0 will be C++ compiled. This is assuming I can get Ruby objects and methods to work...
 
For;
require 'LIBRARYNAME'
In 'LIBRARYNAME' or under that; do I replace that with a script or something? :S

( I'm only 15 ^.^ )
 
Can't you delete Game.rgssad once the game is started ? That would mess your injection detection.

An efficient solution would be a 2 parameters require, with the second parameter a crc of the file to load. However, you'd lose in convenience what you would gain in security. Or you could try to detect Game.rgssad as soon as the game starts : it would be harder to trick the system.

Not that it really matters. If people knew how easy injection is in rmxp...
 
Righty then. Now updated to 1.5.0, which should fix that. The problem was that forgot that you can change the name of the 'Game.*' files and that, so now it looks for the archive under any name (even '.rgssad').

Also, deleting *.rgssad would not work because graphics files need to be loaded from that when needed, so deleting it would raise plenty of Errno::ENOENT exceptions.
 
Yea one question to add to your FAQ...

rsc_require 'LIBRARYNAME'

Am I supposed to put something in 'LIBRARYNAME'?

or leave it 'LIBRARYNAME'?
 
"Include_SDK_Parts = [2, 3, 4, 5] to include what parts of the SDK you wish to include, with part 5 being the patch."

Uhh I don't get it...

where are those? Where do I get those...?

Thanks
 
Status
Not open for further replies.

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