• Register

A classic real-time strategy set in the classical antiquity. Build your economy, employ diplomacy and control hundreds of units on large maps and clash in grand battles. Great modding capabilities and multiplayer features allowing you to shape the game the way you want it and share it with other players.

Post news Report RSS Custom Scripts

Custom Scripts are pieces of code attached to maps which will help players in creating rich interactive maps. It enables an infinite variety of "game modes" such as Tower Defense, RPGs, Hero maps and many more.

Posted by on

I've been planning and spinning around ideas on how to implement scripts since last year. This month, I've finally started to make some practical progress. It's now possible to create some basic scripts, or Triggers as they are called in various real-time strategy games such as Warcraft III and Starcraft II.

It's already possible to declare variables, check if statements and call various functions having a direct effect on the game world.

Sample Script

events: UnitDies
if (event.Unit.Team == 1)
var killCounter;
killCounter++;
ShowMessage("You've killed " + killCounter + " enemies", 255, 255, 255);

This is a basic script that I made during implementation. What it does from top to bottom is the following:

#1. Registers an event, UnitDies. This means that this particular code will run whenever an unit dies.

#2. It continues with checking if the unit that just died was on team 1 (the players default team is 0).

#3. Then it registers a variable named killCounter (variables can only register once) and increments it with one.

#4. The last thing it does is the action itself, displaying a message in white color showing the player how many enemy units he/she has killed.

The trigger doing it's work ingame

Editor

The code editor itself currently has no syntax checker, it consists of a plain and simple text editor. In fact, the syntax is not even decided at this point, but I will most likely go for something like C#/Java as that is what I personally enjoy writing in. I also think it would be fairly easy to get into for non-programmers wishing to make some awesome user maps.

Limitless

While I want to make scripts as limitless as they were in the much modded game Warcraft III, it seems like it would take a lot of time to achieve that. Time which perhaps would be better spent elsewhere.

Nonetheless, my next two goals are to make looping and creating custom functions possible. I will also have to spend some time creating the entire library of functions that will be available. Everything from moving the camera, spawning different amounts of units, events such as when an unit enters a specific part of the map or when players enter a message.

Another important part is to make sure it's stable and that it under no circumstances is possible to crash or bug the game as well as giving the modder as much information as possible about occuring errors.

Post comment Comments
elitewolf13
elitewolf13 - - 654 comments

This game amuses me each time more and more

Reply Good karma Bad karma+2 votes
TKAzA
TKAzA - - 3,154 comments

so its possible to effectively make mods for this?

Reply Good karma Bad karma+2 votes
Trigger01 Author
Trigger01 - - 15 comments

Mods as in Custom Maps with custom units, graphics, objects, scripts, yes totally!

Reply Good karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: