Main Menu
  • Welcome to The RPG Maker Resource Kit.

Read this before asking about how to script RGSS

Started by Zeriab, February 20, 2006, 09:51:53 AM

0 Members and 1 Guest are viewing this topic.

Zeriab


Lord Dante

doesn't the help file in rmxp contain something about scripting?

Zeriab


Lord Cloud

you should also note that it is in the legal english version only which means we only get a months peace before we get stormed by idiot noobs again.

Lord Dante

i wouldnt talk if i were you...

anyways, they can (if they evolve out of noobishness) copy the text to word and then post it. Thatd be nice...

Lord Cloud

Quote from: Lord Dantei wouldnt talk if i were you...
oh, im so offended[/sarcasm] keep in mind i wasnt referring to anyone specifically. im just saying there's a lot of noobs out there. im done my, er... rant.

Zeriab

Meh, you can download the help file from CrankEye.com, yes that's here.  :roll:

ahref


haloOfTheSun

Quote from: ahrefshouldnt this be stickied

Fine.... if you insist.  :roll:
:tinysmile:

Zeriab

Requesting resticking. (I can't report my own posts :'()

Arrow


thingy

Zypher, Veltonvelton, and Dalton are secretly having a homosexual affair in hidden messages just like this one
research shows Fu is also involved, but not in a gross and creepy way

Arrow


Zeriab


Winged

Nice  ;D

What would you all suggest for me to read if I were to script a CMS?

~Winged



Blizzard

First read the code of the basic Scene_Menu. Then go over to more complex codes, learn how they work, what they do and how they do it. No real tutes are actually needed here.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Winged

Thanks, I'll read them tomorrow when I'm awake...

Good night everyone  :)

~Winged



Zeriab

Dubealex's tutorials seems to involve window management, so you could also read them.

Winged

Thanks Zeriab (This took a long time, I didn't check up when I woke up, sorry) I'll edit this post to see if I got any of this scripting

~Winged



Zeriab

No problems.
If you still have problems I suggest you make a topic in either Scripts or Troubleshooting depending on the problem you have. (Possible also Tutorials)

Snailer

I'm gonna give it a go at scripting  in rgss ruby ^^  Any tips i need to know :P ?

Zeriab

I don't really know any tips you need to know before reading the tutorials.
If you have problems I suggest you make a topic in either Scripts or Troubleshooting depending on the problem you have. (Possible also Tutorials)

.:Pyroken Serafoculus:.

#22
I read through the tutorials and part of the default script, but there are a few things I don't understand. what are the functions of the attr_ codes, and what does self. mean?

I'm getting anoying, but I'd like to know what the @ in code means as well. Like in this method from Game_Variables:

  def initialize
    @pdata = []
  end
...

Blizzard

#23
1. An @ before the variable's name means it's a class variable. An example would be an actor's name. The Game_Actor class represents the actor and the class variable @name is a string with his name.

2. attr_reader, attr_writer and attr_accessor are just what they are saying.
- attr_reader lets you read a class variable from "outside"
- attr_writer lets you write (that means change) a variable from "oustide"
- attr_accessor does like the two above together: read and write

3. the self. is actually accessing the class from "within" like it would be from the "outside". If you try self.name within the Game_Actor class, but there is no defined attr_reader :name or attr_accessor :name, it will give you the "Undefined method 'name' for class 'Game_Actor'"

Hope that helps. :)

EDIT:

BTW, the attr_reader is often used instead of an attr_accessor like for example he actor's HP. Then something called "encapsulation" is done instead and instead of just "writing" the actor's HP the given value for the actor's new current HP is first processed little bit, so the HP won't exceed the max HP and won't go lower than 0. Check out def hp=(hp) in the Game_Actor class to see what I mean. :)
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

.:Pyroken Serafoculus:.

...