Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 156 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
    SephirothSpawn
  Mon Sep 18, 2006 3:05 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
Method and Class Library
Version 2.3

What is this?

This script set provides a utility for other scripters by: adding extra methods, classes & modules to prevent other scripters from "reinventing the wheel" and adding methods, classes & modules for other scripters to use. It also provides a set of commonly used constants so setup will not be as much as a hassle among scripts.


Installing the MACL 2.3

Simple copy and paste the MACL Complete text file from below into your game. Paste it below Scene_Debug. Make sure this is the first script after Scene_Debug unless you use the SDK, then put this directly after the SDK.

Files
MACL Complete Text File

What Can I do to Help?

If you have something you want to submit, then post here but read the section in the documentation on this topic. If you find a bug with any item in the library also post here. All of your help is appreciated.

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Last edited by SephirothSpawn on Sun Jul 13, 2008 11:31 pm, edited 1 time in total.

Top Top
Profile      
 

    exseiken
  Tue Sep 19, 2006 9:51 pm
Member

Well, here it goes.

By the way that there is no fill version of these methods. I planned to do them later as they are slightly more complicated but in the end I chose to let it gather dust instead.

Note that the Bitmap#draw_ellipse method is actually a draw_polygon that, by default, draws a 30-sided polygon... but at 30 sides, it looks like a circle or an ellipse. Change the parameter to smaller values if you want something that looks like a polygon. Also, please leave the line_width parameter to its default value, which is 1. You will probably get sloppy results if you use another value. That parameter should be removed. (That, or the Bitmap#draw_line method, which is used "under-the-hood", should be recoded to round its extremities so it looks better.)

Ok, enough talk. Here is the script.
Expand to see the code.


PS: I wrote this long before the legal English version was released, so I apologize if the comments are non-standard.


Top Top
Profile      
 

    Selwyn
  Wed Sep 20, 2006 11:21 am
User avatar
Member

I haven't had much time to go and search for everything I made but I can already post one bitmap method :

Expand to see the code.


Top Top
Profile      
 

    Icarus Featherfight
  Sun Jul 15, 2007 1:23 am
Fallen Scripter
User avatar
Member


Location: Canada
Here are some methods I've been working on recently. I created an Math.root method based on the Nth Root Algorithm and a plus-minus function. Since both these method return arrays, I added arithmetic operators to the array class. In addition, I modified the Array class' [] and []= methods. If called with a range as the key, they will now read all values and write to all indexes inside the range.

Nth Root

Numeric

Array.math

Array Index Range

Hopefully, they will make a valuable addition to the MaCL. :)

_________________
My Resources


Top Top
Profile      
 

    hanmac
  Sun Jul 29, 2007 11:08 am
Member

unsort
Range.sort

i hope this are in the right form


EDIT:
To HSB

this is shorter then yours (why write the code double)

_________________
every thing is true, if true has a specific value.


Last edited by hanmac on Sun Jul 29, 2007 4:48 pm, edited 1 time in total.

Top Top
Profile      
 

    Trickster
  Wed Aug 08, 2007 2:04 pm
Member

Calibre;255946 wrote:
In my demo, I have just had an error reported that won't allow the game to load. So many other people have loaded it fine though, can you spot the reason?

"Script 'Method & Class Library' line 47: LoadError occured.
No such file to load--Array_2D.rb"


uhh it seems to me that you are using an older version please update to version 2.1

Korin;256507 wrote:
I get an error at 4261 - Stack Level too deep.


It doesn't help anyone if you don't post the line that causes the error


Top Top
Profile      
 

    Icarus Featherfight
  Mon Aug 13, 2007 3:29 am
Fallen Scripter
User avatar
Member


Location: Canada
Original Post

Object_Table

P.S. I know Selwyn already created Array_2D and Table_Object classes for the MaCL but his were based on the Array class.
[/spoiler]
As it turns out, the above code suffers from a critical oversight. Since all objects are disposed on exit, saving only their ids is not enough. The version below fixes this and is based on the array class.

New Object_Table

_________________
My Resources


Last edited by Icarus Featherfight on Fri Oct 19, 2007 3:06 am, edited 1 time in total.

Top Top
Profile      
 

    hanmac
  Fri Sep 28, 2007 11:00 pm
Member

Question:
are you think that defs for even and odd can be useful?

EDIT:

there is that:

Expand to see the code.

_________________
every thing is true, if true has a specific value.


Last edited by hanmac on Sat Sep 29, 2007 2:49 pm, edited 1 time in total.

Top Top
Profile      
 

    Yeyinde
  Sat Oct 13, 2007 4:35 am
Rubber Shark
User avatar
Sponsor


Location: Beautiful British Columbia
Seph, how about adding the CRC class I when searching for a checksum algorithm?
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/149918

_________________
Squeak!


Top Top
Profile      
 

    Icarus Featherfight
  Fri Oct 19, 2007 2:54 am
Fallen Scripter
User avatar
Member


Location: Canada
As it turns out, my first Object_Table suffered from a critical oversight. Since all objects are disposed on exit, saving only their ids is not enough. The version below fixes this and is based on a nested @data array. What do you think?

Object_Table

_________________
My Resources


Last edited by Icarus Featherfight on Tue Oct 23, 2007 6:23 am, edited 1 time in total.

Top Top
Profile      
 

    trebor777
  Thu Nov 08, 2007 3:50 pm
Member

some usefull methods for arrays:
I've send them to trickster yesterday night...
So just in case
Expand to see the code.


Top Top
Profile      
 

    malucifer
  Wed Dec 19, 2007 4:35 am
Member

        Here is my first contribution to the Rmxp community, hopefully this gets added to the MCL!
(As if you couldn't tell this goes in the class String section)

Expand to see the code.


I hope this helps somebody....


Last edited by malucifer on Wed Dec 19, 2007 4:37 am, edited 1 time in total.

Top Top
Profile      
 

    khmp
  Thu Feb 14, 2008 3:37 am
The glass is helpful.
User avatar
Sponsor


Location: Haddonfield, NJ
I don't know if work on this is discontinued or no longer supported but while helping someone out I discovered two tiny bugs that deal with variable misnaming.

*Original* module Point_Slope


*Fixed* module Point_Slope


*Original* module Curve_Generator


*Fixed* module Curve_Generator

_________________


Top Top
Profile      
 

    SephirothSpawn
  Mon Jul 07, 2008 5:39 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
The MACL has been updated to version 2.3!


Some of you may be asking, what happened to 2.2? Well many parts of the 2.2 version have been leeked around and about. To avoid any confusion, this is version 2.3. Any old versions of the MACL may be removed completely. We will probably be not using the RSC require method, simply because its a headache for people to get to use. So from here on out, you get one big script (over 16000 lines, go us!).


Let me know if I made any mistakes, as I haven't had a lot of time to review this yet.

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 

    Dargor
  Sun Jul 13, 2008 5:29 pm
User avatar
Retired Staff

Party Mascot

Location: Quebec / Canada
That's a nice update. I'm massively using the MACL in my FF6 SDK.
I have a suggestion, why don't you add your Bitmap sqr_rotate_90 method to it? It would be a nice addition along with the Bitmap flipping methods.

Also, I found a class_defined? method not long ago if you are interested.
Kernel.class_defined? by David Garamond

_________________
Final Fantasy VI SDK
Image

Stay in touch, ask me anything, receive updates and try out the lastest versions!

Image Image Image Image Image

Tutorials


Top Top
Profile      
 

    SephirothSpawn
  Sun Jul 13, 2008 8:14 pm
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
Thanks. From here on out it will be month updates. I left the post in this thread with anything I am unsure if its already in there. I am going to try to include everything in this thread in the next update, or any other useful methods that pop up.

Expand to see the code.

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Last edited by SephirothSpawn on Sun Jul 13, 2008 10:38 pm, edited 1 time in total.

Top Top
Profile      
 

    mephisto
  Mon Jul 14, 2008 11:56 pm
User avatar
Member


Location: Toronto - Canada
I have a little problem with the pathfinding sintax:

I use this: $game_map.events[1].run_path(10, 10)

and I get this:

Wrong number of arguments(2 for 0).

_________________
What slave i am?... i dont know.

I am
http://img463.imageshack.us/img463/5659 ... ve2rz3.jpg[/img]

http://img186.imageshack.us/img186/7425/dibujotg6.png[/img]
This is my signature, beautiful not?...i made them with my owns hands..
[URL=http://planetarpg.com


Top Top
Profile      
 

    SephirothSpawn
  Tue Jul 15, 2008 1:42 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
That was a mistake in the Script Heading. It should be:

find_path(x,y)

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 

    mephisto
  Tue Jul 15, 2008 4:41 am
User avatar
Member


Location: Toronto - Canada
But i have a question, this Pathfinding is used to move the player or the event to a Position?, because I cant do that.

Can you explain a little better this pathfinding?

_________________
What slave i am?... i dont know.

I am
http://img463.imageshack.us/img463/5659 ... ve2rz3.jpg[/img]

http://img186.imageshack.us/img186/7425/dibujotg6.png[/img]
This is my signature, beautiful not?...i made them with my owns hands..
[URL=http://planetarpg.com


Top Top
Profile      
 

    SephirothSpawn
  Tue Jul 15, 2008 7:10 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
Yes, it works for any Game_Character object. It moves them to the dest x, y position or should...

*runs off*

(I am actually going to do some research and possibly improve this for the next update. I was working with pathfinding nodes, but that was before xmas break.)

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 

    rey meustrus
  Wed Jul 16, 2008 12:29 am
Master of Dark Magic
User avatar
Sponsor

Party Mascot
Here I am and I went to all the trouble to update from 2.1 to 2.3 and I find that it's not working entirely.  Don't think about it too much if it doesn't seem simple (because I've made a lot of modifications to the project that you can't predict).  With fotz!'s pixel movement script, the front player in the party does not display properly and the pathfinding is not initializing properly.  And for some reason it made all text in the game shadowed.

_________________
Image


Top Top
Profile      
 

    SephirothSpawn
  Wed Jul 16, 2008 5:52 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
The Pathfinding probably needs a little tweeking. With fotz!'s system, there might be a method name mixup. If you can make a demo, I can take a look. And the font is shadowed because of the settings right below the heading. All those constants are settings you can adjust. Just look for Default_Font_Shadow or something and set it to false. I merely turned it on because I think it looks a little better. lol

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 

    Kain Nobel
  Wed Jul 23, 2008 1:45 pm
No Rest for the Wicked!
User avatar
Member

Wow, I'm really surprised to find very little for the < Window_Base classes, especially these methods... feel free to add them, I use them in all of my window scene scripts, it makes even the most boring Window scene 100x better.

...At least I didn't see these in the MACL, so many lines I could've easily scrolled past it @_@

Window_Base+


Also, just a small addition to the initialize method in Window_Command. You call it like so...

@window_command = Window_Command.new(160, commands, 5) meaning that the window will show a max of 5 commands then scroll the rest.

Don't call the last arg and it'll just call it normally.

Window_Command+

_________________

You can find any scripts I've submitted within the past year upto the date specified above. If you happen to find something else that is either not on the list or just doesn't have a URL that I had posted officially or otherwise, please PM me the link and I'll be sure to add it to the list.


Last edited by Kain Nobel on Wed Jul 23, 2008 2:15 pm, edited 1 time in total.

Top Top
Profile      
 

    SephirothSpawn
  Wed Jul 23, 2008 9:30 pm
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
The move_to method is actually managed in Trickster's Movable module. As for the window command addition... its rather pointless. I mean, you can just alter the windows height to show how many commands pretty easily. Not to cut it off, I just don't see anyone using.

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 

    Kain Nobel
  Thu Jul 24, 2008 5:19 pm
No Rest for the Wicked!
User avatar
Member

SephirothSpawn wrote:
As for the window command addition... its rather pointless. I mean, you can just alter the windows height to show how many commands pretty easily. Not to cut it off, I just don't see anyone using.


It's just a lazy way to do it, incase anybody doesn't want to measure heigth :P

I use it all the time and it doesn't cut-off the command window, it just scrolls the commands. Other than that, it probably is better left out of the MACL.

_________________

You can find any scripts I've submitted within the past year upto the date specified above. If you happen to find something else that is either not on the list or just doesn't have a URL that I had posted officially or otherwise, please PM me the link and I'll be sure to add it to the list.


Last edited by Kain Nobel on Thu Jul 24, 2008 5:21 pm, edited 1 time in total.

Top Top
Profile      
 

    rey meustrus
  Fri Jul 25, 2008 1:10 am
Master of Dark Magic
User avatar
Sponsor

Party Mascot
I don't understand how the move_to function would even work right.  It doesn't seem to be tied to def update at all.  So, do you have to call move_to every frame from within the scene?

The modification on Window_Command seems good, to me, except that instead of setting size to 1 by default it should be non numeric, like nil, in case somebody wanted a command window that was really only 1 command high.  But it probably is redundant otherwise, like the almighty said.

_________________
Image


Top Top
Profile      
 

    iqbal_0k
  Fri Jul 25, 2008 7:45 am
User avatar
Member


Location: Front of your monitor
how to use flip_horizontaly thing on my window bitmap class?

and i had this error on my first attempt "Could not confert My_Windows to bitmap"


Last edited by iqbal_0k on Fri Jul 25, 2008 7:47 am, edited 1 time in total.

Top Top
Profile      
 

    SephirothSpawn
  Fri Jul 25, 2008 8:32 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
Without your code an description of what you are doing, I have no clue. And make a topic in the RGSS Support Forums. This topic is for development discussion, installation support, etc.

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 

    iqbal_0k
  Fri Jul 25, 2008 8:51 am
User avatar
Member


Location: Front of your monitor
oh thanks, i'am figuring out my self on my second attempts
i'll cut this from your flip_horizontally! def
here's the code
Expand to see the code.

unfortunately the x position of that face is also modified ... hmm i wonder

I'am sorry if i post this to this board but i really want to know about flip_horizontally example syntax inside your MACL


Last edited by iqbal_0k on Fri Jul 25, 2008 8:56 am, edited 1 time in total.

Top Top
Profile      
 

    SephirothSpawn
  Fri Jul 25, 2008 9:11 am
Support/RGSS Bitch
User avatar
Retired Staff


Location: Kansas City, Mo
Ok. You just use this:

Expand to see the code.


Much of that code was unneeded. You will probably need to modify your x and y positions, it all depends on your scripts.

_________________
I want to review your script!
I am always looking for scripts to look over and offer my advice on people's coding. If you want your script reviewed and to further develop your scripting skills, just put a [Review] tag in your topic. I will always post in any scripting topic marked [Review] offering whatever advice I can give.

Image


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 156 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next


Who is online

Users browsing this forum: No users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group