[PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 58
- Joined: Thu, 3. Apr 14, 12:51
Any linux guys have a fix for this: http://imgur.com/yZrCaxX ?
P.s.
Does game actually requires every item to be in <xml tags>? I hate this and I only use wine/x-studio due to this strange thing in scripts. Can I code scripts without XML? It's a pain to write XML by-hand in VIM, which I usually use for everything.
P.s.
Does game actually requires every item to be in <xml tags>? I hate this and I only use wine/x-studio due to this strange thing in scripts. Can I code scripts without XML? It's a pain to write XML by-hand in VIM, which I usually use for everything.
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
You can only write scripts in a dedicated editor, such as the ingame Script Editor or a respective external Script Editor. In case, you haven't already, you could try out X Studio 2 and see whether the bug persists.
The xml part of a script file is actually just used for displaying the script in your browser. The actual code is stored in the codearray of the script, which is hardly readable.
The xml part of a script file is actually just used for displaying the script in your browser. The actual code is stored in the codearray of the script, which is hardly readable.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
-
- Posts: 58
- Joined: Thu, 3. Apr 14, 12:51
- jack775544
- Posts: 1277
- Joined: Tue, 13. Dec 11, 08:27
I love X-Studio but one thing I hate having to do every time it starts is to put in the admin password when I know that it doesn't need any admin rights, all my game files are owned by my (non-admin) user. I've tried using things like "PE Editors" to remove the manifest from the binary that says it should prompt for admin but that didn't do anything.
Did anyone manage to make X-Studio run without administrator rights?
Did anyone manage to make X-Studio run without administrator rights?
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]
[ external image ]
-
- Posts: 62
- Joined: Wed, 10. Jul 13, 04:23
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Here you go: Link (mediafire.com)
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
-
- Posts: 4664
- Joined: Mon, 6. Sep 04, 17:24
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
Could we make a github project for this tool?
Thanks
PS sorry if that was asked before, couldnt found.
We could expand this tool alltogether...
Thanks
PS sorry if that was asked before, couldnt found.
We could expand this tool alltogether...
"Hope is the last force i have"
"This is how liberty dies, with thounderous applause"
***Modified***
"This is how liberty dies, with thounderous applause"
***Modified***
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
As a workaround for the DATATYPE_PASSENGER bug, I put together a short python script that scans the x3 scripts for the bug when using "is datatype" commands and patches them. The intention is to run it after editing a script in X-Studio that might suffer from this bug. This requires Python 3.6+ and the lxml package, and the buggy script should be in xml format. Feel free to edit the scanning/saving behavior as desired for convenience.
Spoiler
Show
Code: Select all
'''
All xml scripts will be opened and scanned for an x-studio bug with
datatype codes.
Usage:
- Run from the directory with the scripts to be checked.
- When a bug is found and patched, press 'y' or 'n' and <enter>
to confirm the file overwrite.
'''
'''
This will look for script command 125 ("%0 is datatype[%1] == %2"),
aiming to repair DATATYPE_PASSENGER, which xstudio saves as 0x0001A
when it should be 0x1001A.
Example:
<sval type="array" size="6">
<sval type="int" val="125" />
<sval type="int" val="1" />
<sval type="int" val="131074" />
<sval type="int" val="0" />
<sval type="int" val="20" />
<sval type="int" val="26" />
</sval>
The last "26" will become "65562".
'''
from lxml import etree as ET
from pathlib import Path
for file_path in Path('.').glob('*.xml'):
# First, do a raw text search to determine if this is x-studio generated.
with open(file_path, 'r') as file:
if '<!-- Generated using X-Studio -->' not in file.read():
continue
print('Scanning {}...'.format(file_path))
tree = ET.parse(str(file_path))
root = tree.getroot()
# Pull out the codearray, holding the script details
# (args, commands, etc.).
# Note: this has one child, <sval type="array" size="10">, which in
# turn has a fixed set of 10 children that give different aspects
# of the script, where [6] is the script commands.
codearray = root.find('.//codearray')
assert codearray != None
command_array_node = codearray[0][6]
# Flag when a change occurs.
change_occurred = False
# Loop over all script commands.
for code_node in command_array_node:
# The first child holds the command code.
# Skip if not 'is datatype'.
if code_node[0].get('val') != '125':
continue
# Search for the buggy code, the last item of the node.
data_type_node = code_node[-1]
if data_type_node.get('val') == '26':
# Update it.
data_type_node.set('val', '65562')
change_occurred = True
if change_occurred:
user_response = input(' Patch applied; okay to save? y or n \n')
if user_response == 'y':
# Lxml loses the standalone attribute, so put it back here.
# Also, ensure the declaration line is included.
tree.write(str(file_path), standalone = True, xml_declaration = True)
print(' Saved')
if user_response == 'n':
print(' Skipped')
Author of X3 Customizer and X4 Customizer
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
SirNukes, you're an angel.
Will try this at home and post back if I run into any issues, but for now: thank you very much indeed!
Will try this at home and post back if I run into any issues, but for now: thank you very much indeed!
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
I have added missing commands that were now available at AP3.3 over a Custom Syntax File. For interest have a look here: viewtopic.php?f=94&t=417934
Neue Erweiterung für X3 verfügbar: Farnham's Legacy | +Optional: weitere Verbesserungen im inoffiziellen Patch v1.3.14 *** Modified***
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (FL) | Textkorrekturen & Verbesserungen (FL)
Weitere Veröffentlichungen hier: N8workX
Nützliches Tool für nicht mehr vorhandene Downloads: web.archive.org
Externes Archiv für MOD/SCR Ressourcen: xdownloads.co.uk | code.google.com/archive/p/x3tcscripts/
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (FL) | Textkorrekturen & Verbesserungen (FL)
Weitere Veröffentlichungen hier: N8workX
Nützliches Tool für nicht mehr vorhandene Downloads: web.archive.org
Externes Archiv für MOD/SCR Ressourcen: xdownloads.co.uk | code.google.com/archive/p/x3tcscripts/
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
Found Mr Bear on Github, XS1 source: https://github.com/nick-crowley/X-Studio
"Only the dead have seen the end of war." -Plato
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
Hello everyone,
I hope everybody is well.
I haven't been on this forum for a long long time.
I've been wondering lately if anybody still uses this software that I wrote, X-Studio or X-Studio II?
I realize I haven't released any updates for nearly 10 years.. *awkward cough*
and Egosoft have even released several games over that period
I don't actually game much anymore but I realized I should be putting some effort into keeping this software up-to-date for all of you folks who are using it for developing your mods.
I'd like to get a sense of
I hope everybody is well.
I haven't been on this forum for a long long time.
I've been wondering lately if anybody still uses this software that I wrote, X-Studio or X-Studio II?
I realize I haven't released any updates for nearly 10 years.. *awkward cough*
and Egosoft have even released several games over that period
I don't actually game much anymore but I realized I should be putting some effort into keeping this software up-to-date for all of you folks who are using it for developing your mods.
I'd like to get a sense of
- a) how many people still use this software?
- b) what are the known bugs?
- c) what are you feature requests?
Rapunzel, Rapunzel, let down your bear...
Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]
I think at least officially add support
viewtopic.php?f=201&t=444078
I don't develop mods, but I use a program to view scripts, txt files and some minor edits.
And I think it would be great to update the program.
viewtopic.php?f=201&t=444078
I don't develop mods, but I use a program to view scripts, txt files and some minor edits.
And I think it would be great to update the program.