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

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

Post by Whimsy »

mmbecker wrote:But I miss one thing: A list of all the variables I use in a script would be great.
I've added the variables to the right-click 'autocomplete' menu now. It's not perfect and will pick up variables in strings and comments too but it's better than nothing. :)
Litcube wrote:Suggestion: under the file menu: Rename Script.
I looked into adding this, but it is a lot more fiddly than it sounds, and given the user can just do a quick 'Save As' and then delete the old file, I decided it wasn't worth it in the end. Sorry. :wink:
s9ilent wrote:Find calling scripts:
1. When using this, it can count the same script several times (if it is called several times in the script). So it could probably be optimized if you make it stop after the first success. (It will also prevent the count being incorrect). This also causes the script to be opened multiple times if you say yes to open all calling scripts.

2. It does not count scripts that are already open
Well spotted. I've hopefully fixed both problems now. Note that if you have all the calling scripts open, then it will still ask you if you want to open them, but at least now it won't actually do anything and the count should be correct.
s9ilent wrote:Suggestion
Make it possible to turn off: File "<script location>" has changed since it was last loaded - do you want to overwrite it?
Regions? (Like in visual studio, the ability to collapse regions of code)
I've added the first suggestion - there's now an option to switch it off in the Options. This disables both the periodic 'Script has been changed since loading' warning and also the warning when you want to save it. There was also another related bug here which I fixed where the script would ask to update every time it was saved.

As for regions, it's a good idea, but unlikely to be implemented any time soon as it would be rather complicated. Maybe someday when I'm bored and have lots of time... :D
RavenDP2 wrote:Any support for Czech code page? Langfile 42
Sorry about this one - it seems that certain special characters in some languages (Czech, Polish) were somehow being ignored/replaced during the syntax highlighting, which meant they weren't being recognised properly. :oops: Hopefully it's all fixed now; if not, let me know, and in the mean time you should still be able to get it to work by turning off syntax highlighting until I can fix it.

Anyway, the latest version - V1.2.34 - can be found here as usual.
Ormac
Posts: 1154
Joined: Mon, 14. Jan 08, 10:24
x4

Post by Ormac »

Thankyou for creating Exscriptor it is Absolutely Terrific.

Just updated my copy of Exscriptor

One Tiny problem with 1.2.34 is that when you open the about window it still says 1.2.33 (March 20 2010) although the program and manual have been updated.

The Manual has been updated to 1.2.34
And the Changelog has been updated to 1.2.34 as well

The Exscriptor and ExscriptorCmd files are 11/4/2010 21:29 so it looks like it's installed and updated (and the features you've said you added are there just that string in the about text got overlooked)

Anyway keep working on Exscriptor and providing us with this terrific tool.
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

Ormac wrote:One Tiny problem with 1.2.34 is that when you open the about window it still says 1.2.33 (March 20 2010) although the program and manual have been updated.
Well spotted! :oops: Usually I remember to update the About info but not the manual, and this time it was the other way around... Anyway it should be fixed now.
RavenDP2
Posts: 6
Joined: Fri, 27. Nov 09, 11:32
x4

Post by RavenDP2 »

2 Czech,
its better but not much :) If im load script with CZ setting, its look good (cz chars its supported), but in compiling change compiler right char to unsupported char and dont save.

ENGL orig
[ external image ]

CZ after load
[ external image ]

CZ after compile with error message
[ external image ]

Its possible to disable compiler when saving?
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

RavenDP2 wrote:its better but not much :) If im load script with CZ setting, its look good (cz chars its supported), but in compiling change compiler right char to unsupported char and dont save.
:oops: I had to change something in several places and apparently I forgot one of them, hence the problem you found. Anyway, I've hopefully got them all this time so let me know if it works now! (It's still V1.2.34.)
RavenDP2
Posts: 6
Joined: Fri, 27. Nov 09, 11:32
x4

Post by RavenDP2 »

Version V1.2.34 is better. When compiling remain CZ characters, but the error persists. In engl option is error clear.

[ external image ]

Code: Select all

Saving file...
Save failed because of compilation errors - please compile again
Save failed due to compilation errors!
- Error on line 39 - Ill-formed command - many parts present (should be 2 parts)
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

RavenDP2 wrote:Version V1.2.34 is better. When compiling remain CZ characters, but the error persists. In engl option is error clear.
I'm not sure I understand - what error persists? Why is it more clear when the language is set to English? The one you highlighted in your picture should be an error in any language; I think it should just be:

Code: Select all

= wait 100 ms
Anyway, I'm glad V1.2.34 has fixed at least part of the problem... :wink:
RavenDP2
Posts: 6
Joined: Fri, 27. Nov 09, 11:32
x4

Post by RavenDP2 »

Script with lang set 44 - no errors and save
The same script with lang set 42 in option - some errors (picture in previous post) and no save.
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

RavenDP2 wrote:Script with lang set 44 - no errors and save
The same script with lang set 42 in option - some errors (picture in previous post) and no save.
Is it possible for you to upload your script somewhere? That way I can take a look at it properly and figure out what's going wrong, and hopefully test it to make sure it works rather than guessing what the problem is each time.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Is the "Auto Increment Version" supposed to update the script version? I don't think it's working, if so.

Is there a manual way to update the script version?
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Small glitch:

If making a change to a !....pck file and saving it. I get a popup every few secs now with a window "Update? !....pck has been changed since being loaded - update it?"

this only happens if i click on yes to the popup window
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

Litcube wrote:Is the "Auto Increment Version" supposed to update the script version? I don't think it's working, if so.

Is there a manual way to update the script version?
It should update the script version, yes. Whenever you save it should increment it. You can also change it manually in the 'Script Version' box near the name and description etc. It seems to be working okay for me though - are you doing anything different to normal?
draffutt wrote:Small glitch:

If making a change to a !....pck file and saving it. I get a popup every few secs now with a window "Update? !....pck has been changed since being loaded - update it?"

this only happens if i click on yes to the popup window
The update popup window does seem to keep causing problems, but I'm not sure how in this case since you can't save to a .pck file. I took a look at the code and couldn't see anything obviously wrong though. Which files were you working on when you noticed the problem? In the mean time I think you can turn it off in the options - must be quite annoying otherwise... :wink:
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

[ external image ]

I'll try and explain it this way. as you can see in this pic i loaded a !.pck file. of course exscriptor doesn't allow saving as the .pck. now you can see in the output window in the bottom left i saved it as a .xml file but the update pops up asking do you want to load the !.pck and update it. well it can't update because its a .pck. its almost like the update window doesn't realize it needs to look at the .xml file now instead of the .pck. and as i said if i click on yes the popup will popup every couple of seconds asking do you want to update.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

draffutt wrote:I'll try and explain it this way. as you can see in this pic i loaded a !.pck file. of course exscriptor doesn't allow saving as the .pck. now you can see in the output window in the bottom left i saved it as a .xml file but the update pops up asking do you want to load the !.pck and update it. well it can't update because its a .pck. its almost like the update window doesn't realize it needs to look at the .xml file now instead of the .pck. and as i said if i click on yes the popup will popup every couple of seconds asking do you want to update.
I still can't reproduce this bug. The only way I can see that it might happen is if the .pck file was modified after you saved it to .xml, but that's unlikely to happen.

Let me just check I've got the order of events right:
1. You load up a .pck file
2. You try to save, it tells you it can't save to .pck, so you save to .xml instead.
3. Exscriptor starts to pop up the message asking you to update the file.

Another thing that's strange is that in the pop-up in your screenshot, it refers to the .xml file rather than the .pck file...

Could you check the last modified times of your .pck and .xml files when this happens? Maybe that will give me a clue.

But unfortunately I'm not sure what's going on really; I can't reproduce the bug and I can't see anything that might cause it. However, you should probably be able to avoid it in any case by loading the .pck, saving as .xml, then restarting Exscriptor and loading the .xml instead. It's not ideal but until I figure out the cause, I don't have any better suggestions... :(
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Hi!

If you create a script with a command that starts with <RetVar/If> and instead of selecting this, you escape and 'comment' the line out, and save the script, Exscriptor won't be able to open it. It'll return an index error.

You can go back in to the script in game, and deliberately set it yourself, and then Exscriptor will open it just fine.

Some of us old time scriptors comment a line out just to fill in the nulls of optional args. :)

If you need more details, feel free to ask!
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

Hi Whimsy,

there is a small bug with the Exscriptor concerning font sizes. When I increase or decrease the font size using CTRL + Mousewheel the font size changes correctly. But as soon as I type something, it changes back to its state before the zooming.
I guess this should be easy to fix.

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

Post by Whimsy »

Litcube wrote:If you create a script with a command that starts with <RetVar/If> and instead of selecting this, you escape and 'comment' the line out, and save the script, Exscriptor won't be able to open it. It'll return an index error.
I'm not sure entirely what you mean - you mean you don't fill in the command parameters and leave it '<RetVar/IF>'?

Commented commands are difficult to handle but it should at least be able to open it. If I can figure out what's going on, at the least I should be able to get it to load by converting it to a normal string comment (though in that case you won't be able to uncomment it in-game).
ScRaT_GER wrote:there is a small bug with the Exscriptor concerning font sizes. When I increase or decrease the font size using CTRL + Mousewheel the font size changes correctly. But as soon as I type something, it changes back to its state before the zooming.
I guess this should be easy to fix.
Don't be so sure. :wink: This one was reported a while back and I wasn't able to fix it; the problem was that it wasn't clear how the mousewheel changes the font size (it appears to be some kind of built-in functionality), so I couldn't do anything to control it. I can check again but I don't know if it will help. At least you can still change font size normally through the options anyway.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Here's how to recreate it.

- In X3, create a new script.
- Enter a new command on the first line by following: General, Script, Call Script
- Select the first script you see.
- When you come out of that screen, the script call should look like this:

Code: Select all

@  <?>[THIS]-> call script !config.add.wares.few.one: job ship-<?>
- Do not fill anything in.
- Simply comment the line out.
- Now Un-comment the line.
- Save and exit the script.
- Exit X3

- Load Excriptor
- Load the script you just made.
- Get this erro:

Load failed! Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

Figured it out in the end. It seems that X3 outputted things in a slightly different way if you commented/uncommented call commands. Hopefully it's fixed now in V1.2.35. :)
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Whimsy, still using your product of awesomeness.

Anyway to stop the scrolling from jumping around when either compiling, adding a new command from the context menu, or saving?

I code in VS, and I've used MFC, so I know how much a PITA it is dealing with MFC's scroll settings, but I do know it's possible to keep the screen/scroll locked when refreshing the data->view.

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