[TOOL] X4 Black Marketeer Finder 2.2.0

The place to discuss scripting and game modifications for X4: Foundations.

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

foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

[TOOL] X4 Black Marketeer Finder 2.2.0

Post by foxxbl »

Hi everyone!
I created and published to GitHub a UI tool for parsing save game which helps with unlocking Black Marketeers in a given sector:
https://github.com/foxxbl/shady-search
After installation and running, load the X4 save game to be parsed. Game parsing can take anything from 10-30 seconds (18 seconds on my Ryzen 5600X), progress bar is shown.
Upon parsing the game, tool shows the sortable list of the sectors from the base game + enabled DLCs with the statistics: number of stations, total number of Black Market Vendors and number of unlocked Black Market Vendors:

https://github.com/foxxbl/shady-search/ ... r-Main.png

Sector table can be sorted by all columns and filtered with the controls on the bottom left side of the table:
Image

On double click or by clicking the "Show Sector" button, tool shows the stations in the sector, names and the status of black marketeers on them:
* None - shaded in grey - black marketeer not available on the station.
* Active - shaded in cyan - black marketeer already unlocked.
* Inactive - shaded in light green - black marketeer still locked. If the player is near enough to the station, parser also shows number of voice (comm) leaks on the station.
https://github.com/foxxbl/shady-search/ ... Parsed.png

Just to be mindful that tool will show all stations in a sector, so expect some spoilers.
I can't find a good way to provide station names as in games, some stations have "source" entry with a more helpful information - so that was used.
Therefore, rely on the station codes to find the station in the sector.

Download links for Windows and Linux can be found under releases:
https://github.com/foxxbl/shady-search/ ... /tag/2.2.0

Installers tested on Windows 11 and Linux Mint 21.3. Tool is written in Java, using JavaFX and Spring Boot.

Edit: 05.08.2024 - Version 2.0.0 update
Edit: 17.08.2024 - Version 2.1.0 update
Edit: 31.08.2024 - Version 2.1.1 update
Edit: 18.03.2025 - Version 2.2.0 update
Last edited by foxxbl on Tue, 18. Mar 25, 19:35, edited 9 times in total.
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
scryp
Posts: 158
Joined: Sat, 30. Nov 13, 16:49
x4

Re: [TOOL] X4 Black Marketeer Finder

Post by scryp »

I tried your Tool and it seems that in every "origin" Sector (Sectors without DLC) seems to have no Marketeer at all. If i check some DLC Sectors it worked as intendet and show the Trader.

Bug in the Tool or courius situation?

EDIT: Ok i try it with a new test game "save" and the problem is in my other save. Because in the new one i also see them in the old sectors
db48x
Posts: 107
Joined: Mon, 15. Jul 13, 06:25
x4

Re: [TOOL] X4 Black Marketeer Finder

Post by db48x »

Scryp, see viewtopic.php?t=463749, or this recent bug report viewtopic.php?t=463823.
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder

Post by foxxbl »

scryp wrote: Wed, 3. Jul 24, 19:34 I tried your Tool and it seems that in every "origin" Sector (Sectors without DLC) seems to have no Marketeer at all. If i check some DLC Sectors it worked as intendet and show the Trader.

Bug in the Tool or courius situation?

EDIT: Ok i try it with a new test game "save" and the problem is in my other save. Because in the new one i also see them in the old sectors
Could you please provide a game save, I can check it when I am back from the vacation, please attach here or in the github bug report.
Tool is mostly tested with my game saves started with the Kingdom End expansion.
To be honest, I will probably find the same issue as reported - black marketeers not generated with the game, but I am curious enough to check.
Thanks!
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
scryp
Posts: 158
Joined: Sat, 30. Nov 13, 16:49
x4

Re: [TOOL] X4 Black Marketeer Finder

Post by scryp »

foxxbl wrote: Fri, 5. Jul 24, 13:07
Could you please provide a game save, I can check it when I am back from the vacation, please attach here or in the github bug report.
Hey, yes i could, i post the savegame in this Bugreport viewtopic.php?t=463823 so that also the developer can take a look, cause i guess the problem is not within your tool
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder 2.0.0

Post by foxxbl »

X4 Black Marketeer Finder updated to version 2.0.0: https://github.com/foxxbl/shady-search/ ... /tag/2.0.0
- tool reworked to parse all sector data at once.
- added statistics about stations and black marketeers to the sector list
- added progress bar to show loading progress
- double click also shows the sector data similar to the button "Show Sector"
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder 2.1.0

Post by foxxbl »

X4 Black Marketeer Finder updated to version 2.1.0: https://github.com/foxxbl/shady-search/ ... /tag/2.1.0
- added parsing and displaying of sector owner faction
- used MaterialFX theme and and added table advanced filtering
- improved error handling
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
zakaluka
Posts: 581
Joined: Sat, 16. Nov 13, 19:47
x4

Re: [TOOL] X4 Black Marketeer Finder 2.0.0

Post by zakaluka »

Hi, I would be very interested in a version of this that is spoiler-free. Like, if there were a way to hide the system names, or collapse the list to one entry per faction.

I mostly use a tool like this to decide whether I'm going to continue with a new save; not to actually figure out where where the black markets are. I mostly want to see how many black markets exist in a particular faction's stations, and discard the save if the number is extremely low.

I know it is a very mundane request, but I have forgotten anything I once knew about programming. Also there is another script I can use, in the command prompt, which outputs a list of shadyguys with their sector ID and the faction that owns the sector. That's also workable.
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder 2.1.1

Post by foxxbl »

X4 Black Marketeer Finder updated to version 2.1.1: https://github.com/foxxbl/shady-search/ ... /tag/2.1.1
- allow parsing the game if encountered the unknown sector (e.g. modded game) or in case new sectors are added and the tool is not updated.
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder 2.0.0

Post by foxxbl »

zakaluka wrote: Mon, 26. Aug 24, 04:00 Hi, I would be very interested in a version of this that is spoiler-free. Like, if there were a way to hide the system names, or collapse the list to one entry per faction.

I mostly use a tool like this to decide whether I'm going to continue with a new save; not to actually figure out where where the black markets are. I mostly want to see how many black markets exist in a particular faction's stations, and discard the save if the number is extremely low.
Problem with this, even if such feature would be implemented, is that such information would not be relevant after some game days when you are ready to use this information to build your drug plexes, as new stations will be added, some stations will be removed by the god engine.. As these stations are added, game engine is adding the black marketeers by the rng.
This tool is intended to provide the information prior or after building your drug plexes, to unlock the Black Marketeers. At this point of time, you probably discovered and explored all relevant sectors, so at this point tool is not spoiling very much.
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
zakaluka
Posts: 581
Joined: Sat, 16. Nov 13, 19:47
x4

Re: [TOOL] X4 Black Marketeer Finder 2.1.1

Post by zakaluka »

I was using it to check for the presence of the race condition, before even starting the game. To see if core sectors are nearly bereft of black markets. I did not want the locations revealed, only to count black markets in stations owned by each faction.

but that's okay, the python tool is good enough for this purpose.
DocQuixotic
Posts: 5
Joined: Thu, 13. Oct 16, 15:36
x3ap

Re: [TOOL] X4 Black Marketeer Finder 2.1.1

Post by DocQuixotic »

Hi! Using the tool together with the OTAS shippack and X4:reemergence mod, I get: "something went wrong: Error 'cannot find translation for owner faction otas' happened during parsing [save file]". Is this something that can be circumvented or avoided?
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder 2.1.1

Post by foxxbl »

DocQuixotic wrote: Tue, 14. Jan 25, 21:47 Hi! Using the tool together with the OTAS shippack and X4:reemergence mod, I get: "something went wrong: Error 'cannot find translation for owner faction otas' happened during parsing [save file]". Is this something that can be circumvented or avoided?
Unfortunately this can't be avoided without the code change, I need to make game parsing more resilient if it finds some factions not present in the Vanilla game. Please raise the issue here: https://github.com/foxxbl/shady-search/issues and I will fix it when I get some time.
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder
foxxbl
Posts: 385
Joined: Sat, 8. May 10, 10:31
x4

Re: [TOOL] X4 Black Marketeer Finder 2.2.0

Post by foxxbl »

Tool updated with the new sectors from the 7.5 version and X4: Hyperion Pack DLC, and updated with the more resilient parsing in case it finds the faction not in the game catalogue (e.g. modded game).
Release notes: https://github.com/foxxbl/shady-search/ ... /tag/2.2.0
Defending Split brothers from Xenon since 2020.

X4:Foundations:
* Abandoned/Derelict ships and locations
* X4 Black Marketeer Finder

Return to “X4: Foundations - Scripts and Modding”