EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[TOOL] X3 Customizer 3.4.3
Post new topic Reply to topic Goto page Previous  1, 2, 3
View previous topic :: View next topic
Author Message
SirNukes





Joined: 31 Mar 2007
Posts: 119 on topic

Thank you for registering your game
PostPosted: Mon, 11. Jun 18, 23:25    Post subject: Reply with quote Print

Interesting. The path thing is as you say, taking either the x3 or addon folder, though I can touch up the error message a little bit. The gzip thing I will have to read up on. The x3 .pck files are gzipped versions of text files; when searching for the file to modify, if the tool finds a pck file then it uses the python gzip package to unpack it for reading/editing. I have never had trouble with it on my end, so I need to learn more about what gzip is doing to get an idea of what is going wrong for you. Since the file loader is outside my normal transform exception handler, the problem stops the entire tool run; that I could touch up as well.

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





Joined: 26 Apr 2016



PostPosted: Mon, 11. Jun 18, 23:42    Post subject: Reply with quote Print

A couple things so you dont waste time looking into anything if its all my fault..
I notice when I run the authors_transform it is looking at python in programdata, which I do not have, it's after that the gzip error hits. I also do not have a source folder since I am lazy and have not opened xeditor yet and tried to figure out how to do that lol. If either of those are relevant.

Still it is odd that it partially runs at G:\X3xrm but not at all at G:\X3xrm\addon

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





Joined: 31 Mar 2007
Posts: 119 on topic

Thank you for registering your game
PostPosted: Tue, 12. Jun 18, 01:27    Post subject: Reply with quote Print

3.4.1 has been pushed with some tweaks including nicer gzip error catching.


Just as a warning, the Authors_Transforms includes some options that are hard to roll back once added to the game if the game is saved, such as the factory and ship variants (which get added to shipyards). I mostly make that file available for extended examples of calling transforms.

For the game path, these should hopefully be functionally equivalent:
path_to_x3_folder = r'G:\X3xrm'
path_to_addon_folder = r'G:\X3xrm\addon'

For the ProgramData/Python thing, it might just be a relic of how the executable is packaged up using PyInstaller. At least, if I rename my python distribution folder, the packaged customizer still runs okay.

For the gzip issue, I tracked it down to the X3 Plugin Manager, which will generate a TWareT.pck file but compresses it with something other than gzip. My current best guess from digging around and looking at some source code is that older X games and tools used to use deflate through zlib, so my current theory is that the plugin manager is using deflate still. I am poking around looking for a working solution now.

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





Joined: 31 Mar 2007
Posts: 119 on topic

Thank you for registering your game
PostPosted: Tue, 12. Jun 18, 03:15    Post subject: Reply with quote Print

3.4.2 is now up, and should support the X3 Plugin Manager generated pck file.

After spending some time going through x3 editor source code looking for how it handles decompression, and then the x2fd.dll source code (thanks doubleshadow for making source available), I found that the plugin manager appears to use an x2 pck format. (My theory about deflate instead of gzip was wrong.) Anyway, the customizer now tries x2 style decompression as a fallback when direct gzip fails.

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





Joined: 26 Apr 2016



PostPosted: Tue, 12. Jun 18, 03:36    Post subject: Reply with quote Print

Aha will try 3.4.2 then. Thanks for this.

Was just coming on to say I kinda found a work around for the gzip thing in 3.4.1 by deleting the file created by plugin manager then running customizer and then rerunning plugin manager so it recreates that file. No error then. It might even be better off this way if customizer makes any ware size changes then plugin manager would need to recreate the file anyhow I believe.

Also not sure if I did it right but I grabbed the source and input_script files from the master and just put those into my folder. If that was correct then it is still erroring when I try g:\x3xrm\addon. I do see an x3_customizer_logs folder in addon so I guess it is working correctly regardless.

As far as changes being permanent I dont mind. I plan on starting over once I get this working anyway Very Happy

I noticed in my rummaging through authors_transforms some settings for restoring ammo based weapons. I look forward to breaking my game more trying to figure that out next because I miss ammo weapons lol...

edit: well it still errors with the plugin file in folder as well as the path error, that is of course if I am doing things correctly by grabbing from the master on git and adding the changed files into my folder. Docu and readme both have 3.4.2 in them

edit2: grabbed the compiled version and it runs with no gzip error now but g:\x3xrm\addon now gives error Exception: Path to the AP/addon folder appears invalid(path: G:\X3xrm\addon\addon).. kinda funny but no not really lol

edit3: it is renaming the file to TWareT.pck.x3c.bak, maybe it really should be left alone and just rerun plugin manager after customizer?

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





Joined: 31 Mar 2007
Posts: 119 on topic

Thank you for registering your game
PostPosted: Tue, 12. Jun 18, 05:14    Post subject: Reply with quote Print

If you want to run the python code directly, I won't worry too much about putting out new releases for minor changes.

3.4.3 source code is uploaded, and changes handling of path problems a little bit: it will now raise a hard exception if the x3/addon path looks wrong instead of attempting to still run (with a command line option to override this behavior, if desired). The error messages should show what paths are being used for the base x3 and addon folders, so hopefully that teases out whatever problem you are having.

Are you sure you aren't using something like:
path_to_x3_folder = r'G:\X3xrm\addon' ?
Because that will make the tool think the path is to the base x3 folder, and 'addon' will get appended again. (Perhaps I will add a check for addon\addon to catch this.)

For the plugin manage integration, the plugin manager should run first, though it may work in either order. The customizer will see the twaret.pck file and use it as the base for any edits, then will rename the pck file when outputting twaret.txt to avoid conflicts (x3 prioritizes pck files over unpacked txt or xml files). The plugin manager might do the same thing in reverse, loading the customizer txt file for editing, but I haven't tested that yet.


Edit:
The plugin manager does not capture changes in the twaret.txt file when generating its own, so it will need to be run first, with the customizer being run after the plugin manager is closed. It appears user edits to twaret.txt in general are ignored by the plugin manager.

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





Joined: 26 Apr 2016



PostPosted: Tue, 12. Jun 18, 18:32    Post subject: Reply with quote Print

Yes path_to_x3_folder = r'G:\X3xrm\addon' was exactly what I was trying to use with authors_transform because that worked with example. That explains the problem at least Very Happy


Good to know about plugin manager then thanks for the fixes.

I would prefer compiled but there is no need to release the smaller fixes imo.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3
 
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 Mon, 18. Jun 18, 03:58

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.07014 seconds, sql queries = 21