/==============================\ | STAR TREK: KLINGON ACADEMY | | SCRIPTING PACKAGE | | VERSION 1.0 | \==============================/ NOTE: Please enable word wrap on your text editor to read this document. This package is provided as is and is not suppoprted by Interplay Entertainment Corp. Interplay Technical Support will not answer any questions regarding the content or functionality of this product. Table of Contents ================= 1.0 Introduction 2.0 Requirements 3.0 File Descriptions 4.0 Getting Started 5.0 Creating a Script 6.0 Compiling a Script 7.0 Playing a Script 8.0 SOFTWARE USE LIMITATIONS AND LIMITED LICENSE ====================== 1.0 Introduction ====================== This scripting package was provided solely to build customized missions for Star Trek: Klingon Academy. We [the development team] have tried to document as much as the mission building process as possible. But please bear in mind that some of these documents may have errors and that some information may not have been updated. We hope these tools will allow you to make creative missions adding many more hours of enjoyment for the game. ====================== 2.0 Requirements ====================== Before you can begin scripting you will need a few things listed below. 1) Text Editor. Any text editor that uses standard ASCII text will do. 2) preprocessor. The development team used a Watcom compiler to preprocess the scripts. NOTE: If you don't have a preprocessor, it is still possible to make custom KA missions. Although, it might make it more difficult to maintain and debug since the precompiled script is one large file. 3) Script Compiler. This is provided in this package as compile.exe. 4) Star Trek: Klingon Academy Version 1.01. The compiler contains updates for version 1.01. If you are using version 1.00, please update the game before playing any custom missions. ====================== 3.0 File Descriptions ====================== Here is a list of file descriptions included in the package. File Description ------------ ----------------------------- readme.txt This file. legal.txt Legal information regarding script creation, ownership rights, and distribution rights. netscen.lst This file should be put into the folder where the KA.exe file resides. It contains a list of multiplayer script folder names. \Scripts compile.exe This is the KA Script Compiler cw.bat This is the batch file for the script compiler. If you have Watcom, it will preprocess your scripts before passing it to the compiler. cn.bat This is the batch file for the multiplayer script compiler. If you have Watcom, it will preprocess your scripts before passing it to the compiler. ssl.chm This is a help file for the scripting language functions. \k** These folders contain sample scripts. \n*** These folders contain sample multiplayer scripts. \kTemplate This folder contains an empty script template. Missions.txt This file contains the names of the missions that will appear in the Simulator list. \Docs This folder contains all the documents regarding making missions. mdf.doc This is a MS-Word doc used to help in designing a mission. netscen.txt This doc describes how to make a multiplayer script. scriptai.doc This file contains a description of AI commands. sslfunct.txt This file contains a description of script functions. sslquirk.txt This file contains a list of known quirks for the scripting language. \html This folder contains all the html help files included in ssl.chm. ====================== 4.0 Getting Started ====================== Before you begin, it would help to perform the following steps. 1) Read this document thoroughly. 3) Extract the contents of the scripting package recursively to where you installed Klingon Academy: NOTE: Once completed, you should have a "scripts" folder in the Klingon Academy folder. 3) Add Klingon Academy "Scripts" folder to your path. This can be done several ways. You can modify the path statement in your autoexec.bat file or you can just call the set path statement in a DOS prompt. NOTE: Make sure to back up your autoexec.bat file BEFORE making any modifications. Example: set path = %path%;"c:\Program Files\14 Degrees East\Klingon Academy\Scripts" This will ensure that you can launch the compiler from any folder. 4) Verify your preprocessor. Check to see if your preprocessor works BEFORE modifying any scripts. This is very important. Try to compile one of the loose scripts k01, k07 or even k00 before continuing. NOTE: You might need to modify the batch file to use your preprocessor. The current batch file is currently configured to use the Watcom preprocessor. View the batch file (cw.bat) for more details. If your script does not compile, then you might consider getting a different preprocessor or using one of the preprocessed scripts. ====================== 5.0 Creating a Script ====================== You can start by reading the accompanying documentation to understand the various script functions. Please be aware that some of the documents have not been updated and some functions may not work properly in the game or will not compile at all. Upon starting, it might be helpful to modify certain events of existing scripts until you are familiar with the language. For instance, try adding a ship in mission 1 that warps in after the monitoring station has been destroyed. Or try to add a new objective that will be completed upon entering Beta Ceti. You can even try to add an allowable system to mission 1. Also, it might help to compile OFTEN. It will help you to determine what changes you have made broke the mission. If you are new to the scripts, do not remove the commented out lines in the existing scripts as some of them are there to give you hints on where certain actions go. There are two ways to begin creating scripts. a. If you have a C or C++ preprocessor application, you can use standard preprocessor directives such as #include and #define. This allows you to create more modular scripts rather than have your entire script contained within a single file. This means that you may also create library files that are #included into other scripts to ease maintenance. b. If you do not have a C or C++ preprocessor application, you will have to create your entire script in one file. To view a sample preprocessed file, go to the k01 mission folder and open the k01x.ssl file in a text editor. ====================== 6.0 Compiling a Script ====================== There are two ways to compile scripts. a. If you have a C or C++ preprocessor application, you can use the batch files (cw.bat and cn.bat) to compile the single and multiplayer scripts. Usage: cw k01 k01x Where k01 is the name of the main *.ssl file for the script. If successful, the batch file will generate both a preprocessed file (*x.ssl) and a compiled file (*x.int). Copy the *x.int file into the Klingon Academy Scripts folder. For multiplayer scripts, two files are needed. A *info.ssl file as well as a *.ssl file. The *info file describes the basic parameters to be used in the multiplayer setup screen before the game is started. The *.ssl file is the actual file that runs the game. Usage: cn n120 n120 Where n120 is the name of the main *.ssl file. The *info.ssl must have the same preceding name as the main *.ssl file. If successful, the batch file will generate four files - preprocessed files (*.ssw and *info.ssw) and compiled files (*.int and *info.int). Do NOT copy the *.int and *info.int files into the Scripts folder. Leave them in their n*** folders within the Scripts folder. b. If you do not have a preprocessor, your entire script must be contained within a single file. You will have to use the compiler directly instead of through the provided batch files. You may choose to write your own batch files to ease compilation. The compiler requires an input filename (i.e. k01x.ssl). It will make an int file using the same name as the input file (i.e. k01x.int). Usage: compile k01x.ssl Where k01x.ssl is the name of the preprocessed script file. For multiplayer scripts, repeat this for both the *.ssl file and the *info.ssl file. Do NOT copy the *.int and *info.int files into the Scripts folder. Leave them in their n*** folders within the Scripts folder. NOTE: For the existing multiplayer scripts in the game, they were compiled with an additional preprocessor option /DN*** where *** is the 3 digit numeric index denoting the folder for the script. This was done so that only one script was needed to create death match scripts for all the terrain types using a #define. See n101Init.ssi for more details. NOTE: Your input filenames should not be longer than 8 characters (e.g. jupiterx.ssl). ====================== 7.0 Playing a Script ====================== 1) Copy your new scripts (*.int) into the "Scripts" folder. For multiplayer scripts, do NOT copy the *.int and *info.int files into the Scripts folder. Leave them in their n*** folders within the Scripts folder. 2) For single player, edit the Mission.txt file in the scripts folder and insert an entry for your script.The mission.txt file contains all the single player mission names for the game. To add your mission to the list, you will need to use the following format. [filename.int]:[Mission Description] The filename is the newly created script with the int extension. The mission description is the text description that will be displayed in the "Simulator" list. 3) For multiplayer, you will need to edit the netscen.lst file in the Klingon Academy root folder. Add the name of the folder containing your multiplayer *.int and *info.int files in the first line of the file, keeping a space between names. n101 n102 ... n120 You will have to exit the game or go to the main menu to reload this file to refresh the multiplayer setup screen. ================================================ 8.0 SOFTWARE USE LIMITATIONS AND LIMITED LICENSE ================================================ This Star Trek: Klingon Academy Mission Scripting Package (the "Software") is intended solely for your personal noncommercial home entertainment use. You may not decompile, reverse engineer, or disassemble the Software. Interplay Entertainment Corp. and Paramount Pictures retain all rights and title in the Software including all intellectual property rights embodied therein and derivatives thereof. The Software, including, without limitation, all code, data structures, characters, images, sounds, text, screens, game play, derivative works and all other elements of the Software may not be copied, resold, rented, leased, distributed (electronically or otherwise), used on pay-per-play, coin-op or other for-charge basis, or for any commercial purpose. Any permissions granted herein are provided on a temporary basis and can be withdrawn by Interplay Entertainment Corp. at any time. All rights not expressly granted are reserved. You are granted a revocable, nonassignable limited license to create new levels to Star Trek: Klingon Academy using the Software (the "Levels") solely for your own personal noncommercial home entertainment use. You may provide public access to the Levels you create [by posting them on a Web page with all notices and restrictions intact, provided that you shall not be permitted to use the Levels or allow any other party (except Interplay Entertainment Corp. and its authorized licensees) to use any Levels for any commercial purpose. The Levels may not be copied (except as provided below), resold, rented, leased, distributed (electronically or otherwise), used on pay-per-play, coin-op or other for-charge basis, or for any commercial purpose. You may make copies of the Levels for your personal noncommercial home entertainment use and to give to friends and acquaintances on a no cost noncommercial basis. This limited right to copy or provide public access to the Levels expressly excludes any copying, access or distribution of the Levels on a commercial basis, including, without limitation, bundling the Levels with any other product or service, providing access to or facilitating the access to the Levels on a commercial network or online service and any give away of the Levels in connection with another product or service. Any permissions granted herein are provided on a temporary basis and can be withdrawn by Interplay Entertainment Corp. at any time. All rights not expressly granted are reserved. All Levels shall be owned exclusively by Interplay Entertainment Corp. and subject to the exclusive license of Interplay Entertainment Corp. As a material term and condition to your being granted this limited right to use the Software to create Levels to Star Trek: Klingon Academy (i) you hereby relinquish, release and assign any and all rights in and title to any Levels to Interplay Entertainment Corp, (ii) you further agree to assist Interplay Entertainment Corp. in formalizing their rights to any Levels, including executing documentation evidencing your relinquishment of such rights, (iii) you grant to Interplay Entertainment Corp. a limited power of attorney to sign on your behalf any documents required to effectuate your release and assignment of rights to any Level and (iv) you agree that Interplay Entertainment Corp. may, in its sole discretion, use any or all of the Levels, or any portion thereof, for any purpose, including, without limitation, use in subsequent versions of Star Trek: Klingon Academy, in compilations of Star Trek: Klingon Academy levels, and in advertising and promotions without any compensation to you.