[PROGRAM] X-Studio 2 Script Editor [Beta III : 30th Mar 14]
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 2880
- Joined: Fri, 17. Feb 06, 04:55
I always wondered why Exscriptor used the apostrophes for string identification, and XS/2 follows suit.
I'd have thought that using " to begin/end a string would be better, as I don't know why anybody would use it in a string to start with, so would, logically, not cause problems. Or, at least, not as many.
Leave it to contractions to cause a script editor problems.
As for the script call using [THIS] as an argument being improper, this hasn't stopped people from doing it, and the game seems to accept it. Weird.
Took me a couple tries to figure out which argument check was doing it
I'd have thought that using " to begin/end a string would be better, as I don't know why anybody would use it in a string to start with, so would, logically, not cause problems. Or, at least, not as many.
Leave it to contractions to cause a script editor problems.
As for the script call using [THIS] as an argument being improper, this hasn't stopped people from doing it, and the game seems to accept it. Weird.
Took me a couple tries to figure out which argument check was doing it
-
- Posts: 2993
- Joined: Sun, 25. Dec 05, 10:42
There are reasons to use " in a string, which is why the " escape sequence exists in practically all programming languages, but we wont to too far into that, suffice to say ' is used because the game used ' - in python for example you can use '"' to define a string with a " in it, or "'" to define a string with a ' in it. If you want to represent the name of an object within a string, you need to use " if you want to be grammatically correct.Jakesnake5 wrote:I always wondered why Exscriptor used the apostrophes for string identification, and XS/2 follows suit.
I'd have thought that using " to begin/end a string would be better, as I don't know why anybody would use it in a string to start with, so would, logically, not cause problems. Or, at least, not as many.
Leave it to contractions to cause a script editor problems.
As for the script call using [THIS] as an argument being improper, this hasn't stopped people from doing it, and the game seems to accept it. Weird.
Took me a couple tries to figure out which argument check was doing it
However ignoring all of the above, its not a good idea to hard-code " or ' into X strings, a supported and better solution would be to use a TextFile:
<t id=1>"%s" - Hello World</t>
Then use the sprintf with textfile lookup - This both provides you with grammar, and translate-ability.
As a matter a fact, the game does prevent passing invalid data (in some limited circumstances) to a script that requests a specific type, when you go to select the passed argument, for say perhaps "number" the script editor in-game will only allow you to input a number. This is meaningless however, as its just a loose guide to what the arguments are ment to be, a variable is a variable in the MSCI, and anything can be passed anywhere - even when error prone or inappropriate.
[ 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
-
- Posts: 2880
- Joined: Fri, 17. Feb 06, 04:55
Would help if thing's behaved themselves, but we're stuck with it. However, the xml code for the offending text string is:
As you can see, it defines the text string as a <var>, and exits with </var>, so the game, (and XS) knows what it is. The trouble XS runs into is processing it for compile. It just doesn't work right since XS has nothing to tell it the whole string is a variable, so it hit's a wall with the extra 's.
Maybe XS2 needs to utilize a style sheet like x2script.xsl, to define what we see like the browser does when you double click a script xml. The style sheet tells the browser how to display the code properly, regardless of what that code looks like.
Another tactic, would be to assign the string to a variable, then use the variable instead of a text string.
Actually, I'm surprised that the guys who did M.A.R.S. didn't put that text in the T file and pull it to a var that way.
Trouble is, the way XStudio handles it now, is it forgets that there is a string variable there, and can't handle it when you try to save it.
Maybe if XS were to put a hidden 'flag' of some sort at the beginning and end of the string, and know to just ignore what the string contains when parsing. The game has to do something like that itself.
Would have to put in a selector to identify whether you were typing a variable name or a text string, just to get the data right.
Code: Select all
<line linenr="784" indent=" "><text>send incoming message </text><var>'MARS 9000: I'm sorry Dave, I'm afraid I can't do that.'</var><text> to player: display it=</text><var>[TRUE]</var></line>
Maybe XS2 needs to utilize a style sheet like x2script.xsl, to define what we see like the browser does when you double click a script xml. The style sheet tells the browser how to display the code properly, regardless of what that code looks like.
Another tactic, would be to assign the string to a variable, then use the variable instead of a text string.
Actually, I'm surprised that the guys who did M.A.R.S. didn't put that text in the T file and pull it to a var that way.
Trouble is, the way XStudio handles it now, is it forgets that there is a string variable there, and can't handle it when you try to save it.
Maybe if XS were to put a hidden 'flag' of some sort at the beginning and end of the string, and know to just ignore what the string contains when parsing. The game has to do something like that itself.
Would have to put in a selector to identify whether you were typing a variable name or a text string, just to get the data right.
-
- Posts: 444
- Joined: Sat, 11. Dec 10, 01:38
i think the best way to solve this problem is by using an escape character for apostrophes.
btw the script-xml you quoted is only used by the browser - it uses a transforming style sheet to convert xml to html. that entire section is ignored by the game.
mr.bear
btw the script-xml you quoted is only used by the browser - it uses a transforming style sheet to convert xml to html. that entire section is ignored by the game.
mr.bear
Rapunzel, Rapunzel, let down your bear...
-
- Posts: 2880
- Joined: Fri, 17. Feb 06, 04:55
Do you mean adding an esc char before the first and last apostrophes in the string, so XS knows to ignore the ones in the middle? Or replacing ALL of apostrophes? Or just the ones inside the string?mr.bear wrote:i think the best way to solve this problem is by using an escape character for apostrophes.
mr.bear
The first and last methods have merit. The 2nd would be a bit messier
-
- Posts: 444
- Joined: Sat, 11. Dec 10, 01:38
-
- Posts: 2880
- Joined: Fri, 17. Feb 06, 04:55
-
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Hi. Did you ever release that update? I did allow beta 3 to update when it first ran.mr.bear wrote:UPDATE: Nicoman35/AldeberanPrime - I've fixed the issues you were having, they'll be included in the next update
I am having a similar issue: http://imgur.com/yOkleRC
However, I do not have a 0003* in my addon\t folder, and there is no 0123* file on my disk.
EDIT: From Console.rtf, I see:
Enumerating English language files
Reading language file: I:\X3AP-APCP\addon\t\0001-L044.pck...Success
Reading language file: I:\X3AP-APCP\addon\t\0002.pck...Success
Reading language file: I:\X3AP-APCP\addon\t\0003-L044.pck...Success
Reading language file: I:\X3AP-APCP\addon\t\0010-L044.pck...Success
Reading language file: I:\X3AP-APCP\addon\t\0123-L044.pck...Success
Reading language file: I:\X3AP-APCP\addon\t\0901-L044.pck...
So it appears that XS2 succeeded in reading files that do not exist , but it choked on the same 0901 reported previously by Nicoman.
- (Win8.1 x64)
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)
-
- Posts: 140
- Joined: Tue, 12. Apr 11, 22:12
Hello
0003* - contains dialog lines for exporting game stats.
0123* - contains dialog lines for DiD mode and are connected with Steam connection.
Q: 0901* - I read somewhere that is connected with plugin manager (I'm not using it because it erase my saves few times) - can I get it somewhere to look what text lines (page ID and text ID) it has I search for missing lines from pageID=35 (got few readtexts in my game).
Sorry Dr but you are wrong, 0123* and 0003* tfiles are hidden in 01.dat.DrBullwinkle wrote:(...)
However, I do not have a 0003* in my addon\t folder, and there is no 0123* file on my disk.
(...)]
0003* - contains dialog lines for exporting game stats.
0123* - contains dialog lines for DiD mode and are connected with Steam connection.
Q: 0901* - I read somewhere that is connected with plugin manager (I'm not using it because it erase my saves few times) - can I get it somewhere to look what text lines (page ID and text ID) it has I search for missing lines from pageID=35 (got few readtexts in my game).
-
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Derp.Viliae wrote:0123* and 0003* tfiles are hidden in 01.dat.
Thanks.
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)
-
- Posts: 1019
- Joined: Sun, 26. Sep 10, 06:00
Yeah I have the same problem with loading those .pck files although in my case it doesn't crash but reports a nice error and I can't use the program to load any script, etc:
Code: Select all
Enumerating type definition files
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TDocks.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TFactories.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TLaser.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TMissiles.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TShields.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TShips.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TWareB.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TWareE.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TWareF.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TWareM.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TWareN.pck...Success
Reading type file: C:\Program Files (x86)\EGOSOFT\X3 Terran Conflict\types\TWareT.pck...Failed: Error in zlib library: incorrect header check
EXCEPTION: Error in zlib library: incorrect header check... Source: Logic::Threads::GameDataWorker::ThreadMain() on line 95
SOURCE: Logic::IO::GZipStream::Read() on line 240
Failed to load game data : Error in zlib library: incorrect header check
-
- Posts: 309
- Joined: Sat, 15. Sep 12, 07:42
mr. bear,
Any chance of awaking from hibernation? We eagerly await the next version!
I emailed you a patch for some issues compiling X-Studio 2 that I encountered, but did not receive a response. Figured you are just busy or that the changes weren't wanted/needed. Let me know if I can help, I'd be glad to assist in tracking down and fixing bugs in the UI portion of the program.
Any chance of awaking from hibernation? We eagerly await the next version!
I emailed you a patch for some issues compiling X-Studio 2 that I encountered, but did not receive a response. Figured you are just busy or that the changes weren't wanted/needed. Let me know if I can help, I'd be glad to assist in tracking down and fixing bugs in the UI portion of the program.
-
- Posts: 444
- Joined: Sat, 11. Dec 10, 01:38
merry christmas everybody!
Unfortunately I've been consumed by RL & my day job for the last six months. I don't know when, or even if, I'll have spare time to work on X-Studio or X-Studio II from now on, especially since I may move over to Elite Dangerous if the game is popular.
sorry guys, but X-Studio 1 was an especially huge sink on my time, which I just don't have anymore.
mr.bear
Unfortunately I've been consumed by RL & my day job for the last six months. I don't know when, or even if, I'll have spare time to work on X-Studio or X-Studio II from now on, especially since I may move over to Elite Dangerous if the game is popular.
sorry guys, but X-Studio 1 was an especially huge sink on my time, which I just don't have anymore.
mr.bear
Rapunzel, Rapunzel, let down your bear...
-
- Posts: 1277
- Joined: Tue, 13. Dec 11, 08:27
Omg, he speaks it's a Christmas miracle.
I hope you had a good day and a good new year.
As for work on the program, don't worry about it, it's great already.
Oh and on a semi related side note, I am starting to properly learn to code in C and I have to say it is a pain in the ass. How you mangaged to make this and remain (somewhat) sane is beyond me. But you did it, a feat unto itself.
But once again merry Christmas and have a great holiday.
EDIT: these snow flakes on the forum lag my phone to no end. It's so frustrating to type on.
I hope you had a good day and a good new year.
As for work on the program, don't worry about it, it's great already.
Oh and on a semi related side note, I am starting to properly learn to code in C and I have to say it is a pain in the ass. How you mangaged to make this and remain (somewhat) sane is beyond me. But you did it, a feat unto itself.
But once again merry Christmas and have a great holiday.
EDIT: these snow flakes on the forum lag my phone to no end. It's so frustrating to type on.
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
-
- Posts: 1019
- Joined: Sun, 26. Sep 10, 06:00
-
- Posts: 309
- Joined: Sat, 15. Sep 12, 07:42
Yes, just extract each manifest from each file that has one (check *.dll;*.exe) using CFF Explorer. Then edit each manifest to "asInvoker" instead of "requireAdministrator" - finally, replace the manifest in each file with the modified one.memeics wrote:zanzal, can you run X-Studio 1 without giving it admin privileges?
-
- Posts: 66
- Joined: Fri, 12. Jul 13, 14:08
-
- Posts: 66
- Joined: Sun, 15. Nov 15, 19:20