[TOOL] X4 Customizer 1.23
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Re: [TOOL] X4 Customizer 1.3 (added editable weapon table)
I was trying out compression with LZMA, without realizing you need 7-zip to unpack it. From a quick check just now, deflate will only be 25% larger and windows should handle it fine; I will use that in the next release (probably sometime tomorrow).
-
- Posts: 11
- Joined: Tue, 4. Dec 18, 16:30
Re: [TOOL] X4 Customizer 1.3 (added editable weapon table)
Thx, would be great, seeing forward to test out your tool
Re: [TOOL] X4 Customizer 1.4
Version 1.4 is up.
On the surface, it adds a Wares tab with editable fields, and the Weapons tab now supports changing a laser's bullet.
Under the surface, major refinements have been made to the gui code (for easy tab expansion, thread chaining, etc.) and the live editor (lots of polish and debug). Parsing the wares.xml file was exceedingly slow with all of the xpaths I was throwing at it (lxml was bogging things down), so various speedup code was added to get its loading time down to a couple seconds. Multithreading it was a bit of a headache due to Python awkwardness (threading is one of its big weaknesses), so hopefully that doesn't give anyone trouble.
On the surface, it adds a Wares tab with editable fields, and the Weapons tab now supports changing a laser's bullet.
Under the surface, major refinements have been made to the gui code (for easy tab expansion, thread chaining, etc.) and the live editor (lots of polish and debug). Parsing the wares.xml file was exceedingly slow with all of the xpaths I was throwing at it (lxml was bogging things down), so various speedup code was added to get its loading time down to a couple seconds. Multithreading it was a bit of a headache due to Python awkwardness (threading is one of its big weaknesses), so hopefully that doesn't give anyone trouble.
-
- Posts: 11
- Joined: Tue, 4. Dec 18, 16:30
Re: [TOOL] X4 Customizer 1.4
Thanks for all your efforts.
Unfortunately, application crashes when I try to add the path for my x4 installation (Win 10)
Unfortunately, application crashes when I try to add the path for my x4 installation (Win 10)
Re: [TOOL] X4 Customizer 1.4
exactly the same for me (win 10 too)Perry-Rhodan49 wrote: ↑Sun, 30. Dec 18, 08:57Thanks for all your efforts.
Unfortunately, application crashes when I try to add the path for my x4 installation (Win 10)
Re: [TOOL] X4 Customizer 1.4
1.4.1 is up with a fix. As a bonus/apology, it adds a new shield editing tab.
Re: [TOOL] X4 Customizer 1.4
Updated to 1.5.
The GUI table edit tabs have been redone and polished up. Tabs in general now support dynamic create/move/delete/restore, and any new editing tables are autodetected, to support future additions.
This also adds editing support for engines, scanners, storage, and docking bays.
The GUI table edit tabs have been redone and polished up. Tabs in general now support dynamic create/move/delete/restore, and any new editing tables are autodetected, to support future additions.
This also adds editing support for engines, scanners, storage, and docking bays.
Re: [TOOL] X4 Customizer 1.4
Updated to 1.6
The big addition is the virtual file system tab and the file contents viewer. The latter lets you open an xml file in its various versions: vanilla, diff patched, and customized. Select any two versions and hit "compare" to get a text diff summary of the changed lines, with highlighted characters. If one of the diff patch sources is your own extension, you can edit the patch and hit "reload" on the tab to see the changes pop up. This is also a handy way to verify changes made by transforms through this tool.
(Side note: attempts to get the syntax hightlighter to run in decent time for larger xml files modestly successful, though it still takes around ~3 seconds where notepad++ takes 1).
This release also adds some basic ship editing.
The big addition is the virtual file system tab and the file contents viewer. The latter lets you open an xml file in its various versions: vanilla, diff patched, and customized. Select any two versions and hit "compare" to get a text diff summary of the changed lines, with highlighted characters. If one of the diff patch sources is your own extension, you can edit the patch and hit "reload" on the tab to see the changes pop up. This is also a handy way to verify changes made by transforms through this tool.
(Side note: attempts to get the syntax hightlighter to run in decent time for larger xml files modestly successful, though it still takes around ~3 seconds where notepad++ takes 1).
This release also adds some basic ship editing.
Re: [TOOL] X4 Customizer 1.4
Updated to 1.7. The object edit tab now supports multi-object table views, a feature I've been wanting to add for a while to make it easier to make comparisons. Currently, this is only for the 'edited' version of the objects; individual object view can be used to check other versions (vanilla, patched, etc.).
Re: [TOOL] X4 Customizer 1.7.1
Is It possible to create missions with this framework?
Strade? Dove andiamo noi non ci servono strade. (Emmett Brown)
Re: [TOOL] X4 Customizer 1.7.1
Updated to 1.8
This update adds an Extensions tab to the GUI. From here, you may view, enable, disable, and test extensions. Tests will load all files from an extension to look for errors or conflicts with other extensions (same as the prior Check_Extensions command line tool, but refined). The GUI will show any seeming errors found. This should be much faster than loading x4, much easier than reading the x4 log, and can catch some errors the x4 log is silent about (like duplicate extension IDs).
For this release, I downloaded the top 100 mods off of Nexus (plus FOCW and a couple others) to stress test the code, hopefully weeding out most of the major bugs when loading oddly formed input files.
I also added a Color_Text transform, which can apply a color code to selected text entries across all languages. It was mostly added for some quick fun, but might be useful later in building a more complex transform, like coloring npc names based on their race.
This update adds an Extensions tab to the GUI. From here, you may view, enable, disable, and test extensions. Tests will load all files from an extension to look for errors or conflicts with other extensions (same as the prior Check_Extensions command line tool, but refined). The GUI will show any seeming errors found. This should be much faster than loading x4, much easier than reading the x4 log, and can catch some errors the x4 log is silent about (like duplicate extension IDs).
For this release, I downloaded the top 100 mods off of Nexus (plus FOCW and a couple others) to stress test the code, hopefully weeding out most of the major bugs when loading oddly formed input files.
I also added a Color_Text transform, which can apply a color code to selected text entries across all languages. It was mostly added for some quick fun, but might be useful later in building a more complex transform, like coloring npc names based on their race.
No, that is outside the current scope of this tool, which is mostly aimed at adjusting existing content rather than creating new content.
-
- Posts: 15
- Joined: Thu, 3. Mar 11, 12:19
Re: [TOOL] X4 Customizer 1.9
G'day SirNukes, many thanks, this is a great tool . Not being overly familiar with python I am using the GUI version.
I don't want to appear a complete noob, but I can't workout how to get the analysis scripts to output anything. I want to output the vanilla statistics, to a csv output so that I have a baseline, but can't figure out how to do it in the GUI???
A little guidance would be greatly appreciated.
Cheers
I don't want to appear a complete noob, but I can't workout how to get the analysis scripts to output anything. I want to output the vanilla statistics, to a csv output so that I have a baseline, but can't figure out how to do it in the GUI???
A little guidance would be greatly appreciated.
Cheers
We have learned from our mistakes, and can now repeat them almost perfectly.
Re: [TOOL] X4 Customizer 1.9
On the Config tab, set up the paths to the X4 installation and the user folder (where saves, content.xml, and such as located). Optionally change the name of the output extension; its folder is where the csv files will be written. On the script tab, start a new script and type or drag Print_Weapon_Stats() and/or Print_Ware_Stats() at the end (optionally deleting Apply_Live_Editor_Patches and Write_To_Extension). Then press Run Script near the top of the gui. If all goes well, csv and html files can be found in the output extension folder (along with a couple other log files).
Side note: csv format is a little ugly currently. Html is somewhat better. You can also view this data in the gui itself using the Edit tabs.
Side note: csv format is a little ugly currently. Html is somewhat better. You can also view this data in the gui itself using the Edit tabs.
-
- Posts: 15
- Joined: Thu, 3. Mar 11, 12:19
Re: [TOOL] X4 Customizer 1.9
G'day SirNukes, many thanks found it in steam/extensions. I initially ran the script with it set to write to user/extensions and got following error meassage: PermissionError: "[Errno 13] Permission denied: 'W:\\Grant Documents\\Egosoft\\X4\\60023335\\extensions\\x4_customizer_output\\weapon_stats.csv'". When I changed the setting to write to the default output, it wrote to steam/extensions.
Ok I am a complete noob I'm still having an issue with getting stats for Ships and components, I entered Ships and Ship_stats as arguments for Print_Objects_Stats and I get an error message "Ship_stats" not defined
Would there be any chance of building in an export command/button to the GUI, so that one could export the various tabs to csv/html as one went along? To either get baseline or diff/updated statistics onto a spread sheet as you went along?
Ok I am a complete noob I'm still having an issue with getting stats for Ships and components, I entered Ships and Ship_stats as arguments for Print_Objects_Stats and I get an error message "Ship_stats" not defined
Would there be any chance of building in an export command/button to the GUI, so that one could export the various tabs to csv/html as one went along? To either get baseline or diff/updated statistics onto a spread sheet as you went along?
Last edited by Nebulaewolf on Thu, 31. Jan 19, 22:25, edited 1 time in total.
We have learned from our mistakes, and can now repeat them almost perfectly.
Re: [TOOL] X4 Customizer 1.9
I don't have full documentation on all of the Print_Objects_Stats possible inputs currently in there, though they generally match the names of the Edit tabs but lowercased ("weapons", "bullets", "ships", etc.).Nebulaewolf wrote: ↑Thu, 31. Jan 19, 20:53Ok I am a complete noob I'm still having an issue with getting stats for Ships and components, I entered Ships and Ship_stats as arguments for Print_Objects_Stats and I get an error message "Ship_stats" not defined
-
- Posts: 15
- Joined: Thu, 3. Mar 11, 12:19
Re: [TOOL] X4 Customizer 1.9
G'day SirNukes, I am usually only a humble texture/model modder and know very little about scripts or why they don't work when they don't work, but would there be any chance of building in an export command/button to the GUI, so that one could export the various tabs to csv/html as one went along? To either get baseline or diff/updated statistics onto a spread sheet as you went along?
Input:
# X4 Customizer input script.
from Plugins import *
# Write modified files to the output extension.
Write_To_Extension()
Print_Object_Stats(
Ships,
Ship_Stats,
None)
Output:
New script started
Saved script to "D:\Grant Downloads\Game Downloads\X4\Moddinig\Tools\X4 Customiser Tool\X4_Customizer_v1.9\Scripts\Ships_Print.py"
Saved Live Editor patches
Starting thread: Run(D:\Grant Downloads\Game Downloads\X4\Moddinig\Tools\X4 Customiser Tool\X4_Customizer_v1.9\Scripts\Ships_Print.py -argpass)
Calling D:\Grant Downloads\Game Downloads\X4\Moddinig\Tools\X4 Customiser Tool\X4_Customizer_v1.9\Scripts\Ships_Print.py
Cleaning up old files
Writing output files (diff encoded)
Successfully ran Write_To_Extension
Exception of type "NameError" encountered.
name 'Ship_Stats' is not defined
Script run completed
I've tried upper and lower case (Uppercase matches category) but file_name i can't get to work with either lower/uppercase, version not sure?
Print_Object_Stats(
category,
file_name,
version = None,
Input:
# X4 Customizer input script.
from Plugins import *
# Write modified files to the output extension.
Write_To_Extension()
Print_Object_Stats(
Ships,
Ship_Stats,
None)
Output:
New script started
Saved script to "D:\Grant Downloads\Game Downloads\X4\Moddinig\Tools\X4 Customiser Tool\X4_Customizer_v1.9\Scripts\Ships_Print.py"
Saved Live Editor patches
Starting thread: Run(D:\Grant Downloads\Game Downloads\X4\Moddinig\Tools\X4 Customiser Tool\X4_Customizer_v1.9\Scripts\Ships_Print.py -argpass)
Calling D:\Grant Downloads\Game Downloads\X4\Moddinig\Tools\X4 Customiser Tool\X4_Customizer_v1.9\Scripts\Ships_Print.py
Cleaning up old files
Writing output files (diff encoded)
Successfully ran Write_To_Extension
Exception of type "NameError" encountered.
name 'Ship_Stats' is not defined
Script run completed
I've tried upper and lower case (Uppercase matches category) but file_name i can't get to work with either lower/uppercase, version not sure?
Print_Object_Stats(
category,
file_name,
version = None,
We have learned from our mistakes, and can now repeat them almost perfectly.
Re: [TOOL] X4 Customizer 1.9
I put it on my todo list.Nebulaewolf wrote: ↑Thu, 31. Jan 19, 22:28would there be any chance of building in an export command/button to the GUI, so that one could export the various tabs to csv/html as one went along? To either get baseline or diff/updated statistics onto a spread sheet as you went along?
This function requires python string arguments, so an example might look like:
Code: Select all
from Plugins import *
Print_Object_Stats('ships', 'ship_stats')
-
- Posts: 15
- Joined: Thu, 3. Mar 11, 12:19
Re: [TOOL] X4 Customizer 1.9
G'day SirNukes, thank you again, the 'apostrophes' d'oh. Worked and I learnt something
One minor thing with the csv output, I think that because the data in the name, description etc fields in the xml are in the format {xxxxx, yyyyyy}; the output gets split over the T Name Entry and T Desc. Entry data fields in the output csv. I think it might be because the output is reading the comma as a separation: (please see example below)
Name---------------------------------T Name Entry---T Desc. Entry--- Codename--------Class
M Dumbfire Launcher Mk1 ----------{20105-------------2124}-----------{20105----------2122}
sorry about the dashes but it was the quickest way to tab out the info so that you could see where it is going
This not the same in the html output where it gets tabulated correctly:
Name--------------------------T Name Entry---T Desc. Entry-------------------------Codename------------------------Class
S Dumbfire Launcher Mk1--{20105,1124}----{20105,1122}---weapon_gen_s_dumbfire_01_mk1_macro---missilelauncher
This is a really great tool, I am still sorting out the spread sheets, but am looking forwarded to using your tool for some re-balancing and overhaul modding
One minor thing with the csv output, I think that because the data in the name, description etc fields in the xml are in the format {xxxxx, yyyyyy}; the output gets split over the T Name Entry and T Desc. Entry data fields in the output csv. I think it might be because the output is reading the comma as a separation: (please see example below)
Name---------------------------------T Name Entry---T Desc. Entry--- Codename--------Class
M Dumbfire Launcher Mk1 ----------{20105-------------2124}-----------{20105----------2122}
sorry about the dashes but it was the quickest way to tab out the info so that you could see where it is going
This not the same in the html output where it gets tabulated correctly:
Name--------------------------T Name Entry---T Desc. Entry-------------------------Codename------------------------Class
S Dumbfire Launcher Mk1--{20105,1124}----{20105,1122}---weapon_gen_s_dumbfire_01_mk1_macro---missilelauncher
This is a really great tool, I am still sorting out the spread sheets, but am looking forwarded to using your tool for some re-balancing and overhaul modding
We have learned from our mistakes, and can now repeat them almost perfectly.
-
- Posts: 45
- Joined: Wed, 6. Mar 19, 06:02
Re: [TOOL] X4 Customizer 1.9
SirNukes,
just want to give you a pretty big Kudo for creating and sharing your X4 Customizer.
I've never used any mods for X4 before, let alone created one. In fact, the first time I ever saw the data structures was in your Customizer.
Pure gold being able to explore these structures, hack away at them using Python and your swiss army knife pms, then have the Customizer take care of the details of turning the results into a working mod.
Much appreciated
just want to give you a pretty big Kudo for creating and sharing your X4 Customizer.
I've never used any mods for X4 before, let alone created one. In fact, the first time I ever saw the data structures was in your Customizer.
Pure gold being able to explore these structures, hack away at them using Python and your swiss army knife pms, then have the Customizer take care of the details of turning the results into a working mod.
Much appreciated
-
- Posts: 5
- Joined: Wed, 13. Mar 19, 11:37
Re: [TOOL] X4 Customizer 1.9
Thanks you for your excellent ... thing
I'm noob in python but I'm starting to understand how it works ...
On the other hand, the Cat_Pack does not pack the folder "index" that contain macro.xml with all mods ... I put the extensions folder that I previously Unpack (with you Cat_Unpack.bat) in the Cat_Pack.bat and it packs everything except the index folder and it does not indicate any error, just the number of less files that I had with the Unpack...
MapMarker is an exemple:
https://www.nexusmods.com/x4foundations ... ?tab=files
I imagine, perhaps wrongly, that there must be another script with the list of folders to pack ... that I can not find ...
If not, how to do it then ...
Sorry for googleTrad
@+
I'm noob in python but I'm starting to understand how it works ...
On the other hand, the Cat_Pack does not pack the folder "index" that contain macro.xml with all mods ... I put the extensions folder that I previously Unpack (with you Cat_Unpack.bat) in the Cat_Pack.bat and it packs everything except the index folder and it does not indicate any error, just the number of less files that I had with the Unpack...
MapMarker is an exemple:
https://www.nexusmods.com/x4foundations ... ?tab=files
I imagine, perhaps wrongly, that there must be another script with the list of folders to pack ... that I can not find ...
If not, how to do it then ...
Sorry for googleTrad
@+