[PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Hey Mr. Bear,
Firstly; thank you for an extremely professional MSCI editing environment!
Now that I have buttered you up, a bug report:
Cheers.
Firstly; thank you for an extremely professional MSCI editing environment!
Now that I have buttered you up, a bug report:
Code: Select all
Issue: using a % sign as the last character of a string within an MSCI script causes your parser on re-loading the script to remove the % sign.
Example1: $string = '100%' becomes $string = '100'
Example2: $string = '100%%' becomes $string = '100%'
Cause: reloading of the script or restarting of X-Studio
Workaround: do not re-load scripts and do not exit X-Studio
- RedEclipse
- Posts: 1269
- Joined: Sat, 11. Sep 04, 16:43
Progressing... Still ugly.mr.bear wrote:ok, it sounds like you're taking quite a different approach than i did.
best of luck,
mr.bear
http://www.hostingpics.net/viewer.php?id=36485667MC.jpg
Known bugs in the "Start" cue (miss a "new" before the cue, it's how I translate "instanciate = true) and non translated conditions (still thinking of a design for that, I stoped there @00:00AM yesterday).
(very very) partial scanner only for MD -> MC for the moment. MC -> MD in a month or more.
Again, my intention is not to go against your stuff, in fact I'll make the scanners/compiler public, or something like that I don't really know, once done if you like that you'll be free to use them.
"AaaAaaAah ! They're everywhere...", Jane Doe, Freedom Force.
When you work on a mod located is some place, lets say: D:/games/X3/mods/BigBang1, Xstudio will open any script, if you right klick on a script call and then choose "Open Target Script", if that script is is the same folder.
BUT, if a script, like a vanilla script, is being called, this script will be in the C:/gamefolder.
Trying to open that script will lead to this error:
BUT, if a script, like a vanilla script, is being called, this script will be in the C:/gamefolder.
Trying to open that script will lead to this error:
Could you add an option, to add paths, where Xstudio should also look for scripts, or is that option included, and I am not able to find it?The external MSCI script 'script.in.some.place' is unavailable or could not be accessed
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Rather than right-click, just drag-and-drop files onto X-Studio.
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)
I haven't seen that before. I will look into it.Shush wrote:using a % sign as the last character of a string within an MSCI script causes your parser on re-loading the script to remove the % sign.
mr.bear
that screenshot looks promising. some syntax colouring might help make things easier to understand.RedEclipse wrote:Progressing... Still ugly.
http://www.hostingpics.net/viewer.php?id=36485667MC.jpg
mr.bear
hi nicoman,Nicoman35 wrote:When you work on a mod located is some place, lets say: D:/games/X3/mods/BigBang1, Xstudio will open any script, if you right klick on a script call and then choose "Open Target Script", if that script is is the same folder. BUT, if a script, like a vanilla script, is being called, this script will be in the C:/gamefolder.
Could you add an option, to add paths, where Xstudio should also look for scripts, or is that option included, and I am not able to find it?
I hadn't thought of that. it's a bit late in the day to be adding features to x-studio (i'll be releasing x-studio 2 next week) so i've added your feature to that instead. it searches the document folder first, then the game folder.
mr.bear
Last edited by mr.bear on Tue, 11. Mar 14, 21:19, edited 2 times in total.
Rapunzel, Rapunzel, let down your bear...
I DO drag-and-drop them now, but as a lazy man, I do much apreciate things that make things even easyer than that.DrBullwinkle wrote:Rather than right-click, just drag-and-drop files onto X-Studio.
WOOT - once again - many thanks for your support, Mr. Bear!mr.bear wrote:..it's a bit late in the day to be adding features to x-studio (i'll be releasing x-studio 2 next week) so i've added your feature to that instead. it searches the document folder first, then the game folder.
here's a preview of some of the new features: code refactoring, difference viewer, language file tag editor
[ external image ] [ external image ] [ external image ]
global find & replace, named script-arguments in all script-call commands, intellisense-style commenting, and better syntax-error feedback
[ external image ] [ external image ] [ external image ] [ external image ]
i don't have a picture yet but x-studio II has in-built script version control, and some commands now support variable arguments. (eg. 'sprintf', 'create new array', and all script-calls)
also, all the 'normal' editing features work properly throughout the program: undo/redo, cut/copy/paste, code indentation, national symbol input etc.
mr.bear
[ external image ] [ external image ] [ external image ]
global find & replace, named script-arguments in all script-call commands, intellisense-style commenting, and better syntax-error feedback
[ external image ] [ external image ] [ external image ] [ external image ]
i don't have a picture yet but x-studio II has in-built script version control, and some commands now support variable arguments. (eg. 'sprintf', 'create new array', and all script-calls)
also, all the 'normal' editing features work properly throughout the program: undo/redo, cut/copy/paste, code indentation, national symbol input etc.
mr.bear
Last edited by mr.bear on Tue, 11. Mar 14, 21:33, edited 1 time in total.
Rapunzel, Rapunzel, let down your bear...
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Diff... sweet! Looks like a lot of great stuff!
(any chance of properly indenting if/else/end statements inside of subs?)
(any chance of properly indenting if/else/end statements inside of subs?)
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)
I came to hate x-studio's automatic indentation because it made my code bounce around too much when I was editing it. identation is manual in x-studio 2 (like visual studio).
It automatically places the cursor for you when you start a new line, and there are 'format selection' and 'format document' editor commands.
simple answer is 'yes', subroutine code is properly indented
mr.bear
It automatically places the cursor for you when you start a new line, and there are 'format selection' and 'format document' editor commands.
simple answer is 'yes', subroutine code is properly indented
mr.bear
Last edited by mr.bear on Tue, 11. Mar 14, 21:38, edited 1 time in total.
Rapunzel, Rapunzel, let down your bear...
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Nice.
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)
/agreeNicoman35 wrote:*slobber*
Loving the new visual studio look 'n' feel
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
- hourheroyes
- Posts: 346
- Joined: Mon, 9. Apr 12, 05:14
Hi,
I've just tried using X-Studio after many years of working with Exscriptor and I've found a few issues and got a couple of suggestions.
Although extremely fast, your generated code adds 500K to one of my largest script files (similar to Exscriptor).
If I save the file in X3, it takes 15.3 seconds and is 2,136K, Exscriptor took 265 seconds (4.5 minutes) to save and the file was 2,608K and X-Studio took only 4.6 seconds but produced the biggest file at 2,637K.
The tabs are difficult to navigate because of the different sizes, multiple rows and the files are not in alphabetical order. for example, these are the scripts I usually have open:
http://www.tecsg.co.uk/scs/Tabs.jpg
The '.xml' could also be removed from the text on the tab (I would assume the most common file type to have open would be .xml). It would be useful if there was a 'Reload Script' option for when scripts are modified in X3 that are open in X-Studio, or, even better, for X-Studio to detect when a script is modified and prompts to reload (like Exscriptor).
Can an option to turn off the Script Engine version number errors be added? I use scripts written in AP which work perfectly well in X3 as long as none of the additional commands are used, but they throw up errors because the game version is 'too high'.
Finally, found this bug if you have too many 'end' commands:
[ external image ]
Other than that, you've written a pretty efficient and handy editor there. Many thanks.
Update: Also now noticed X-Studio has renamed several of my variables 'XStudio.Hidden' and screwed up some of my scripts.
I've just tried using X-Studio after many years of working with Exscriptor and I've found a few issues and got a couple of suggestions.
Although extremely fast, your generated code adds 500K to one of my largest script files (similar to Exscriptor).
If I save the file in X3, it takes 15.3 seconds and is 2,136K, Exscriptor took 265 seconds (4.5 minutes) to save and the file was 2,608K and X-Studio took only 4.6 seconds but produced the biggest file at 2,637K.
The tabs are difficult to navigate because of the different sizes, multiple rows and the files are not in alphabetical order. for example, these are the scripts I usually have open:
http://www.tecsg.co.uk/scs/Tabs.jpg
The '.xml' could also be removed from the text on the tab (I would assume the most common file type to have open would be .xml). It would be useful if there was a 'Reload Script' option for when scripts are modified in X3 that are open in X-Studio, or, even better, for X-Studio to detect when a script is modified and prompts to reload (like Exscriptor).
Can an option to turn off the Script Engine version number errors be added? I use scripts written in AP which work perfectly well in X3 as long as none of the additional commands are used, but they throw up errors because the game version is 'too high'.
Finally, found this bug if you have too many 'end' commands:
[ external image ]
Other than that, you've written a pretty efficient and handy editor there. Many thanks.
Update: Also now noticed X-Studio has renamed several of my variables 'XStudio.Hidden' and screwed up some of my scripts.
This is not in anyway a complaint or even a feature request, (X-Studio is a magnificent tool), but I wanna' play to!TECSG wrote:The tabs are difficult to navigate because of the different sizes, multiple rows and the files are not in alphabetical order. for example, these are the scripts I usually have open:
http://www.tecsg.co.uk/scs/Tabs.jpg
http://s0.uploads.im/sihbW.jpg
P.S. I don't browse for my scripts using the tabs, (that's almost impossible), I use the Project Explorer pane; so if I was going to make a feature request, (which I have already stated I am not), then I would ask for a simple toggle to turn the tabs on and off.
it's probably formatting. exscriptor/msci outputs all the code on a single line, but x-studio writes every value on a separate line so i can debug easier.TECSG wrote:Although extremely fast, your generated code adds 500K to one of my largest script files (similar to Exscriptor).
If I save the file in X3, it takes 15.3 seconds and is 2,136K, Exscriptor took 265 seconds (4.5 minutes) to save and the file was 2,608K and X-Studio took only 4.6 seconds but produced the biggest file at 2,637K.
Re: tabs on multiple lines - I can't do anything about the annoying tabs. i just use the project window too.
TECSG wrote:It would be useful if there was a 'Reload Script' option for when scripts are modified in X3 that are open in X-Studio, or, even better, for X-Studio to detect when a script is modified and prompts to reload (like Exscriptor).
i could both of those to x-studio 2.TECSG wrote:Can an option to turn off the Script Engine version number errors be added? I use scripts written in AP which work perfectly well in X3 as long as none of the additional commands are used, but they throw up errors because the game version is 'too high'.
I've never seen that before.TECSG wrote:[ external image ]
those are variables that've been replaced as part of a macro (maybe a 'for' loop). they don't change the logic of your code though.TECSG wrote:Update: Also now noticed X-Studio has renamed several of my variables 'XStudio.Hidden' and screwed up some of my scripts.
mr.bear
Rapunzel, Rapunzel, let down your bear...
Hi,
I think I've found the issue with my scripts being corrupted.
When X-Studio saves a script, it seems to ignore the case sensitivity of variables.
I have several scripts with the same name is used for a variable but with different case (ie, ships and SHIPS) which X3 treats as different variables.
However once such a script is saved with X-Studio, the two variable will both be converted to the same.
As a test I created a script in X3 that defined 2 variables
Hope that helps.
I think I've found the issue with my scripts being corrupted.
When X-Studio saves a script, it seems to ignore the case sensitivity of variables.
I have several scripts with the same name is used for a variable but with different case (ie, ships and SHIPS) which X3 treats as different variables.
However once such a script is saved with X-Studio, the two variable will both be converted to the same.
As a test I created a script in X3 that defined 2 variables
- VARIABLEone and
variableONE
Hope that helps.