[TOOL] X4 Galaxy Creator

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

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

killerog
Posts: 2582
Joined: Fri, 28. Oct 05, 16:31
x4

[TOOL] X4 Galaxy Creator

Post by killerog » Sat, 29. Dec 18, 17:35

This tool is used to create the JSON used by the X4 Universe Generation Tool create by Celludriel (viewtopic.php?f=181&t=408787).


WARNING - This is a beta release and it is a work in progress.


The tool has 3 different editors.
  • Map editor - this allows the creating of galaxy. The placement of clusters, their settings and how they are connected.
  • Job editor - allows the creation of jobs.
  • Economy editor - allows changing Gods settings.
Image

Installation Requirements
- .Net Framework 4.6.1
- Java 1.8 JDK

.NET:
- Make sure .Net 4.6.1 is installed (https://www.microsoft.com/en-us/downloa ... x?id=49982)


Java:
- Install the latest java 1.8 JDK (https://www.oracle.com/technetwork/java ... 33151.html)
- Make sure java is working by opening command line and typing java --version

Download
https://github.com/killeroguk/X4GalaxyC ... reator.zip

Simply unzip this file and run GalaxyCreator.exe. When you export a galaxy it will be in this directory in a folder called output.

Test galaxy JSON download
https://github.com/killeroguk/X4GalaxyC ... /test.json

You can open this JSON to get an example of a galaxy to use.


Thanks to Celludriel for the massive amount of help provided in creating this tool and the generation tool that does all the hard work.


Known Bugs:
  • The map editor does some strange things when you change its size.
  • When adding stations to a cluster you need to toggle the cluster enable flag to make it update what race owns that sector.

Limitations:
  • Highways are not possible
  • Currently all gates are acceleration gates
  • The current vanilla Faction Logic will not work with a custom galaxy a custom Faction Logic is being developed but not ready
Bug and feature tracker on Trello
Last edited by killerog on Sat, 19. Jan 19, 13:53, edited 6 times in total.
Image

killerog
Posts: 2582
Joined: Fri, 28. Oct 05, 16:31
x4

Re: [TOOL] X4 Galaxy Creator

Post by killerog » Sat, 29. Dec 18, 17:37

Releases
- 29/12/2018 - V1.0.0
- 1/01/2019 - V1.0.1 : Updated the universe generator
- 9/01/2019 - V1.0.2 : Bug fixes/updates
- 19/01/2019 - V1.0.3 : Bug fixes (Thanks to ianb1987)
Last edited by killerog on Sat, 19. Jan 19, 13:54, edited 3 times in total.
Image

celludriel
Posts: 155
Joined: Thu, 12. Sep 13, 11:29
xr

Re: [TOOL] X4 Galaxy Creator

Post by celludriel » Sat, 29. Dec 18, 17:43

I approve of this application :wink:

You'll be able to create your own galaxy in less then an hour, just keep in mind, while you'll be able to play it the factions won't invade each other
here are a few rules that you need to know about

- Create a minimum of 28 clusters (there are 28 datavaults that need to be distribuated across the galaxy)
- Each faction needs to have a factionHq set
- MINISTRY, SCALEPLATE, ANTIGONE needs to be an Equipmentdock
- HATIKVAH needs to be a Tradestation
- ALLIANCE needs to be a Shipyard
- For the Xenon Vs Argon war to happen there must be at least one xenon sector bordering an argon sector (if you do not nothing breaks but the war missions won't happen)

andygiles
Posts: 2
Joined: Mon, 31. Dec 18, 12:02
x4

Re: [TOOL] X4 Galaxy Creator

Post by andygiles » Mon, 31. Dec 18, 12:21

Sorry to be dim, but after creating a Galaxy, how do you use it?

Thanks

celludriel
Posts: 155
Joined: Thu, 12. Sep 13, 11:29
xr

Re: [TOOL] X4 Galaxy Creator

Post by celludriel » Mon, 31. Dec 18, 13:15

andygiles wrote:
Mon, 31. Dec 18, 12:21
Sorry to be dim, but after creating a Galaxy, how do you use it?

Thanks
- Create a new galaxy (no spaces in it's name, and a relative small prefix I advice 6 letters max)
- Make sure you save the galaxy to a json file
- After you saved it to a json you can export it to a mod
- If everything went right (you need to have Java 1.8 installed) you will see an output folder in the folder you are running the map editor in
- In this output folder will be folder with the name of your galaxy (no spaces)
- Copy this folder to your games root extensions folder
- When you start a new game now you will see four new gamestarts and none of the vanilla

andygiles
Posts: 2
Joined: Mon, 31. Dec 18, 12:02
x4

Re: [TOOL] X4 Galaxy Creator

Post by andygiles » Tue, 1. Jan 19, 11:25

celludriel wrote:
Mon, 31. Dec 18, 13:15
andygiles wrote:
Mon, 31. Dec 18, 12:21
Sorry to be dim, but after creating a Galaxy, how do you use it?

Thanks
- Create a new galaxy (no spaces in it's name, and a relative small prefix I advice 6 letters max)
- Make sure you save the galaxy to a json file
- After you saved it to a json you can export it to a mod
- If everything went right (you need to have Java 1.8 installed) you will see an output folder in the folder you are running the map editor in
- In this output folder will be folder with the name of your galaxy (no spaces)
- Copy this folder to your games root extensions folder
- When you start a new game now you will see four new gamestarts and none of the vanilla
Thanks, I have managed to get this working and export the galaxy but when I put it into the extensions folder I get nothing. It's like the game doesn't see it.

Any help would be appreciated.
Thanks

celludriel
Posts: 155
Joined: Thu, 12. Sep 13, 11:29
xr

Re: [TOOL] X4 Galaxy Creator

Post by celludriel » Tue, 1. Jan 19, 11:50

andygiles wrote:
Tue, 1. Jan 19, 11:25

Thanks, I have managed to get this working and export the galaxy but when I put it into the extensions folder I get nothing. It's like the game doesn't see it.

Any help would be appreciated.
Thanks
Can you send me the json file and show me the directory structure of you extensions folder ?

alexringess
Posts: 40
Joined: Tue, 25. Sep 18, 23:57
x4

Re: [TOOL] X4 Galaxy Creator

Post by alexringess » Tue, 1. Jan 19, 13:07

Awesome guys !
I gave some feedback to my first use to Celludriel on the discord. It's more comfortable for me to do that way.

Anyway, what you did here is freaking awesome !

ApoxNM
Posts: 729
Joined: Wed, 5. Dec 18, 07:17

Re: [TOOL] X4 Galaxy Creator

Post by ApoxNM » Tue, 1. Jan 19, 13:46

Can I use these tools to just edit the vanilla galaxy?

I would really like to add some sectors, as well as new factions (if that is possible).

celludriel
Posts: 155
Joined: Thu, 12. Sep 13, 11:29
xr

Re: [TOOL] X4 Galaxy Creator

Post by celludriel » Tue, 1. Jan 19, 13:51

ApoxNM wrote:
Tue, 1. Jan 19, 13:46
Can I use these tools to just edit the vanilla galaxy?

I would really like to add some sectors, as well as new factions (if that is possible).
Sorry that is not possible, the concept is that this editor creates a json file. That json file then runs through a custom java engine to output a mod that has the galaxy in it. As you can tell the original galaxy has no json file. Also we do not support highways due to the complexity of those things they are very hard to implement. Maybe in the future we will but not in any closeby one. Our priority atm is trying to make the editor more user friendly and write custom faction war code, since the code from Egosoft atm is to specific for their galaxy and very overengineered for a more generic galaxy.

You can however add new sectors, clusters, zones manually to the existing galaxy and add new factions. However that is a lot of manual labor in the xml files and you will hit the same roadblocks we do by adding new factions in regard to the faction warfare part of the game.

alexringess
Posts: 40
Joined: Tue, 25. Sep 18, 23:57
x4

Re: [TOOL] X4 Galaxy Creator

Post by alexringess » Tue, 1. Jan 19, 13:55

ApoxNM wrote:
Tue, 1. Jan 19, 13:46
Can I use these tools to just edit the vanilla galaxy?

I would really like to add some sectors, as well as new factions (if that is possible).
To do that, you'd have to extract all the assets of the game from the source cat files, convert the original map, jobs and god files to mix them into a json file that fit to the tool.

Actualy, as I understand where killerorg and celludriel are, it's close to a beta stage so the tool have only essential options to run properly. It probably have some bugs we must hunt to have a good tool without bug before the modders go beyond ;)

killerog
Posts: 2582
Joined: Fri, 28. Oct 05, 16:31
x4

Re: [TOOL] X4 Galaxy Creator

Post by killerog » Tue, 1. Jan 19, 14:03

New version released that has the updated universe generator. If you created a galaxy with the old version please regen it with the newer version.
Image

ApoxNM
Posts: 729
Joined: Wed, 5. Dec 18, 07:17

Re: [TOOL] X4 Galaxy Creator

Post by ApoxNM » Tue, 1. Jan 19, 14:11

celludriel wrote:
Tue, 1. Jan 19, 13:51
ApoxNM wrote:
Tue, 1. Jan 19, 13:46
Can I use these tools to just edit the vanilla galaxy?

I would really like to add some sectors, as well as new factions (if that is possible).
Sorry that is not possible, the concept is that this editor creates a json file. That json file then runs through a custom java engine to output a mod that has the galaxy in it. As you can tell the original galaxy has no json file. Also we do not support highways due to the complexity of those things they are very hard to implement. Maybe in the future we will but not in any closeby one. Our priority atm is trying to make the editor more user friendly and write custom faction war code, since the code from Egosoft atm is to specific for their galaxy and very overengineered for a more generic galaxy.

You can however add new sectors, clusters, zones manually to the existing galaxy and add new factions. However that is a lot of manual labor in the xml files and you will hit the same roadblocks we do by adding new factions in regard to the faction warfare part of the game.
Thanks for the info.
alexringess wrote:
Tue, 1. Jan 19, 13:55
ApoxNM wrote:
Tue, 1. Jan 19, 13:46
Can I use these tools to just edit the vanilla galaxy?

I would really like to add some sectors, as well as new factions (if that is possible).
To do that, you'd have to extract all the assets of the game from the source cat files, convert the original map, jobs and god files to mix them into a json file that fit to the tool.

Actualy, as I understand where killerorg and celludriel are, it's close to a beta stage so the tool have only essential options to run properly. It probably have some bugs we must hunt to have a good tool without bug before the modders go beyond ;)
Thank you.

Yep, sound like way too much work for now. But I am glad to see the effort being made here! Thank you guys for your time and effort. It is much appreciated!

balogt
Posts: 764
Joined: Thu, 18. Dec 03, 10:00
x3

Re: [TOOL] X4 Galaxy Creator

Post by balogt » Thu, 3. Jan 19, 01:30

nice tool I will play with it kellerog and provide feedback, if needed as its likely pretty darn good

Hornet108
Posts: 330
Joined: Thu, 15. Nov 12, 14:46
x4

Re: [TOOL] X4 Galaxy Creator

Post by Hornet108 » Tue, 8. Jan 19, 23:34

//Edit Moved on - now with a different problem

Code: Select all

Logfile started, time Tue Jan 08 22:38:43 2019
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\content.xml.sig'
[General] 0.00 ======================================
[General] 0.00 'GeForce RTX 2080 Ti' NVidia-driver v417.35.0 (Vulkan 1.1.84) check=1
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\gamestarts.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\gamestarts.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\index\macros.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\index\macros.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\defaults.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\defaults.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\mapdefaults.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\mapdefaults.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\god.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\god.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\jobs.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\jobs.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\region_definitions.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\region_definitions.xml' (error: 14)
[General] 4.24 ======================================
[=ERROR=] 4.24 File I/O: Could not find file '.\ui\addons\ego_eventmonitor\ui.xml'
[General] 4.24 ======================================
[General] 4.24 ======================================
[=ERROR=] 4.24 XLib::XMLInputOpenCallback(): Failed to open the file: ui/addons/ego_eventmonitor/ui.xml
[General] 4.24 ======================================
[General] 4.24 ======================================
[=ERROR=] 4.24 AddonManager::LoadAddonInfos(): Failed to load addon info file 'ui/addons/ego_eventmonitor/ui.xml.(xml|xml.gz)': 'Error loading from XML file 'ui/addons/ego_eventmonitor/ui.xml'. Check the log for further information.'
[General] 4.24 ======================================
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\index\macros.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\index\macros.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\defaults.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\defaults.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\mapdefaults.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\mapdefaults.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\god.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\god.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\libraries\jobs.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\libraries\jobs.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 Cannot find macro XML file from index 'PUR_galaxy_macro' in file 'index\macros'
[General] 0.00 ======================================
[General] 0.00 ======================================
[=ERROR=] 0.00 Macro not found: PUR_galaxy_macro
[General] 0.00 ======================================
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\md\x4ep1_mentor_subscription.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\md\x4ep1_mentor_subscription.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\md\customgamestart.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\md\customgamestart.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 File I/O: Could not find file '.\extensions\purpose-argon\md\x4ep1_mentor_subscription.xml.sig'
[General] 0.00 ======================================
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\purpose-argon\md\x4ep1_mentor_subscription.xml' (error: 14)
[General] 0.00 ======================================
[=ERROR=] 0.00 Error loading MD file extensions\Purpose-Argon\md\X4Ep1_Mentor_Subscription.xml: Ignoring root node 'diff' in XML file 'extensions\Purpose-Argon\md\X4Ep1_Mentor_Subscription.xml'.
[General] 0.00 ======================================
Getting a CTD on that log file, no doubt its got something to do with - [=ERROR=] 0.00 Macro not found: PUR_galaxy_macro - any help would be appreciated :D

Great tool btw, tho a bit rough around the edges. I might PR some fixes in if I get a moment if you guys want the help :D

Post Reply

Return to “X4: Foundations - Scripts and Modding”