New Tool: Region Generator (pseudo-random and controllable fogs, asteroids, nebulae, and resources)

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

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

Post Reply
tomchk
Posts: 1294
Joined: Mon, 26. Jan 15, 19:55
x4

New Tool: Region Generator (pseudo-random and controllable fogs, asteroids, nebulae, and resources)

Post by tomchk » Wed, 19. Jan 22, 21:39

A certain major modder (think VRO and others) has been testing my latest tool for X4, and he said it's good to go. If you want to try generating new regions for the vanilla galaxy or your own,* please take a look! I'll let him post example screenshots if he chooses.
Basic instructions are in the ReadMe: https://github.com/tomchk/X4_gen_regions

Blender looks scary, but you only need to install it (via Steam is great) and click a few buttons, and you will soon have your own new regions!

You may need to tweak some values to improve performance, as it might be impossible to guarantee ideal densities and such every time. Enjoy!

*There's another tool to make your own galaxy--that one is not made by me.
Last edited by tomchk on Wed, 19. Jan 22, 22:28, edited 1 time in total.
Care to see what I've been creating? https://www.youtube.com/user/ytubrute


User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: New Tool: Region Generator (pseudo-random and controllable fogs, asteroids, nebulae, and resources)

Post by Shuulo » Fri, 21. Jan 22, 16:49

This tool is really powerful and helped me to create diverse regions for more than 120 sectors saving me ton of work.

The workflow is following:
1. I created a sheet with all the sectors and required attributes for the input file. This the link.
First tab is the sheet itself with sectors and their future regions, second tab contains templates of regions I copied into the first tab, than manually updated the values to better suit specific sectors

2. This sheet is then saved as CSV file REGIONS.csv

3. Using any IDE you prefer (I use PyCharm as its quite straightforward) run the following script (CSV file should be in same folder as the script). It will generate the input file required by the the tool/blender plugin.

4. Use the tool: run blender 3.0, install the tool as blender addon, go to generators tab as mentioned in readme and press the button. Remember to place the input file generated by python script into the extension's root folder, sectors.xml file that you feed the tool should also be in the same extention. DONE!

Here are few screenshots of regions generated by the tool that I didnt update manually much.

pesadelo
Posts: 6
Joined: Tue, 8. Jan 19, 13:02
x4

Re: New Tool: Region Generator (pseudo-random and controllable fogs, asteroids, nebulae, and resources)

Post by pesadelo » Fri, 21. Jan 22, 18:30

Shuulo wrote:
Fri, 21. Jan 22, 16:49
This tool is really powerful and helped me to create diverse regions for more than 120 sectors saving me ton of work.

The workflow is following:
1. I created a sheet with all the sectors and required attributes for the input file. This the link.
First tab is the sheet itself with sectors and their future regions, second tab contains templates of regions I copied into the first tab, than manually updated the values to better suit specific sectors

2. This sheet is then saved as CSV file REGIONS.csv

3. Using any IDE you prefer (I use PyCharm as its quite straightforward) run the following script (CSV file should be in same folder as the script). It will generate the input file required by the the tool/blender plugin.

4. Use the tool: run blender 3.0, install the tool as blender addon, go to generators tab as mentioned in readme and press the button. Remember to place the input file generated by python script into the extension's root folder, sectors.xml file that you feed the tool should also be in the same extention. DONE!

Here are few screenshots of regions generated by the tool that I didnt update manually much.
:o those images look wonderful.

tomchk
Posts: 1294
Joined: Mon, 26. Jan 15, 19:55
x4

Re: New Tool: Region Generator (pseudo-random and controllable fogs, asteroids, nebulae, and resources)

Post by tomchk » Fri, 21. Jan 22, 23:33

pesadelo wrote:
Fri, 21. Jan 22, 18:30
:o those images look wonderful.
Thank you both! The main reason I did this in Blender is it comes with some great random spline generating, and I was provided code for exporting those to X4/XR format. I'm not sure if those images used them, but I think the splines are pretty cool. :)
Care to see what I've been creating? https://www.youtube.com/user/ytubrute

Post Reply

Return to “X4: Foundations - Scripts and Modding”