The Scripter’s Journey Series
1.The Fundamentals of Programming!
Table of Contents
I. You woke up late! Professor Law is waiting!
II. What does it mean to program?
III. Object-Oriented Programming.
IV. The Script Editor and some other stuff!
V. Conclusion
You woke up late! Professor Law is waiting!
The Story: The story begins with you, a young teen that lives in Noobet Town aspiring to become a Scripting Master. You’ve been constantly mocked and jeered at by your “friends” and always feel abased due to your lack of success…in well…anything. Fortunately you’re mother was able to set up an appointment with you at Professor Law’s (a famous scripter who’s studied scripts in all five regions of the Scripting Lands) lab in order to hopefully give you a jump start on your scripting “career” and get you to that goal of being a Scripting Master. The problem though is that the day of your appointment, you’ve woken up late! What will Professor Law think of you?!!
Hello to everyone, this is my first tutorial of The Scripter’s Journey Series (SJS) that I plan on completing to help everyone like the person in the play story up above become a competent scripter. I can’t promise you the title of Scripting Master (I’m definitely not one anyway lol) but I can certainly get you to the point where you can write your own scripts and programs without any assistance. Time is already ticking, don’t wake up late (or start late) in your quest to get better at scripting; the earlier the better! Now let us begin!
What does it mean to program?
Now before we continue on with the story of the little guy from Noobet Town, there are two very important sections we need to cover first which is “What does it mean to program?” and “Object-Oriented Programming”.
Now, programming, in my perspective, in the most simplest form is “the process of implanting an idea into a computer”. Making a script that prints “Hello World!” was first an idea in your head. In your mind you thought something along the lines of “Hey…that would be pretty cool if I allowed the player to be greeted with a ‘hello world!’ statement so that they feel good inside…” The beginning (creating the idea) and the end result (the final message) are not what scripting is, but the process to get this beginning (or idea) to the conclusion (the idea now being on your computer). Hopefully that was pretty clear so far.
Now, most of the time, these ideas are used to solve problems…in fact I’ll go ahead and make up a random statistic (I mean when aren’t they random!) that about 98.784321% of all scripts are used to solve problems. Battle Systems were scripted as a way to solve the problem of a player being able to…well…battle! Now, these are what I call conscious problems. What do I mean? That means people realize there is a problem (“I can’t battle the big bad monsters!!!”). Now the other type of problems are called the unconscious problems. Again, what do I mean? That means people DON’T realize (shocker) that there is a problem. Take for example, a side-view battle system. People’s problem of being able to battle has been solved, but no one thinks of the “problem” that they can’t see both the actors and enemies fighting each other visually and moving across the screen. Essentially, unconscious problems are those unique ideas that some scripters have the gift of thinking up and they ALWAYS spread like wildfire and become popular. But again, unconscious problem-like scripts are very hard to think up, but the rewards are great.
So to summarize, scripting is the process of implanting an idea from your head into the computer. Most of the time this idea is used to solve a problem which can be either an unconscious or conscious problem.
Object-Oriented Programming
Now back when dinosaurs roamed the globe, there was something called Procedural Programming…I don’t much about it more than the fact that it is a headache coding in it…and plus I don’t want to bore you guys. Nowadays, we have the awesome Object-Oriented Programming which I WILL explain.
In Object-Oriented Programming, everything is…well…an object! To put it simply an object is an entity or a data structure (also known as a class) that has certain properties (variables) and methods (functions). In Object-Oriented Programming you create these objects and allow them to interact…thus creating a program!
The Script Editor and some other stuff!
The Story: After tumbling out of your house and running back after your mom tells you that you forgot to put on underwear (really?) you finally reach Professor Law’s house to see your arch rival, Professor Law’s grandson, leaving with his own newly presented Script. You glare at him as he walks out nonchalantly and proceed to enter the lab where Professor Law presents you with the unfortunate news…all the Beginner Scripts have been given away! However, he does tell you that one script is left, but it is a volatile script…it’s called Pikachu! After getting zapped by Pikachu’s “thunderbolt” method, Professor Law places Pikachu in your newly presented Script Editor, which will be used later on to write and capture other Scripts. With that, he presents you with your very own poked—Help File to also aid you on your journeys. Professor Oak explains you to how to use the Script Editor and the Help File and you are off with your very first SCRIPT!
The script editor will be the home to your scripts, much like a pokeball is the home of a Pokémon. I’ll now proceed to help you get comfortable with this place as…well..this is where you’ll script! You can enter the toolbar by pressing F11 or clicking the script icon near the end of the toolbar at the top of your screen (XP or VX). A nice little window should appear that has several names on the left and a huge space on the right. Use the scroll bar and scroll up and down and even click some of those names listed on the left and stare in awe. Yes, these are all default scripts made by Enterbrain, but we won’t be playing around with these guys—yet. So scroll all the way down until you see a scripted labeled “Main”, right-click, and press insert. Above “Main” and below all the other default scripts will be the space where you will insert your own scripts.
Now, to the right you should have a blank page, were not going to write any code down, but just know for now that this place is for…well…writing code! First we need to know some short cut commands that may come in handy. CTRL+F allows you to find specific lines of code in the script you’re currently in, CTRL+SHIFT+F allows you to find specific lines of code in ALL scripts, CTRL+I allows you to indent, CTRL+G allows you to jump to a specific line number (like line number 35577353233234234556), and CTRL+H allows you to replace a line of code with another line of code.
Now on to the Help File, I’ll go into the Help File in more detail on a later tutorial, but for now just know that the Help File will be your greatest friend. When you don’t understand a line of code, the Help File will come to the rescue…much like…well…a pokedex!
Conclusion
Well, I know you’re probably half a sleep by now, but I promise you code will come soon. You all have to trust me though, jumping right into all the flashy stuff and all the big codes WILL NOT get you to become a good scripter, let alone a decent one. We just need to get these few boring tutorials out of the way to secure your foundation in the field and from their we will be flying. Next time on SJS we have an in-depth tutorial on variables and moreover, just so everyone knows, the "story" element was just to spice up this tutorial (to prevent sleeping) and provide a better introduction to this series, so I won't be using the story for the rest of the tutorials lol (besides the fact that pokemon and scripting aren't TOO related)...but regardless come prepared next time with a sideways cap, some tacky jeans, and a cool-looking jacket and be prepared to BATTL—script.
Side Note: If you’d like to know the order of how these tutorials will progress, check out this topic I created: http://www.rpgrevolution.com/forums/index....showtopic=54953
~Law
