Difference between revisions of "UFO-Scripts"

From UFO:AI
(Scriptfiles)
 
(Scriptfiles)
Line 35: Line 35:
 
* [[UFO-Scripts/seq_*.ufo|sequence definitions]]
 
* [[UFO-Scripts/seq_*.ufo|sequence definitions]]
 
* [[UFO-Scripts/skins.ufo|character skin definitions]]
 
* [[UFO-Scripts/skins.ufo|character skin definitions]]
 +
* [[UFO-Scripts/staticcampaign.ufo|static campaign]]
 
* [[UFO-Scripts/team_*.ufo|team definitions]]
 
* [[UFO-Scripts/team_*.ufo|team definitions]]
 
* [[Tip_of_the_Day|tip of the day]]
 
* [[Tip_of_the_Day|tip of the day]]

Revision as of 13:00, 6 December 2012

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.

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