RDNWiki: DOWScar ...

RDN Wiki Home | Page Index | Recent Changes | Recently Commented | Users | Registration | Login:  Password:  

SCAR Information


What is SCAR?

SCAR is the scripting language for Dawn of War, standing for “Scripting at Relic”.

It is used mainly in the single player missions, but comes 3 file forms:

Each one uses SCAR functions.

SCAR uses the LUA scripting language, which is mearly a basis for what they have changed it to. Several LUA things would make no sense in Dawn of War (such as GUI related functions).

Note that all SCAR files are compiled at run time, and this makes debugging harder (as you have to run the code until it fails and gives a “FATAL SCAR ERROR” and stops the program – see Debugging.

Textpad Syntax File

One way to edit SCAR's plain text files is to use Textpad, and use a syntax file to highlight the code. To do this, firstly download the syntax file: here (you may need to “Save Target As” to download).

Then, place it in your samples directory, which for the latest version 4, is: C:\Program Files\TextPad 4\Samples

Then, once you open textpad, go to the menu Configure -> New Document Class. You can put any name, but “DOW SCAR” will probably to. Class members are: *.nis, *.scar, *.ai. Note: the AI files use a lot of custom functions, and so not as useful for that.

For the next page, you must Enable Syntax Highlighting, and choose the “scar.syn” file from the dropdown box – if you have put it in the right place, that is! Then click Finish.

This document class will appear in the Preferences menu. It is recommended to turn on “Strip Trailing spaces from lines when saving”, just to save some extra space, which would otherwise be wasted unnessissary extra whitespace. You can also modify the colours here, and selecting a different colour (eg: dark red) for Keywords 2, makes some things better distinguished.


Tutorials, advice, and examples of SCAR.

Beginning Scripting – Starter scripting tutorials

These beginner tutorials should be done in step by step, and allows you to build up knowledge of how SCAR works (wether you have coded before or not). It will start with very general things, and build up to the singleplayer SCAR files.

SCAR is a very easy language to use, because Dawn of War doesn't do very many complicated things (the entire scenario is contained within one file!).

Once you have completed the tutorials, you should be able to make singleplayer SCAR files very easily.

These are done by FinalDeath:, and uses expamples from Dawn of War's singleplayer campaign, and some new scripts.

  1. Beginning Tutorial 1 – The Basics?
  2. Beginning Tutorial 2 – Variables?
  3. Beginning Tutorial 3 – Conditionals?
  4. Beginning Tutorial 4 – Squad and Entity Groups?
  5. Beginning Tutorial 5 – Loops?
  6. Beginning Tutorial 6 – Functions and Rules
  7. Beginning Tutorial 7 – Functions that return a variable?
  8. Beginning Tutorial 8 – Players?
  9. Beginning Tutorial 9 – Win Conditions?

Advanced Tutorials – Examples and Advanced code

You can look at these SCAR examples, templates and advanced tutorials for more information.


This section is dedicated to a Primer of these sections of SCAR:

Also see the LUA site documentation for more basics like this.

Functions index

The functions in SCAR, while avalible at ScarDoc, are not editable (and not updated for later patches), and do not include other notes.

Once complete, the Functions section will contain all avalible game functions to use in SCAR scripts, as well as appropriate examples, notes, revisions and updates. Each function will have its own sub-page. The functions page will link to the index and category pages where you can find list of the SCAR functions.


This section explains the world of Cutscenes and Non Interactive Sequences.

  1. NIS Tutorial 1 – The Basics?
  2. NIS Tutorial 2 – Initilising and event?
  3. NIS Tutorial 3 – Working with Actors?
  4. NIS Tutorial 4 – Groups actions?
  5. NIS Tutorial 5 – Clearing up?

Advanced NIS section, for a fuller set of examples and more advanced work.


This is some information on Artificial Intelligence SCAR scripting in Dawn of War.


Wiki Home

End of Page

There is one file on this page. [Display files/form]
There is no comment on this page. [Display comments/form]