Intoduction

MTA Script Editor is a tool for Lua scripters. What we are aiming for is to speed up process of developing resources. We thought that process of creating new resources and testing them is, let's be honest... a pain in the ass. Management of the resources is a bit annoying sometimes. For instance, if you want to add a new script file to your resource you have to create it and add path to it into meta.xml, it happens that you forget about adding the file to meta.xml and you end up being surprised that your script didn't work at all. We wanted to do something that would speed this up so you could add a new file within a few seconds. If you use custom sounds, you can preview them within Script Editor just by double-clicking it in the resource explorer. We are aiming for something that reminds Visual Studio IDE.

Things the tool offers

We have been working on this tool for long but we had a long break due to lack of time and now I'm the only one working on this because education is more important than "having nice time". Even though I'm working alone we are progressing smoothly. Currently we have implemented the followings:

Loading resources

Easy resource management

Preview sound files

Preview image files

Lua and XML syntax highlighting

On-the-fly Lua syntax checker

New resource wizard - allows you to create new resource with a few clicks

Switching between resources

C#'s #region-like grouping code - useful when working in teams and to keep the code clean

Start/stop server and client

Join your local server with 1 click

Switch between game and Script Editor with only one key on the keyboard

Screenshots

Main window - overall look of the application. On the right you can see a list of MTA functions. You can choose what functions you want to be displayed by changing item in the combo box above it. Are you going to ask what this "silly table" at the bottom of the window is doing? I knew it... It's the syntax checker. As you script the syntax is checked by Lua engine and outputs any errors you've made in the script. It speed up progress because you don't have to go into game and restart the resource to check if you fixed the syntax error. I made a little error on line 1 to show you how it looks:

Suggested functions - a "window" similar to the one in Visual Studio showing a list of functions. It also shows a tooltip telling you what the function does and its parameters. It also contains all exported functions from every resource. You can add a 3 new attributes to your exported function tag in meta.xml to let Script Editor display descriptive tooltip, like on the screenshot:

retval: return type (eg. bool, marker, int, etc.)

params: list of parameters

description: short description of the function[/list]

(screenshot show an example of exported function that in meta.xml looks like the following:)

Exported functions - you can view all exported functions from every resource

Overview

As you can see we want to simplify resource development and it seems to look pretty nice but we are still in development. There are some good key features that would attract you as a scripter. While we are still in development we wanted to ask you what you think about this tool and what would you like to see included in the release (do not ask when! we do not know when). Any suggestions? You're welcome to suggest some features and if possible we will do our best to implement it.

Requirements

To run this application you need to have .NET 2.0 Framework installed.

You should be able to run it on Windows XP and Vista. Never tested on Windows 7.

You must have both MTA Client and Server installed.

Download

To download the tool go to our thread on MTA forum HERE. That thread is updated frequently.

FAQ

Error/Warning messages at startup

File name: 'irrKlang.NET2.0, Version=1.1.3.0, Culture=neutral, PublicKeyToken=a854741bd80517c7' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

This message appears most likely for Windows XP/Vista 64bit users. It may occur on 32bit OS if that machine doesn't have .NET 2.0 SP1 installed.

There is only 1 known way to solve the problem...: Make sure you have .NET 2.0 SP1 installed, if you don't have it you can download it from Microsoft Download Center.

Error parsing meta.xml

The reason why this window comes up should be explained in the message. It's most likely that your meta.xml has the following XML declarations:

To solve the problem, simply open the file in WordPad or Notepad (Notepad++ may not solve the problem so use the Windows one), remove that line and save the changes.

.NET 2.0 XML parser doesn't like not "well-formed" XML files, so you may get different messages with different meta.xml files.

Not able to save file

If you can't seem to be able to save a file that's probably because you created a new file and the file wasn't added to any resource. This is a bug and will be fixed.

Problem with horizontal scrollbar

If you have too long line and you paste some code on it, you may get a problem of not being able to scroll to the left (beginning of the line). This is problem with 3rd party library MTA:SE is using. It is not going to be fixed by its author (he's inactive for over 2 years now) and it's hard for us to find what is causing it.
If you encounter this problem there are a few ways to get to the beginning of the line.

start highlighting this line so that caret moves to the left

press Home key on your keyboard to move caret to the first character on a line

Contact

We have an IRC channel on GTANet.com network which you can join, ask questions or even give suggestions. The channel name is #mtatools. You can also find us on MTA forum