Copyright (C) 2006 Mancuso
Raffaele
Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.2 or any later version
published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GNU Free
Documentation License version 1.2 here
ARES' SCRIPT GUIDE
Index
1. Introduction (what is scripting?)
2. Script engine and its documentation
3. Ares’ functions and classes
Appendix A: This guide license
1. Introduction
(what is scripting?)
A
script can modify some parameters of the game also if you aren’t a programmer.
For example with scripting you can modify the dimension of the specular
hightlights effect, the speed of the weapon and the position and rotation of
weapons\enemies. The difference between script and .aresm2 files is .aresm2
files describe levels, with walls, enemies, exc… With scripts you can modify
others parameters don’t modifiable trough .aresm2 files (specular hightlights
effect, weapon’s speed) and also some parameters modifiable trough .aresm2
files (enemies rotation on y axis. Rotation on z and x axis is modifiable by
scripts and don’t modifiable by .aresm2 files). But if you build a script that
change the rotation on y axis of all enemies, Ares executes that script always,
independent from the level loaded. The folder contains the scripts is
ares\scripts.
2. Script engine and
its documentation
Ares
use LUA as script engine. You can download it from LUA
web site . In your scripts you can use all functions and others thing that
LUA offers for default and some LUA additional libraries. Ares loads these LUA
libraries (in brackets the name of the library):
-basic
library (base)
-string
manipulation (string)
-table
manipulation (table)
-mathematical
functions (sin, log, etc.) (math)
-debug
facilities (debug)
So you can use the functions provides by the
libraries above.
Ares
DOESN’T LOAD these libraries:
-input
and output (can read\write into files)
-operating
system facilities (can send a command at the system)
-package
library (can load external modules)
Ares
doesn't load these libraries to avoid the risk of dangerous scripts. For
example if Ares load input and output library someone can write a script which format
your computer. So you can’t use the functions provides by the libraries above.
To
write your script is necessary you know LUA syntax, so you must read LUA
documentation. You can find LUA documentation at LUA web site, linked above.
3. Ares’ functions and classes
To read Ares functions and classes full
documentation, click here (NO DOWNLOAD REQUIRE, simply click on open) or open the file
“script_funcs&classes_doc.chm” in this folder
Appendix A: This guide license
You
can find a copy of the FDL here