UFO-Scripts

From UFO:AI
(Redirected from Scripts)
Jump to navigation Jump to search

General

The ufo script files can all be found in base/ufos (see Directory tree). These files include the menu definitions, weapon definitions and a lot more. You might first have to extract the pk3 files in base

Make sure, that you looked into the coding guidelines before submitting patches.

You can also use comments here:

// this is a comment for one line
/* this is
   a comment
   over
   several lines */

Scriptfiles

Available commands

You can get a command list by typing

cmdlist

in the game console. There are some commands that are only available after starting a single player game.

Available cvars

You can get a cvar list by typing

cvarlist

in the game console.

Offline viewing

You can view a command list or cvar list outside of the game by using the

logfile 1

command prior to using the cmdlist or cvarlist command, if it's not already in your console log file. This will have the list placed into the log file which can then be viewed directly after you exit the game and prior to running the game again. Keep in mind that you may have to clean this output up. Replacing the date and time with an empty string should do the trick quite well. You should be able to use a simple text editor like notepad for this task. You can find the console log at base/ufoconsole.log.

Adding campaigns

Links