Exscriptor - new external script editor
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Something you can do to change the font size is
1) Get focus on the particular area (e.g. the main text area or the numbered area)
2) Hold control, spin the mouse wheel forwards
Although you will have to do this every time you reopen the exscriptor.
---
@Whimsy
Any chance we can get the source code?
1) Get focus on the particular area (e.g. the main text area or the numbered area)
2) Hold control, spin the mouse wheel forwards
Although you will have to do this every time you reopen the exscriptor.
---
@Whimsy
Any chance we can get the source code?
I've uploaded some files to support exscriptor AP compatibility:
http://forum.egosoft.com/viewtopic.php?t=312689
My notes on getting exscriptor working with X3AP:-
To let exscriptor load up scripts with X3AP commands:
1. Extract 0001-L044.xml from addon\01.cat
2. Copy out text ids 1538 through 1618 into exscriptor's X3TCCommandParameters.xml
3. Decorate the new items with <command>, <type> and -> using existing entries as examples.
To let the new commands be inserted via the editor, add corresponding entries into X3TCCommandList.txt and organize to taste.
To let exscriptor see the new AP constants (e.g. Bullet.IgnoreShield):
1. Extract and edit a copy of addon\01.cat's 0001-L044.xml
2. Copy the constants from table 382002 into the 2002 table.
3. Package this into a cat file at <root>\t\0001-L044.pck
4. Set exscriptor's mod/cat file option to point at the new cat file
5. Restart exscriptor : constants should appear in the menu
Notes:
The constants aren't the only items exscriptor doesn't see. For example new ship entries. Though for my purposes I only needed to make availble the constants.
0001-L044.xml contains 3 page nodes for constants: 2002, 352002, 382002. The last 2 appear to be extensions to the original table, where the AP constants appear in 382002.
Exscriptor sees the 35 extension table but not the 38 table, where the 35 table contains wing constants. Wings are recent and exscriptor hasn't been updated for a while, so the question is why does exscriptor see the 35 extension table and not the 38 one?
I suspect exscriptor must find extension table IDs by consulting some other table, but what may be happening in the AP case is the new addon folder (also present inside the cat file folder structure) is confusing exscriptor and it only sees the vanilla data.
Possibly the cleanest solution would be to figure out how exscriptor identifies the extension tables, then supply this to exscriptor's mod cat file instead of the hacky method I employed for constants.
http://forum.egosoft.com/viewtopic.php?t=312689
My notes on getting exscriptor working with X3AP:-
To let exscriptor load up scripts with X3AP commands:
1. Extract 0001-L044.xml from addon\01.cat
2. Copy out text ids 1538 through 1618 into exscriptor's X3TCCommandParameters.xml
3. Decorate the new items with <command>, <type> and -> using existing entries as examples.
To let the new commands be inserted via the editor, add corresponding entries into X3TCCommandList.txt and organize to taste.
To let exscriptor see the new AP constants (e.g. Bullet.IgnoreShield):
1. Extract and edit a copy of addon\01.cat's 0001-L044.xml
2. Copy the constants from table 382002 into the 2002 table.
3. Package this into a cat file at <root>\t\0001-L044.pck
4. Set exscriptor's mod/cat file option to point at the new cat file
5. Restart exscriptor : constants should appear in the menu
Notes:
The constants aren't the only items exscriptor doesn't see. For example new ship entries. Though for my purposes I only needed to make availble the constants.
0001-L044.xml contains 3 page nodes for constants: 2002, 352002, 382002. The last 2 appear to be extensions to the original table, where the AP constants appear in 382002.
Exscriptor sees the 35 extension table but not the 38 table, where the 35 table contains wing constants. Wings are recent and exscriptor hasn't been updated for a while, so the question is why does exscriptor see the 35 extension table and not the 38 one?
I suspect exscriptor must find extension table IDs by consulting some other table, but what may be happening in the AP case is the new addon folder (also present inside the cat file folder structure) is confusing exscriptor and it only sees the vanilla data.
Possibly the cleanest solution would be to figure out how exscriptor identifies the extension tables, then supply this to exscriptor's mod cat file instead of the hacky method I employed for constants.
Since Egosoft were kind enough to release a new expansion to lure me back, and since I had a few free days, I updated the Exscriptor with proper X3AP support (bugs notwithstanding). I also went through and fixed as many old bugs as possible, and even implemented a couple of simple new additions. It's a bit late for a Christmas present, but oh well.
Responses to previous entries in the thread:
Litcube - Finally fixed the dots-in-variables bug
h2o.Ava - Fixed the tradeskill bug.
ScRaT_GER - Preprocessor functions as you proposed are very possible, and I gave it a go in 1.2.40, but after running into a few issues it seemed like it'd take more time than I was willing to spend on it.
darkangel666 - Unfortunately I can't implement something like that as a preprocessor macro. I don't know why it doesn't exist in game...
Roger L.S. Griffiths - Glad you managed to get the DLL working, and thanks for the offer. I may also upload the code one day but first I'd have to tidy it up or I'd die of shame if anyone ever saw it.
FriedTrix - I caught the exception, but don't know what caused it. Sorry.
Phezzan - I think you just solved the mystery of the bug ScRaT_GER always experienced; I've redone the layout to use TableLayout now, so I hope it works much better for you now.
Shimrod - Firstly, thanks for uploading the AP command parameter files; it saved me a lot of time! In return (and because it was easy to do ), I added a drop-down list to select open scripts, and also added a 'script set' load/save as a kind of crude workspace.
On Cat/Dats, TFiles, and mods
Speaking of cat/dat files and mods, in theory Exscriptor should have been able to load both external language (.xml) and T files (.txt) from mod cat/dat files for a while now, and yet nobody seems to have been able to get it to work. I took another look at it for 1.2.40 and it seemed to work when I tested it on the XRM mod (after a few bug fixes). If anyone's still having problems with it, let me know ASAP while I still have time to look into it, and I'll try to sort it out once and for all.
Latest Version
Anyway, V1.2.40 is available in the usual place. Apart from X3AP support, highlights include:
- Drop down list to select tabs.
- Better layout to support non-standard font sizes etc.
- Fixes to the font sizes (line numbers should now finally change size properly with the rest of the fonts - yay!).
- Loading and saving of 'script sets': basically lists of open scripts. You can save your list of currently open scripts to a file, close them all, then open the script set file and Exscriptor will reload the full set of scripts again. It's not a proper workspace/project solution, but hopefully it's still useful.
- Following a great idea from mr.bear, I renamed the "random value from 0" command to "random value from zero" to avoid ambiguity.
- Made some fixes to the cat/dat loading, so hopefully it should load from TFiles properly now (but see note above).
- Several other fixes to other things, especially wing commands and a few other compiler bugs.
Responses to previous entries in the thread:
Litcube - Finally fixed the dots-in-variables bug
h2o.Ava - Fixed the tradeskill bug.
ScRaT_GER - Preprocessor functions as you proposed are very possible, and I gave it a go in 1.2.40, but after running into a few issues it seemed like it'd take more time than I was willing to spend on it.
darkangel666 - Unfortunately I can't implement something like that as a preprocessor macro. I don't know why it doesn't exist in game...
Roger L.S. Griffiths - Glad you managed to get the DLL working, and thanks for the offer. I may also upload the code one day but first I'd have to tidy it up or I'd die of shame if anyone ever saw it.
FriedTrix - I caught the exception, but don't know what caused it. Sorry.
Phezzan - I think you just solved the mystery of the bug ScRaT_GER always experienced; I've redone the layout to use TableLayout now, so I hope it works much better for you now.
Shimrod - Firstly, thanks for uploading the AP command parameter files; it saved me a lot of time! In return (and because it was easy to do ), I added a drop-down list to select open scripts, and also added a 'script set' load/save as a kind of crude workspace.
To answer your questions, in case you're still curious, the 35xxxx pages were added by X3TC, so I added those when I added X3TC support. Exscriptor didn't know to look for the 38xxxx pages at all, but hopefully it gets all the new information correctly now, although X3AP still had a few strange surprises in store that I had to work around.Shimrod wrote:Exscriptor sees the 35 extension table but not the 38 table, where the 35 table contains wing constants. Wings are recent and exscriptor hasn't been updated for a while, so the question is why does exscriptor see the 35 extension table and not the 38 one?
I suspect exscriptor must find extension table IDs by consulting some other table, but what may be happening in the AP case is the new addon folder (also present inside the cat file folder structure) is confusing exscriptor and it only sees the vanilla data.
Possibly the cleanest solution would be to figure out how exscriptor identifies the extension tables, then supply this to exscriptor's mod cat file instead of the hacky method I employed for constants.
On Cat/Dats, TFiles, and mods
Speaking of cat/dat files and mods, in theory Exscriptor should have been able to load both external language (.xml) and T files (.txt) from mod cat/dat files for a while now, and yet nobody seems to have been able to get it to work. I took another look at it for 1.2.40 and it seemed to work when I tested it on the XRM mod (after a few bug fixes). If anyone's still having problems with it, let me know ASAP while I still have time to look into it, and I'll try to sort it out once and for all.
Latest Version
Anyway, V1.2.40 is available in the usual place. Apart from X3AP support, highlights include:
- Drop down list to select tabs.
- Better layout to support non-standard font sizes etc.
- Fixes to the font sizes (line numbers should now finally change size properly with the rest of the fonts - yay!).
- Loading and saving of 'script sets': basically lists of open scripts. You can save your list of currently open scripts to a file, close them all, then open the script set file and Exscriptor will reload the full set of scripts again. It's not a proper workspace/project solution, but hopefully it's still useful.
- Following a great idea from mr.bear, I renamed the "random value from 0" command to "random value from zero" to avoid ambiguity.
- Made some fixes to the cat/dat loading, so hopefully it should load from TFiles properly now (but see note above).
- Several other fixes to other things, especially wing commands and a few other compiler bugs.
Thanks Whimsy. I had a problem initially with 1.2.40 'could not load X3AP data', but I found that this fixed itself if I configured X3TC paths in addition to X3AP ones.
I love the script set feature and the dropdown with alphabetical order.
A minor point, if its not too much trouble perhaps the dropdown could size to fit more than 8 entries as a future enhancement. It's easy enough to scroll it with the mouse wheel otherwise though.
Cheers
I love the script set feature and the dropdown with alphabetical order.
A minor point, if its not too much trouble perhaps the dropdown could size to fit more than 8 entries as a future enhancement. It's easy enough to scroll it with the mouse wheel otherwise though.
Cheers
Hi Whimsy,
nice to see you back.
Is there any chance you could make the source code available (i.e. on GitHub)? I think there are quite a few who'd be willing to contribute and it could be a good source of knowledge.
Greetings,
ScRaT
nice to see you back.
Is there any chance you could make the source code available (i.e. on GitHub)? I think there are quite a few who'd be willing to contribute and it could be a good source of knowledge.
Yes, I know. I'm currently trying to implement them myself (in a project of my own). Besides that, compiling is still a problem (especially resolving jumps), so it'll be a while until I get there.ScRaT_GER - Preprocessor functions as you proposed are very possible, and I gave it a go in 1.2.40, but after running into a few issues it seemed like it'd take more time than I was willing to spend on it.
Greetings,
ScRaT
Well spotted - I've fixed them now. I also extended the size of the drop-down tab selection box thingy.Shimrod wrote:2 of the 'get user input' command entries are missing '->' in the TC and AP command parameters files.
Perhaps.ScRaT_GER wrote:Is there any chance you could make the source code available (i.e. on GitHub)? I think there are quite a few who'd be willing to contribute and it could be a good source of knowledge.
Anyway, latest version (V1.2.41) is available on the first page or here.
That would be cool.Perhaps.
A small bug I'm encountering sometimes: When opening Exscriptor it is minimized and cannot be maximised. I noticed that it always sets "window maximised" to False and also the "window y pos" gets a huge negative value (something like -32700 (maybe -2^15?)). To get it working again I have to delete these values from the config.dat.
Unfortunately I don't know how to reproduce that bug.
Greetings,
ScRaT
-
- Posts: 2
- Joined: Sun, 26. Apr 09, 08:57
Hey, Whimsy. First let me thank you for all your hard work in making Exscripter, I am very grateful to have it and use it more then I do the MCSI.
If you are looking for input on exscriptcmd, I have a couple of bugs to report, and a suggestion for an enhancement to make it easier to use:
1. I have noticed that it expects some data files to be in the current directory, forcing one to start it in the directory it is installed. I recommend you add code that searches for those files in the same location as the executable instead of just the current directory. (for example you can use the directory name argv[0], except if the program was in the PATH)
I get the following error when using an absolute path name (e.g. "K:\devel\workspace\makeitso\modules\x3tc\scripts\*.txt"):
And a different error attempting to use a relative path (e.g. "..\scripts\*.txt"):
If you are looking for input on exscriptcmd, I have a couple of bugs to report, and a suggestion for an enhancement to make it easier to use:
1. I have noticed that it expects some data files to be in the current directory, forcing one to start it in the directory it is installed. I recommend you add code that searches for those files in the same location as the executable instead of just the current directory. (for example you can use the directory name argv[0], except if the program was in the PATH)
I get the following error when using an absolute path name (e.g. "K:\devel\workspace\makeitso\modules\x3tc\scripts\*.txt"):
Code: Select all
Unhandled Exception: System.ArgumentException: Second path fragment must not be a drive or UNC name.
Parameter name: path2
at System.IO.Path.InternalCombine(String path1, String path2)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)http://forum.egosoft.com/viewtopic.php?t=211689
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at CmdLineVersion.Program.Main(String[] args)
Code: Select all
Unhandled Exception: System.ArgumentException: Search pattern cannot contain ".." to move up directories and can be contained only internally in file/directory names, as in "a..b".
at System.IO.Path.CheckSearchPattern(String searchPattern)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at CmdLineVersion.Program.Main(String[] args)
Huh, maybe this is a syntax checking bug
Use the example on
http://forum.egosoft.com/viewtopic.php?t=296301
will get a red line for
$marine.fight.skill = $marine -> get marine fighting skill
saying
It seems that Exscriptor can not recognise all 'get marine xxx skill'
Using Exscriptor, Version 1.2.41, Released 2 January 2012
Use the example on
http://forum.egosoft.com/viewtopic.php?t=296301
will get a red line for
$marine.fight.skill = $marine -> get marine fighting skill
saying
Code: Select all
Saving file...
Save failed because of compilation errors - please compile again
Save failed due to compilation errors!
- Error on line 6 - Unrecognised symbol in expression: get
Using Exscriptor, Version 1.2.41, Released 2 January 2012
What am I doing wrong for set-up? for Albion :
addon
C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\addon
scripts
C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\addon\Scripts
Mod/cat dat
C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\addon\01.cat
Says "Could not load X3AP data" always ...
addon
C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\addon
scripts
C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\addon\Scripts
Mod/cat dat
C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\addon\01.cat
Says "Could not load X3AP data" always ...
Got the same issue but my path for Mod/cat don't take the 01.cat into account
Maybe your issue is there. But well, I hope not, I would like not to be the only one with that issue
EDIT : just got it resolved! You have to specify X3:TC options too! Then it takes 10 secondes to me to load data and I was operationnal
Maybe your issue is there. But well, I hope not, I would like not to be the only one with that issue
EDIT : just got it resolved! You have to specify X3:TC options too! Then it takes 10 secondes to me to load data and I was operationnal
-
- Posts: 25
- Joined: Sat, 4. Feb 12, 00:46
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Thank you for the excellent tool, Whimsy. It is much easier to write good code with Exscriptor than with the Script Editor!
Report: Version 1.2.41 cannot decode ware names use by the Color Coded Freight Menu Mod, which adds color codes to t\0004.xml.
Workaround: Uninstall Color Coded Freight Menu Mod before editing session, then reinstall when done.
Report: Version 1.2.41 cannot decode ware names use by the Color Coded Freight Menu Mod, which adds color codes to t\0004.xml.
Workaround: Uninstall Color Coded Freight Menu Mod before editing session, then reinstall when done.
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Problem
Greetings,
Thanks for a great program, I wouldn't be writing any scripts if Exscriptor didn't exist.
Unfortunately, I have a bug report. Ever since the X3AP 2.0 update, when a script is opened (X3AP Mode) that contains "skip if not," Exscriptor 1.2.41 changes it to "do if," which is a Mission Director command. And it returns a fatal error when trying to save the script because it doesn't recognize "do if" as being valid.
If it is changed back to "skip if not" and saved, everything is fine until the script is closed and reopened where is goes back to "do if" again.
EDIT1: Correction: it's a mistake in the T-file not Exscriptor. I'll submit a bug report to EGOSOFT.
EDIT2: Apparently, it is not a mistake in the T-file but rather an intended change by EGOSOFT. "skip if not" is now "do if" but Exscriptor doesn't recognize it as being valid.
Have a nice day!
A.Persyn
Thanks for a great program, I wouldn't be writing any scripts if Exscriptor didn't exist.
Unfortunately, I have a bug report. Ever since the X3AP 2.0 update, when a script is opened (X3AP Mode) that contains "skip if not," Exscriptor 1.2.41 changes it to "do if," which is a Mission Director command. And it returns a fatal error when trying to save the script because it doesn't recognize "do if" as being valid.
If it is changed back to "skip if not" and saved, everything is fine until the script is closed and reopened where is goes back to "do if" again.
EDIT1: Correction: it's a mistake in the T-file not Exscriptor. I'll submit a bug report to EGOSOFT.
EDIT2: Apparently, it is not a mistake in the T-file but rather an intended change by EGOSOFT. "skip if not" is now "do if" but Exscriptor doesn't recognize it as being valid.
Have a nice day!
A.Persyn
Great tool!
I would like to see an improvment : would it be possible to organize opened file by name in a tree, each dot in name being a node of that tree?
exemple
plugin
-- myMod
---- script1
---- script2
-- yourMod
---- script1
---- script2
It would make this editor the ultimate script resource for mod with lot of script
I would like to see an improvment : would it be possible to organize opened file by name in a tree, each dot in name being a node of that tree?
exemple
plugin
-- myMod
---- script1
---- script2
-- yourMod
---- script1
---- script2
It would make this editor the ultimate script resource for mod with lot of script
Thanks für this great tool.
Could have saved much work if I only found earlier
Besides of the "skip if not" problem mentioned above would it be possible to:
In this case: Sorry - but please tell me the page the information can be found. Thanks.
Could have saved much work if I only found earlier
Besides of the "skip if not" problem mentioned above would it be possible to:
- Add a copy/paste to context menu?
- Make variables, expressions and text in brackets (like "<RetVar/IF>" - including the brackets), selectable as whole?
- Make conditions collapsable (would make finding of misplaced or missing ENDs much easier)?
In this case: Sorry - but please tell me the page the information can be found. Thanks.