ETScript version 0.5 ready! With AutoComplete feature!


(Flippy) #1

Yes, another version of ETScript is ready for download!

This time, version 0.5 features a very nice AutoComplete feature that is the ultimate help to your script writing.
It also fixed a few annoying bugs, and lastly I added a small GoTo ScriptBlock feature that makes the program jump to the scriptblock of your wish.

Also, there is (very limited) support for an “Open With…” feature now. Rightclick a .script file and select ETScript.exe in the Open With dialog to directly open the script file.
NOTE that this is still in very early stages and might not work properly.

Downloads:
http://rapidshare.com/files/45035940/ETScript_v05.zip.html
http://www.megaupload.com/?d=LVV4FRYR

Screenshot: (AutoComplete in action)

Readme:

ETScript	-	V 0.5
--------

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

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


1. ABOUT
2. FEATURES
3. KNOWN BUGS
4. BUGFIXES
5. TO DO
6. CREDITS
7. 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.dat".
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:


NEW IN V0.5!!
-------------

- AutoComplete function.
	Type a part of a keyword and the program will automatically finish it for you.
	Additionally, a listbox will show up showing you any other possible keywords.
	This feature will help you write the script greatly since you cannot possibly make any typo's anymore!

- GoTo ScriptBlock function.
	Enter the name of the scriptblock you want to find and hit OK. The program will
	take you to that scriptblock, if it exists.



Old 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.

- Ability to change font.

- Automatic tab-indenting. 
	The program remembers the number of tabs on the previous line when
  	you press enter and adds that number of tabs. So you don't need to
	press tab everytime after a linebreak!

- Automatic { block indent.
	When you type an opening bracket ( { ) the program also adds a linebreak
	and an extra tab.

- If you want to type brackets without the linebreak and tab effects, you can use
	[ and ] to type { and }.

- Comment Block and Uncomment Block features.
	Select a few lines of text and comment them out with a click of a button!

- New Options screen with more options and a new layout.

- Nice looking toolbar with most tools at the ready.

- Bracket count function. Counts the difference between opening and closing brackets.
	So far, this feature works perfectly but it does not always give an accurate
	read. Any brackets in a commented out line or in a wm_announce text for example
	will be counted aswell.

- Save to Preset function.
	Saves the current script text to the preset.txt file.
	Note that there is no backup. You cannot go back to the default preset unless
	you recreate it yourself.


- TreeView with the complete scripting reference from Chruker's website.
    	Select any script command and see it's usage and description.
	Doubleclick any command and it will insert itself into the script, at the
	last cursor position.
	Unfortunately, I didn't have the time to include ALL commands yet. Only
	about 1/3 of the commands are currently there. It will include all commands 
	in the next release.
	You can hide or unhide the treeview with Ctrl+T or via the View menu.

	A script reference editor is also included, which allows you to easily view all commands
	as well as edit their descriptions.

- Standard notepad functions:
	Cut, Copy, Paste, Select All, Find, Replace, and GoTo.
	There is also an option to insert the current Date and Mapname (only if you have a map loaded).

- Entity import!
	When loading a script file from a map of which the .map file is available, the entities scriptnames
  	and targetnames are extracted and listed in a treeview. Doubleclicking a script or targetname will add it 
  	to the script.

- Updated 'Automatic { block indent' function. The program now automatically adds:
	{
		//<-- tab
	}
  when you type a { character. Bugs in this function have been fixed.

- Globalaccum list function.
	All globalaccums used throughout the script are listed so you can see instantly which ones are still free.



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


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. BugFixes
===========

Lots of bugs from v0.2 fixed!

*Cannot find picture bugs
*Some major speedlag fixed
*Some minor bugs fixed


Some more bugs from v0.3 fixed:

*Automatic block indenting ({ }) function bug fixed.
*W:ET Directory choice not transfering to the Open File dialog - fixed.


Bugs from v0.4(1) fixed:

*Black option buttons fixed (hopefully)
*Searching Up finally works properly
*Vista-style doesn't require XP-SP2 compatibility mode anymore


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


5. 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.


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


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


6. Credits
==========

I would like to thank Chruker, for his complete scripting reference:
http://games.chruker.dk/enemy_territory/scripting_reference.php



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



Many thanks also goes out to the XTremeVBTalk forum:
http://www.xtremevbtalk.com/

And the VBForums:
http://www.vbforums.com/

For helping me with this project.



And last but certainly not least, I would like to thank FreeVBCode, for the
Syntax Highlighting Textbox control, that is ofcourse the heart of this program:
http://www.freevbcode.com/ShowCode.Asp?ID=8548

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


7. 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!

Enjoy!


(Pytox) #2

Awesome stuff, this makes scripting more fun :slight_smile:


(broloi) #3

Yea. It does… Good to see you doing what Roltje stopped :wink:


(-SSF-Sage) #4

Excellent work! This is becoming a very handy tool for scripts. I might start using only this one. :slight_smile: Good luck with this project, i’m looking forward to it.


(murka) #5

downloading now, looking for more bugs :slight_smile:


(-SSF-Sage) #6

Don’t look for the bad things, look for the good ones… :evil:


(Flippy) #7

Please do look for bugs! The more you find, the more I can fix! And as the maker of this program, I won’t find all the bugs because I’ll only look where I think there could be bugs…


(murka) #8

yep, those black boxes are fixed now.


(Flippy) #9

Great! It turned out to be a bug with VisualBasic 6 + XP-style so I was almost thinking there would be no fix for it, but there was a simple workaround that appears to work fine. :slight_smile: Glad you told me, as I have no way of testing it.


([Cerberus]) #10

Cant wait to use it.


(-SSF-Sage) #11

Ok, I installed it from the exe, everything is fine installer runs perfectly etc. When im trying to launch etscript: Firstly the windows is trying to configure it. Then it tries to use some internet resources (not saying which and why…). Then it says

"Error 1706 No valid source could be found for product etscript. The windows installer cant continue".

So in other words it is trying to search for etscript.msi! And this spam comes again and more when you are closing it. So I have to hold alt f4 for a few seconds to make this spam stop. :frowning: Why couldn’t you use the same old installer type. Or then tweak this exe a lot… :S

Edit. now I was able to get it open after a lot alt+f4. At last it opened the program. Still something has to be done for this bug. Same goes after each time you start the program.

Edit2 This exe does seem to need to find the etscript.msi (THE OLD INSTALLER format) from the etscripts folder to launch without problems. I’m trying to find more about this bug.

Edit3 If I close this windows’ configuration popup 3-4 times before it runs the whole thing, I am able to open the program. :S

Found some more bugs:

The autocomplete stucks to the old point if you point to a another place with your mouse to change the typing point (or use the arrows aswell) and doesn’t disappear even if you start typing to a different place. When you press space or tab etc in the other or in any place, it disappears.


(kamikazee) #12

If you are creating an installer with the MS tools, you must release the MSI file like {SSF}Sage said. The .exe file is just for those who haven’t got the Microsoft Installer or those who don’t like to double-click on .msi files for some reason.


(Flippy) #13

I don’t know why you are getting problems with the new installer.

You might need to de-install the old version first?

The reason it is now a .exe is because Im now using a completely different install-maker program. The old one didn’t allow for some features of the autocomplete function.

About the bugs in the autocomplete:
Thanks for pointing those out. I will work on it!


(DC9) #14

Hey Flippy.

You’re really moving along with this project. The options and functions you are adding in are great. I like the new install myself. The download zip is almost one-tenth the size of the previous installs. To install I remove the previous installed version, make sure all of the files have been removed, and use the “run” command to execute the new install package without any issues.

I have come across a few bugs though (I am using an XP environment in case that has some influence on the operation of the program).

  1. When I open the program the first time, I go to the options and change the path for the maps files to my development environment. I apply the change and close the program. The setting saves fine and when I look in the .dat file I see the path. When I run the program though, it doesn’t seem to capture the scriptnames/targetnames from the map file.
    EDIT: I re-tested issue #1 above with a script that does not get the error message I indicated in #2 and the scriptnames/targetnames are being read from the map - Excellent.

  2. When I open some scripts files, the file is opened and I get the message “Error - This file can not be read. It is probably not a text based file.” This is a perfect message for the runtime error that I reported before and the program no longer crashes (which is excellent!). The issue is that it is a text file that is being opened. This doesn’t happen to all script files, but consistently happens to some specific ones. I will see if I can find the difference between the ones that work correctly and those that do not.

  3. I use a particular method for identifying comments in my scripts. It has the following format: // ***** comments or messages *****
    The bug I found is that when I add a space character and then press the <SHIFT> <8> keys to get the * character, the program throws an exception “ETScript - Run-time error ‘5’: Invalid procedure call or argument” causing the program to crash. It only seems to happen when I use the <SHIFT> <8> key combination after a space. I’ve tested other key combinations and they seem to be fine.

  4. The program doesn’t scroll to the very end of the file for scripts that are more than one page. It seems that the last 2 1/2 lines are not displayed. If I stretch the window down I can see the remainder of the script, however when I scroll up and then go back down to the end, the last 2 lines are hidden again. I think this has something to do with #2 above since I don’t have this problem when I open a script that doesn’t get the message. It may be that the end-of-file is not being recognized on some files.
    EDIT - I have re-tested issue #4 and I can no longer re-create it. :roll: So #2 and #3 are repeatable bugs.

Cheers,


(Flippy) #15

Thanks DC9!

With error 2, what happens exactly? The script opens AND it displays the error message? But it still opens?
Well I don’t really know how to fix this… It gives this message on ALL errors that occur during loading of a file, so even if it’s a different problem it will still give this message… I’ll try to work on that but I don’t know if I can trap the right error…

Error 3 is fixed, thanks for notifying!


(DC9) #16

Issue #2: the script does open and then the error message appears. This is repeatable with the specific files. I will continue looking at the differences between the files that get the error message and the files that don’t. Since it does open the script file and then throws the error, it may be related to the map files. I’ll let you know what I find.


(Flippy) #17

Could you send me or show me the specific files you mean, both a file that has this problem and a file that does not have this problem? I might be able to see something you don’t since I know what the program looks for.

Also, if anyone has any suggestions as to what I should add to this program, feel free to tell me!


(DC9) #18

I have posted a zip file for you to download with examples.

http://webzoom.freewebs.com/sts103_designs/ET%20Script/ETScript%20test%20files.ZIP

From the testing I’ve done, the issue does not seem to be with the script files themselves. I have taken one of the bad scripts and completely commented out ever thing but the generic game manger lines and the issue still exists.


(-SSF-Sage) #19

I did deinstall the old version. I have xp sp2 so I don’t think it’s that. However installing was no problem and the installer ran as it should. But when I tried to launch the prog it start executing/pointing/looking for the etscript.msi, but couldn’t find it. As I told you. I did install it just like everything else etc. I’m really looking for a new version since this doesn’t seems to work for me as it should. No probs with the earlier versions…


(Flippy) #20

Maybe try updating the windows installer to the latest version? Search for Windows Installer on microsoft.com. I believe it’s version 3.1 now…

Other than that I don’t know :frowning:

I could give you version 0.5 with the old installer, but you would not be able to use the autocomplete feature properly as for some reason it won’t work properly with the old installer…