Jump to content
Sign in to follow this  
Texx

Cool new sqs-editor

Recommended Posts

Hi,

I have written a cool looking Editor for OFP-SQS-Scripts.

Ok, you may think, what's the special, why should I use is programm instead of (e.g.) 'UltraEdit' or 'Notepad'.

It's because of the limmitations of the original "sqs"-Language. The Programm supports some extension (called xsqs) that allows you to programm on an higher level than ever.

To give you an imagin of what power xsqs gives you, see the example below:

//in xsqs you can write things like this

if(...){ /*do something you want*/ }else{ /*do something else*/ }

which is equivalent with:

?(...): goto "if1"

goto "else1"

#if1

;do something you want

goto "endif1"

#else1

;do something else

#endif1

But that is not all, there are a lot of other Features like "for" or "while". Finally xSQS-Edit gives you a modern Programming editor with codecompleation and contextsensitiv help of all possible sqs-commands. Everything to allow you to programm very fast and effectiv.

An the best is: It is free. Free for non comercial use. (And free for comercial use if you ask me!  wink.gif )

Feel free an take a look at: http://www.contexx.net/xsqs/

greatings, Texx

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Texx @ Oct. 09 2002,15:07)</td></tr><tr><td id="QUOTE">It's because of the limmitations of the original "sqs"-Language. The Programm supports some extension (called xsqs) that allows you to programm on an higher level than ever.<span id='postcolor'>

I belive OFP will offer "if"/"else", "while" and suchlike with the new 1.85 patch (check the feature list in the Flashnews board), so what's the point in inventing your own language extension?

Share this post


Link to post
Share on other sites

It's just because xSQS is a 1/2 jear older than 1.85. And at this time there was no "if/else", and so i decided to write a programm that can do so.

An now I finished it, and give it to public.

You can wait for 1.85 an maybe use what BIS gives you, but, xSQS is still in development too and in my head are some more ideas about features i want to add to sqs/sqs+.

Also there are a lot of more Features that can be very usefull for you. E.g. CodeCompleation, integrated Help, an so on.

Test it, and if you like it feel free to use it, but don't blame me, because of my (hard) work. (remenber xSQS started 1/2 jear ago)

greatings, Texx

PS: Also I must say, that i don't read changelist compleatly until now... I promise to do it now! smile.gif

Share this post


Link to post
Share on other sites

Don't worry Texx, you couldn't possibly have known they would add if else while when you started your proggy. smile.gif

Share this post


Link to post
Share on other sites

Good work anyway, especially under the aspect that those commands are included in the 1.85 patch and would not be usable under 1.46.

Q: where do I find a list of the now aviable commands that you introduced with the editor? Or are all commands in the sample.sqs the one we can use?

Share this post


Link to post
Share on other sites

@bn880: I don't worry! Thanks.  smile.gif

@Rastavovich: Sure, that's an advantage of xSQS that it also works with 1.46/CWC.

The commands you are asking for are the following:

- if (with or without else)

- for (with following syntax: for(<precondition>;<condition>;<postcondition>){ ... }

- while

It a Java/C/C++-Style.

(If you have downloaded it, there is an file called 'sample.xsqs'. It contains all commands.)

Surely that is not very much, but it is one more than 1.85 gives you (the 'for'-Statement, if i read the 1.85-Changelist correctly)!

But as I already said, xSQS is still in development: for Example i want to add the possibility to use self defined function/procedures (with Namespaces to enable librarys).

I didn't add this until now, becaus the stability of the current code was more important for me than a bigger list of feature. It will be intruduced in some comming Versions of xSQS-Edit.

To the 1.85-'if'-Features: The Editor has FULL support for this. tounge.gif

greatings, Texx

Share this post


Link to post
Share on other sites

When we are at the if statement, could you also include a "elseif"?

Oh and a minor bug report: is it possible, that if you open a file twice at one time, the program crashes?

Share this post


Link to post
Share on other sites

Hey nice work. There aren't really any good sqs editors out there right now, this is a step in the right direction. If you want some ideas, here's something I know people would appreciate:

Macros for setting up a unit, like the equipment loadout especially. You know, no more addweapon, addmagazine x100 over and over for each unit, having to lookup the weapon names, etc.

Cutscene macros like picking a target, camera effect and duration and have the macro write out all the camcreate, setrelpos, camcommit, etc., lines and values. By Camera effects I mean things like a chasecam, zooms, etc.

Description.ext editing functions

So basically, things to automate repetative scripting functions. Also you might want to tell ofpec.com about your editor, maybe they can work with you on some of these things.

Share this post


Link to post
Share on other sites

@Rastavovich: Do you mean a "not"-like if-Statement? If it's so, just try to negativate the condition with a "!". Or did you mean "if(...){...}else{...}"? It's already implemented.  smile.gif (I want to say: please explain it a liddle more! smile.gif )

to you bugreport: I can't evaluate it. I tryed to do like you said, but in no case it crashes (or something like that). Can you explain it a liddle more? (and thanks for testing... wink.gif )

@toadeater: Macros? Good idea! Maybe next version....

-to description.ext: I'll take a look at!

-to ofpec.com: I've already looked at their side but I didn´'t found any link or email-address to contact them? Maybe someone can help me?

greatings, Texx

Share this post


Link to post
Share on other sites

Well, I cannot reproduce it either, sorry for bothering you.

with the elseif /elsif command I mean something like:

if(condition) {}

elsif(condition) {}

else {}

Share this post


Link to post
Share on other sites

@Rastavovich: You didn't bothering me, IMO it's better that you 'bothering' me cause of a possible bug, than the Software is elementary buggi! biggrin.gif (That is, why i declared the current release a "Beta"! )

I never see a "elsif"-Statement befor, sorry. But can use "}else if{...}" instead. But, ATTENTION, this is not implementet yet. (It's a bug, not a feature wink.gif ) I'll implement it now! biggrin.gif

greatings, Texx

Share this post


Link to post
Share on other sites

Just downloaded it playing around with it now, great work! I would take the page line out from the editing view.

Again great work, good idea to include the command ref with it.

RED

Share this post


Link to post
Share on other sites

Nice to hear this from an "OF fan"-poster! biggrin.gif

I'll make the pagelines to be hide out in the optionmenu!

greatings, Texx

Share this post


Link to post
Share on other sites

Texx, you can submit tools here, and send them a comment about it:

http://www.ofpec.com/userboard/index.php?a=sub_tool

First you have to register (free).

If you don't want to register, I can send it to them, but their rules say that if you submit other people's stuff you need to have permission from them first.

Anyway good luck, I'm using Xsqs edit in place of Battleaxe now.

Share this post


Link to post
Share on other sites

I checked your editor, and while I didn't use the extended scripting language, I used it to write/edit scripts, briefing and browse the mission.sqm I really liked it. I'ts nice to have a command reference at hand and all your scripts available with just one click instead of managing a ton of different editor windows. Also the Auto-Update function (if you change the mission.sqm in the mission editor, the script editor asks if it should reload the file) is very nice.

It seems to have some issues - it wouldn't close (produced an error message) so I had to kill the task. Nice work anyways.

Share this post


Link to post
Share on other sites

If you are still reading this Texx I found a bug, you can't copy from the command ref.

Looking forward to the new release.

RED

Share this post


Link to post
Share on other sites

Hi Texx,

your Editor is something that I was really looking for!

I've got some suggestions:

- In the file tree only sqs-files are shown, but I need more. There should be also stringtable.csv, any .cpp/.hpp and the description.ext.

- It would be nice if you could invoke a "browse folder of this file"-icon. You click the icon and the explorer is opened in the file's directory

- customizable command line shortcuts. That means that I can define a command for the command line incorporating path/filename of the current file as argument.

Please take a look at Ulli Meybohms Page and test PROTON. Then you perhaps get some other ideas for your SQS-Editor.

Nice work and keep on improving the editor! smile.gif

Share this post


Link to post
Share on other sites

Thank you for praising!

I list your proposals. Maybe you will see them in a future version!

@joltan: Interesting! Don't know why, but I think I can fix it!

greetings, Texx

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bigpoppa @ Oct. 13 2002,20wow.gif)</td></tr><tr><td id="QUOTE">Hi Texx,

- customizable command line shortcuts. That means that I can define a command for the command line incorporating path/filename of the current file as argument.

<span id='postcolor'>

"customizable command line shortcuts": What do you want to do with this feature? Don't know why you need to execute a commandline-tool with an x/sqs file? Or do you only need the absolute filepath, maybe in clipboard!?

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bigpoppa @ Oct. 13 2002,20wow.gif)</td></tr><tr><td id="QUOTE">

Please take a look at Ulli Meybohms Page and test PROTON. Then you perhaps get some other ideas for your SQS-Editor.

<span id='postcolor'>

I know this tool. But i used "UltraEdit" as Refference!

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bigpoppa @ Oct. 13 2002,20wow.gif)</td></tr><tr><td id="QUOTE">

Nice work and keep on improving the editor!  <!--emo&smile.gif<span id='postcolor'>

Thats my favour! biggrin.gif

greetings, Texx

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Texx @ Oct. 13 2002,22:59)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bigpoppa @ Oct. 13 2002,20wow.gif)</td></tr><tr><td id="QUOTE">Hi Texx,

- customizable command line shortcuts. That means that I can define a command for the command line incorporating path/filename of the current file as argument.

<span id='postcolor'>

"customizable command line shortcuts": What do you want to do with this feature? Don't know why you need to execute a commandline-tool with an x/sqs file? Or do you only need the absolute filepath, maybe in clipboard!?<span id='postcolor'>

No, actually the case is that:

You know perhaps my project Strategic Commando Force and as you see on the screenshots I am using lot of dialogs.

Now my description.ext is very big and I cannot find the dialog I am looking for. To make a small change I have to go through 1000 lines of code, just to change x = 0.1; wink.gif

So I incorporated a C-Preprocessor (CPP from the GCC) and outsourced every dialog into a header-file. So now I find the dialog very fast and then I only have to do CTRL-F1 and my description.ext is automatically generated biggrin.gif

That is, why I need command line support. And therefore I also requested the other file support like ext,cpp,hpp, because PROTON lacks SQS-syntaxhighlighting and I could not create a scheme for myself!

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bigpoppa @ Oct. 13 2002,23:52)</td></tr><tr><td id="QUOTE">That is, why I need command line support. And therefore I also requested the other file support like ext,cpp,hpp, because PROTON lacks SQS-syntaxhighlighting and I could not create a scheme for myself!<span id='postcolor'>

Ok, I understand. I put it on my list, but it's a low priority point!

Support for ext and cpp is already given!

greetings, Texx

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×