Sphere Logo

What's in your scripts?
sphere_d_book.scp
This file contains the message of the day, new player, and guest messages one gets when logging onto your shard, as well as the contents of books in the game. It also contains the "hints" popups given when logging onto your shard, and the email messages sent when creating a new account or requestion a lost password via the HTML account manager that comes with Sphere. Note: As of version 99m the HTML account management files are not working. Not sure if they will be functional in 99n or later releases.
sphere_d_char.scp and any sphere_d_char_xxx.scp
These files contain the NPCs you'll use for your shard. Everything from vendors to ogres to horses can be found in these.
sphere_d_defs.scp
This was the first script made for Sphere. It contains -many- important definitions. I strongly recommend you familiarize yourself with this script. What this file does is associate tons of ID numbers and groups of things with easy to remember names for convenience in scripting. You can find lists of flags, attributes, types, layers, regiontypes, items, memorytypes, spellflags, CAN settings, and more in this script. This should be one of the first places you look when trying to remember the name of something for a script.
sphere_d_dialog.scp and any sphere_d_dlg_xxx.scp
These files contain the dialogs you will see in game. A dialog is a more advanced form of menu, a popup allowing customization of text, color, buttons, size, and images. These are also known as gumps, for anyone coming from another emulator or old enough to remember when they were called that with this one. The admin menu, character and item info/tweak menus, and sphere.ini viewer can be found in the sphere_d_dlg_smc.scp (SMC = Sphere Master Command). The command list dialog is in sphere_d_dlg_reference.scp. The rest of the default dialogs can be found in sphere_d_dialog.scp.
sphere_d_events.scp and sphere_d_events_human.scp
This file contains events that effect players and NPCS in game. An event is a trigger or set of triggers placed on a player or NPC to 'listen' for an action or occurance of something specific, and react to it. One overlooked, and well complained about, event in the game is the e_undead event. This causes undead to vanish when killed in the daytime. Most new admins mistake this for a bug in the game. You can find this event in sphere_d_event.scp. Another common question is "How do I add an @Trigger to all players at once?". Well, sphere_d_event.scp also has an e_AllPlayers event. This event is already on all the players when they're created, so adding @Triggers in here will affect everyone.
sphere_d_function.scp
This file contains useful functions. Functions are .commands in game or commands called by other scripts. Several useful functions are included in the default scripts to help you out scripting or give you better commands in game.
sphere_d_healing.scp
When you double click a bandage to use it, it calls to the function in this script. Here you can edit or completely redo the way healing works by default in Sphere.
sphere_d_house_item.scp and sphere_d_house_menu.scp
These files contain the scripts for the house system on Sphere. When you double click a house sign, it will open a dialog with commands for the owner or coowner or friends of that house. Editing these two files will allow you to further customize or completely rewrite the dialogs and events for your shard.
sphere_d_item_xxx.scp
These item files contain the thousands of items you'll find in the game. These items have been divided up into categories and placed into individual scripts just like Axis Gm Tool is categorized. Reading the names of these scripts can easily tell you what will be found inside them. Sphere_d_item_beers.scp will have beer itemdefs inside, sphere_d_item_ore.scp will have ore and ingots inside them, etc. I recommend a good text editor with a find in files option (you can also use the Windows find in files option) when trying to search for an item you don't know the script location of, it will save you tons of time.
sphere_d_map.scp and sphere_d_map2.scp
These files contain the region definitions for your world. It will have the cities, wilderness, houses, etc. detailed in it with their flags, coordinates, guard information, and more. Do -not- edit these scripts and resync your Sphere server. You must restart Sphere for changes to these files. If you resync it accidently, don't panic. It will spam many lines of errors, but it won't break anything. Just restart Sphere afterwards to correct things. Editing these files may be confusing at first. The FAQ section of this help file has a how-to on editing region flags. Sphere_d_map.scp has the main Britannia map and T2A land definitions, sphere_d_map2.scp has the Ilshenar map definitions.
sphere_d_menu.scp
This file contains menus you will see in game. Examples are the guildstone and townstone menus, and others. Most (if not all) of these will be rewritten into nice dialogs eventually.
sphere_d_name.scp
This file contains lists of names you can use with your NPCs. If you open sphere_d_char_human.scp you will see something like: NAME="#NAMES_HUMANMALE the Vendor". This tells Sphere to randomly pick a name from the [NAMES NAME_HUMANMALE] section of spherename.scp. You can add your own name lists by doing a new [NAMES whatever] block in any script file.
sphere_d_newb.scp
This file contains the starting equipment a player will have when making a new character. The first two entries listed are for male and female characters, all players will get whatever is in those, depending on his or her sex, when starting. The rest are categorized by skills. If a player picks alchemy, anatomy, and bowcrafting as his three skills to start with, he or she will also get any items listed within those [NEWBIE skillname] blocks.
sphere_d_plevel.scp
This file contains the commands available to each plevel (privilege level) in the game. If you want to edit what commands your counselors, seers, GMs, or admins are allowed to use, do so here.
sphere_d_region.scp
This file contains some region resource entries and region type entries. If you wanted to edit the chances of finding ore, you would do so here. A very common new admin question is "Why does it always say there is no ore here to mine?". The answer is found in this file. There is a section called [REGIONTYPE r_default_rock t_rock]. Below it is a list of all the regionresources for ores. By default mr_nothing is high. This means your chance of finding nothing is very high. You can lower this amount by just lowering the number. You can adjust the other frequencies here as well.
sphere_d_resources.scp
This is another item file. Almost everything required as a base element of another item can be found here. Examples of items found here: logs, reagents, food, cloth, water tiles, gems, and gold.
sphere_d_skillmenu.scp
This file contains the crafting menus for the various skills. It will probably look confusing at first, but it's actually one of the easiest of all the Sphere scripts to learn and edit. It's divided into sections. The main menu that you will see when initiating the crafting skill will have selections that will take you to a submenu. Each submenu will either have the actual items to craft, or another 'link' to another submenu, so on and so forth until you get to the item you wish to craft.
sphere_d_spawns.scp
Spawn groups are an often overlooked luxury in Sphere. These allow you to group together several NPCs under one name to allow you to set spawns in the world randomly without having to spawn a new worldgem for each NPC. You can adjust the frequency one NPC in a group will have over others in the group by giving it a WEIGHT line higher than the others.
sphere_d_spells.scp
This file contains the spell, scroll, and potion definitions. Note: the potion definitions are not the potions themselves, just their spelleffects. You can find the actual potions in sphere_d_item_potions.scp.
sphere_d_template.scp, sphere_d_temp_loot.scp, and sphere_d_temp_vend.scp
A template is an easier, more organized, method of making a group of objects and calling to them with a single name. For example if you wanted a bag to contain 50 of each reagent, you could make a template for a bag and place all the regs inside it, then call the bag with a single name in your scripts. Sphere_d_template.scp has many basic templates: everything from a poor gold pile to a random wand or weapon. Sphere_d_temp_loot.scp contains templates for loot you will find on NPCs. Sphere_d_temp_vend.scp contains templates for what your vendors buy and sell.
sphere_d_trig.scp
This file contains some examples of typedefs (also called triggers). A typedef is a set of triggers, similar to an EVENT, that you can place on an item. For example, if you wanted to make a set of figurines (small, shrunken statues of creatures) that would make a sparkle effect when double clicked, you could set them TYPE=t_sparkle and make a TYPEDEF t_sparkle that would do the sparkle effect @UserDClick. This would be easier than placing the @UserDClick trigger on each figurine you scripted. There are a few good examples of slightly more advanced scripting in these you could learn from.
spheretables.scp
This is a very important script, and one you should be -very- familiar with. When Sphere is first run, it loads sphere.ini first, and this file second. It contains the list of all scripts and directories of scripts that Sphere should load, lists of settings such as bad language filters and fame/karma titles, stat advancement rates, skill definitions and advancement rates, skillclass definitions where you can set your skill/stat caps for each class, and starting locations for new characters. Sphere will not run without being able to load this script. Like sphere_d_defs.scp and sphere.ini, this is a script you should go to first when trying to find something.
SphereServer ©1997-2002 by Menasoft