Editor Guide — Program Editor
A large proportion of any game making is programming - when it comes to the Toolkit, much of that has already been done for you, and you can get a lot of things happening without doing much programming at all. Whereas commercial games are written in languages such as Visual Basic or C++, any programming done in the Toolkit is in its own scripting language, RPGCode; specially tailored to make the creation process easier. And the Toolkit has its own program editor to make the coding process even easier!
Program Basics
RPGCode programs (*.prg) in the Toolkit are effectively text documents that can be edited in any text program; for instance Notepad. The advantage of editing them in the Toolkit's editor is the range of tools and features available.
The basics of programming and RPGCode are covered extensively in the Scripting in RPGCode section.
Around the Editor
You can start typing code into the editor straight away; as you type, the commands on each new line are coloured according to their construct or variable type. At the top of the editor is the Bookmark bar, which can be used for quickly navigating programs, by listing comments, methods and labels as reference lines. The drop-down box on the left lists these options and when selected, the lines of that type are listed in the right-hand box, and can be jumped to by selecting one.
Toolbar
Run - Test runs the program. Although the program is run through the Toolkit engine, no information (variables, players, boards, etc.) from your game will be loaded, and so won't be "visible" to the program. However, you can run the program with test players and boards through the Test Preferences window (see below). |
[ top ]
Menus
Edit
Copy, Cut, Paste, Select All - The standard text manipulation tools.
View
Bookmark Toolbar - Shows/hides the bookmark toolbar.
Notepad Mode - Hides all the Toolkit's toolbars and other editors, and windows the program editor, giving it the appearance of the Notepad program!
Tools
Indent Wizard - This routine can be used to auto-indent your code. Indenting your code makes it easier to read and can aid the debugging process by keeping track of open brackets. Lines of code are indented when they lie inside block brackets, { }, used for instance in the if statement. If a new block is started ("nestled") inside a block, this gets indented twice, and so on.
Options - Various settings for colour coding and indenting that affect all programs whilst editing.
- Colouring - sets the colours and text effects for a range of word types.
- Misc - sets the amount each block is indented by using the Indent Wizard.
- Common - Option for a small amount of text to appear at the start of new programs.
Run
Run - Test-runs the program (see toolbar button).
Test Preferences - Since no information from the game is accessible when testing (although you can load objects from the program), the program is run with optional test settings. You can choose a font, font size, message window graphic, a set of players and a board that the program runs on. None of these are mandatory fields.
Help
Whilst the program editor is active, the Help menu gains a "Quick Reference" option, which brings up a list of all commands with a short description and syntax information. The command can be inserted into the program at the current position by double-clicking or hitting the "Insert" button.
[ top ]