[PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Joubarbe
Posts: 4797
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe »

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy »

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?
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 ]
andreihaiducul
Posts: 62
Joined: Wed, 10. Jul 13, 04:23
x3ap

Post by andreihaiducul »

Does anyone have a working download link for the source code package?
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

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!
Deniskos
Posts: 179
Joined: Wed, 11. Jun 08, 21:40
x4

Post by Deniskos »

X-Studio.v1.08.14.Feb.2014
Data type [DATATYPE_PASSENGER] does not work!
In order to work it is necessary to reassign the type [DATATYPE_PASSENGER] in the game editor.
Deniskos
Posts: 179
Joined: Wed, 11. Jun 08, 21:40
x4

Post by Deniskos »

If I create a new script in x-studio with Custom Syntax, then after changing and saving the script in the game editor, x-studio does not recognize new commands. :evil:
FritzHugo3
Posts: 4731
Joined: Mon, 6. Sep 04, 17:24
x4

Post by FritzHugo3 »

Dont like my Steamversion, dont accept the path.
Any idears?

Gibts eine Lösung dafür?
Ich fordere mehr und vorallem gerechtere Verteilung von Keksen und Süßkram für die "Magischen 20"! Daher wählen Sie jetzt die DPFGKV, die Deutsche Partei für gerechtere Keks - Verteilung!
Deniskos
Posts: 179
Joined: Wed, 11. Jun 08, 21:40
x4

Post by Deniskos »

Deniskos wrote:If I create a new script in x-studio with Custom Syntax, then after changing and saving the script in the game editor, x-studio does not recognize new commands. :evil:
Understood, it's all about the script engine version.
User avatar
Perahoky
Posts: 501
Joined: Fri, 22. Aug 08, 16:04
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by Perahoky »

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...
"Hope is the last force i have"
"This is how liberty dies, with thounderous applause"
***Modified***
SirNukes
Posts: 549
Joined: Sat, 31. Mar 07, 23:44
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by SirNukes »

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')
terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by terodil »

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!
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre
User avatar
N8M4R3
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 480
Joined: Fri, 24. Nov 06, 15:48
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by N8M4R3 »

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.19 *** Modified*** :khaak: :thumb_up:
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (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/
MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by MegaBurn »

Found Mr Bear on Github, XS1 source: https://github.com/nick-crowley/X-Studio
"Only the dead have seen the end of war." -Plato
User avatar
mr.bear
Posts: 444
Joined: Sat, 11. Dec 10, 01:38
x2

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by mr.bear »

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 :oops:

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?
Thanks & Happy New Year!
Rapunzel, Rapunzel, let down your bear...
User avatar
alexalsp
Posts: 1935
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by alexalsp »

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.
User avatar
Hector0x
Posts: 1055
Joined: Mon, 18. Nov 13, 18:03
x3tc

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by Hector0x »

i've been using your X-Studio for 2 years now. As a complete beginner it helped me greatly to dive deep into extensive modding projects. So huge thanks for this!

The only issue which comes to mind is that the external script dependency search somehow never yielded any results for me. I couldn't examine which scripts call for a specific script. It doesn't seem like a file access problem since the program got Admin rights. In the end i just substituted this missing feature with Notepad+ and this works for me.
User avatar
Zaitsev
Posts: 2010
Joined: Tue, 2. Dec 08, 01:00
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by Zaitsev »

mr.bear wrote: Mon, 2. Jan 23, 01:53 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 :oops:

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?
Thanks & Happy New Year!
Still use your software, mainly to make some personal LU mods.
The only issue I've noticed is that the program hangs once in a blue moon when I try to close it, but I don't know if that's caused by the program itself or some issue with my computer.

As for feature requests, changing font size would be nice. My middle aged eyes have started to struggle a bit with the font, so if it's at all possible to make it bigger that would be nice.
Also, since I'm a greenhorn when it comes to modding, and read the command descriptions constantly to find out what the command actually does, having a way to read the command descriptions without having to hover the cursor over the command and then move it every 10 seconds because it disappears would be really helpful.
I'm sorry, I can't hear you over the sound of how awesome I am :D

DiDs:
Eye of the storm Completed
Eye of the storm - book 2 Inactive
Black Sun - Completed
Endgame - Completed
User avatar
alexalsp
Posts: 1935
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by alexalsp »

As for feature requests, changing font size would be nice.
https://i.imgur.com/7zHomyy.jpg
Joelnh
Posts: 433
Joined: Wed, 3. Mar 10, 00:12
x3tc

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by Joelnh »

I also use this software anytime I play X3AP and want to tweak things. only current issue is trying to locate the info needed to correctly identify Litcube / Mayhem Zerohour commands.
Since there are unrecognized commands showing.

I also use X3 Editor 2, until I can find a better program.
I haven't looked at XStudio2 yet.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22473
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [PROGRAM] X-Studio Script Editor [v1.08 : 14th Feb 14]

Post by Cycrow »

Updating for the X3FL could be useful to get more people to starting modding in FL

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”