[MOD] Random Galaxy Tool - Second Realignment

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

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

General Vash
Posts: 24
Joined: Thu, 30. Jan 20, 05:13
x4

[MOD] Random Galaxy Tool - Second Realignment

Post by General Vash » Sat, 4. Dec 21, 23:00

The Second Realignment
This mod/tool creates a random galaxy for the denizens of the X-Universe to inhabit and squabble over. Welcome to a realm of infinite probabilities!

Features
Choose the number of sectors in your galaxy!
Choose the factions that exist at game start, and how many sectors they inhabit!
Race-specific fleet compositions - Paranid use fighters and carriers more than destroyers, Argon have a balanced approach, Teladi use numbers to swarm, Split and Terran use mostly destroyers with supporting vessels. Please give feedback about fleet composition!
War economy at game start - I attempted to give factions an economy that was well-suited to constant production of warships. Please give me feedback about the economy!

Requirements
This mod was tested originally for the vanilla game version 4.x using both DLCs at the time - Split Vendetta and Crade of Humanity. The DLCs are needed because the soundtracks and sector backdrops are used by the tool and the assets which these macros require will be missing if you don't have the DLC. No other mods are required.

Get started now at the link below:
https://x4-random-galaxy-tool.herokuapp.com/

Please feel free to report any issues you experience with the tool or the mod in this thread, but know that I will respond more quickly if it is reported at the github page for the mod:
https://github.com/nathansmith11170/RandomGalaxyTool

Future Plans (in no particular order)
Mod compatibility: I want to make my mod work well with Dynamic Wars from DeadAir and the Faction Enhancer modules, but there are some issues I am working through.
I want to make factions succeed more often when they start with very few sectors.
I want to make the map generate without isolated islands. If your map generates with isolated clusters, it will have an error preventing the placement of factions. Use the back button and generate another map.
I want to make the fleets used by the factions more successful - I do need feedback from experienced players on this point.

Thanks to all modders on the discord who helped me out, and especially to Celludriel who wrote some of the xml templates and to DeadAir whose expertise was invaluable. Fly safe!

Patch 3 - 1 Jan 2022
Fixed quotas for carrier jobs - galaxy quota defaults to 0 so no carriers were being built
Fixed loadouts for military jobs - loadout wasn't being set and was defaulting to parameters.xml which is low quality for military ships

Patch 2 - 27 Dec 2021
Added scout jobs for enabled factions.
Prevented tool from generating disconnected islands.
Fixed preview to be the right way up so it matches what is in the game.

Patch 1 - 19 Dec 2021:
Reduced freighter count across the board to give shipyards and wharfs more time to build military ships - previously was overproducing freighters
Doubled hull part production modules in starting stations for universal type factions (non-Xen, non-Ter)
Removed food and medical supplies production from game start - AI will build these modules themselves to improve their baseline production capabilities, but it is more important to have increased ship construction
Tuned low cluster-count economy to focus on station construction materials, set minimum cluster count to 2 for all factions other than Xenon. (Xenon starting at 1 cluster can keep pace with Argon at 12 clusters)
Added long-range energy cell transport jobs to all factions
Reduced spawning of resource zones so that nearly every sector doesn't have every raw resource. Also helps with over-doing it on the fog regions
Added mass traffic back in
Locked Xenon relations to -0.10 to player, which should be hostile. Previously was -0.03 which was -14 in game.
Last edited by General Vash on Sun, 2. Jan 22, 03:35, edited 13 times in total.

shovelmonkey
Posts: 152
Joined: Wed, 29. Feb 12, 17:34
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by shovelmonkey » Sun, 5. Dec 21, 11:15

Impressive work!
“Not even once has life or the weather complained about a human being.”
― Mokokoma Mokhonoana

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by kuertee » Sun, 5. Dec 21, 18:29

nice!
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kmunoz
Posts: 444
Joined: Sun, 25. Feb 07, 19:59
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by kmunoz » Sun, 5. Dec 21, 19:41

This is incredible.
Let's Play Poorly! - Suboptimal X4 Playthroughs

gmargaro
Posts: 38
Joined: Tue, 3. Jun 08, 19:34
xr

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by gmargaro » Mon, 6. Dec 21, 14:52

Hi,

Very impressive.

Do you think this could be compatible with mods that heavily change/add ships (SWI, VRO, ...)

General Vash
Posts: 24
Joined: Thu, 30. Jan 20, 05:13
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by General Vash » Tue, 7. Dec 21, 00:24

I've got to test with VRO still, at the moment I'm working on faction enhancers and dynamic wars compatibility. If you do try VRO let me know if there are any problems. I can't promise a particular timeline, but I enjoy using VRO so eventually I'll probably straighten any problems out.

gmargaro
Posts: 38
Joined: Tue, 3. Jun 08, 19:34
xr

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by gmargaro » Tue, 7. Dec 21, 12:54

Seems to work with SWI, but i haven't gone very far in game.

One point that intrigues me : The Xenon reputation seems to be locked at -14, with SWI or vanilla.
Perhaps it's related to another mod, or is it normal ?

List of mods in my current "Vanilla" Play :

https://steamcommunity.com/sharedfiles/ ... 2675793629
https://steamcommunity.com/sharedfiles/ ... 2675794091
https://steamcommunity.com/sharedfiles/ ... 2675794429

I know, it's a lot of mods...

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

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by Shuulo » Tue, 7. Dec 21, 13:28

gmargaro wrote:
Tue, 7. Dec 21, 12:54
Seems to work with SWI, but i haven't gone very far in game.
Trust me, it will have balancing issues with SWI, including the absence of Galactic Empire :)

The tool on the other hand is very very cool and should work with VRO in general

gmargaro
Posts: 38
Joined: Tue, 3. Jun 08, 19:34
xr

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by gmargaro » Tue, 7. Dec 21, 13:40

Shuulo wrote:
Tue, 7. Dec 21, 13:28
Trust me, it will have balancing issues with SWI, including the absence of Galactic Empire :)
I know, but it's cool to have a random map with SW ships :)

For now, I test it with "Vanilla+'" (IE no ship mods)

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by kuertee » Tue, 7. Dec 21, 13:53

gmargaro wrote:
Tue, 7. Dec 21, 12:54
One point that intrigues me : The Xenon reputation seems to be locked at -14, with SWI or vanilla.
Perhaps it's related to another mod, or is it normal ?
some factions are locked at a negative value by default in the base game.
some mods remove that lock.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

gmargaro
Posts: 38
Joined: Tue, 3. Jun 08, 19:34
xr

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by gmargaro » Tue, 7. Dec 21, 13:57

kuertee wrote:
Tue, 7. Dec 21, 13:53
some factions are locked at a negative value by default in the base game.
some mods remove that lock.
Yes, but when I Kill Xenons the reputation doesn't drop... It stays at -14

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by alexalsp » Tue, 7. Dec 21, 14:39

I don’t understand why to make a tool originally sharpened for other mods. We must first make an instrument for a vanilla game, and then try to make Wishlist.
But you know better.

:wink:

gmargaro
Posts: 38
Joined: Tue, 3. Jun 08, 19:34
xr

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by gmargaro » Tue, 7. Dec 21, 16:39

Hello,

Just one thing, there can be multiple sectors with the same name.
For example, in my game, I have 2 "Tharka's ravine" sectors.

extract from libraries\mapdefault :

Code: Select all

................................................................
 <dataset macro="x4sr_cluster5_12_macro">
    <properties>
      <identification name="Tharka's Ravine" description="This system was first explored by the Split Patriarch Tharka, whose family were venturing into the unknown after the Argon Federation denied them access to the Boron territories. Tharka was once a powerful family, but conflicts with Patriarch Rhonkar and dwindling resources pushed them further and further into remote space. They were driven by the need to locate and settle planets rich in resources in order to repair their standing.

Tharka's Ravine represents the furthest family Tharka have come in their ambitious pursuit. However, the further they travelled, the more vulnerable they made themselves, and trailblazers can only endeavour so far before coming into contact with Xenon fleets. The Gate Shutdown only accelerated the decline of the Tharka family when they found themselves stretched thin, cut off from any outside aid, and trapped with a Xenon presence." />
      <sounds>
        <music ref="music_cluster_antigone_memorial" />
      </sounds>
      <area sunlight="1.88" economy="0.5" security="0.5" />
    </properties>
  </dataset>
  <dataset macro="x4sr_cluster5_12_sector001_macro">
    <properties>
      <identification name="Tharka's Ravine" description="This system was first explored by the Split Patriarch Tharka, whose family were venturing into the unknown after the Argon Federation denied them access to the Boron territories. Tharka was once a powerful family, but conflicts with Patriarch Rhonkar and dwindling resources pushed them further and further into remote space. They were driven by the need to locate and settle planets rich in resources in order to repair their standing.

Tharka's Ravine represents the furthest family Tharka have come in their ambitious pursuit. However, the further they travelled, the more vulnerable they made themselves, and trailblazers can only endeavour so far before coming into contact with Xenon fleets. The Gate Shutdown only accelerated the decline of the Tharka family when they found themselves stretched thin, cut off from any outside aid, and trapped with a Xenon presence." />
    </properties>
  </dataset>
  ..................................................................................
  <dataset macro="x4sr_cluster11_0_sector001_macro">
    <properties>
      <identification name="Tharka's Ravine" description="The Split, Tharka, spent many years trapped in this sector during a prolonged campaign against the Boron. After the gate shutdown, this sector was thought to be lost." />
    </properties>
  </dataset>
  <dataset macro="x4sr_cluster3_2_macro">
    <properties>
      <identification name="Farnham's Legend" description="The stars may have never been meant for humanity, but humanity isn't very good at following directions." />
      <sounds>
        <music ref="music_dlc_terran_soundtrack_earth" />
      </sounds>
      <area sunlight="0.03" economy="0.5" security="0.5" />
    </properties>
  </dataset>
  ...................................................................................

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

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by Shuulo » Tue, 7. Dec 21, 18:07

alexalsp wrote:
Tue, 7. Dec 21, 14:39
I don’t understand why to make a tool originally sharpened for other mods. We must first make an instrument for a vanilla game, and then try to make Wishlist.
But you know better.

:wink:
it seems to be for vanilla though, it just works for some mods out of the box

Newinger
Posts: 249
Joined: Mon, 11. Mar 19, 11:18
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by Newinger » Wed, 8. Dec 21, 16:11

Awesome idea!

How do the sectors look visually?

General Vash
Posts: 24
Joined: Thu, 30. Jan 20, 05:13
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by General Vash » Fri, 10. Dec 21, 15:35

alexalsp wrote:
Tue, 7. Dec 21, 14:39
I don’t understand why to make a tool originally sharpened for other mods. We must first make an instrument for a vanilla game, and then try to make Wishlist.
But you know better.

:wink:
I did design it to work for vanilla first, but as Shuulo observed it also works with some of my most often used mods just because I got lucky, so I thought I'd mention them as already tested. And while I was at it, I figured I might as well mention the ones I wish to make compatible.
Newinger wrote:
Wed, 8. Dec 21, 16:11
Awesome idea!

How do the sectors look visually?
I took the backdrops from vanilla and assigned them randomly with one of the sector soundtracks from vanilla, also randomly assigned. Except for Sol, which I made sure had Earth as a background. The fog and asteroid belts are taken from DeadAir Gate Overhaul, but I switched the fog regions for volumetric fog because the volumetric fog performs better, and I changed the color to a standard hazy fog rather than the resource-specific colors that DeadAir was going for. The reason I used his region definitions is that they have boundaries to prevent them from stretching infinitely into the distance, so the game loads up faster (I was having load times of 15 minutes using vanilla region definitions).
One thing I have noticed is that some sectors will have similarities due to the resource region placements. So, the same asteroid belt might show up multiple times. But, you probably wouldn't have noticed if I hadn't mentioned it here.

General Vash
Posts: 24
Joined: Thu, 30. Jan 20, 05:13
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by General Vash » Fri, 10. Dec 21, 15:52

gmargaro wrote:
Tue, 7. Dec 21, 16:39
Hello,

Just one thing, there can be multiple sectors with the same name.
For example, in my game, I have 2 "Tharka's ravine" sectors.
Nice catch, that's actually an issue which was probably unique to Tharka's Ravine - I had that one twice in my dictionary of sector names. Should be fixed.

spccasey
Posts: 37
Joined: Thu, 16. Aug 12, 18:37
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by spccasey » Tue, 14. Dec 21, 23:22

Any plans to allow us to decide the percentage of the universe is populated by pirates and unknown aliens?

User avatar
Tanvaras
Posts: 170
Joined: Thu, 27. Nov 03, 10:45
x4

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by Tanvaras » Wed, 15. Dec 21, 00:16

WoW, just WoW! - "You are a Steely Eyed Missile Man"

This is something Egosoft need to add into the game as an option when creating a new game, and credit you in some big shining Billboard on a station!
“We don't make mistakes, just happy little accidents.”
“Talent is a pursued interest"
“Let's get crazy.”
“There's nothing wrong with having a tree as a friend.”

Bob Ross, 29 October 1942 - 4 July 1995

Jaskan
Posts: 192
Joined: Fri, 31. Jan 20, 10:42

Re: [MOD] Random Galaxy Tool - Second Realignment

Post by Jaskan » Wed, 15. Dec 21, 22:15

When is this going to be compatible with dynamic wars ?

Better yet you could give us Christmas present by updating the Extension Options of Dynamic wars to include all factions.

Currently dynamic wars does not include faction relation settings for Xenon, Khak, Yak and others would be great to add such feature to your mod.
I find the faction relations the most useful part of dynamic wars, but its shame xenon etc are not in there.

And very unfortunately DeadAir has retired from x4 moding, Are you kind enough to continue Dynamic Wars .

I hope egosoft realise moders like yourself and Deadair contribute to the sales of X4, cause i wount touch this incomplete game without DynbamicWars for example.

Thanks for the contribution

Post Reply

Return to “X4: Foundations - Scripts and Modding”