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.
I'm asking for either a rewrite or an original. If not maybe you can help me with monkey patching. I read a wiki on it and didn't quite understand it.
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:
  1. class Window_Base
  2.   #-------------------------------------------------------------------------------
  3.   # lots of other methods
  4.   #-------------------------------------------------------------------------------
  5.   def normal_color
  6.     return Color.new(255, 255, 255, 255)
  7.   end
  8.   #-------------------------------------------------------------------------------
  9.   # more other methods
  10.   #-------------------------------------------------------------------------------
  11. end
Expand to see the code.

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:
  1. class Window_Base
  2.   #-------------------------------------------------------------------------------
  3.   def normal_color
  4.     return Color.new(0, 0, 0, 255) # this illustrates how you'd change the font color to black
  5.   end
  6.   #-------------------------------------------------------------------------------
  7. end
Expand to see the code.

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?

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71052