CCBasic
Welcome to CCBasic! Ive tried to break this down as logically as possible, but feel free to email me with any questions at srd09@aol.com, or post them on the at Pkhack forum
1. All About CCBasic
1.1
What is CCBasic?
CCBasic is a programming language that I created for the sole purpose of EarthBound hacking. It uses simple statements reminiscent of BASIC, but is not in any way a real programming language. It is designed for easy and efficient use.
1.2
What is CCBasic coded in?
CCBasic is coded entirely in Visual Basic, with a few API calls for the GUI.
1.3
How did you create that nice, rounded form?
I used a few API calls to render it, and the graphics were created in MSPaint. If you want to know the specifics of it, feel free to email me.
2. The CCBasic IDE
The CCBasic IDE is a RHD (Rapid Hack Development) environment. It incorporates some of the most advanced features of Visual Basic. The IDE really stretches VB to the limit, with transparent forms, snapping the mouse, and many other advanced features. Heres a screenshot of what the IDE might look like
2.1
General Interface
Dont become overwhelmed with the language itself, yet. Lets just focus on the interface. Most of the command buttons are straightforward. The only one which may seem a little challenging is the difference between Save and Compile. Save saves the source of your program to a text file, while Compile compiles the code and saves it in a ROM.
2.2 The AutoComplete Feature
The AutoComplete feature is probably the best feature in the IDE. As soon as you type in the command you want, a list of acceptable values will pop up to assist you. Also, your mouse will automatically be move to directly over the list of values and the list will open. This command also contains constants for the print command.
3. CCBasic
3.1
Basic scripting
The basic functionality of the program lies not in variables or properties, as it does in Visual Basic and C++, but in simple commands, much like QBasic.
3.2
Subroutines
Subroutines are to be found in every programming language, and CCBasic is no exception. Subroutines in CCBasic are used like this
Sub Hello
Code
End Sub
Each subroutine is really a block of EarthBound text, and the address of each subroutine will be displayed after you compile your code.
3.3 Basic Commands
So, we finally come to something interesting. These are probably the commands that you will use more than any others, so learn them by heart
Print The Print command is the most basic command in CCBasic. To put it simply, all it does is print text and codes; you can input text exactly as you would into the text editor. Besides just printing text, the print command also encapsulates basic text display codes using print constants.
Constants
^p This pauses without the little blinking cursor
^pc This is the same as the last, but it displays a blinking cursor, out of battle only.
^clear this clears out the text box
^n - This is a new line character
~Ness~ - This prints the name of the first character
~Paula~ - This prints the name of the second character
~Jeff~ - This prints the name of the third character
~Poo~ - This prints the name of the fourth character
~Pokey~ - This prints the name of Pokey *
~Pickey~ - This prints the name of Pickey *
~King~- This prints the name of your dog
~Tony~ - This prints the name of Tony *
~Bmonkey~ - This prints the name of Bubble Monkey *
~Dman~ - This prints the name of Dungeon Man *
~FlynmanX~ These print the name of Flynman (where X is the number of Flynman)*
~Tbear~ - This prints the name of the teddy bear *
~SPBear~ - Prints the name of the Super Plush Bear *
~Font Normal~ - This switches to the normal font
~Font Saturn~ - This switches to the Mr. Saturn font
~Smash~ - This prints the SMAAAAAASH! text image
~You Won~ - This prints the You Won! text image
~Target~ - This prints the name of the receiver of the action
~Performer~ - This prints the name of performer of the action
* Uses the name in the Pkhack enemy listing
Add This adds a person to the party, plain and simple. It uses the name constants: NESS
PAULA, JEFF, POO, POKEY, PICKY, KING, TONY, BMONKEY, DMAN, FLYNMAN1, FLYNMAN2, FLYNMAN3, FLYNMAN4, TBEAR, SPBEAR
Remove This removes a person from the party. It uses the same constants as the add command.
Give This gives an item to a person. Its syntax is Give Name Item. Name is the name of one of the chosen four, and Item is an item name.
Take Takes an item from a player. Same syntax as Give
Heal Restores HP/PP for the whole party
Warp This uses the Pkhack teleport listing to teleport you to a location using animation. Its syntax is Warp Town Animation where Town is self-explanatory and Animation is a hex number, documented in the CC Chrestomathy at the Pkhack website.
Set Sets an event flag
Unset Unsets an event flag
Goto Jumps to a subroutine and does not return
Call Jumps to a subroutine and returns after the specified subroutine executes
Music Changes the current music to the specified music. Uses the same arguments as the music control code documented in the Chrestomathy
Goto$ - Jumps to text specified by an SNES address and does not return
Credit Gives money to the player in the amount specified
Debit Takes money from the player in the amount specified
Effect Utilizes a music effect
Beep Plays a specified sound
Heal Restores the entire partys HP and PP
Window This control code opens or closes a window. The Window Open statement has the following commands: Normal, Battle, Large, Phone, Status, Small, HP. Window Close has the following commands: Normal, Battle
Wait Pauses execution for the specified time