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.

Sprite Class

Hidden Sprite Class

Hidden Sprite Class
RMXP
Detailed Description:
As most of you scripters know, the Sprite class is hidden and only accessible from the rgss102e.dll I need it for edits I plan on creating.
Screen shots:
N/A
Other Scripts I am using (in order):
RTP Scripts
 
Just for clarification, are you asking for the original one or for a rewrite? The first would be relatively hard to obtain through here, meaning I don't think people will post their reverse-engineered stuff in here (which would be in C anyway). As for the rewrite, I'm not aware of any being in existance.

In my opinion, sharing what you want to do in order for us to help you achieving it the regular way is the quickest road to victory for you. And I'd like to drag your attention to monkey-patching, which will perfectly work for the hidden classes as well. Therefore, you don't really need to see them or have them to make edits.
 
Well, monkey patching basicaly means overwriting a previously defined method with a method defined afterwards. In other words, if you have multiple methods named the same, the method that's last read into the Interpreter (aka the one that's most towards the bottom of the Script Editor) will be the one in effect. Note that all of the hidden scripts, aka hardcoded scripts, are read before all of the Script Editor's scripts, so no need to worry about placement.

So, let's take a look at an easy example. Let's take Window_Base's normal_color as an example. I have no idea how XP's method looked like, so I'll have a shot in the blue here:
Code:
class Window_Base

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

  # lots of other methods

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

  def normal_color

    return Color.new(255, 255, 255, 255)

  end

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

  # more other methods

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

end
So, this basically is a cut-out of Window_Base. At the same time, that's about the part you need to have to monkey-patch it. What you do is completely leaving the Window_Base script alone and create a new script somewhere between Main and the default Window_Base. You need to fill it with this:
Code:
class Window_Base

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

  def normal_color

    return Color.new(0, 0, 0, 255) # this illustrates how you'd change the font color to black

  end

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

end
You successfully monkey-patched something now. Once you figured out the gist of it, read some of the very good tutorials in here about aliasing - it's essential for doing that kind of stuff sometimes!

Now of course, with the hidden scripts, that isn't as easy, as you don't have a default method you can start with (unless you do get a script from somewhere). The help file is helpful (nice, eh?) on method names, so you should be able to figure out with a bit of figuring and logic how to get what you need.
 
I know about aliasing and the example you posted, I just didn't know that it was called monkey patching. I've read the help file and it has a script called RPG::Sprite but I need the actual sprite class. I've tried googling to find it.

I really don't know much about C or C++ so I don't think coding a rewrite in those languages is possible. I also really don't even know where to start on re-making it. Maybe you could be of some help?
 

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