The Script

OK, I said this wasn’t a scripting tutorial, and it isn’t. However, you may remember we need to have the journal update when you pick up Madera’s Vagaries of Magicka from the floor of the Ald-Ruhn Mages Guild. This requires a very short, simple script to be attached to the book. Here’s how we do it.

  1. 1. Click the little pencil icon on the toolbar in the CS. It looks like this: This will bring up the Script Editor window. In the Script pull-down menu, select New, and a blank white screen will appear. I know, nothing is more imposing than a blank screen awaiting a script, especially for a newbie scripter!

Contents
1. Introduction and Background
2. General Quest-Creation Tips
3. The Sample Quest
3.a. Adding the NPC
3.b. Adding the Book
3.c. The Dialogue Window
3.c.i. Journal Entries
3.c.ii. Greetings
3.c.iii. Topics

3.d. The Script
4. Testing Your Mod
5. Additional Tweaks
6. What Tribunal Added
7. Final Notes
8. Glossary and Links

  1. 2. Here’s a screenshot of what you should type in. Make sure everything is spelled correctly! I included comments for every line that explains what the script is doing at that moment. You don’t have to type in anything that is to the right of a semi-colon (;) since those are just comments and have no effect on the execution of the script:


3. All you have to do is save this, either by clicking the disk icon at the top of the window, or selecting save from the Script menu. When you save it, the script will automatically compile. If there’s an error, the CS will tell you and the script will NOT save, but this is only for syntax. If there’s a logic error in your script, you won’t find out until you test it in-game. For example, if I left out the line that says “activate”, the script would compile and save just fine, but when I try to pick up the book in the game, the journal will update, but the book won’t open…it will just sit there and there would be no way for me to take it. The script will automatically be saved as “sd_MaderaBook”, the title from the first line of the script.

4. Now we need to attach this script to our special book. Find the ID of the book in the Object window under the Book tab and double click it. In the Drop-down box labeled “Script”, type in the first few letters of the script’s name and it should come up. If you want to double-check if it’s the right one, click the little button with three dots on it, and the script edit window should open with your script in it. Click Save.

5. Now all we have to do is place the book. I put mine under the bed in one of the upstairs “guest rooms” of the Ald’Ruhn Mages Guild.

6. Save your mod.

Guess what? It’s time to test!

Back to Topics, pg. 3

On to Testing