Exscriptor - new external script editor
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
I have a question:
Where are the text files saved, when you choose "Quicksave as text"?
I can't seem to find them anywhere.
And a simple request:
When you have a "return null" somewhere in your script, the exscriptor does not add an additional one to the end of the script.
However if this is missing and the game does not exit the script "using" one of your returns, the game will crash.
The solution would be to simply add "return null" to any script at the end, if the last command isn't a return command.
Greetings,
ScRaT
Where are the text files saved, when you choose "Quicksave as text"?
I can't seem to find them anywhere.
And a simple request:
When you have a "return null" somewhere in your script, the exscriptor does not add an additional one to the end of the script.
However if this is missing and the game does not exit the script "using" one of your returns, the game will crash.
The solution would be to simply add "return null" to any script at the end, if the last command isn't a return command.
Greetings,
ScRaT
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
They're supposed to be stored in the main script directory. However, it seems that the code actually stored it in the current working directory, which in some cases may be different. I've updated it so it always stores them in the scripts directory now.ScRaT_GER wrote:Where are the text files saved, when you choose "Quicksave as text"?
I can't seem to find them anywhere.
Easily done. It should work better now.ScRaT_GER wrote:And a simple request:
When you have a "return null" somewhere in your script, the exscriptor does not add an additional one to the end of the script.
However if this is missing and the game does not exit the script "using" one of your returns, the game will crash.
The solution would be to simply add "return null" to any script at the end, if the last command isn't a return command.

I've added a third 'Find scripts' command to the Tools menu that searches recursively for all called scripts. It takes a little longer obviously but it seems to work okay (and I hope I've made sure it won't get stuck in a loop). I've also extended these functions to include all types of call commands (there are 25 now included) and also, when in recursive mode, it will ignore .pcks and the 'hidden' ! scripts.Litcube wrote:Does the command "branch out"? Meaning, will it find all called scripts within all called scripts?
As usual, latest version is available here.
-
- Posts: 13
- Joined: Fri, 17. Apr 09, 21:52
Hi!
Firstly can I say a massive thanks for taking the time to do this editor, as a newbie scriptor, I can say that this has made learning the language so much easier. Thank you for your efforts on this.
Secondly I have I have a query, all my wares show up in French, I can work around it with my rusty french (wish I studied more of the French language at school
) but I would love to have it english. I have the options set to use the english option and I am using the latest version but no dice, just see these wonderful french wares. Any ideas what I am doing wrong ?
Thank you again.
Regards,
Sneakers.
Firstly can I say a massive thanks for taking the time to do this editor, as a newbie scriptor, I can say that this has made learning the language so much easier. Thank you for your efforts on this.
Secondly I have I have a query, all my wares show up in French, I can work around it with my rusty french (wish I studied more of the French language at school

Thank you again.
Regards,
Sneakers.
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
Glad you find the program useful! As for your problem, I'm not sure why it's doing that; if you've set the option to use English then it shouldn't be loading the French language files (unless they've been renamed somehow). You can check the config.dat file and make sure it says "language = 44" in there somewhere; other than that, I don't know what to suggest. Have you modded the game at all, e.g. unpacked any cat/dat files? You could also try reinstalling Exscriptor (or - as a last resort - both the game and Exscriptor).SneakersOToole wrote:Secondly I have I have a query, all my wares show up in French, I can work around it with my rusty french (wish I studied more of the French language at school) but I would love to have it english. I have the options set to use the english option and I am using the latest version but no dice, just see these wonderful french wares. Any ideas what I am doing wrong ?
Hope that helps! If not, let me know.

-
- Posts: 13
- Joined: Fri, 17. Apr 09, 21:52
Thanks Whimsy for your reply.
I checked the config.dat but it is pointing to language 44.
I do though have a modded game, I have a mod I choose from the main menu X3TC startup screen (MARS) and I have two installed as fake patches (Ys GUI Mod and Complex Cleaner), I am thinking this might have something to do with Y's GUI Mod though not sure how (MARS and Complex Cleaner are so popular that I suspect somebody else would have noticed it by now). Interestingly the in-game script editor shows the
wares in english.
I am going to install a separate dev environment for X3TC so I should be able to work out if it is Y's then. Might not be for a week or so depending on RL, so I'll let you know how I get on. Thanks again.
Regards,
Sneakers
I checked the config.dat but it is pointing to language 44.
I do though have a modded game, I have a mod I choose from the main menu X3TC startup screen (MARS) and I have two installed as fake patches (Ys GUI Mod and Complex Cleaner), I am thinking this might have something to do with Y's GUI Mod though not sure how (MARS and Complex Cleaner are so popular that I suspect somebody else would have noticed it by now). Interestingly the in-game script editor shows the
wares in english.
I am going to install a separate dev environment for X3TC so I should be able to work out if it is Y's then. Might not be for a week or so depending on RL, so I'll let you know how I get on. Thanks again.
Regards,
Sneakers
-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
Hi Whimsy,
just a minor bug report here:
Sometimes the Exscriptor creates a "return null" at the end of a script, even if there was already one. I don't know under which circumstances this bug appears, but I found various scripts with up to three "return null" at the and.
Other than that, everything works fine (luckily the bug with the windows overlapping I reported some time ago, does not appear on my Windows 7 Laptop).
Greetings,
ScRaT
just a minor bug report here:
Sometimes the Exscriptor creates a "return null" at the end of a script, even if there was already one. I don't know under which circumstances this bug appears, but I found various scripts with up to three "return null" at the and.
Other than that, everything works fine (luckily the bug with the windows overlapping I reported some time ago, does not appear on my Windows 7 Laptop).
Greetings,
ScRaT
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
I've not been able to recreate this yet - have you any more clues about when it happens? What were the ends of those scripts with 3 returns like? Was it just three returns in a row, for example, or were there spaces or empty lines between them etc?ScRaT_GER wrote:Sometimes the Exscriptor creates a "return null" at the end of a script, even if there was already one. I don't know under which circumstances this bug appears, but I found various scripts with up to three "return null" at the and.
Glad to hear it!Other than that, everything works fine (luckily the bug with the windows overlapping I reported some time ago, does not appear on my Windows 7 Laptop).

-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
Unfortunately I already corrected the scripts the bugs occured at. However, one thing I am sure about, is that there were always spaces between the "return null"s - clearly a sign of the Exscriptor's work. =)I've not been able to recreate this yet - have you any more clues about when it happens? What were the ends of those scripts with 3 returns like? Was it just three returns in a row, for example, or were there spaces or empty lines between them etc?
As soon as I encounter another script with multiple "return null"s I'll report.
Greetings,
ScRaT
EDIT: Do you somehow flag the script, that already have a "return null" at the end? Because I have the feeling, that this bug appears, when I save a script I previoulsy opened in the internal SE. Maybe this removes the flag (if there is one).
-
- Posts: 4293
- Joined: Wed, 21. Feb 07, 17:46
hello whimsy:
here is a test script for you.
test.rar
cut line 122 threw 127; paste to line 132 and now save. you'll have 2 return nulls at the end of the file.
here is a test script for you.
test.rar
cut line 122 threw 127; paste to line 132 and now save. you'll have 2 return nulls at the end of the file.
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
At the minute it just checks to see if the last non-empty line (i.e. the last one with text) is a return; if not, it adds one. But clearly there must be something wrong there somewhere...ScRaT_GER wrote:EDIT: Do you somehow flag the script, that already have a "return null" at the end? Because I have the feeling, that this bug appears, when I save a script I previoulsy opened in the internal SE. Maybe this removes the flag (if there is one).
Thanks draffut, this should help a lot. I'll take a look and see if I can track the problem down.draffutt wrote:here is a test script for you.

-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
Okay, I think I managed to find and fix the problem. As usual, it was something trivial and idiotic. 
The new version should work okay, but if it still happens, let me know.

The new version should work okay, but if it still happens, let me know.
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Hi Whimsy,
Love your editor, but found a small problem.
One of my scripts references the sector Queen's Retribution directly, but when I open that script in your editor, it replaces the sector name with {7,30012}. This isn't too much of a problem, except that when you try and save the script, it fails with the error "Error on line 97 - Unresolved literal: {7, 30012}".
There are several other sectors missing, I've noticed: Patriarch's Collusion, Senator's Badlands, Vestibule of Creation and Weaver's Tempest. Presumably most of their adjoining sectors are missing too.
Also, the version number is incremented even if the save fails.
I know this is the thread for X3R, not X3TC, but it's the only link in the editor, sorry.
Love your editor, but found a small problem.
One of my scripts references the sector Queen's Retribution directly, but when I open that script in your editor, it replaces the sector name with {7,30012}. This isn't too much of a problem, except that when you try and save the script, it fails with the error "Error on line 97 - Unresolved literal: {7, 30012}".
There are several other sectors missing, I've noticed: Patriarch's Collusion, Senator's Badlands, Vestibule of Creation and Weaver's Tempest. Presumably most of their adjoining sectors are missing too.
Also, the version number is incremented even if the save fails.
I know this is the thread for X3R, not X3TC, but it's the only link in the editor, sorry.
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
It seems that this has gone unnoticed since Exscriptor V1.2 for X3TC was released, so well spotted! Apparently almost none of the new sectors were being read in correctly. I have fixed this now in the new V1.2.25.TECSG wrote:One of my scripts references the sector Queen's Retribution directly, but when I open that script in your editor, it replaces the sector name with {7,30012}. This isn't too much of a problem, except that when you try and save the script, it fails with the error "Error on line 97 - Unresolved literal: {7, 30012}".
This is the the only thread on the Exscriptor, so feel free to report bugs found with any of the games (X2, X3, X3TC) here.I know this is the thread for X3R, not X3TC, but it's the only link in the editor, sorry.

-
- Posts: 310
- Joined: Wed, 6. Nov 02, 20:31
I didn't have time to work on my x3tc-script for some time. came here to download the new version of this fine tool but it somehow got broken 
I wrote a script calling a menu-script:
This exact line was giving me quite a headache yesterday until I found the problem. When I change the multiple.selection-argument to [FALSE] and save+compile with exscriptor, the script WILL NOT be called.
Whenever I use the internal script editor (which is a pain in the ... in comparison btw), I can change the argument and everything works as expected.
I wrote the 'freggel.lib.menu'-script and the script issuing this call some time ago in june I think and the exscriptor-version I used back then worked fine (meaning the script worked ingame).
Beats me why the older version had no trouble but now the script won't work anymore when compiled by exscriptor...
freggel

I wrote a script calling a menu-script:
Code: Select all
$data.array = [THIS]->call script 'freggel.lib.menu' : description=$description info.lines=$info.lines data.array=$data.array preselect.array=null empty.selection.allowed=[FALSE] abort.allowed=[TRUE] multiple.selection=[TRUE]
Whenever I use the internal script editor (which is a pain in the ... in comparison btw), I can change the argument and everything works as expected.
I wrote the 'freggel.lib.menu'-script and the script issuing this call some time ago in june I think and the exscriptor-version I used back then worked fine (meaning the script worked ingame).
Beats me why the older version had no trouble but now the script won't work anymore when compiled by exscriptor...
freggel
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
That's extremely odd. I took a quick look and can't see anything obviously wrong - could you upload the relevant broken scripts (both the calling script and the called script) somewhere? That way I can compare the Exscriptor-compiled versions against the ingame-compiled versions and hopefully figure out what's going on.Freggel.Doe wrote:This exact line was giving me quite a headache yesterday until I found the problem. When I change the multiple.selection-argument to [FALSE] and save+compile with exscriptor, the script WILL NOT be called.
Whenever I use the internal script editor (which is a pain in the ... in comparison btw), I can change the argument and everything works as expected.
I wrote the 'freggel.lib.menu'-script and the script issuing this call some time ago in june I think and the exscriptor-version I used back then worked fine (meaning the script worked ingame).
Beats me why the older version had no trouble but now the script won't work anymore when compiled by exscriptor...
Without that I don't know where to start. I can't begin to think why changing a parameter from true to false would stop the script from being called....

-
- Posts: 310
- Joined: Wed, 6. Nov 02, 20:31
Code: Select all
write to log file $log.file append=[TRUE] printf: fmt='data.type: %s', $data.type, null, null, null, null
if $data.type == {DATATYP_SHIP}
write to log file $log.file append=[TRUE] printf: fmt='ship', null, null, null, null, null
$data.array = [THIS]->call script 'freggel.lib.menu' : description=$description info.lines=$info.lines data.array=$data.array preselect.array=null empty.selection.allowed=[FALSE] abort.allowed=[TRUE] multiple.selection=[FALSE]
else if $data.type == {DATATYP_STATION}
write to log file $log.file append=[TRUE] printf: fmt='station', null, null, null, null, null
end
The call is enclosed in an if-else if where data.type comparisons are made. These don't work as intended anymore. Output in log.file gives me just this:
Code: Select all
data.type: DATATYP_SHIP
Suggestions?
freggel
-
- Posts: 167
- Joined: Mon, 9. Feb 04, 20:32
There was an issue with the datatypes before, which I fixed in a previous version. It's possible that change somehow broke your script. However, I can't reproduce the same problem you're getting - I get the same result from both Exscriptor and the ISE: both versions work correctly (they get into the if $data.type == DATATYP_SHIP part). I checked the produced codearrays and they're the same, so the problem must be elsewhere, before the code you showed me. How are you getting $data.type?Freggel.Doe wrote:I did some further inverstigation and the problem is not the script call itself.
The call is enclosed in an if-else if where data.type comparisons are made. These don't work as intended anymore. Output in log.file gives me just this:The code inside the if wont be executed - there is no 'ship' output in log.file. The line where I made the argument-change I referred to in my last post is not even reached. This worked in an older version of Exscriptor and still does if the ingame SE compiles these scripts.Code: Select all
data.type: DATATYP_SHIP
Suggestions?
Here is my test code ([THIS] was my ship at the time):
Code: Select all
$data.type = datatyp[ [THIS] ]
write to player logbook $data.type
if $data.type == {DATATYP_SHIP}
write to player logbook 'datatype ship'
else if $data.type == {DATATYP_STATION}
write to player logbook 'datatype station'
else
write to player logbook '?'
end

-
- Posts: 310
- Joined: Wed, 6. Nov 02, 20:31
I thought long and hard about this since your fix came around the time, when I last worked on all the involved scripts.Whimsy wrote:There was an issue with the datatypes before, which I fixed in a previous version.
I finally found the problem or rather a solution to it: I recompiled all my scripts with the up-to-date version of Exscriptor and now the error is gone.
I'm still puzzled by the fact, that ONE change in ONE of the scripts broke the entire thing when compiled by Exscriptor but not when this one script got compiled by the ingame SE.
Thanks for your help and I'm sorry for any inconvenience I may have caused.
freggel