Scripting basics

From Soldat Community Wiki
Jump to: navigation, search

Story of Soldat Script Core

The Soldat Server Scripting Core was programmed by EnEsCe to help other users creating scripts for their server. It use the Pascal coding language with Events, Functions and Variables. You can find list of this coding part here.

Quick look at Pascal language

In quick glance, Pascal is quite useful and easy to manage compared to eg. C and C++ languages. Its use words (e.g. begin-end, if-or) instead of symbols ({-}) used in C/C++ so its easier to read. For basic script its doesn't need much work, most of text you can copy/paste, and its have very clear structure:


Another big plus of Pascal is its speed. Pascal compiler is lightning-fast and well-suited for teaching programming, you can do more in small time frame. Also there is less overhead and fewer ways for a new users to crash program. So as a first program language, Pascal its probably best choose. Even when world is filled with C++ and Java languages, Pascal, in his simplicity, is still one of the best programing language: Powerful and easy to handle.

Tools for Writing a Scripts

Probably you expected that you need lost of programs and good PC to write Scripts for soldat, but don't worry, all you need is... Notepad.

Yes. To write Scripts for Soldat you need just simple text editor that you can find in your system.

But to help you, and improve your work, we recommend downloading Notepad++ just click here to get latest version.

Also to improve your work, we recommend downloading this file

Download it and put in your Notepad++ folder in ..\plugins\APIs

eg. C:\Program Files\Notepad++\plugins\APIs

And after you start program just select in Language Tab: P->Pascal

What this Small Plugin do, you can see here

BEFORE:Notepad plusplus 01.jpg AFTER:Notepad plusplus 02.jpg

Its massively improve your work, its color all important parts of script and you can hide/show selected part of script(small + icons on the left)

Online Pascal Tutorials

If you are interested in writing script for Soldat you should check few sites before you start messing with any Functions and Procedures :]

Note: Some tutorials may have references to functions that do not exist in the scripting core.

Soldat Scripting Tutorials

Our Soldat Community have prepared few easy tutorials for beginners, that should prepare you to write your first scripts for Soldat.
But don't worry. If you encounter any problem you can ask for help in our Forum in Scripting Discussions and Help section.