[Finished] [RGSS] RMXP Hidden classes

Started by Blizzard, March 07, 2011, 03:50:56 pm

Previous topic - Next topic

Blizzard

March 07, 2011, 03:50:56 pm Last Edit: September 10, 2011, 03:27:43 am by Blizzard
Somebody has to put a Ruby script together and insert it into RMXP. Make use of Ruby's reflection to extract all the methods and (possibly) instance variables of the hidden classes such as Tilemap, etc. It will make it easier to clone RMXP's functionality. Who's up for it? The script shouldn't take more than an hour.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

I can do this, but I won't be home nor able to start on it until tomorrow night.
If you someone else wants to do it sooner, go ahead, but let me know so I don't start working on it tomorrow when someone else already has.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Ryex

done. a folder with the information in txt files has been committed to SVN.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

March 07, 2011, 05:17:27 pm #3 Last Edit: March 07, 2011, 05:22:30 pm by Blizzard
It would be good if we have this until the weekend so we can put a structure together for the C++ classes.

Lol!

EDIT: I modified the script. Can you rerun it?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

good call there. much easier to read.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

March 07, 2011, 05:31:29 pm #5 Last Edit: March 07, 2011, 05:40:34 pm by Blizzard
Yeah, I used to do that when debugging some heavy stuff. xD

EDIT: Would be good if you also added the hidden modules Graphics, Audio and Input. I think those are all.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

ThallionDarkshine

Sorry for the necropost, but could someone post the information the script got?

Ryex

I could, I actually went back in our reapo to find the files (had to go back to revision 52). but what do you need it for?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

ForeverZer0

Its literally just a list of methods and variables.
Ruby has the feature built in:

ex.
Tilemap.methods
Bitmap.private_methods
Table.instance_variables
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Ryex

yes, actually I would be easier for me to give you the script I used to generate the files, it simple and has no bearing on the project it self so... here.

Spoiler: ShowHide

def reflect(obj)
io = open("./" + obj.class.to_s + ".txt", 'wb')
io.write("Instance variables:\n")
(obj.instance_variables - Object.new.instance_variables -
Class.instance_variables - Module.instance_variables).sort.each {|name|
io.write("\t" + name.to_s + " => " +
obj.instance_variable_get(value).to_s + "\n")
}
io.write("Methods:\n")
(obj.methods - Object.new.methods - Class.methods - Module.methods).sort.each {|name|
io.write("\t" + name.to_s + "\n")
}
io.write("Public Methods:\n")
(obj.public_methods(true) - Object.new.public_methods(true) -
Class.public_methods(true) - Module.public_methods(true)).sort.each {|name|
io.write("\t" + name.to_s + "\n")
}
io.write("Private Methods:\n")
(obj.private_methods(true) - Object.new.private_methods(true) -
Class.private_methods(true) - Module.private_methods(true)).sort.each {|name|
io.write("\t" + name.to_s + "\n")
}
io.write("Protected Methods:\n")
(obj.protected_methods(true) - Object.new.protected_methods(true) -
Class.protected_methods(true) - Module.protected_methods(true)).sort.each {|name|
io.write("\t" + name.to_s + "\n")
}
io.write("Singleton Methods:\n")
(obj.singleton_methods(true) - Object.new.singleton_methods(true) -
Class.singleton_methods(true) - Module.singleton_methods(true)).sort.each {|name|
io.write("\t" + name.to_s + "\n")
}
end

begin
 reflect(Bitmap.new(32, 32))
 reflect(Color.new(255, 255, 255, 255))
 reflect(Font.new())
 reflect(Plane.new())
 reflect(Rect.new(0, 0, 32, 32))
 reflect(Sprite.new())
 reflect(Table.new(10, 10, 10))
 reflect(Tilemap.new())
 reflect(Tone.new(255, 255, 255, 255))
 reflect(Viewport.new(0, 0, 640, 480))
 reflect(Window.new())
 reflect(RGSSEror.new())
end
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />