EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
Exscriptor - new external script editor
Post new topic Reply to topic Goto page 1, 2, 3 ... 35, 36, 37  Next
View previous topic :: View next topic
Author Message
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
modified
PostPosted: Sat, 26. Jul 08, 18:10    Post subject: Exscriptor - new external script editor Reply with quote Print

==========
EXSCRIPTOR
==========

Summary
----------------
The Exscriptor is an (unofficial) external script editor for X2, X3, X3TC, and X3AP that allows you to:

- Open existing X2/X3/TC/AP scripts in both .XML and .PCK format
- Create new X2/X3/TC/AP scripts (.XML)
- Compile the script to check for any syntax errors
- Save scripts as .XML or in simple .TXT format

The editor uses the X2, X3, X3TC, and/or X3AP data files, so all the possible commands, wares, ships, stations and so forth will be available, including those present in unpacked mods or patches (but not files in the 'mods' directory). The program also supports the use of data files in different languages (though the editor's interface and the script commands themselves are only in English). Since X3 offers a large number of commands and objects, these are visible in a list onscreen, so you do not have to remember them all.

You will need Windows and the Microsoft .NET Framework for the program to run. You will also need either X2 or X3 or X3TC or X3AP installed (or all of them) as the editor uses the game's data files - it will ask you where to find them when it first runs.

Screenshot of interface: screenshot

Features of current version includes:

- Command Line version
- Preprocessor macros like foreach, for loops, and inline array initialisation.
- Prototype Script comparator, highlighting differences between two scripts.
- Checking of scripts for things like use of unassigned variables, invalid expressions, and if/while commands not matching up with corresponding else/ends.
- Backs up scripts (copying as a .bak) before overwriting them.
- Conflict viewer: view ID conflicts in language files.
- Change appearance - colours and fonts etc
- Check to see if script file has changed since you loaded it
- Lots and lots of bug fixes!

Current version is:
Version 1.2.43 - X3AP support, several more bug fixes and a few other minor improvements


Alternatively, why not try out mr.bear's X-Studio - a newer script editor with even more features? Smile


Downloads:

V1.2.43 (For X3AP, X3TC, X3, and X2)
-------------------------------------
Use at your own risk and make regular backups!

From Blackpanthergroup (courtesy of Blacky_BPG - thanks!)
Available as an installer here or as a zip here.

From Mediafire:
Available as an installer here or as a zip here.


Thanks to all the people who have pointed out bugs and suggested improvements so far! Smile

[Edited to update links to V1.2.43]



Last edited by Whimsy on Wed, 24. Jul 13, 01:01; edited 84 times in total
Back to top
View user's profile Send private message
Draakon





Joined: 21 Jul 2008



PostPosted: Sat, 26. Jul 08, 18:15    Post subject: Reply with quote Print

Does this support EMP?

Back to top
View user's profile Send private message
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
PostPosted: Sat, 26. Jul 08, 18:30    Post subject: Reply with quote Print

Quote:
Does this support EMP?


It should do. It checks the Type files for wares and then looks up their names in the language files, so if it appears in those then it should be in the editor. But I'm not 100% certain.

I know it works with XTM, though, and I think that uses the EMP?

Back to top
View user's profile Send private message
Blacky_BPG





Joined: 24 Feb 2004
Posts: 2015 on topic
Location: MV's wahre Hauptstadt: ROSTOCK
Thank you for registering your game
PostPosted: Sat, 26. Jul 08, 22:06    Post subject: Reply with quote Print

Ok, the idea is great, i love external SE for use with X3.
I used the X3-ExternalScriptEditor by Cool_SnipeR ... and i like it.
I wanted to test yours now because he reads the data directly from the X3 directory there.
But now the Problem:
Code:
Unhandled Exception: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 18961, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean prese
rveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at X3_Script_Editor.XData.loadLanguageFiles()
   at X3_Script_Editor.XData.initialise(String pathToX3, String lang)
   at X3_Script_Editor.Editor.Initialise()
   at X3_Script_Editor.Editor..ctor()
   at X3_Script_Editor.Editor.Main()


My configuration of X3:
- RAW-Mode (all cat/dat unpacked -> NO cat/dat in X3 dir)
- ONLY 49xxxx textfiles in t directory (yes, i changed the config.dat language to 49)
- XTM installed

QUESTION 1:
Can you add a advanced ErrorMessage with the file name to find the invalid character. Line 18961, position 1 file???

QUESTION 2:
I could not try it out yet but reads your program the script commands from the <codearray> or from the <sourcetext> section of a Script?


_________________


Back to top
View user's profile Send private message Visit poster's website
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Sat, 26. Jul 08, 23:55    Post subject: Reply with quote Print

*Blinks* I wish I had heard of one of these sooner..
Dont suppose anyone could link me to the other so I can compare them?

Btw, how come neither are listed in the tutes + resources sticky



*Edit*
I'm having troubles running it, I'm running on Windows XP Service pack.. something with Net framework 3.5 and it wont open. When I start it goes to the command prompt black screen, I select my install directories, then that closes and it gives a generic error message
Exscriptor.exe has encountered a problem and needs to close. We are sorry for this inconvenience.

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 00:42    Post subject: Reply with quote Print

Draakon wrote:
Does this support EMP?


Okay, update on this - I tested it on a fresh install (X3 v2.5) with just the EMP and yes, it does work - but only wares that have been given names in a language file will show up. So if you want to use an EMP ware in the editor you need to give it a name first.

Blacky_BPG wrote:
Can you add a advanced ErrorMessage with the file name to find the invalid character. Line 18961, position 1 file???


I've updated the program to beef up the error reporting - it should be better at reporting errors and now a log file (errorlog.txt) is made too. You can get the new version here - just unzip and copy over the old one (I'll edit the first post to update the links in a minute).

I'm a bit confused by your error though - I'm pretty sure it's having trouble loading your 490001.xml (that's the one I forgot to add the filename to). Could you open up that file and check that location to see if there's anything weird there? It shouldn't be the raw/unpacked stuff that's the problem - I tested that and it seems to work okay.

Blacky_BPG wrote:
I could not try it out yet but reads your program the script commands from the <codearray> or from the <sourcetext> section of a Script?


It reads from the codearray. The program basically ignores the sourcetext when loading a script; when saving a new script it will generate both the codearray and the sourcetext so it should be visible both in and out of the game.

s9ilent wrote:
I'm having troubles running it, I'm running on Windows XP Service pack.. something with Net framework 3.5 and it wont open.


It sounds like you might not have the latest .NET Framework installed. You can obtain it from Microsoft here - see if that fixes the problem. Smile

Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 00:50    Post subject: Reply with quote Print

Sad That's the Net framework that I have Sad
I don't suppose your program makes an error log somewhere?

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 02:03    Post subject: Reply with quote Print

s9ilent wrote:
I don't suppose your program makes an error log somewhere?


It does now I've updated it. I improved the error detection too so hopefully it'll give us more information about why its crashing. Sad It sounds like something is probably going wrong when loading the data files - what sort of mods/scripts do you have installed, if any? Maybe it's getting confused by one of them.

If the new version doesn't help, I might try adding in some sort of option to temporarily disable loading of extra/mod files, to help narrow it down.

Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2009 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 03:02    Post subject: Reply with quote Print

Ok, I've run the new version now (1.001) and it opens, but it says...

Error Log
---------

Exception occurred:
Message: Could not read from the main language XML file, 440001.xml: '.', hexadecimal value 0x00, is an invalid character. Line 18794, position 1.
Stack Trace: at X3_Script_Editor.XData.loadLanguageFiles()
at X3_Script_Editor.XData.initialise(String pathToX3, String lang)
at X3_Script_Editor.Editor.Initialise()
Source: X3 Script Editor V3
Target: Void loadLanguageFiles()

-------------------------------------------



I'm making my own mod atm, so I've got a few extra scripts and my own cat/dat (but its a mod and uses 447042 or something like that, and not false patched or anything)
My x3 directory is very messy thou as its actually 8 gb, (i'm guessing 3 from the game, 5 from me unpacking all the games files)
Where is it trying to read the file from?

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 12:36    Post subject: Reply with quote Print

s9ilent wrote:
I'm making my own mod atm, so I've got a few extra scripts and my own cat/dat (but its a mod and uses 447042 or something like that, and not false patched or anything)
My x3 directory is very messy thou as its actually 8 gb, (i'm guessing 3 from the game, 5 from me unpacking all the games files)
Where is it trying to read the file from?


As far as I'm aware (I use doubleshadow's library to open the files), it should try to load an unpacked file first, then a packed one if it can't find that, then the one in the cat/dat as a last resort, so if you have 440001.xml or 440001.pck in your "\t" directory it should load that one. If your directory is really complex though I'm not sure which versions of all the different files will get loaded in the end...

I've uploaded a new version (1.002) that should hopefully fix the hexadecimal value 0x00 problem though, so try that.

Back to top
View user's profile Send private message
Blacky_BPG





Joined: 24 Feb 2004
Posts: 2015 on topic
Location: MV's wahre Hauptstadt: ROSTOCK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 13:01    Post subject: Reply with quote Print

@s9silent
Here the link for the ExternalScriptEditor by Cool_SnipeR:
Version 0.9.9.0 RC1
Hotfix 0.9.9.1
But I think if the Exscriptor running fine it would be better to use this tool because the Exscriptor reads the data directly from the X3 directory.

Version 1.003(*) can't read & in text files, but this is a smaller error. I fixed the & to an +. But now I have this error at programm start:
Code:
Exception occurred:
Message: Object reference not set to an instance of an object.
Stack Trace:    at X3_Script_Editor.XData.loadLanguageFiles()
   at X3_Script_Editor.XData.initialise(String pathToX3, String lang)
   at X3_Script_Editor.Editor.Initialise()
Source: X3 Script Editor V3
Target: Void loadLanguageFiles()

And yes, the 0x00 error is fixed up now.

Second test: I've made a cat/dat with the t and types directory and start Exscriptor again, the error is the same.

(*) The new Version in the program (Help -> About) is 1.003 not 1.002.


_________________


Back to top
View user's profile Send private message Visit poster's website
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 14:17    Post subject: Reply with quote Print

Blacky_BPG wrote:
Version 1.003(*) can't read & in text files, but this is a smaller error. I fixed the & to an +


Which text file? If it's a .XML file then the & sign will cause problems, but you can get around it by replacing an & with &amp;. It'll load in Internet Explorer then too. Similarly if you need to use < or >, which have the same problem, you can replace them with &lt; and &gt;.

Quote:
But now I have this error at programm start:
Exception occurred:
Message: Object reference not set to an instance of an object.


Hmm. I've tried to figure out what's causing this, so let's see if I've guessed right with the new version. If I'm right, it was trying to load from a page id that wasn't there.

Blacky_BPG wrote:
But I think if the Exscriptor running fine it would be better to use this tool because the Exscriptor reads the data directly from the X3 directory.


"If" being the important word! The other editor has some cool features though, like the autocomplete, and I think it likely has a better command parser.

Blacky_RPG wrote:
(*) The new Version in the program (Help -> About) is 1.003 not 1.002.


Oops... Embarassed The new one definitely is 1.003 now! Though thinking about it, I forgot to change the manual...

Back to top
View user's profile Send private message
Blacky_BPG





Joined: 24 Feb 2004
Posts: 2015 on topic
Location: MV's wahre Hauptstadt: ROSTOCK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 21:34    Post subject: Reply with quote Print

Yes, I mean an xml text file. Thats right, I can change it to &amp; Headbang

Now I have the file for the error:
Code:
Error while loading: E:\X3\t\498400.xml: Object reference not set to an instance of an object.

What do you mean with it was trying to load from a page id that wasn't there? The ID is not in text file or a not existing reference in a types file?
The 498400.xml is my test text file with many different data in it. If you wish you can download the file for testing: 498400.xml (in RAR)


Yeah, "IF" is important, thats right. But I am confident that the Exscriptor works soon.


Exscriptor ABOUT Menu wrote:
Version 1.003 - for real this time
LOL, thats cool Very Happy



AAARRGGGHH, the invalid hex 0x00 error for script files is back.


_________________


Back to top
View user's profile Send private message Visit poster's website
Whimsy





Joined: 09 Feb 2004
Posts: 167 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 27. Jul 08, 23:47    Post subject: Reply with quote Print

Blacky_BPG wrote:
Now I have the file for the error:
Code:
Error while loading: E:\X3\t\498400.xml: Object reference not set to an instance of an object.


I checked the file and figured out what it was - it was trying to read an ID from a comment and was getting confused. Rolling Eyes

Quote:
What do you mean with it was trying to load from a page id that wasn't there? The ID is not in text file or a not existing reference in a types file?


I thought it was still the xx0001 language file, and maybe trying to read a page that didn't exist in the file.

Quote:
AAARRGGGHH, the invalid hex 0x00 error for script files is back.


Hopefully I managed to fix it (again). New version here and I'll update the first post (again).

Back to top
View user's profile Send private message
Blacky_BPG





Joined: 24 Feb 2004
Posts: 2015 on topic
Location: MV's wahre Hauptstadt: ROSTOCK
Thank you for registering your game
PostPosted: Mon, 28. Jul 08, 00:14    Post subject: Reply with quote Print

Ok, Version 1.004 has a text file comment detection included ... IT WORKS FINE WITH NO ERROR ... at the moment

Great Work, I have opend a large script file (470kb only codearray) without problems (a little slow maybe but I think that is my weak machine here Evil or Very Mad)
    [EDIT]
    Yeah, its my machine, ExSE open the script in same time


And what I said? -> If it running fine... -->> [And its running fine.] Thumb up Thumb up


_________________


Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3 ... 35, 36, 37  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Sat, 23. Jun 18, 10:08

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.15721 seconds, sql queries = 29