Welcome to the retake of Taran's famous "Sphere Scripting for Dummies Tutorials" originally made for Sphere 55i and now updated to the current version 56b.
Where should I start?
If you want to learn to script for Sphere 56b you should start by first reading the Setting Up Sphere section. It will teach you how to set up a basic empty world to start your path. After that you should try reading the Tutorials, go slow, don't try to go through everything in one day as it takes time to read and fully understand everything.
I learned how to script! And now?
If you have finished the 10 chapters then we encourage you to read the tutortials and other articles below. They may not be as important as the others but they are still quite useful and contain lots of useful information. Try making your own scripts and share with others at the SphereServer Forums. You can also ask for help if you can't resolve something by yourself. Remember to use the Reference Compendium below as it is really useful and always keep track of revisions to see all the changes being made to the core.
I want to contribute!
Maintaining the information on this site involves a huge amount of work and not many of us have the time to do it. If you wish to help out then please feel free to do so! All you need to do to get started is create an account if you haven't done so already. You can then edit any page by using the "Edit" link in the rop right corner. Before you go do this, you may want to start by reading the Contribution Guide.
Setting Up Sphere
Sphere 3rd Party Tools
- Axis II - GM Tool for Sphere that will allow you to place objects in-game, spawns, traveling and many other useful functions for shard admins and GMs.
- vSCP - vSCP is the most complete and up-to-date syntax editor for sphere scripting. It does contain syntax highlighting, autocomplete, folding markers to specify blocks of code that can expand or collapse, bookmarks, autoindent, find/replace/gotoline, help guide for all the sphere elements added to your code, and more!
- vServerLauncher - Install and run the latest build of sphereserver in a few clicks with vServerLauncher. It's pretty quick and simple!
- SphereService - Relaunch SphereSvr.exe everytime it closes/crashes. Automatically runs at windows startup and works in a silent mode minimized to Tray.
- vCrypter - Type the client version and the tool will calculate the correct UO login keys for classic or enhanced clients.
Here are the chapters of Taran's original compendium, updated for Sphere56b:
- Chapter 1 (Numbers, DEFNAME, ITEMDEF, CHARDEF)
- Chapter 2 (Sphere files explained)
- Chapter 3 (Scripting NPC's and items, Cool commands)
- Chapter 4 (Objects, operators, speech)
- Chapter 5 (Tags, Vars, Locals, Functions)
- Chapter 6 (LINKs, TIMERs, TARGETs)
- Chapter 7 (Loops and powerful functions)
- Chapter 8 (SKILLMENUs, MENUs, Gumps)
- Chapter 9 (Events)
- Chapter 10 (String Handling)
Advanced Tutorials (Extra Content)
In addition to these there are some more advanced tutorials that have been contributed by other members. Once you have read the above 10 tutorials you may wish to read these to learn more:
- Common Mistakes Explained (A revision of Maximus's tutorial on the forums, and continuation of Taran's Misconceptions tutorial)
- Internet and Sphere (And how to make the right use of them)
- Languages Tutorial (How to script your own language system)
- Making your own Skills (How to make and customize your skill)
- Nazghul's Mul Patching Tutorial external link (A document about mul patching and customizing your server)
- Overriding Hardcoded Commands (How to override hardcoded commands and functions)
- Scheduled Reboot (How to schedule system reboots)
- Using MySQL (How to use MySQL)
- Bitwise Operations (how to work with flags)
- Armor Calculation
- Client Changes
- Common Scripting Misconceptions
- Custom Object Properties
- Error Codes
- Experience System
- How Combat Works
- Occam's Razor
- Optimization Theory
- Override TAGs
- Revisions Changelog
- Skill Gain Theory
- The Process of Scripting
- Building Component Reference
Special thanks to:
Tracker, for writing the Sphere 56 Tracking Changes in Sphereserver.net
Ben, Khaos, Ranxerox, Shiryux, Furio, Radiant, Vjaka, Nazghul-ll, Ellessar, Torfo, Shadow Dragon and MrSugarCube for continuing to develop Sphere into a powerful and very customizable Ultima Online emulator.