Difference between revisions of "Chapter 2"
MrSugarCube (talk | contribs) (Created page with '<big>'''''(incomplete)'''''</big> ==spheretables.scp== Spheretables.scp is the very first file read by SPHERE after SPHERE.ini, and therefore it is the most important. Almost a...') |
(No difference)
|
Revision as of 15:22, 28 May 2009
(incomplete)
spheretables.scp
Spheretables.scp is the very first file read by SPHERE after SPHERE.ini, and therefore it is the most important. Almost all of the secondary settings are contained within this file, wich makes this very important. Now, let's talk about this very important file in topics:
== [RESOURCES] ==
The first thing you'll see when you open this file is a list of resources. This is marked by (SURPRISE!) a [RESOURCE] tag. It looks something like this:
[RESOURCES]
scripts/sphere_defs.scp
scripts/sphere_book.scp
scripts/sphere_backward_compatibility.scp
scripts/sphere_events_human.scp
scripts/sphere_events_npcs.scp
scripts/npcs/
...
This tells sphere what files to load and in what order to do so. You must change it carefully sometimes, put scripts with a lot of DEFNAMES, REGIONS, and other global used settings first, to avoid errors when sphere starts (although those errors won't harm your server). For example, we looked at a gold script in Chapter 1 that had a line like this:
TYPE=t_gold
Now, unless SPHERE loads sphere_defs.scp before the script containing the gold, it will have no idea what t_gold means, and will give you an error. This is because t_gold is defined within sphere_defs.scp.
Item files should be loaded before template files, and finally character files. Other files may come after this, but these particular files must load in that order. The loot on monsters is comprised of items and templates, and unless SPHERE has already loaded the file containing these items and templates, you will get hundreds of fun errors to track down and correct. Actually, it isn't very hard to correct, but it's irritating to start up the program and have a thousand errors scroll up your screen.
Note: You can make sphere load a full folder instead of putting each file, that's why we have this scripts/ as the last file on the [RESOURCES] tag, so sphere loads all other scripts that might have been out of the list.
== [OBSCENE] ==
The next section is self-explanatory, [OBSCENE]. This defines "illegal names". If a player creates a character with a name on this list, it will tell him that the name is unavailable and to pick another. If you are a punk who enjoys cussing at others, this list might be a good place to expand your knowledge of obscenities.
== [NOTOTITLES] ==
This defines the title that will be shown related to the player's karma. Do not touch this section. If you remove a line inadvertently, your server WILL NOT RUN. Only change them.
== [PLEVEL X] ==
These sections define the commands available to the various account plevels. Any command not listed is automatically assumed to be in the plevel 4 category. This includes self-defined functions (see Chapter 6). As you can see, there is quite an extensive list of functions and commands.
Note: You don't have to put every function you make in this section as you can have various sections in different scripts, although I recommend that you put them here just for organization purposes.
== [RUNES] ==
This is the list of those words you say when casting a spell (An, Lor, In, etc). You can play with them, but it'll become very confusing. =P