ETScript - Updated! v0.1 released


(Flippy) #1

ETScript version 0.1
released!

Download: http://rapidshare.com/files/33947075/ETScript.zip.html

Readme:

ETScript
--------

Made by Nick Thissen	aka Flippy	aka reT!reD.Nick
[email]r0fnick@gmail.com[/email]

============



1. ABOUT
2. FEATURES
3. KNOWN BUGS
4. TO DO
5. CREDITS
6. BUG REPORT


============





1. About
========

This program will help you writing script files for
Wolfenstein Enemy Territory maps.
It features a few handy things that will make your
scripting life easier!

This program is made in Visual Basic 6, in Windows Vista.
Tested to run in both Windows XP and Windows Vista.


In the Options menu, you can specify the path to your
Enemy Territory folder. Click the Browse button and select
any file inside the folder that contains your script files
(usually etmain\maps).
If you specify this, the Open and Save dialog boxes will
default to that location.
By default, this is set to:
"C:\Program Files\Wolfenstein - Enemy Territory\etmain\maps"


Any options you set get stored in the file "options.cfg".
Please do not edit this file if you don't know what you're doing.
The line numbers for each option are hardcoded into the program.
IF you must edit this file, be sure to keep every setting on the same line!

---------------------------------------------------------------------------------


2. Features
===========

Currently, the program features:

- Notepad-like script editor:
	Open and save in the .script filetype by default, never worry about
	the wrong filetype again!

- Syntax Highlighting:
	Special scriptcommands are colored, so you can easily see what you're
	doing!

- Customizable Preset:
	If checked in the Options menu, the program will load a game_manager
	preset when you open a new file.
	You can customize the preset by simply editing the "preset.txt" file.

---------------------------------------------------------------------------------


3. Known Bugs
=============

- Not really a bug, but when loading a very large script file, it can take a few
seconds to load the syntax highlighting. Please have patience for this, I will
try to make it faster in the future.



---------------------------------------------------------------------------------


4. To do
========

In the future I'm planning to add a few very cool features.
I don't promise anything, I don't know if I can pull it off.

- Search/Replace function (except this soon)

- IntelliSense:
	A form of auto-completion that will show you a popup with available commands
	for the part of a command you typed.
	Example, type "abor", and a popup will show, saying "abort_if_equal, abort_if_not_equal, etc..."

- ToolTips:
	A tip popup that will tell you exactly what the command you typed
	does, and how you need to use it.

- Automatic indentation / tabbing

- Scripting reference import

- Scriptname/targetname import from map file



---------------------------------------------------------------------------------


5. Credits
==========

I would like to thank FreeVBcode for their Syntax Highlighting Textbox control:
http://www.freevbcode.com/ShowCode.Asp?ID=8548

I would also like to thank Roeltje for his original idea (MasterScript), which
unfortunately never got finished.

---------------------------------------------------------------------------------


6. Bug Report
=============

Please report any bugs you find to the corresponding thread in the
SplashDamage forums, or email me: [email]r0fnick@gmail.com[/email]
Thanks in advance for your cooperation!

Original post:


(Violator) #2

Thats weird because I was thinking of trying to hack notepad2 (free notepad-like text editor http://www.flos-freeware.ch/notepad2.html) to support ET script highlighting but it seems that the languages it supports are hard coded :frowning: Having ‘.script’ files open like c does a pretty good job though.

It might be possible to do a plugin for VS.NET 2005 (which already has the ‘smart tab’ option you described) to support the highlighting as well… and make use of intellisense/intellifish to give hints/autocomplete

I’m a c# coder by trade but have done VB6 in the past (a little rusty though)

In the dim and distant past I used to use Zap (http://zap.tartarus.org/) on my Acorn RISC PC which was probably the best text editor I’ve ever used - you could completely scheme/highlight up any language.


(nUllSkillZ) #3

Nice effort.


(Flippy) #4

I also thought of trying to make a mod for VS 2005, as it does basically everythnig I want… but yeah… for one, I have no idea how to do that, and I want to make a program that anyone can use, since I dont think many people will have VS 2005.


(C) #5

Way to go Flippy…

I always get a hard time working with pointers in VB. The language just isn’t that low-level as i often want it to be. (I only know/use VS6…and i use it very infrequently).
My native language is Delphi, and it is not hard to create your own components/controls. One can derive from an existing control to extend its functionality (for example to create syntax highlighting… or whatever).

It may be an idea to develop Your own ActiveX-control. (maybe develop it in another language than VB when the going gets tough). Programmers could use this ActiveX-control in any other IDE (at least for Windows). An ActiveX-control even fits on a webpage!
With such a control, coding the main program will be much easier as well.
…it is just an idea…

If i would use something different than my good old notepad for creating scripts, i definitely like to see:

  • some kind of “if-then-else” to ET-code converting.
  • a program-flow checker when using triggers with wait-statements.

(Flippy) #6

C,
Thanks for your advice, but I think that will get a bit over my head… :stuck_out_tongue:
I found a nice syntax highlighting textbox control, and Im using that (gave credit ofcourse). It does the job nicely :slight_smile:

About “if-then-else” converting… whew… if anyone could do that it would be worth money ^^
I know I can’t do it… im not going to try :stuck_out_tongue: ET scripting sucks, and it sucks too much for me to try to make it suck less, if that makes sense :stuck_out_tongue:

program flow checker? Don’t understand that…
Do you mean like a debugger?
Also too hard for me…

If you want to help, be my guest :stuck_out_tongue:

First version is on it’s way…


(Flippy) #7

First version, v0.1 ready for download!
It supports only the most basic functions, but I wanted to release something, to motivate me to keep working on it :slight_smile:

Check the first post.


(Violator) #8

Nice 1 - looking good so far 8)
Just a couple of ideas (I know the app’s in early days)-

Have the script load default to <ET DIR>\etmain\maps (no biggie, it seems to remember the last dir you had)

Can you make your popup dialogue boxes centred/centre parent (not a life-critical change ;))

A bit more tricky, when the cursor is over a brace ({) have it and the matching brace go red and/or bold (notepad2 does this for an example).

My 2p’s worth :wink:

Next we’ll want a shader-script version of course :slight_smile:


(DC9) #9

Really neat little tool Flippy. Thank you.

It would be great to have the scriptname/targetname grouped by classname feature.


(RayBan) #10

very handy tool, hope you continue on it.


(Flippy) #11

Thanks for your comments people!

Violator,

The dialog boxes should load to C:\Program FIles\Wolfenstein - Enemy Territory\etmain\maps by default, but I just rechecked it and your right, they dont the first time…
The only do after you set the path in the options, but I just realised that there’s a tiny bug that sets the default path of the dialog boxes first, and only then reads the path specified in the options file… So that’s an easy fix.

Dialog boxes centered… I don’t know actually if I can do this, the dialog boxes are just part of windows, they are just getting called by my program. I will see what I can do.

About the braces, that was an idea aswell.
I also thought about it counting all braces and notifying you if the number of { braces is not equal to the number of }, and maybe even say where.
But that will be a bit more tricky, I will look into that after my final exams (3 days)

HMm a shader script version… I didn’t even think of that, good idea.


(nUllSkillZ) #12

Couldn’t test the program (Win only - but might install wine and try if it runs).
But povray came to my mind.
Actually it’s a ray-tracing program.
But it’s script driven and editor is included.
And source is available.
So may be you can get some ideas from there code.
http://www.povray.org/

Edit:

Much simpler idea.
The W:ET source code has also a parser already that checks the script.


(Kic) #13

Flippy
I cant run this notepad, When I click on Et script.exe . pop up window

  • Component RICHT32.OCX or one of its dependecies not correctly registered: a file is missing or invalid

(Flippy) #14

nullskillz, the ET parses is a good idea! But tbh I have no idea how to use it/ where it is etc… never even looked at ET code before lol…
And yeah it’s windows only, since I don’t know any other OS :stuck_out_tongue:

Kic,
Are you trying this on windows?
You don’t have the RichTextBox component…
I thought that was a common thing to have in windows? I might be wrong though…

Fix:
Download the .OCX file and put it in “%Systemroot%\Windows\System32”
For example, if your windows is installed on the “C:” drive, you put it in “C:\Windows\System32”

If it still doesn’t work you might have to register it like this:
Open the “Run” window (Start - Run, or press WindowsKey + R) and type:

regsvr32 "C:\Windows\System32\RICHTX32.OCX"

And press enter. A message will say that it succeeded (or not ofcourse lol)

But i doubt you have to do that…

By the way… if anyone wants to ‘port’ this over to linux, mac, whatever, feel free to contact me :slight_smile:


(Kic) #15

Thanks Flippy
Yes I have Win XP sp2, maybe some of registry cleaner remove this from my system
I try it

EDIT:/ downloaded this file ( right32.ocx ) and got it work
Who want download this, they can here - use only rightx32.ocx and put it How was saying Flippy in C:/windows/system32 , here is this file http://1-up.retrogames.com/


(C) #16

Flippy:

program flow checker? Don’t understand that…
Do you mean like a debugger?

I mean:
Check if some trigger-code in a scriptblock issues a wait-statement.
If it does, all commands after the line that calls that trigger, will not get executed. (the “gosub” idea is gone, and becomes “goto”-like)
You could syntax-highlight these remaining lines after the call to that trigger, to indicate for code that will never be executed.

example:

SomeScriptname
{
	spawn
	{
		wm_announce "this line will execute"
		trigger self test
		wm_announce "this line will not get executed"
	}

	trigger test
	{
		wait 50
		wm_announce "Hello SplashDamage"
	}
}

The output will be:
this line will execute
Hello SplashDamage

All code after the call to trigger test will not be executed, because of the wait-statement in trigger test.

! A “resetscript” statement acts like a “wait 50” command.


(etconfigs.net) #17

http://etconfigs.net/downloads.php?cat_id=10

FAst easy mirror for public. Top download 8)


(Pytox) #18

Still doesn’t work for me :frowning:


(Flippy) #19

Pytox, are you getting the same error? Or a different error?
Are you using Windows? Which version?


(Pytox) #20

I’m getting the error: “The file C:\Windows\System32\RICHTX32.OCX is not a executable file and there is no registrationhelper registred for this type of file.” I’m using Windows XP SP2 btw.