Exscriptor - new external script editor

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

StormRazor52
Posts: 74
Joined: Sat, 9. Jun 07, 19:19
xr

Post by StormRazor52 » Thu, 31. Jul 08, 07:08

Something seems to wrong with your download link at Mediafire. When you get transfered to the site there is no download link there. Not sure what is wrong but can you check it out for I would like to download your program and try it out, Thanks

User avatar
Blacky_BPG
Posts: 2030
Joined: Mon, 23. Feb 04, 23:42
x4

Post by Blacky_BPG » Thu, 31. Jul 08, 11:27

You must try it repeatedly and use the back button of the browser. Medifire is getting crazy a little at the moment. Otherwise the link is ok, however.

StormRazor52
Posts: 74
Joined: Sat, 9. Jun 07, 19:19
xr

Post by StormRazor52 » Thu, 31. Jul 08, 12:50

Thanks for the reply, and the problem seems to the Firefox browser I was using. When I opened MS Internet Explorer I had no problem with the download. For anyone else I was using version 3 of Firefox. If they have the same problem tell them to switch to IE to download from Mediafire, Thanks again.

User avatar
Blacky_BPG
Posts: 2030
Joined: Mon, 23. Feb 04, 23:42
x4

Post by Blacky_BPG » Thu, 31. Jul 08, 13:07

Yes I use Firefox3 and have the same problem, but i use the back button (4-5 times I think) then the download link page wait for my click on the link :P
It works.
I don't know why this link will not work at the first try, the other links on mediafire works correct ... I think mediafire is a little bit crazy, sometimes, but better as rapidshare I mean.

Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy » Thu, 31. Jul 08, 13:56

Erilaz wrote:Been usng your editor to good effect. So far I've only found one issue: It seems that when I open a file from a certain path, it displays the contents for the same file in a different path.
This bug was a tricky devil to figure out, so thanks for spotting it! It was one of those fairly obscure things that I wouldn't ordinarily notice. Turns out it was basically giving files in the Scripts directory priority, so if you had another file with the same name elsewhere it would still load the Scripts one. Anyway, it should be fixed now in V1.008, but let me know if you have any more problems with it.
Erilaz wrote:As a suggestion, could there be an indication of the path when having two scripts of the same name open, so we know which is which, when trying to do a merge.

Great tool though, I must say.
Thanks (and thanks ihndry)! And that's a good suggestion, so I added a file location box so you can see where the script is located too. I also fixed a couple of other bugs at the same time, the main one being that trying to open a .PCK out of the X3 directory wouldn't work. Hopefully this is fixed now too.
StormRazor52 wrote:Something seems to wrong with your download link at Mediafire.
Hmm, sorry about that. I tested the new links though (with Firefox 3) and they both seem to download okay, so hopefully whatever the problem was, it's gone now. :)
Blacky_BPG wrote:I think mediafire is a little bit crazy, sometimes
That's my theory, too. Maybe they're just getting confused by my frequent updates. :D

Erilaz
Posts: 161
Joined: Mon, 8. May 06, 13:49
x4

Post by Erilaz » Thu, 31. Jul 08, 14:00

Wow, that WAS quick, I thought it might be obscure. Downloading now...

Thanks a mil,will try it out tonight.

User avatar
Blacky_BPG
Posts: 2030
Joined: Mon, 23. Feb 04, 23:42
x4

Post by Blacky_BPG » Thu, 31. Jul 08, 19:43

If you fast enough you can also quickly click on the download link befor MediaFire loads the new page :D



@Whimsy
If you want I can also furnish to you a FTP access on my server. Then everybody accesses a direct link, is comfortable, and my server is fast also.

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent » Fri, 1. Aug 08, 06:25

This might sound a little silly but... how do I put in an "IF"? I can't seem to find a place to select it from, or am I just suppose to type it?

Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy » Fri, 1. Aug 08, 14:25

Blacky_BPG wrote:@Whimsy
If you want I can also furnish to you a FTP access on my server. Then everybody accesses a direct link, is comfortable, and my server is fast also.
That would be great, thanks! That way if Mediafire plays up again there's an alternative source.
s9ilent wrote:This might sound a little silly but... how do I put in an "IF"? I can't seem to find a place to select it from, or am I just suppose to type it?
You can just type it. Same with things like "while", "skip", and various symbols (=, *, + etc). I didn't put them in the command list because they're more like parts of commands rather than commands themselves. If it's a problem, though, I could add them in somewhere.

Atrocious
Posts: 165
Joined: Mon, 15. May 06, 20:13

Post by Atrocious » Fri, 1. Aug 08, 15:28

Great tool you made there! 8)

Unfortunately it just crashed for me after playing around with it.
It happened after browsing through the Station commands and clicking a [+] sign in front of a command, then clicking the [-] afterwards, then Exception.

Note that the first exceptions happened because I didn't set the language correctly, at first. They didn't crash the tool. After I set the language correctly there are still two exceptions and the last one crashed the tool.

Edit: For future versions it might be a good idea to put the language selection into the options, which show up on first start of the tool.

The log:
<removed>
Last edited by Atrocious on Sat, 2. Aug 08, 14:14, edited 1 time in total.

User avatar
Blacky_BPG
Posts: 2030
Joined: Mon, 23. Feb 04, 23:42
x4

Post by Blacky_BPG » Fri, 1. Aug 08, 23:00

Whimsy wrote:[...]That would be great, thanks! That way if Mediafire plays up again there's an alternative source.[...]
I've send you a PM with all required information.

Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy » Sat, 2. Aug 08, 00:20

Enrico777 wrote:Unfortunately it just crashed for me after playing around with it. It happened after browsing through the Station commands and clicking a [+] sign in front of a command, then clicking the [-] afterwards, then Exception.
Hmm. I've not been able to reproduce this, and I can't see what might be causing it - could you give me any more information? Have you been able to get it to happen again?
Note that the first exceptions happened because I didn't set the language correctly, at first. They didn't crash the tool. After I set the language correctly there are still two exceptions and the last one crashed the tool.
I don't recognise all of those language files, but I know that 44/497213 and 44/497215 are both XTM files and both have the same problem - a stray & inside them at the line numbers mentioned in the error message. You can open these and fix it just by changing the "&" to "&amp;". But these shouldn't be causing the Exscriptor to crash; if you fix them or move these files out of the way temporarily, does the program still crash?
Edit: For future versions it might be a good idea to put the language selection into the options, which show up on first start of the tool.
Good idea, I'll do this in the next version. I'm sorry I couldn't fix your problems yet though!

Atrocious
Posts: 165
Joined: Mon, 15. May 06, 20:13

Post by Atrocious » Sat, 2. Aug 08, 14:35

@Whimsy: I fixed the errors you mentioned, plus some more errors in the files.
Edit: Removed suggestion for an existing function.

--

While fixing the errors in the t folder, I noticed that my changes would be overwritten if Exscriptor remains open and is closed later. Is it supposed to save all the data that got loaded in?

--

Now Exscriptor loads up and shows "X3 data loaded but with errors:". Those errors are conflicting files not syntax errors like before. And they have no "error" warning in the descriptions.

Suggestion: You could make the text in the lower left corner (the mini log) copyable. I couldn't even copy it with CTRL-C.

--

The crash to desktop happened again: I clicked on the [+] and [-] for a bit and it CTD. I remember which sign I clicked last: It was the [-] in front of "Formations" in the "Objects" list.

Exception text (without loaded assemblies):
************** Ausnahmetext **************
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei X3_Script_Editor.Editor.clickCommands(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
bei System.Windows.Forms.TreeView.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The errorlog.txt is empty (just headline).
Edit: As you can see, it is missing a function for double-click. So it counts my click on [+] click on [-] as double-click. I could actually reproduce the error and I could avoid it by clicking not so fast.

--

Also the "Object commands" list doesn't show the texts correctly. See screenshot:
[ external image ]


Keep up the good work. 8)

Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy » Sat, 2. Aug 08, 16:17

Enrico777 wrote:While fixing the errors in the t folder, I noticed that my changes would be overwritten if Exscriptor remains open and is closed later. Is it supposed to save all the data that got loaded in?
It doesn't save, but for some reason it refuses to let go of the files once it's opened them, so they're effectively write-protected. I'll keep investigating this bug but so far I've been unable to figure out how to fix it.
Now Exscriptor loads up and shows "X3 data loaded but with errors:". Those errors are conflicting files not syntax errors like before. And they have no "error" warning in the descriptions.
These will just be object command conflicts, I expect - they're fairly normal and shouldn't cause any problems.
Suggestion: You could make the text in the lower left corner (the mini log) copyable. I couldn't even copy it with CTRL-C.
This as a known bug (I even mention it in the manual) . You should be able to copy using CTRL-Insert (the other shortcut) but in V1.009 I've tried to work around the issue and so CTRL-C should work okay now too (at least in a few places).
Enrico777 wrote:The crash to desktop happened again: I clicked on the [+] and [-] for a bit and it CTD. I remember which sign I clicked last: It was the [-] in front of "Formations" in the "Objects" list.
I still don't understand why this is happening, nor have I been able to reproduce it, but I've improved the function in question so hopefully, if it does happen again, the error will be trapped and should appear in the log instead of the Exscriptor simply crashing.
Enrico777 wrote:Also the "Object commands" list doesn't show the texts correctly. See screenshot:
Do you mean the way it's almost overlapping the text boxes underneath it? If so, I've fixed this now (don't know how I missed it originally, actually). If that's not what you mean, then I'm confused... everything else looks normal to me. :?
Keep up the good work. 8)
Thanks for the help! :)

Atrocious
Posts: 165
Joined: Mon, 15. May 06, 20:13

Post by Atrocious » Sat, 2. Aug 08, 19:04

Whimsy wrote: I still don't understand why this is happening, nor have I been able to reproduce it, but I've improved the function in question so hopefully, if it does happen again, the error will be trapped and should appear in the log instead of the Exscriptor simply crashing.
I told you why it's crashing underneath the crash log. It doesn't find a function to handle double clicks.
Edit: In 1.0009 it doesn't crash anymore. :)
Whimsy wrote:
Enrico777 wrote:Also the "Object commands" list doesn't show the texts correctly. See screenshot:
Do you mean the way it's almost overlapping the text boxes underneath it? If so, I've fixed this now (don't know how I missed it originally, actually). If that's not what you mean, then I'm confused... everything else looks normal to me. :?
I haven't been scripting for a while, but isn't it supposed to show clear text instead of things like COMMAND_TYPE_NAV_46 ?
That looks to me as if it doesn't find the texts. This was happening on the other lists as well, until I fixed the files.

Draslin
Posts: 199
Joined: Sat, 11. Feb 06, 22:07
x4

Post by Draslin » Sat, 2. Aug 08, 19:48

Awesome I have tons of plans for scripting in X3 but the clunky interface has alway frustrated me enormously. This external editor looks much cleaner and easier to use. Might have to reload X3 after all. :)
Its not a hug so much as "Help me I'm dieing!"

Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy » Sat, 2. Aug 08, 20:09

Enrico777 wrote:I told you why it's crashing underneath the crash log. It doesn't find a function to handle double clicks.
Edit: In 1.0009 it doesn't crash anymore.
It's actually crashing inside the double click handling function - which is really simple, so I couldn't see why it might be crashing. Hence my confusion. But I'm glad it's not crashing now, anyway... :wink:
Enrico777 wrote:I haven't been scripting for a while, but isn't it supposed to show clear text instead of things like COMMAND_TYPE_NAV_46? That looks to me as if it doesn't find the texts. This was happening on the other lists as well, until I fixed the files.
No, it's currently working as intended - it's supposed to use the COMMAND_WHATEVER form, since that's what the ingame editor uses. If it picks up any user defined names from other files then they should be shown beneath the default name (using +/- thingies). Multiple entries under a command mean a conflict (more than one name for the same command). Though you can actually use any of these names in a script, since in the end it all gets converted back to the same number.

Thanks for finding the other bugs, though - you've been a great help. :)
Draslin wrote:Awesome I have tons of plans for scripting in X3 but the clunky interface has alway frustrated me enormously. This external editor looks much cleaner and easier to use. Might have to reload X3 after all. :)
Glad to be of service! :D

Atrocious
Posts: 165
Joined: Mon, 15. May 06, 20:13

Post by Atrocious » Sat, 2. Aug 08, 23:51

Whimsy wrote: Thanks for finding the other bugs, though - you've been a great help. :)
My pleasure! :wink:

I'll let you know if I find anything else. Thanx again for this tool!

Atrocious
Posts: 165
Joined: Mon, 15. May 06, 20:13

Post by Atrocious » Sun, 3. Aug 08, 14:47

Me again!

Great manual you have written. It's actually worth reading! :)
And thanx for mentioning us there!

I've found a strange thing when making comments: I put * in front of some lines and when I reopened the script later, the commented code was changed! Here is the result:

Code: Select all

   * $Quest = $Needed $Total {==}
   * $Time = playing time
   * $Quest = $Time $End {>}
   * $Message = sprintf: pageid=$Page.ID textid=2025, $Employer, $Time, $End, null, null
   * $Message = sprintf: pageid=$Page.ID textid=2025, $Employer, $Total, $Ware, null, null
   * set quest state with message: quest=$Quest state=[Quest.Aborted] msg=$Message
   * send incoming message $Message to player: display it=[TRUE]
   * return null
   * end
   * end
It removed some ifs and put the logical operands into {} at the end of the lines. I think that's all what has changed (despite the fact that indenting is gone).

Edit: Oh, and I just got another exception "The stack is empty" - after compiling with Exscriptor:
************** Ausnahmetext **************
System.InvalidOperationException: Der Stapel ist leer.
bei System.Collections.Stack.Pop()
bei X3_Script_Editor.Compiler.finaliseJumps()
bei X3_Script_Editor.Compiler.parse(ArrayList code, ArrayList arguments)
bei X3_Script_Editor.Editor.menuCompile(Object sender, EventArgs e)
bei System.Windows.Forms.MenuItem.OnClick(EventArgs e)
bei System.Windows.Forms.MenuItem.MenuItemData.Execute()
bei System.Windows.Forms.Command.Invoke()
bei System.Windows.Forms.Command.DispatchID(Int32 id)
bei System.Windows.Forms.Control.WmCommand(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ContainerControl.WndProc(Message& m)
bei System.Windows.Forms.Form.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The log is empty, too. :wink:

Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy » Sun, 3. Aug 08, 15:59

Enrico777 wrote:Great manual you have written. It's actually worth reading! :) And thanx for mentioning us there!
No problem! Glad someone read it. :)
Enrico777 wrote:I've found a strange thing when making comments: I put * in front of some lines and when I reopened the script later, the commented code was changed!
I must have forgotten to add this to the known bug list in the manual. If you use conditionals in a commented out command (like an if, or a while) then the Exscriptor basically ignores them since it cannot calculate where the corresponding end might be. That's why your ifs are disappearing (and thus the indentation).

However, there might still be something weird going on with those operators - could you post the original code, before the Exscriptor screwed it up? That way I can recreate the problems myself and hopefully fix them. :)

Alternatively I might just change it to ignore commented commands altogether and just treat them as text, since they're more trouble than they're worth... You'd only notice the difference if you tried to uncomment it in the ingame editor anyway.
Enrico777 wrote:Edit: Oh, and I just got another exception "The stack is empty" - after compiling with Exscriptor:
Hmm, I think I know what caused that - it's probably because the ends don't match up with ifs or whiles (or vice versa). I'll fix it in the next version.

Post Reply

Return to “X³: Reunion - Scripts and Modding”